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

<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>Manage Branches</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">Manage Branches</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 Code</label>
                        <asp:TextBox ID="txtBranchCode" runat="server" class="form-control"  
                                                            MaxLength="3"></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>
                    Branches List
                </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><asp:Label ID="lblError" runat="server" Text="Label"></asp:Label></div>
			<div class="card-body ">
			<asp:GridView ID="GridView1" class="table table-bordered table-hover" BorderStyle="None" BorderWidth="0"
					GridLines="None" runat="server" AutoGenerateColumns=false OnRowCommand="GridView1_RowCommand" 
					DataKeyNames="branch_cd" onprerender="GridView1_PreRender" OnRowCreated="GridView1_RowCreated">
				<Columns>
					<asp:BoundField DataField="branch_cd" HeaderText="Branch_Code"/>
                    <asp:BoundField DataField="L_NM" HeaderText="Name(EN)" />
                    <asp:BoundField DataField="A_NM" HeaderText="Name(AR)" />
                    <asp:BoundField DataField="acct_number" HeaderText="Account No"/>
                    <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="u" 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>
						    </div>
					    </ItemTemplate>
				    </asp:TemplateField>
				</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>
		<!-- /.card -->
		<div class="row">
			<div class="col-12">
				<asp:Button ID="btnAdd" runat="server" Text="     Add     " OnClick="btnAdd_Click"
										class="btn btn-success float-right" />
			</div>
			<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">Parameter 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" cellpadding="0" cellspacing="0" class="add_ItemTB">
                                                 <tr>
                                                    <td class="tdNormal" style="width:5%">
                                                        Branch Code</td>
                                                        
                                                    <td class="tdNormal" style="width:20%">
                                                        <asp:TextBox ID="txtBranchCode1" runat="server" Width="100%" 
                                                            class="fieldNormal" MaxLength="3" onKeypress="return KeyPressFuncIsWholeNumber()"></asp:TextBox>
                                                    </td>
                                                   <%-- <td class ="tdNormal"></td>--%>
                                                  
                                                  
                                                </tr>
                                                <tr>
                                                    <td class="tdNormal" style="width:5%">
                                                        Branch Name(EN)&nbsp;
                                                    </td>
                                                    <td class="tdNormal" style="width:20%">
                                                        <asp:TextBox ID="txtEnBranch" runat="server" Width="100%" class="fieldNormal" 
                                                            MaxLength="255"></asp:TextBox>
                                                    </td>
                                                      <%--<td class ="tdLong"></td>--%>
                                                  
                                                  
                                                </tr>
                                                <tr>
                                                    <td class ="tdNormal" style="width :5%">Branch Name(AR)</td>
                                                    <td class ="tdNormal" style="width :20%">
                                                        <asp:TextBox ID="txtARBranch" runat="server" class="fieldMultiLine" Rows="4" 
                                                            Width="100%" CssClass="fieldNormal" MaxLength="255"></asp:TextBox>
                                                    </td>
                                                     <%-- <td class ="tdLong"></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>
	<!-- AdminLTE App -->
	<script src="../dist/js/adminlte.min.js"></script>
	<!-- AdminLTE for demo purposes -->
	<script src="../dist/js/demo.js"></script>
	<!-- /.content-wrapper -->
	<script>
		$(function () {

		    $('#ctl00_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)');
		});
</script>
</asp:Content>
