<%@ Page Language="C#" MasterPageFile="~/MasterPages/Main.master" AutoEventWireup="true" CodeFile="CSBilling.aspx.cs" Inherits="CSBilling" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <!-- DataTables -->
    <link rel="stylesheet" href="../plugins/datatables-bs4/css/dataTables.bootstrap4.min.css">
	<link rel="stylesheet" href="../plugins/datatables-responsive/css/responsive.bootstrap4.min.css">
	<link rel="stylesheet" href="../plugins/datatables-buttons/css/buttons.bootstrap4.min.css">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
            <div class="content-wrapper">
                <!-- Content Header (Page header) -->
                <section class="content-header">
                    <div class="container-fluid">
                        <div class="row mb-2">
                            <div class="col-sm-6">
                                <h1>Card Scheme Billing</h1>
                            </div>
                            <div class="col-sm-6">
                                <ol class="breadcrumb float-sm-right">
                                    <li class="breadcrumb-item"><a href="#">Home</a></li>
                                    <li class="breadcrumb-item active">Settlement and Posting</li>
                                    <li class="breadcrumb-item active">Card Scheme Billing</li>
                                </ol>
                            </div>
                        </div>
                    </div>
                    <!-- /.container-fluid -->
                </section>

                <section class="content">
                    <div class="container-fluid">
                        <div class="card card-warning">
                            <div class="card-body">
                                <div class="row">
                                    <div class="col-sm-3">
                                        <div class="form-group">
                                            <label>Card Scheme</label>
                                            <asp:DropDownList ID="ddlCScheme" runat="server" DataTextField="product_name" DataValueField="product_name" class="form-control select2" AutoPostBack="true" OnSelectedIndexChanged="ddlCScheme_SelectedIndexChanged">
                                            </asp:DropDownList>
                                        </div>
                                        <asp:TextBox ID="txtproductid" runat="server" Visible="false" class="form-control"></asp:TextBox>
                                        <asp:TextBox ID="txtfilentype" runat="server" Visible="false" class="form-control"></asp:TextBox>
                                        <asp:TextBox ID="txtjobname" runat="server" Visible="false" class="form-control"></asp:TextBox>
                                    </div>
                                    <div class="col-sm-2">
                                        <div class="form-group">
                                            <label>Date</label>
                                            <div class="input-group date" id="scsdate" data-target-input="nearest">
                                                <asp:TextBox ID="txtscsdate" data-target="#scsdate" runat="server" AutoPostBack="true" OnTextChanged="txtscsdate_TextChanged" class="form-control datetimepicker-input"></asp:TextBox>
                                                <div class="input-group-append" data-target="#scsdate" data-toggle="datetimepicker">
                                                    <div class="input-group-text"><i class="fa fa-calendar"></i></div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-2">
                                        <div class="form-group">
                                            <label>&nbsp;</label><br />
                                            <asp:Button ID="btnSearch" runat="server" Text="Search" class="btn btn-secondary btn-l" OnClick="btnSearch_Click" OnClientClick="$('#cover-spin').show();"/>&nbsp; 
                                            <asp:Button ID="btnReset" runat="server" Text="Reset" class="btn btn-info btn-l" OnClick="btnReset_Click" OnClientClick="$('#cover-spin').show();"/> 
                                        </div>
                                    </div>
                                    <div id="fileupload" class="col-sm-4" style="margin-left: -1%" runat="server" visible="false">
                                        <div class="form-group">
                                            <label><asp:Label ID="Lbl_FileName" runat="server" ></asp:Label></label><br />
                                            <asp:FileUpload ID="FileUpload1" runat="server" CssClass="form-control" ClientIDMode="Static" />
                                        </div>
                                    </div>
                                    <div class="col-sm-1">
                                        <div class="form-group">
                                            <label>&nbsp;</label><br />
                                            <asp:Button ID="btnUpload" runat="server" Text="Load File" class="btn btn-primary btn-l" OnClick="btnUpload_Click" OnClientClick="$('#cover-spin').show();" visible="false" />
                                        </div>
                                    </div>
                                    <asp:Label ID="LblFLStatus" runat="server" Visible="false"></asp:Label>
                                </div>
                            </div>
                        </div>

                        <%--<asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>--%>

                        <div id="FLSResults" class="card card-info color-palette-box" runat="server" visible="false">
                            <div class="card-header">
                                <h3 class="card-title">
                                    <i class="fas fa-tag"></i>
                                    <b>File Loading Summary Results</b>
                                </h3>
                                <div class="card-tools">
                                    <button type="button" class="btn btn-tool" data-card-widget="collapse" title="Collapse">
                                        <i class="fas fa-minus"></i>
                                    </button>
                                </div>
                            </div>
                            <div class="card-body">
                                <asp:GridView ID="GV_FileLS" class="table table-striped table-bordered table-sm" runat="server" AutoGenerateColumns="False" OnRowCommand="GV_FileLS_RowCommand" OnRowCreated="GV_FileLS_RowCreated" OnRowDataBound="GV_FileLS_RowDataBound" OnPreRender="GV_FileLS_PreRender" DataKeyNames="record_date" EmptyDataText="There are no results">
                                    <Columns>
                                        <asp:BoundField DataField="file_id" HeaderText="File&nbsp;Name" />
                                        <asp:BoundField DataField="file_number" HeaderText="File&nbsp;Number" />
                                        <asp:BoundField DataField="record_date" HeaderText="Record&nbsp;Date" />
                                        <asp:BoundField DataField="proc_start_time" HeaderText="Start&nbsp;Time" />
                                        <asp:BoundField DataField="proc_end_time" HeaderText="End&nbsp;Time" />
                                        <asp:BoundField DataField="processing_status" HeaderText="Status" />
                                        <asp:BoundField DataField="records_loaded" HeaderText="Records&nbsp;Loaded" />
                                        <asp:BoundField DataField="records_rejected" HeaderText="Records Rejected" />
                                        <asp:BoundField DataField="total_records" HeaderText="Total&nbsp;Records" />
                                        <asp:TemplateField HeaderText="Actions" Visible="true">
                                            <ItemTemplate>
                                                <button type="button" class="btn btn-default btn-block btn-xs dropdown-toggle" data-toggle="dropdown">
                                                    Action
                                                </button>
                                                <div class="dropdown-menu">
                                                    <a class="dropdown-item" href="#">
                                                        <asp:Button ID="btn_breakdown" CssClass="btn btn-outline-info btn-block btn-sm" runat="server" Text="View Breakdown" CommandName="vb" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>" />
                                                        <asp:Button ID="btn_summary" CssClass="btn btn-outline-info btn-block btn-sm" runat="server" Text="Summary" CommandName="v" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>" />
                                                        <asp:Button ID="btn_details" CssClass="btn btn-outline-secondary btn-block btn-sm" runat="server" Text="Details" CommandName="d" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>" />
                                                    </a>
                                                </div>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                </asp:GridView>
                                <asp:TextBox ID="txtfilenumber" runat="server" Visible="false" class="form-control"></asp:TextBox>
                            </div>
                            <!-- /.card-body -->
                        </div>

                        <%--</ContentTemplate></asp:UpdatePanel>--%>

                        <div id="BreakdownFR" class="card card-info color-palette-box" runat="server" visible="false">
                            <div class="card-header">
                                <h3 class="card-title">
                                    <i class="fas fa-tag"></i>
                                    <b>Visa Quard Breakdown File Results</b>
                                </h3>
                                <div class="card-tools">
                                    <button type="button" class="btn btn-tool" data-card-widget="collapse" title="Collapse">
                                        <i class="fas fa-minus"></i>
                                    </button>
                                </div>
                            </div>
                            <div class="card-body">
                                <asp:GridView ID="GV_BFileLS" class="table table-striped table-bordered table-sm" runat="server" AutoGenerateColumns="False" DataKeyNames="FILE_NUMBER" EmptyDataText="There are no results" OnRowDataBound="GV_BFileLS_RowDataBound" OnPreRender="GV_BFileLS_PreRender">
                                    <Columns>
                                        <asp:BoundField DataField="RECORD_DATE" HeaderText="Record&nbsp;Date" />
                                        <asp:BoundField DataField="FILE_NUMBER" HeaderText="File&nbsp;Number" />
                                        <asp:BoundField DataField="CARD_SERVICE_DESC" HeaderText="Cards&nbsp;Service&nbsp;Desc" />
                                        <asp:BoundField DataField="CARD_TYPE_1" HeaderText="Credit&nbsp;Card" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Right" />
                                        <asp:BoundField DataField="CARD_TYPE_2" HeaderText="Debit&nbsp;Card" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Right" />
                                        <asp:BoundField DataField="CARD_TYPE_3" HeaderText="Travel&nbsp;Card" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Right" />
                                        <asp:BoundField DataField="CARD_TYPE_4" HeaderText="Shopping&nbsp;Card" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Right" />
                                        <asp:BoundField DataField="TOTAL_AMOUNT" HeaderText="Total&nbsp;Amount" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Right" />
                                        <asp:BoundField DataField="SOURCES" HeaderText="Sources" />
                                    </Columns>
                                </asp:GridView>
                                <div class="col-12" style="text-align: center; margin-top: 2%" margin-bottom: 1%">
                                    <asp:Button ID="btnProcess" runat="server" Text="Process" Enabled="false" class="btn btn-primary btn-l" OnClick="btnProcess_Click" />
                                </div>
                                <asp:Label ID="LblQBFProcess" runat="server" Visible="false"></asp:Label>
                            </div>
                            <!-- /.card-body -->
                        </div>

                        <!-- pnlSettlements -->
                        <asp:Panel ID="pnlSettlements" runat="server" Width="100%" Visible="false">
                            <div class="card card-info color-palette-box">
                                <div class="card-header">
                                    <h3 class="card-title">
                                        <i class="fas fa-tag"></i>
                                        <b>Settlements</b>
                                        <asp:Label ID="LblLSettlements" runat="server" Visible="false" />
                                    </h3>

                                    <div class="card-tools">
                                        <button type="button" class="btn btn-tool" data-card-widget="collapse" title="Collapse">
                                            <i class="fas fa-minus"></i>
                                        </button>
                                    </div>
                                </div>
                                <div class="card-body">
                                    <ul class="nav nav-tabs mb-3" id="myTab" role="tablist">
                                        <li class="nav-item">
                                            <a class="nav-link active" id="usd-tab" data-toggle="tab" href="#usd" role="tab" aria-controls="usd" aria-selected="true">USD Settlements</a>
                                        </li>
                                        <li class="nav-item">
                                            <a class="nav-link" id="sar-tab" data-toggle="tab" href="#sar" role="tab" aria-controls="sar" aria-selected="false">SAR Settlements</a>
                                        </li>
                                    </ul>
                                    <div class="tab-content" id="myTabContent">
                                        <div class="tab-pane fade show active" id="usd" role="tabpanel" aria-labelledby="usd-tab">
                                            <asp:Label ID="LblFileNumber" runat="server" Visible="false" />
                                            <asp:Label ID="LblQBFNumber" runat="server" Visible="false" />
                                            <div class="col-sm-12">
                                                <div class="form-group">
                                                <label>Net Settlement USD Amount</label>&nbsp;: &nbsp;<asp:Label ID="lblNetTotal_USD" runat="server" />
                                                </div>
                                            </div>
                                            
                                            <asp:GridView ID="GV_Settlements_USD" class="table table-striped table-bordered table-sm" runat="server" AutoGenerateColumns="False" EmptyDataText="There are no results">
                                                <Columns>
                                                    <asp:BoundField DataField="CARD_TYPE" HeaderText="Card&nbsp;Type" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left"/>
                                                    <asp:BoundField DataField="ATM_USD_AMOUNT" dataformatstring="{0:N2}" HeaderText="ATM&nbsp;USD&nbsp;Amount" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Right"/>
                                                    <asp:BoundField DataField="POS_USD_AMOUNT" dataformatstring="{0:N2}" HeaderText="POS&nbsp;USD&nbsp;Amount" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Right"/>
                                                    <asp:BoundField DataField="GENERAL_USD_AMOUNT" dataformatstring="{0:N2}" HeaderText="General&nbsp;USD&nbsp;Amount" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Right"/>
                                                    <asp:BoundField DataField="TOTAL" dataformatstring="{0:N2}" HeaderText="Total" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Right"/>
                                                </Columns>
                                            </asp:GridView>
                                        </div>

                                        <div class="tab-pane fade" id="sar" role="tabpanel" aria-labelledby="sar-tab">
                                            <div class="col-sm-12">
                                                <div class="form-group">
                                                    <span id="SA_RRate" runat="server"><label>Currency Rate</label>&nbsp;: &nbsp;<asp:Label ID="Lbl_SARRate" runat="server" />&nbsp;&nbsp;&nbsp;|&nbsp;</span>
                                                    <span id="VB_Amount" runat="server"><label>Visa Billing SAR Amount</label>&nbsp;: &nbsp;<asp:Label ID="Lbl_VBAmount" runat="server" />&nbsp;&nbsp;&nbsp;|&nbsp;</span>
                                                    <span id="SAR_NTotal" runat="server"><label>Net Settlement SAR Amount</label>&nbsp;: &nbsp;<asp:Label ID="lblNetTotal_SAR" runat="server" />&nbsp;&nbsp;</span>
                                                    <asp:Button ID="btnGenerate" runat="server" Text="Generate" class="btn btn-primary btn-l" OnClick="btnGenerate_Click" OnClientClick="$('#cover-spin').show();"/> 
                                                </div>
                                            </div>

                                            <asp:GridView ID="GV_Settlements_SAR" class="table table-striped table-bordered table-sm" runat="server" AutoGenerateColumns="False" EmptyDataText="There are no results">
                                                <Columns>
                                                    <asp:BoundField DataField="CARD_TYPE" HeaderText="Card&nbsp;Type" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left"/>
                                                    <asp:BoundField DataField="ATM_SAR_AMOUNT" dataformatstring="{0:N2}" HeaderText="ATM&nbsp;SAR&nbsp;Amount" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Right"/>
                                                    <asp:BoundField DataField="POS_SAR_AMOUNT" dataformatstring="{0:N2}" HeaderText="POS&nbsp;SAR&nbsp;Amount" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Right"/>
                                                    <asp:BoundField DataField="GENERAL_SAR_AMOUNT" dataformatstring="{0:N2}" HeaderText="General&nbsp;SAR&nbsp;Amount" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Right"/>
                                                    <asp:BoundField DataField="TOTAL" dataformatstring="{0:N2}" HeaderText="Total" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Right"/>
                                                </Columns>
                                            </asp:GridView>
                                        </div>
                                    </div>
                                </div>
                                <!-- /.card-body -->
                            </div>
                        </asp:Panel>

                        <!-- pnlControls -->
                        <div class="row">
                            <div class="modal fade" id="pnlfdetails-modal-xl">
                                <div class="modal-dialog modal-xl" style="max-width: max-content;">
                                    <div class="modal-content">
                                        <div class="modal-header">
                                            <h4 class="modal-title">File Summary Results</h4>
                                            <asp:Label ID="lblpnlControls" runat="server" Visible="false"></asp:Label>
                                            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                                <span aria-hidden="true">&times;</span>
                                            </button>
                                        </div>
                                        <div class="modal-body">
                                            <div class="row card-body">
                                                <div class="col-sm-4">
                                                    <label>File ID</label>
                                                    <div class="form-group">
                                                        <asp:Label ID="Label1" runat="server"></asp:Label>
                                                    </div>
                                                </div>
                                                <div class="col-sm-4">
                                                    <label>File Number</label>
                                                    <div class="form-group">
                                                        <asp:Label ID="Label2" runat="server"></asp:Label>
                                                    </div>
                                                </div>
                                                <div class="col-sm-4">
                                                    <label>Record Date</label>
                                                    <div class="form-group">
                                                        <asp:Label ID="Label3" runat="server"></asp:Label>
                                                    </div>
                                                </div>
                                                <div class="col-sm-4">
                                                    <label>Process Start Time</label>
                                                    <div class="form-group">
                                                        <asp:Label ID="Label4" runat="server"></asp:Label>
                                                    </div>
                                                </div>
                                                <div class="col-sm-4">
                                                    <label>Process End Time</label>
                                                    <div class="form-group">
                                                        <asp:Label ID="Label5" runat="server"></asp:Label>
                                                    </div>
                                                </div>
                                                <div class="col-sm-4">
                                                    <label>Status</label>
                                                    <div class="form-group">
                                                        <asp:Label ID="Label6" runat="server"></asp:Label>
                                                    </div>
                                                </div>
                                                <div class="col-sm-4">
                                                    <label>Records Loaded</label>
                                                    <div class="form-group">
                                                        <asp:Label ID="Label7" runat="server"></asp:Label>
                                                    </div>
                                                </div>
                                                <div class="col-sm-4">
                                                    <label>Records Rejected</label>
                                                    <div class="form-group">
                                                        <asp:Label ID="Label8" runat="server"></asp:Label>
                                                    </div>
                                                </div>
                                                <div class="col-sm-4">
                                                    <label>Total Records</label>
                                                    <div class="form-group">
                                                        <asp:Label ID="Label9" runat="server"></asp:Label>
                                                    </div>
                                                </div>

                                                <%--<div class="col-sm-12">
                                                    <asp:GridView ID="GridView2" class="table table-bordered table-hover" runat="server" AutoGenerateColumns="False" EmptyDataText="There are no results">
                                                        <Columns>
                                                            <asp:BoundField DataField="channel_name" HeaderText="Channel Name" />
                                                            <asp:BoundField DataField="mresult" HeaderText="Match Result" />
                                                        </Columns>
                                                    </asp:GridView>
                                                </div>--%>

                                                <%--</section> --%><!-- End: pnlClaim -->
                                            </div>
                                        </div>
                                        <div class="modal-footer justify-content-between">
                                            <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                                        </div>
                                    </div>
                                    <!-- /.modal-content -->
                                </div>
                                <!-- /.modal-dialog -->
                            </div>
                            <!-- /.modal -->
                        </div>

                        <!-- UR-Confirmation-modal -->
                        <div class="row">
                            <div id="UR-confirmation-modal-xl" class="modal fade modal-full" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
                                <button aria-label="" type="button" class="close px-2" data-dismiss="modal" aria-hidden="true">
                                    <span aria-hidden="true">×</span>
                                </button>
                                <div class="modal-dialog modal-dialog-centered" role="document">
                                    <div class="modal-content">
                                        <div class="modal-body text-center">
                                            <table border="0" width="100%" cellpadding="0" cellspacing="0" class="add_ItemTB">
                                                <tr>
                                                    <td colspan="2" class="tdNormal" align="center">
                                                        <asp:Label ID="Lbl_URC_Message" runat="server"></asp:Label>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="2" class="tdNormal">&nbsp;</td>
                                                </tr>
                                                <tr>
                                                    <td colspan="2" class="tdNormal" align="center">
                                                        <asp:Button ID="btn_URConfirm_OK" runat="server" Text="Yes" CssClass="btn btn-primary" OnClick="btn_URConfirm_OK_Click" OnClientClick="$('#cover-spin').show();" />
                                                        <button type="button" class="btn btn-primary" data-dismiss="modal">No</button>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>
                </section>
            </div>

         <!-- Toastr -->
            <!-- jQuery -->
            <script src="../plugins/jquery/jquery.min.js"></script>
            <!-- Bootstrap 4 -->
            <script src="../plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
            <!-- SweetAlert2 -->
            <script src="../plugins/sweetalert2/sweetalert2.min.js"></script>
            <!-- Toastr -->
            <script src="../plugins/toastr/toastr.min.js"></script>
            <!-- AdminLTE App -->
            <script src=".../dist/js/adminlte.min.js"></script>
            <!-- AdminLTE for demo purposes -->
            <script src="../plugins/datatables-buttons/js/dataTables.buttons.min.js"></script>
            <script src="../plugins/datatables/jquery.dataTables.min.js"></script>
            <script src="../plugins/datatables-bs4/js/dataTables.bootstrap4.min.js"></script>
            <script src="../plugins/datatables-responsive/js/dataTables.responsive.min.js"></script>
            <script src="../plugins/datatables-responsive/js/responsive.bootstrap4.min.js"></script>
            <script src="../plugins/datatables-buttons/js/dataTables.buttons.min.js"></script>
            <script src="../plugins/datatables-buttons/js/buttons.bootstrap4.min.js"></script>
            <script src="../plugins/jszip/jszip.min.js"></script>
            <script src="../plugins/pdfmake/pdfmake.min.js"></script>
            <script src="../plugins/pdfmake/vfs_fonts.js"></script>
            <script src="../plugins/datatables-buttons/js/buttons.html5.min.js"></script>
            <script src="../plugins/datatables-buttons/js/buttons.print.min.js"></script>
            <script src="../plugins/datatables-buttons/js/buttons.colVis.min.js"></script>
            <script src="../plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script>
            <!-- AdminLTE App -->
            <script src="../dist/js/adminlte.min.js"></script>
            <!-- AdminLTE for demo purposes -->
            <script src="../dist/js/demo.js"></script>
            <script src="../plugins/select2/js/select2.full.min.js"></script>
            <!-- Bootstrap4 Duallistbox -->
            <script src="../plugins/bootstrap4-duallistbox/jquery.bootstrap-duallistbox.min.js"></script>
            <!-- InputMask -->
            <script src="../plugins/moment/moment.min.js"></script>
            <script src="../plugins/inputmask/jquery.inputmask.min.js"></script>
            <!-- date-range-picker -->
            <script src="../plugins/daterangepicker/daterangepicker.js"></script>
            <!-- bootstrap color picker -->
            <script src="../plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js"></script>
            <!-- Tempusdominus Bootstrap 4 -->
            <script src="../plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script>
            <!-- Bootstrap Switch -->
            <script src="../plugins/bootstrap-switch/js/bootstrap-switch.min.js"></script>
            <!-- BS-Stepper -->
            <script src="../plugins/bs-stepper/js/bs-stepper.min.js"></script>
            <!-- dropzonejs -->
            <script src="../plugins/dropzone/min/dropzone.min.js"></script>
            <!-- AdminLTE App -->
            <script>

                $(function () {

                    $('#ContentPlaceHolder1_GridView1').DataTable({
                        "responsive": true, "lengthChange": false, "autoWidth": false,
                        "buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"]
                    }).buttons().container().appendTo('#example1_wrapper .col-md-6:eq(0)');

                    //Date picker
                    $('#scsdate').datetimepicker({
                        //format: 'L'
                        format: 'DD-MM-YYYY'
                    });


                    //        $('#ContentPlaceHolder1_GridView1').DataTable({
                    //            "responsive": true, "lengthChange": false, "autoWidth": false,
                    //            "buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"]
                    //        }).buttons().container().appendTo('#example1_wrapper .col-md-6:eq(0)');

                    //        $('#ContentPlaceHolder1_gvChannel').DataTable({
                    //            "responsive": true, "lengthChange": false, "autoWidth": false,
                    //            "buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"]
                    //        }).buttons().container().appendTo('#example1_wrapper .col-md-6:eq(0)');

                    //        $('#ContentPlaceHolder1_gvEJ').DataTable({
                    //            "responsive": true, "lengthChange": false, "autoWidth": false,
                    //            "buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"]
                    //        }).buttons().container().appendTo('#example1_wrapper .col-md-6:eq(0)');
                });

                $(function () {
                    $('#<%= ddlCScheme.ClientID %>' + ',#<%= txtscsdate.ClientID %>').change(function () {
                        $("#cover-spin").show();
                    });

                    //btn_summary.addEventListener("click", function () {
                    //    isDisabled = !isDisabled;
                    //    btn_details.disabled = isDisabled;
                    //});

                    //function enableDet(btn_details) {
                    //    btn_details.disabled = false;
                    //}

                });
            </script>
</asp:Content>