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

<%--<%@ Register src="../UserControls/LOV.ascx" tagname="LOV" tagprefix="uc1" %>--%>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
 <script language ="javascript" type ="text/javascript" >
     function KeyPressFuncIsWholeNumber() {

         if (event.keyCode < 48 || event.keyCode > 57)
         { event.returnValue = false; }
     }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
 <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
                   <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                     <ContentTemplate>
    <table class="body_MainTB" border="0" cellpadding="0" cellspacing="0">
                    <tr align="center">
                        <td valign="top">
                            <!------------------------------------body St  ---------------------------------------------->
                            <table border="0" cellpadding="0" cellspacing="0" class="body_formTitle">
                                <tr>
                                    <td>
                                        Add Bank</td>
                                </tr>
                            </table>
                            <br/>
                            <!------------------------------------body End1 ----------------------------------------------->
                            <asp:Label ID="Label1" runat="server" Text="" class="fieldError"></asp:Label>
                            <table border="0" cellpadding="0" cellspacing="0" class="contTB">
                                <tr>
                                    <td align="center">
                                        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="Frow">
                                            <tr>
                                                <td>
                                                </td>
                                            </tr>
                                        </table>
                                        <br />
                                        <asp:Panel ID="pnlSearch" runat ="server" >
                                             <table border="0" width="100%" cellpadding="0" cellspacing="0" class="add_ItemTB">
                                                 <tr>
                                                     <td class="tdNormal" style="width: 15%">
                                                         Bank</td>
                                                     <td colspan="4">
                                                         <asp:DropDownList ID="ddlBank" runat="server" class="fieldNormal" 
                                                             DataTextField="long_name" DataValueField="local_bin" Width="250px" 
                                                             AutoPostBack="True" 
                                                             onselectedindexchanged="ddlAtmType_SelectedIndexChanged">
                                                         </asp:DropDownList>
                                                     </td>
                                         </tr>
                               
                                
                                
                               
                            </table>
                            </asp:Panel>
                                        
                                            
                                        <!------------------------------------body End2 ----------------------------------------------->
                                        <br/>
                                         <asp:Panel ID="pnlControls" runat="server" Width="100%">
                                            <fieldset id="addItem">
                                                <legend id="addItem">Bank Details</legend>
                                            </fieldset>
                                             <asp:UpdateProgress ID="UpdateProgress1" runat="server" 
                                                        AssociatedUpdatePanelID="UpdatePanel1" DisplayAfter="0">
                                                        <ProgressTemplate>
                                                            <img alt="Loading" src="../Images/ajax-loader.gif" />
                                                        </ProgressTemplate>
                                                    </asp:UpdateProgress>
                                            <table border="0" cellpadding="0" cellspacing="0" class="add_ItemTB">
                                                <tr>
                                                    <td class="tdNormal" style="width:15%" colspan="2">
                                                        Local Bin
                                                    </td>
                                                    <td class="tdNormal" style="width:30%" colspan="3">
                                                       <asp:TextBox ID="txtLocalBin" runat="server" class="fieldNormal"  
                                                            Width="250" MaxLength="20"  onKeypress="return KeyPressFuncIsWholeNumber()" 
                                                            TabIndex="1"></asp:TextBox>
                                                    </td>
                                                  
                                                </tr>
                                                <tr>
                                                    <td class="tdNormal" style="width:15%" colspan="2">
                                                        Abbreviation</td>
                                                    <td class="tdNormal" style="width:30%" colspan="3">
                                                        <asp:TextBox ID="txtBankName" runat="server" class="fieldNormal" MaxLength="10" 
                                                            onkeyup="this.value=this.value.toUpperCase()" TabIndex="1" Width="250"></asp:TextBox>
                                                    </td>
                                                  
                                                </tr>
                                                <tr>
                                                    <td colspan ="2" class ="tdNormal">Name</td>
                                                    <td colspan ="3" class ="tdNormal">
                                                        <asp:TextBox ID="txtAbbreviation" runat="server" class="fieldNormal" 
                                                            Width="250" MaxLength="100" onkeyup="this.value=this.value.toUpperCase()" 
                                                            TabIndex="1"></asp:TextBox>
                                                        &nbsp;<asp:Button ID="btnDelete" runat="server" class="Btn_M_Normal" 
                                                            onclick="btnDelete_Click" Text="Delete Bank" OnClientClick="return confirm('Are you sure to delete?');" />
                                                    </td>
                                                </tr>
                                                
                                               <%-- <tr>
                                                    <td colspan ="2" class ="tdNormal">&nbsp;</td>
                                                    <td colspan ="3" class ="tdNormal">
                                                        <asp:Button ID="btnSave" runat="server" class="Btn_M_Normal" Text="Save" 
                                                            onclick="btnSave_Click1" Visible="False" />
                                                        &nbsp;<asp:Button ID="btnCancel" runat="server" class="Btn_M_Normal" 
                                                            Text="Cancel" onclick="btnCancel_Click" Visible="False" />
                                                    </td>
                                                </tr>--%>
                                            </table>
                                            
                                        </asp:Panel>
                                        <asp:Label ID="lblError" runat="server" class="fieldError" Text=""></asp:Label>
                                       <br />
                                       <table border="0" cellpadding="0" cellspacing="0" class="grid_TitleBG_B">
                                            <tr>
                                                <td>
                                                    Bank BINs</td>
                                            </tr>
                                            
                                        </table>
                                       
                                        <asp:Panel ID="pnlGrid" runat="server" Width="100%">
                                            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="bin"
                                                CssClass="gridMaster" OnRowCommand="GridView1_RowCommand"
                                                AllowPaging="True" AllowSorting="True" CellPadding="4" ForeColor="#333333" GridLines="None"
                                                OnRowCreated="GridView1_RowCreated" EmptyDataText="There are no bins" 
                                                onpageindexchanging="GridView1_PageIndexChanging" Width="100%" 
                                                onrowdatabound="GridView1_RowDataBound">
                                                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                                <Columns>
                                                    <asp:BoundField DataField="short_name" HeaderText="Short Name"/>
                                                    <asp:BoundField DataField="long_name" HeaderText="Bank Name" />
                                                    <asp:BoundField DataField="bin" HeaderText="BIN" />
                                                    <asp:BoundField DataField="app_status" HeaderText="app_status"/>
                                                                <asp:BoundField DataField="status" HeaderText="Status"/>
                                                                 <asp:ButtonField ButtonType="Image" ItemStyle-Width="30px" CommandName="vm" Text="View Modification" ImageUrl="~/Images/view.jpg" />
                                                    <asp:ButtonField ButtonType="Image" CommandName="u" Text="Update" ItemStyle-Width="30px"
                                                        ImageUrl="~/Images/edit.jpg" >
                                                        <ItemStyle Width="30px" />
                                                    </asp:ButtonField>
                                                    <asp:ButtonField ButtonType="Image" CommandName="d" Text="Delete" ItemStyle-Width="30px"
                                                        ImageUrl="~/Images/delete.jpg" >
                                                        <ItemStyle Width="30px" />
                                                    </asp:ButtonField>
                                                </Columns>
                                                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                                <EditRowStyle BackColor="#999999" />
                                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                            </asp:GridView>
                                        </asp:Panel>
                                         <table border="0" cellpadding="0" cellspacing="0" class="action_TB_BgForm">
                                            <tr>
                                                <td>
                                                    <asp:Button ID="btnAddBin" runat="server" Text="Add Bin   " class="Btn_M_Normal"
                                                        OnClick="btnAdd_Click" />
                                                        </td> 
                                            </tr>
                                        </table>
                                        <br />
                                        <asp:Panel ID="Panel1" runat="server" Width="100%">
                                           
                                            <table border="0" cellpadding="0" cellspacing="0" class="add_ItemTB">
                                                <tr>
                                                    <td class="tdNormal" style="width:15%">
                                                        &nbsp;Bin</td>
                                                    <td class="tdNormal" style="width:30%">
                                                       <asp:TextBox ID="txtBin" runat="server" class="fieldNormal"  
                                                            Width="250" MaxLength="20" onKeypress="return KeyPressFuncIsWholeNumber()"  
                                                            TabIndex="1"></asp:TextBox>
                                                    </td>
                                                  <td class="tdNormal">
                                                    <asp:Button ID="btnSaveBin" Text ="Save" runat ="server" class="Btn_M_Normal" 
                                                          onclick="btnSaveBin_Click" />
                                                      &nbsp;<asp:Button ID="btnCancelBin" runat="server" class="Btn_M_Normal" 
                                                          Text="Cancel" onclick="btnCancelBin_Click" />
                                                      &nbsp;</td>
                                                </tr>
                                                
                                                
                                            </table>
                                            
                                        </asp:Panel>
                                    </td>
                                </tr>
                            </table>
                            <!------------------------------------body End2 ----------------------------------------------->
                        </td>
                    </tr>
                </table>
                 </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>

