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

<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>ATM Information</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">Configurations</li>
			  <li class="breadcrumb-item active">ATM Information</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">
                      <div class="form-group">
                        <label>Branch</label>
                        <asp:DropDownList ID="ddlChannels" runat="server" DataTextField="branch_name" 
                                DataValueField="branch_code" class="form-control select2" AutoPostBack="True" 
                            onselectedindexchanged="ddlChannels_SelectedIndexChanged" >
                        </asp:DropDownList>
                        
                      </div>
                    </div>
                    <div class="col-sm-3">
                      <div class="form-group">
                        <label>ATM Type</label>
                        <asp:DropDownList ID="ddlType" runat="server" DataTextField="type_name" DataValueField="type_code" class="form-control select2">
                        </asp:DropDownList>
                        
                      </div>
                    </div>
                    <div class="col-sm-3">
                      <div class="form-group">
                        <label>Terminal</label>
                        <asp:TextBox ID="txtATMnumber" runat="server" class="form-control"  
                                                            MaxLength="16"></asp:TextBox>
                        
                      </div>
                    </div>
                    <div class="col-sm-3">
                    <label>&nbsp;</label><br />
                    <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>
                    <b>Business Rules List</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="GridView1" class="table table-bordered table-hover" runat="server" AutoGenerateColumns="False" OnRowCommand="GridView1_RowCommand" 
            onprerender="GridView1_PreRender" onrowcreated="GridView1_RowCreated" DataKeyNames="atm_number" EmptyDataText="There are no results">
                <Columns>
                       <asp:BoundField DataField="branch_code" HeaderText="Branch code" />
                        <asp:BoundField DataField="atm_number" HeaderText="ATM Number" />
                        <asp:BoundField DataField="term_id" HeaderText="Terminal ID" />
                        <asp:BoundField DataField="type_code" HeaderText="" />
                        <asp:BoundField DataField="atm_type" HeaderText="Type" />
                        <asp:BoundField DataField="overage_acct_number" HeaderText="Overage Acct Number" />
                        <asp:BoundField DataField="shortage_acct_number" HeaderText="Shortage Acct Number" />
                        <asp:BoundField DataField="cash_acct_number" HeaderText="Cash Acct Number" />
                        <asp:BoundField DataField="overage_dep_acct_number" HeaderText="Cash Acct Number" />
                        <asp:BoundField DataField="shortage_dep_acct_number" HeaderText="Cash Acct Number" />
                        <asp:BoundField DataField="cash_dep_acct_number" HeaderText="Cash Acct Number" />
                        <asp:BoundField DataField="modified_by" HeaderText="" />
                        <asp:BoundField DataField="modify_date" HeaderText="" />
                        <asp:BoundField DataField="ATM_GROUP" HeaderText="Group"/>
                    <asp:TemplateField HeaderText="Actions" >
					    <ItemTemplate>
							    <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
							    Action
						    </button>
						    <div class="dropdown-menu">
							    <a class="dropdown-item" href="#"><asp:Button ID="Edit" CssClass="btn btn-outline-info btn-block btn-sm" runat="server" Text="Edit" CommandName="e" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>"/></a>
                                <a class="dropdown-item" href="#"><asp:Button ID="Delete" CssClass="btn btn-outline-info btn-block btn-sm" runat="server" Text="Delete" CommandName="d" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>"/></a>
							    <%--<a class="dropdown-item" href="#"><asp:Button ID="View" CssClass="btn btn-outline-success btn-block btn-sm" runat="server" Text="View" CommandName="v" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>"/></a>--%>
						    </div>
					    </ItemTemplate>
				    </asp:TemplateField>
                    <asp:BoundField DataField="suspense_acct_number" HeaderText="suspense_acct_number" />
                    <asp:BoundField DataField="suspense_dep_acct_number" HeaderText="suspense_acct_number" />

                    <asp:BoundField DataField="overage_usd_acct_number" HeaderText="overage_usd_acct_number" />
                    <asp:BoundField DataField="shortage_usd_acct_number" HeaderText="shortage_usd_acct_number" />
                    <asp:BoundField DataField="cash_usd_acct_number" HeaderText="cash_usd_acct_number" />
                    <asp:BoundField DataField="suspense_usd_acct_number" HeaderText="suspense_usd_acct_number" />
                                                                
                    <asp:BoundField DataField="overage_coin_dep_acct_number" HeaderText="overage_coin_dep_acct_number" />
                    <asp:BoundField DataField="shortage_coin_dep_acct_number" HeaderText="shortage_coin_dep_acct_number" />
                    <asp:BoundField DataField="coin_dep_acct_number" HeaderText="coin_dep_acct_number" />
                    <asp:BoundField DataField="suspense_coin_dep_acct_number" HeaderText="suspense_coin_dep_acct_number" />
                </Columns>
            </asp:GridView>
			<div class="row">
			    Go To Page: <asp:DropDownList ID="ddlPages" runat="server" class="form-control select2" AutoPostBack="True" Width=100px Height=30px onselectedindexchanged="ddlPages_SelectedIndexChanged"></asp:DropDownList>
            </div>
			</div>
			
			<!-- /.card-body -->
		</div>
        <div class="row">
			<div class="modal fade" id="modal-xl">
		   
				<div class="modal-dialog modal-xl">
					<div class="modal-content">
					<div class="modal-header">
						<h4 class="modal-title">BR 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">
							<table border="0" width="80%" cellpadding="0" cellspacing="0" class="add_ItemTB1">
                                                    <tr>
                                                        <td class="tdNormal" style="width:15%">Record Date</td>
                                                        <td class="tdNormal" style="width:30%"><asp:Label ID="lblRecordDate" runat="server" Text=""></asp:Label></td>
                                                        <td class="tdNormal" style="width:10%"></td>
                                                        <td class="tdNormal" style="width:15%"></td>
                                                        <td class="tdNormal" style="width:30%"></td>
                                                    </tr>
                                                    <tr runat="server" id="addrow">
                                                        <td class="tdNormal" style="width:15%">
                                                            Channel</td>
                                                        <td class="tdNormal" style="width:30%">
                                                            <asp:DropDownList ID="ddlChannels0" runat="server" class="fieldNormal" 
                                                                DataTextField="channel_name" DataValueField="rc_code">
                                                            </asp:DropDownList>
                                                        </td>
                                                        <td class="tdNormal" style="width:10%">
                                                            &nbsp;</td>
                                                        <td class="tdNormal" style="width:15%">
                                                            Event</td>
                                                        <td class="tdNormal" style="width:30%">
                                                            <asp:DropDownList ID="ddlEvents0" runat="server" class="fieldNormal" 
                                                                DataTextField="evant_name" DataValueField="re_code">
                                                            </asp:DropDownList>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td class="tdNormal">Cut Off Start</td>
                                                        <td class="tdNormal"><asp:TextBox ID="txtcos" runat="server" class="fieldNormal" onKeypress="return KeyPressFuncIsWholeNumber()"
                                                                MaxLength="8"></asp:TextBox></td>
                                                        <td class="tdNormal"></td>
                                                        <td class="tdNormal">Cut Off End</td>
                                                        <td class="tdNormal"><asp:TextBox ID="txtcoe" runat="server" class="fieldNormal" onKeypress="return KeyPressFuncIsWholeNumber()"
                                                                MaxLength="8"></asp:TextBox></td>
                                                    </tr>
                                                    <tr>
                                                        <td class="tdNormal">Cut off rule</td>
                                                        <td class="tdNormal"><asp:CheckBox ID="CheckBox1" runat="server" class="fieldNormal"/></td>
                                                        <td class="tdNormal"></td>
                                                        <td class="tdNormal">Transaction date</td>
                                                        <td class="tdNormal"><asp:CheckBox ID="CheckBox2" runat="server" class="fieldNormal"/></td>
                                                    </tr>
                                                    <tr>
                                                        <td class="tdNormal">Transaction time</td>
                                                        <td class="tdNormal"><asp:CheckBox ID="CheckBox3" runat="server" class="fieldNormal"/></td>
                                                        <td class="tdNormal"></td>
                                                        <td class="tdNormal">Card number</td>
                                                        <td class="tdNormal"><asp:CheckBox ID="CheckBox4" runat="server" class="fieldNormal"/></td>
                                                    </tr>
                                                    <tr>
                                                        <td class="tdNormal">Reference number</td>
                                                        <td class="tdNormal"><asp:CheckBox ID="CheckBox5" runat="server" class="fieldNormal"/></td>
                                                        <td class="tdNormal"></td>
                                                        <td class="tdNormal">Trace ID</td>
                                                        <td class="tdNormal"><asp:CheckBox ID="CheckBox6" runat="server" class="fieldNormal"/></td>
                                                    </tr>
                                                    <tr>
                                                        <td class="tdNormal">Local date</td>
                                                        <td class="tdNormal"><asp:CheckBox ID="CheckBox7" runat="server" class="fieldNormal"/></td>
                                                        <td class="tdNormal"></td>
                                                        <td class="tdNormal">Local time</td>
                                                        <td class="tdNormal"><asp:CheckBox ID="CheckBox8" runat="server" class="fieldNormal"/></td>
                                                    </tr>
                                                    <tr>
                                                        <td class="tdNormal">Currency</td>
                                                        <td class="tdNormal"><asp:CheckBox ID="CheckBox9" runat="server" class="fieldNormal"/></td>
                                                        <td class="tdNormal"></td>
                                                        <td class="tdNormal">Transaction amount</td>
                                                        <td class="tdNormal"><asp:CheckBox ID="CheckBox10" runat="server" class="fieldNormal"/></td>
                                                    </tr>
                                                    <tr>
                                                        <td class="tdNormal">Settlement amount</td>
                                                        <td class="tdNormal"><asp:CheckBox ID="CheckBox11" runat="server" class="fieldNormal"/></td>
                                                        <td class="tdNormal"></td>
                                                        <td class="tdNormal">fee amount</td>
                                                        <td class="tdNormal"><asp:CheckBox ID="CheckBox12" runat="server" class="fieldNormal"/></td>
                                                    </tr>
                                                    <tr>
                                                        <td class="tdNormal">Auth code</td>
                                                        <td class="tdNormal"><asp:CheckBox ID="CheckBox13" runat="server" class="fieldNormal"/></td>
                                                        <td class="tdNormal"></td>
                                                        <td class="tdNormal">Message type</td>
                                                        <td class="tdNormal"><asp:CheckBox ID="CheckBox14" runat="server" class="fieldNormal"/></td>
                                                    </tr>
                                                    <tr>
                                                        <td class="tdNormal">Acquirer</td>
                                                        <td class="tdNormal"><asp:CheckBox ID="CheckBox15" runat="server" class="fieldNormal"/></td>
                                                        <td class="tdNormal"></td>
                                                        <td class="tdNormal">Issuer</td>
                                                        <td class="tdNormal"><asp:CheckBox ID="CheckBox16" runat="server" class="fieldNormal"/></td>
                                                    </tr>
                                                    <tr>
                                                        <td class="tdNormal">Terminal ID</td>
                                                        <td class="tdNormal"><asp:CheckBox ID="CheckBox17" runat="server" class="fieldNormal"/></td>
                                                        <td class="tdNormal"></td>
                                                        <td class="tdNormal">Account Number</td>
                                                        <td class="tdNormal"><asp:CheckBox ID="CheckBox19" runat="server" class="fieldNormal"/></td>
                                                    </tr>
                                                    <tr>
                                                        <td class="tdNormal">Master table</td>
                                                        <td class="tdNormal">
                                                            <asp:DropDownList ID="ddlMaster" runat="server" class="fieldNormal"
                                                                DataTextField="table_name" DataValueField="table_name" AutoPostBack="True" 
                                                                onselectedindexchanged="ddlMaster_SelectedIndexChanged" ></asp:DropDownList>
                                                        </td>
                                                        <td class="tdNormal"></td>
                                                        <td class="tdNormal">Slave table</td>
                                                        <td class="tdNormal">
                                                            <asp:DropDownList ID="ddlSlave" runat="server" class="fieldNormal"
                                                                DataTextField="table_name" DataValueField="table_name" ></asp:DropDownList>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td class="tdNormal">Days before</td>
                                                        <td class="tdNormal"><asp:TextBox ID="txtBefore" runat="server" class="fieldNormal" onKeypress="return KeyPressFuncIsWholeNumber()" 
                                                                MaxLength="1"></asp:TextBox></td>
                                                        <td class="tdNormal"></td>
                                                        <td class="tdNormal">Days after</td>
                                                        <td class="tdNormal"><asp:TextBox ID="txtAfter" runat="server" class="fieldNormal" onKeypress="return KeyPressFuncIsWholeNumber()"
                                                                MaxLength="1"></asp:TextBox></td>
                                                    </tr>
                                                    <tr>
                                                        <td class="tdNormal">
                                                            File name</td>
                                                        <td class="tdNormal">
                                                        <asp:DropDownList ID="ddlFileName" runat="server" class="fieldNormal"
                                                                DataTextField="FILE_NAME" DataValueField="FILE_NAME" ></asp:DropDownList>
                                                            </td>
                                                        <td class="tdNormal">
                                                            &nbsp;</td>
                                                        <td class="tdNormal">
                                                            Active</td>
                                                        <td class="tdNormal">
                                                            <asp:CheckBox ID="CheckBox18" runat="server" class="fieldNormal" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td class="tdNormal" colspan="5">
                                                            &nbsp;</td>
                                                    </tr>
                                                </table>
								  
						</div>
						<!-- /.card-body -->

							  
					</div>
					<div class="modal-footer justify-content-between">
						<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                        <asp:Button ID="btnSave" runat="server" Text="Save changes" OnClick="btnSave_Click" class="btn btn-primary" />
					</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
		    //$('#ContentPlaceHolder1_TextBox1').daterangepicker()

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

		    //$('#reservationdatetime').datetimepicker({ icons: { time: 'far fa-clock'} });
//        $('#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>
