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

<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>Claim History</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">Claims</li>
			  <li class="breadcrumb-item active">Claim History</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-3" style="display: none">
                        <div class="form-group">
                            <label>Claim Type</label><br />
                            <asp:RadioButton ID="rdATM" AutoPostBack="true" Text="ATM" GroupName="1" runat="server" Checked="true" OnCheckedChanged="rdATM_CheckedChanged" />&nbsp;&nbsp;
                            <asp:RadioButton ID="rdPOS" AutoPostBack="true" Text="POS" GroupName="1" runat="server" OnCheckedChanged="rdPOS_CheckedChanged" />
                        </div>
                    </div>
                    <div class="col-sm-3">
                        <div class="form-group">
                            <label>Claim ID</label>
                            <asp:TextBox ID="txtClaimID" runat="server" class="form-control"></asp:TextBox>
                        </div>
                    </div>
                    <div id="RefNo" class="col-sm-3" runat="server">
                        <div class="form-group">
                            <label>Reference Number</label>
                            <asp:TextBox ID="txtReference" runat="server" class="form-control"></asp:TextBox>
                        </div>
                    </div>
                    <div id="CardNo" class="col-sm-6" runat="server">
                        <div class="form-group">
                            <label>Card Number</label>
                            <asp:TextBox ID="txtCardNumber" runat="server" class="form-control"></asp:TextBox>
                        </div>
                    </div>
                    <div id="ClientNo" class="col-sm-6" runat="server">
                        <div class="form-group">
                            <label>Client Number</label>
                            <asp:TextBox ID="txtClientNo" runat="server" class="form-control"></asp:TextBox>
                        </div>
                    </div>
                    <div id="TerimnalID" class="col-sm-6" runat="server">
                        <div class="form-group">
                            <label>Terminal ID</label>
                            <asp:TextBox ID="txtTermID" runat="server" class="form-control"></asp:TextBox>
                        </div>
                    </div>
                    <div id="RetailerID" class="col-sm-6" runat="server">
                        <div class="form-group">
                            <label>Retailer ID</label>
                            <asp:TextBox ID="txtRetailerID" runat="server" class="form-control"></asp:TextBox>
                        </div>
                    </div>
                    <div class="col-sm-6">
                        <label>Claim Status</label>
                        <div class="form-group">
                            <asp:DropDownList ID="ddlClaimType" runat="server" DataTextField="CLAIM_STATUS_DESC"
                                DataValueField="CL_CODE" class="form-control select" AutoPostBack="False">
                            </asp:DropDownList>
                        </div>
                    </div>
                    <div class="col-sm-6">
                        <div class="form-group">
                            <label>Transaction Date</label>
                            <div class="input-group date" id="trdate" data-target-input="nearest">
                                <asp:TextBox ID="txtstrdate" data-target="#trdate" runat="server" class="form-control datetimepicker-input"></asp:TextBox>
                                <div class="input-group-append" data-target="#trdate" data-toggle="datetimepicker">
                                    <div class="input-group-text"><i class="fa fa-calendar"></i></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-12" style="text-align: center">
                        <asp:Button ID="btnSearch" runat="server" Text="Search" OnClick="btnSearch_Click" CssClass="btn btn-primary btn-l" />
                    </div>
                </div>
            </div>
              <!-- /.card-body -->
            </div>
		<!-- Default box -->
            <div class="card card-info color-palette-box">
                <div class="card-header">
                    <h3 class="card-title">
                        <i class="fas fa-tag"></i>
                        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="min-height: 100px; 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" OnPreRender="GridView1_PreRender" OnRowCreated="GridView1_RowCreated"
                            DataKeyNames="claim_id" OnRowCommand="GridView1_RowCommand" EmptyDataText="There are no results">
                            <Columns>
                                <asp:BoundField DataField="claim_id" HeaderText="Claim&nbsp;ID" />
                                <asp:BoundField DataField="card_number" HeaderText="Card&nbsp;No" />
                                <asp:BoundField DataField="tran_date" HeaderText="Tran&nbsp;Date" />
                                <asp:BoundField DataField="tran_amount" HeaderText="Tran&nbsp;Amount" />
                                <asp:BoundField DataField="rrn" HeaderText="Reference&nbsp;No" />
                                <asp:BoundField DataField="WHO_DID" HeaderText="User" />
                                <asp:BoundField DataField="What_Action" HeaderText="Action" />
                                <asp:BoundField DataField="When_DID" HeaderText="Action&nbsp;Time" />
                                <asp:BoundField DataField="MESSAGE_TEXT" HeaderText="Claim&nbsp;Note" />
                                <asp:BoundField DataField="org_claim_id" HeaderText="Sama Claim&nbsp;ID" />
                                <asp:ButtonField ButtonType="Link" HeaderText="Actions" CommandName="v" Text="Details" ControlStyle-CssClass="btn btn-outline-info btn-block btn-sm" />
                                <asp:BoundField DataField="when_did" HeaderText="when_did" />
                            </Columns>
                        </asp:GridView>
                        <div class="row" style="margin-left: 1%; margin-top: 1%; margin-bottom: 1%">
                            Go To Page&nbsp;: &nbsp;<asp:DropDownList ID="ddlPages" runat="server" class="form-control select2" AutoPostBack="True" Width="100px" Height="30px" OnSelectedIndexChanged="ddlPages_SelectedIndexChanged"></asp:DropDownList>
                        </div>
                    </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="card-body">
                            <div class="row">
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label>Claim ID</label>
                                        <asp:Label ID="lblClaim" runat="server" class="form-control"></asp:Label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label>SAMA Claim ID</label>
                                        <asp:Label ID="lblSamaClaimId" runat="server" class="form-control"></asp:Label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label>Claim Status</label>
                                        <asp:Label ID="lblClaimStatus" runat="server" class="form-control"></asp:Label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label>Event</label>
                                        <asp:Label ID="lblEventCode" runat="server" class="form-control"></asp:Label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label>Last Modified by</label>
                                        <asp:Label ID="lblLastAmendmentDate" runat="server" class="form-control"></asp:Label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label>Card Number</label>
                                        <asp:Label ID="lblCardNo" runat="server" class="form-control"></asp:Label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label>Transaction Date</label>
                                        <asp:Label ID="lblTransactionDate" runat="server" class="form-control"></asp:Label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label>Transaction Time</label>
                                        <asp:Label ID="lblTransactionTime" runat="server" class="form-control"></asp:Label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label>Terminal ID</label>
                                        <asp:Label ID="lblTerminalID" runat="server" class="form-control"></asp:Label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label>Transaction Currency</label>
                                        <asp:Label ID="lblTransactionCurrency" runat="server" class="form-control"></asp:Label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label>Transaction Amount</label>
                                        <asp:Label ID="lblTransactionAmount" runat="server" class="form-control"></asp:Label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label>Process Code</label>
                                        <asp:Label ID="lblProcessCode" runat="server" class="form-control"></asp:Label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label>Trace ID</label>
                                        <asp:Label ID="lblTraceID" runat="server" class="form-control"></asp:Label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label>Authorization Code</label>
                                        <asp:Label ID="lblAuthorizationCode" runat="server" class="form-control"></asp:Label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label>RRN</label>
                                        <asp:Label ID="lbl_RRN" runat="server" class="form-control"></asp:Label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label>Financial Flag</label>
                                        <asp:Label ID="lblFinancialFlag" runat="server" class="form-control"></asp:Label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label>Claim Source</label>
                                        <asp:Label ID="lblClaimSource" runat="server" class="form-control"></asp:Label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label>Claim Type</label>
                                        <asp:Label ID="lblClaimType" runat="server" class="form-control"></asp:Label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label>Claim Currency</label>
                                        <asp:Label ID="lblClaimCurrency" runat="server" class="form-control"></asp:Label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label>Claim Amount</label>
                                        <asp:Label ID="lblClaimAmount" runat="server" class="form-control"></asp:Label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label>Sama File ID</label>
                                        <asp:Label ID="lblSAMAFileID" runat="server" class="form-control"></asp:Label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label>On Us File ID</label>
                                        <asp:Label ID="lblOnUsFileID" runat="server" class="form-control"></asp:Label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label>Issuer Bank</label>
                                        <asp:Label ID="lblIssuerBank" runat="server" class="form-control"></asp:Label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label>Acquirer Bank</label>
                                        <asp:Label ID="lblAcquirerBank" runat="server" class="form-control"></asp:Label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label>Message Text</label>
                                        <asp:Label ID="lblMessageText" runat="server" class="form-control"></asp:Label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label>Note Text</label>
                                        <asp:Label ID="lblNoteText" runat="server" class="form-control"></asp:Label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label>Parent Claim ID</label>
                                        <asp:Label ID="lblParentClaimID" runat="server" class="form-control"></asp:Label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label>Client Number</label>
                                        <asp:Label ID="lblClientNumber" runat="server" class="form-control"></asp:Label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label>SAMA Status</label>
                                        <asp:Label ID="lblSAMAStatus" runat="server" class="form-control"></asp:Label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label>Product</label>
                                        <asp:Label ID="lblProduct" runat="server" class="form-control"></asp:Label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label>To Account</label>
                                        <asp:Label ID="lblToAccount" runat="server" class="form-control"></asp:Label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label>From Account</label>
                                        <asp:Label ID="lblFromAccount" runat="server" class="form-control"></asp:Label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label>New RRN</label>
                                        <asp:Label ID="lblNewRRN" runat="server" class="form-control"></asp:Label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label>Credit Issuer</label>
                                        <asp:Label ID="lblCreditIssuer" runat="server" class="form-control"></asp:Label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label>Credit Acquirer</label>
                                        <asp:Label ID="lblCreditAquirer" runat="server" class="form-control"></asp:Label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label>Debit issuer</label>
                                        <asp:Label ID="lblDebitIssuer" runat="server" class="form-control"></asp:Label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="form-group">
                                        <label>Debit Acquirer</label>
                                        <asp:Label ID="lblDebitAcquirer" runat="server" class="form-control"></asp:Label>
                                    </div>
                                </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
            $('#trdate').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>
