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

<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>Channel Transaction Search</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">Transaction Search</li>
			  <li class="breadcrumb-item active">Channel Transaction Search</li>
			</ol>
		  </div>
		</div>
	  </div><!-- /.container-fluid -->
	</section>
		<!-- /.content-header -->
		<!-- Main content -->
	<section class="content">
	    <div class="container-fluid">
        <div class="card card-warning">
              <%--<div class="card-header">
                <h3 class="card-title">Search Filters</h3>
              </div>--%>
              <!-- /.card-header -->
              <div class="card-body">
                  <div class="row">
                      <%--<div class="col-sm-12">--%>
                          <div class="col-sm-3">
                              <label>Channel</label>
                              <div class="form-group">
                                  <div class="form-group">
                                      <asp:DropDownList ID="ddlChannels" runat="server" class="form-control select" DataTextField="channel_name" DataValueField="rc_code" AutoPostBack="True" OnSelectedIndexChanged="ddlChannels_SelectedIndexChanged">
                                      </asp:DropDownList>
                                  </div>
                              </div>
                          </div>
                          <div class="col-sm-3">
                              <label>Event</label>
                              <div class="form-group">
                                  <asp:DropDownList ID="ddlEvents" runat="server" class="form-control select" DataTextField="evant_name" DataValueField="re_code" AutoPostBack="True" OnSelectedIndexChanged="ddlEvents_SelectedIndexChanged">
                                  </asp:DropDownList>
                              </div>
                          </div>
                          <div class="col-sm-3">
                              <label>Card Number</label>
                              <div class="form-group">
                                  <asp:TextBox ID="txtCardNumber" runat="server" class="form-control" MaxLength="19"></asp:TextBox>
                              </div>
                          </div>
                          <div class="col-sm-3">
                              <label>Reference Number</label>
                              <div class="form-group">
                                  <asp:TextBox ID="txtReferenceNumber" runat="server" class="form-control" MaxLength="19"></asp:TextBox>
                              </div>
                          </div>
                          <%--<div class="col-sm-3">
                              <label>Date (From)</label>
                              <div class="input-group">
                                  <div class="input-group-prepend">
                                      <span class="input-group-text">
                                          <i class="far fa-calendar-alt"></i>
                                      </span>
                                      <asp:TextBox ID="txtsftdate" data-target="#sftdate" runat="server" class="form-control float-right"></asp:TextBox>
                                  </div>
                                  <asp:TextBox ID="picksftdate" runat="server" Visible="false" class="form-control"></asp:TextBox>
                                  <asp:TextBox ID="txtsfdate" runat="server" Visible="false" class="form-control"></asp:TextBox>
                                  <asp:TextBox ID="txtstdate" runat="server" Visible="false" class="form-control"></asp:TextBox>
                              </div>
                          </div>--%>
                          <div class="col-sm-3">
                              <div class="form-group">
                                  <label>Date (From)</label>
                                  <div class="input-group">
                                      <div class="input-group-prepend">
                                          <span class="input-group-text">
                                              <i class="far fa-calendar-alt"></i>
                                          </span>
                                      </div>
                                      <asp:TextBox ID="txtsftdate" data-target="#sftdate" runat="server" class="form-control float-left"></asp:TextBox>
                                  </div>
                                  <asp:TextBox ID="picksftdate" runat="server" Visible="false" class="form-control"></asp:TextBox>
                                  <asp:TextBox ID="txtsfdate" runat="server" Visible="false" class="form-control"></asp:TextBox>
                                  <asp:TextBox ID="txtstdate" runat="server" Visible="false" class="form-control"></asp:TextBox>
                              </div>
                          </div>
                            
                          <div class="col-sm-3">
                              <label>Terminal ID</label>
                              <div class="form-group">
                                  <asp:TextBox ID="txtATM" runat="server" class="form-control" MaxLength="16"></asp:TextBox>
                              </div>
                          </div>
                          <div class="col-sm-3">
                              <label>Issuer</label>
                              <div class="form-group">
                                  <asp:DropDownList ID="ddlIssuer" runat="server" class="form-control select" DataTextField="display" DataValueField="bin">
                                  </asp:DropDownList>
                              </div>
                          </div>
                          <div class="col-sm-3">
                              <label>Acquirer</label>
                              <div class="form-group">
                                  <asp:DropDownList ID="ddlAcquirer" runat="server" class="form-control select" DataTextField="display" DataValueField="bin">
                                  </asp:DropDownList>
                              </div>
                          </div>

                          <div class="col-12" style="text-align:center">
                              <asp:Button ID="btnSearch" runat="server" Text="Search" CssClass="btn btn-primary btn-l" OnClick="btnSearch_Click" />
                              <asp:Button ID="btnClear" runat="server" Text="Clear" CssClass="btn btn-primary btn-l" OnClick="btnClear_Click" CausesValidation="False" />
                          </div>
                    <%--</div>--%>
              </div>
              <!-- /.card-body -->
            </div>
		<!-- Default box -->
		<div id="SR_Channel_Transaction" class="card card-info color-palette-box" visible="false" runat="server">
			<div class="card-header">
				<h3 class="card-title">
                    <i class="fas fa-tag"></i>
                    Channel Transaction Search Results
                </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">
                <div style="width: 100%; display: inline-block; vertical-align: top; overflow-x: auto;">
                    <asp:GridView ID="GridView1" class="table table-striped table-bordered table-sm" runat="server" AutoGenerateColumns="False"
                        DataKeyNames="ct_code" OnRowCommand="GridView1_RowCommand" EmptyDataText="There are no results">
                        <Columns>
                            <asp:BoundField DataField="TRAN_DATE" HeaderText="Txn&nbsp;Date" />
                            <asp:BoundField DataField="TRAN_TIME" HeaderText="Txn&nbsp;Time" />
                            <asp:BoundField DataField="CARD_NUMBER" HeaderText="Card&nbsp;Number" />
                            <asp:BoundField DataField="FINANCIAL_FLAG" HeaderText="Financial&nbsp;Flag" />
                            <asp:BoundField DataField="TERM_ID" HeaderText="Terminal&nbsp;ID" />
                            <asp:BoundField DataField="TRAN_AMOUNT" HeaderText="Amount" />
                            <asp:BoundField DataField="TRAN_CURR" HeaderText="Currency" />
                            <asp:BoundField DataField="SETTL_AMOUNT" HeaderText="Settl&nbsp;Amount" />
                            <asp:BoundField DataField="SETTL_CURR" HeaderText="Settl&nbsp;Currency" />
                            <asp:BoundField DataField="TRAN_SOURCE" HeaderText="Acquirer" />
                            <asp:BoundField DataField="TRAN_DEST" HeaderText="Issuer" />
                            <asp:BoundField DataField="RRN" HeaderText="Reference&nbsp;No" />
                            <asp:BoundField DataField="product" HeaderText="product" />
                            <asp:BoundField DataField="MATCH_RESULT" HeaderText="Match&nbsp;Result" />
                            <asp:BoundField DataField="Pcode_Type" HeaderText="Pcode&nbsp;Type" />
                            <asp:BoundField DataField="ISO_RSP" HeaderText="Response" />
                            <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="Button5" CssClass="btn btn-outline-info btn-block btn-sm" runat="server" Text="View" CommandName="v" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>" /></a>
                                    </div>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                </div>
                <div class="row" style="margin-left: 1%; margin-top: 1%; margin-bottom: 1%">
                    <div style="margin-top:3px;"><asp:Label ID="LGTP" runat="server" Text="Go To Page"></asp:Label>&nbsp;: &nbsp;</div>
                    <asp:DropDownList ID="ddlPages" runat="server" class="form-control select2" AutoPostBack="True" Width="7%" Height="6%" OnSelectedIndexChanged="ddlPages_SelectedIndexChanged"></asp:DropDownList>
                </div>
            </div>
			<!-- /.card-body -->
		</div>
        
        <!-- /.card -->
            <div class="row">
                <div class="modal fade" id="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">Transaction details</h4>
                                <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-3">
                                            <label>Record date</label>
                                            <div class="form-group">
                                                <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-sm-3">
                                            <label>Settlment Date</label>
                                            <div class="form-group">
                                                <asp:Label ID="Label2" runat="server" Text="Label"></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-sm-3">
                                            <label>Transaction date</label>
                                            <div class="form-group">
                                                <asp:Label ID="Label3" runat="server" Text="Label"></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-sm-3">
                                            <label>Transaction time</label>
                                            <div class="form-group">
                                                <asp:Label ID="Label4" runat="server" Text="Label"></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-sm-3">
                                            <label>Card number</label>
                                            <div class="form-group">
                                                <asp:Label ID="Label5" runat="server" Text="Label"></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-sm-3">
                                            <label>ISO response</label>
                                            <div class="form-group">
                                                <asp:Label ID="Label6" runat="server" Text="Label"></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-sm-3">
                                            <label>Terminal ID</label>
                                            <div class="form-group">
                                                <asp:Label ID="Label7" runat="server" Text="Label"></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-sm-3">
                                            <label>Transaction amount</label>
                                            <div class="form-group">
                                                <asp:Label ID="Label8" runat="server" Text="Label"></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-sm-3">
                                            <label>Acquirer</label>
                                            <div class="form-group">
                                                <asp:Label ID="Label9" runat="server" Text="Label"></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-sm-3">
                                            <label>Issuer</label>
                                            <div class="form-group">
                                                <asp:Label ID="Label10" runat="server" Text="Label"></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-sm-3">
                                            <label>Message type</label>
                                            <div class="form-group">
                                                <asp:Label ID="Label11" runat="server" Text="Label"></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-sm-3">
                                            <label>Trace ID</label>
                                            <div class="form-group">
                                                <asp:Label ID="Label12" runat="server" Text="Label"></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-sm-3">
                                            <label>File number</label>
                                            <div class="form-group">
                                                <asp:Label ID="Label13" runat="server" Text="Label"></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-sm-3">
                                            <label>Card brand</label>
                                            <div class="form-group">
                                                <asp:Label ID="Label14" runat="server" Text="Label"></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-sm-3">
                                            <label>Reference number</label>
                                            <div class="form-group">
                                                <asp:Label ID="Label15" runat="server" Text="Label"></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-sm-3">
                                            <label>Card expiry date</label>
                                            <div class="form-group">
                                                <asp:Label ID="Label16" runat="server" Text="Label"></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-sm-3">
                                            <label>Account number</label>
                                            <div class="form-group">
                                                <asp:Label ID="Label17" runat="server" Text="Label"></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-sm-3">
                                            <label>Auth code</label>
                                            <div class="form-group">
                                                <asp:Label ID="Label18" runat="server" Text="Label"></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-sm-3">
                                            <label>Business class</label>
                                            <div class="form-group">
                                                <asp:Label ID="Label19" runat="server" Text="Label"></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-sm-3">
                                            <label>Recon status</label>
                                            <div class="form-group">
                                                <asp:Label ID="Label20" runat="server" Text="Label"></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-sm-3">
                                            <label>Transaction currency</label>
                                            <div class="form-group">
                                                <asp:Label ID="Label21" runat="server" Text="Label"></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-sm-3">
                                            <label>Settlment currency</label>
                                            <div class="form-group">
                                                <asp:Label ID="Label22" runat="server" Text="Label"></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-sm-3">
                                            <label>Settlment amount</label>
                                            <div class="form-group">
                                                <asp:Label ID="Label23" runat="server" Text="Label"></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-sm-3">
                                            <label>Transaction change</label>
                                            <div class="form-group">
                                                <asp:Label ID="Label24" runat="server" Text="Label"></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-sm-3">
                                            <label>Match result</label>
                                            <div class="form-group">
                                                <asp:Label ID="Label25" runat="server" Text="Label"></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-sm-3">
                                            <label>Chip index</label>
                                            <div class="form-group">
                                                <asp:Label ID="Label26" runat="server" Text="Label"></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-sm-3">
                                            <label>Channel name</label>
                                            <div class="form-group">
                                                <asp:Label ID="Label27" runat="server" Text="Label"></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-sm-3">
                                            <label>Event name</label>
                                            <div class="form-group">
                                                <asp:Label ID="Label28" runat="server" Text="Label"></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-sm-3">
                                            <label>PCODE</label>
                                            <div class="form-group">
                                                <asp:Label ID="Label29" runat="server" Text="Label"></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-sm-3">
                                            <label>Financial flag</label>
                                            <div class="form-group">
                                                <asp:Label ID="Label30" runat="server" Text="Label"></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-sm-3">
                                            <label>product</label>
                                            <div class="form-group">
                                                <asp:Label ID="Label31" runat="server" Text="Label"></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-sm-3">
                                            <label>Message reason code</label>
                                            <div class="form-group">
                                                <asp:Label ID="Label32" runat="server" Text="Label"></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-sm-3">
                                            <label>Settlment flag</label>
                                            <div class="form-group">
                                                <asp:Label ID="Label33" runat="server" Text="Label"></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-sm-3">
                                            <label>Claim ID</label>
                                            <div class="form-group">
                                                <asp:Label ID="Label34" runat="server" Text="Label"></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-sm-3">
                                            <label>Equation Value date</label>
                                            <div class="form-group">
                                                <asp:Label ID="lblFinValDate" runat="server" Text=""></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-sm-3">
                                            <label>Equation Posting date</label>
                                            <div class="form-group">
                                                <asp:Label ID="lblFinPostDate" runat="server" Text=""></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-sm-3">
                                            <label>Equation Posting time</label>
                                            <div class="form-group">
                                                <asp:Label ID="lblFinPostTime" runat="server" Text=""></asp:Label>
                                            </div>
                                        </div>
                                        <div class="col-sm-3">
                                            <label>Merchant Name</label>
                                            <div class="form-group">
                                                <asp:Label ID="lblMerchantName" runat="server" Text=""></asp:Label>
                                            </div>
                                        </div>
                                    </div>
                                <!-- /.card-body -->
                            </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>
	</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>
    <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
            $('#reservationdate22').daterangepicker();

	        //Date picker
            $('#sftdate').daterangepicker();
//	        $('#ctl00_ContentPlaceHolder1_reservation').daterangepicker()({
//	            format: 'DD/MM/YYYY - DD/MM/YYYY'
//	        });
	        $('#ctl00_ContentPlaceHolder1_txtsftdate').daterangepicker({
	            locale: {
                    format: 'DD-MM-YYYY'
	            }
            })

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

            $('#stdate').datetimepicker({
                //format: 'L'
                format: 'DD-MM-YYYY'
            });
	        
	        //		    $('#reservationdate').datetimepicker({
	        //		        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)');
	    });
    </script>
</asp:Content>