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

<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>
	<!-- Content Wrapper. Contains page content -->
	<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>Search Settlements</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">Search</li>
			  <li class="breadcrumb-item active">Settlement</li>
			</ol>
		  </div>
		</div>
	  </div><!-- /.container-fluid -->
	</section>
		<!-- /.content-header -->
		<!-- Main content -->
	<section class="content">
	    <div class="container-fluid">
		<!-- Default box -->
        <div class="callout callout-warning">
                  <%--<p>- Keep Date field empty to view latest Jobs.<br />- Enter Date to view History Jobs.</p>--%>
                </div>
		<div class="card card-info">
			<div><asp:Label ID="lblError" runat="server" Text=""></asp:Label></div>
			<div class="card-body ">
            
            <div class="row">
			        <div class="col-12">
                    <div class="btn-group btn-group-toggle" data-toggle="buttons">
                </div>
			        </div>
                    </div>
                    <br />
            <div class="row">
                    <div class="col-sm-3">
                      <!-- textarea -->
                      <label>GL Date</label>
                      <div class="input-group date" id="dateform" data-target-input="nearest">
                        
                        <asp:TextBox ID="txtSearchDate" data-target="#dateform" runat="server" class="form-control datetimepicker-input"></asp:TextBox>
                        <div class="input-group-append" data-target="#dateform" data-toggle="datetimepicker">
                            <div class="input-group-text"><i class="fa fa-calendar"></i></div>
                        </div>
                    </div>
                    </div>

                    <div class="col-sm-3">
                    <label> &nbsp;&nbsp;</label><br />
                    <asp:Button ID="Button1" runat="server" Text="     Search     " 
										CssClass="btn btn-primary btn-l" onclick="btnSearch1_Click" />
                      <asp:Button ID="btnGenerate" runat="server" Text="     Generate     " 
										CssClass="btn btn-primary btn-l" onclick="btnSearch_Click" />
                                        <asp:Button ID="btnDownload" runat="server" Text="     Download File     " Visible=false 
										CssClass="btn btn-primary btn-l" onclick="btnDownload_Click" />
                                        <asp:HyperLink ID="HyperLink1" runat="server" Visible=false>DownloadFile</asp:HyperLink>
                    </div>
                  </div>
                  <asp:panel id ="pnlGrid" runat="Server" Visible=true>
                        <asp:GridView ID="GridView1" class="table table-bordered table-hover" BorderStyle="None" BorderWidth="0"
					            GridLines="None" runat="server" AutoGenerateColumns=false DataKeyNames="File_Number"  OnRowCommand="GridView1_RowCommand">
				            <Columns>
					            <asp:BoundField DataField="Record_Date" HeaderText="Date" />
                                <asp:BoundField DataField="File_Number" HeaderText="File Number"/>
					            <asp:BoundField DataField="Proc_Start_Time" HeaderText="Start Time"  />
					            <asp:BoundField DataField="Processing_Status" HeaderText="Status"  />
                                <asp:BoundField DataField="Records_Loaded" HeaderText="Records Generated"  />
                                <%--<asp:BoundField DataField="Records_Rejected" HeaderText="Records Rejected"  />
                                <asp:BoundField DataField="Total_Records" HeaderText="Total Records"  />--%>
                                <asp:ButtonField ButtonType="Link" CommandName="v" Text="View Details"  ControlStyle-CssClass="btn btn-primary btn-sm" />
				            </Columns>
			            </asp:GridView>
                  </asp:panel>

                  <asp:panel id ="pnlDetails" runat="Server" Visible=true>
                        <asp:GridView ID="GridView2" class="table table-bordered table-hover" BorderStyle="None" BorderWidth="0"
					            GridLines="None" runat="server" AutoGenerateColumns=false  >
				            <Columns>
					            <asp:BoundField DataField="tran_date" HeaderText="Date" />
                                <asp:BoundField DataField="tran_time" HeaderText="Time"/>
					            <asp:BoundField DataField="reference_number" HeaderText="RRN"  />
                                <asp:BoundField DataField="transaction_type" HeaderText="Type"  />
                                <asp:BoundField DataField="merchant_id" HeaderText="Merchant"  />
                                <asp:BoundField DataField="merchant_account" HeaderText="Merch Acct"  />
                                <asp:BoundField DataField="terminal_id" HeaderText="Terminal"  />
                                <asp:BoundField DataField="masked_card_no" HeaderText="Card No"  />
                                <asp:BoundField DataField="Transaction_Amount" HeaderText="Amount"  />
                                <asp:BoundField DataField="Walt_Tran_Amount" HeaderText="Digital Amount"  />
                                <asp:BoundField DataField="Product" HeaderText="Product"  />
                                <asp:BoundField DataField="financial_flag" HeaderText="Financial?"  />
                                <asp:BoundField DataField="recon_status" HeaderText="Recon Status"  />
				            </Columns>
			            </asp:GridView>
                  </asp:panel>
                      
                  
                    





            
            <br />
            
                  <br />
                 
            
            
            </div>
					
			<!-- /.card-body -->

            
		</div>
		<!-- /.card -->
		
	</div><!-- /.container-fluid -->
	</section>
		<!-- /.content -->
	</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>
	<!-- 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>
	<!-- /.content-wrapper -->
	<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)');

            $('#reservationdate').datetimepicker({
                //format: 'L'
                format: 'DD/MM/YYYY'
            });

            $('#dateform').datetimepicker({
                //format: 'L'
                format: 'DD/MM/YYYY'
            });
		});
</script>
</asp:Content>
