<%@ Page Language="C#" 
    MasterPageFile="~/CITAD.Master" 
    AutoEventWireup="true" 
    EnableEventValidation="false"
    CodeBehind="frmCIList.aspx.cs" 
    Inherits="CITAD.Modules.BangMaNganHang.Web.frmCIList" 
    Title="Danh sách bảng mã ngân hàng" 
    Culture="auto" 
    meta:resourcekey="PageResource1" 
    UICulture="auto" %>
<%@ Register Src="../../Controls/MessageBox.ascx" TagName="MessageBox" TagPrefix="uc1" %>
  
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script language="javascript" type="text/javascript" >
	    //Cài đặt sự kiện phím tắt
        window.document.onkeyup=ShortcutKeys;
        function ShortcutKeys()
        {
            if(event.ctrlKey)
            {
                switch (event.keyCode)
                {
                    case 49://Ctrl + 1
                        __doPostBack('ctl00$ContentPlaceHolder1$Menu1','mnuNew');
                        break;
                    case 50://Ctrl + 2
                        __doPostBack('ctl00$ContentPlaceHolder1$Menu1','mnuDetail');
                        break;
                    case 52://Ctrl + 4
                        __doPostBack('ctl00$ContentPlaceHolder1$Menu1','mnuQuery');
                        break;
                    case 69://Ctrl + E
                        __doPostBack('ctl00$ContentPlaceHolder1$Menu1','mnuClose');
                        break;
                }
            }
            if(event.keyCode == 13)
            {    
                var tablet = document.getElementById('eventSRC');                
                if(tablet.contains(event.srcElement)){
                    __doPostBack('ctl00$ContentPlaceHolder1$Menu1','mnuQuery');                    
                }                
            }
        }        
		window.onload = function(){
            document.getElementById('<%=txtCICode.ClientID%>').focus();
        }
    </script>
    <ajaxToolkit:ToolkitScriptManager runat="Server" ID="ScriptManager1" EnableScriptGlobalization="True"
     EnableScriptLocalization="True" CombineScripts="True" EnablePageMethods="true"  />
     
     <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
    <div style="width:770px;">
        <table class="toolbar" cellpadding="0" cellspacing="0" >
            <tr><td class="toolbar-tdleft"></td>
            <td class="toolbar-tdmain">
                <asp:Menu ID="Menu1" runat="server" 
                    DynamicHorizontalOffset="2" 
                    Font-Names="Verdana"
                    Font-Size="11px"
                    OnMenuItemClick="Menu1_MenuItemClick"
                    Orientation="Horizontal" 
                    CssClass="citad-menu" 
                    StaticSubMenuIndent="10px" 
                    meta:resourcekey="Menu1Resource1"
                    StaticHoverStyle-CssClass="citad-menu-hover"
                    StaticMenuStyle-CssClass="citad-menu"
                    StaticSelectedStyle-CssClass="citad-menu-selected"
                    StaticMenuItemStyle-HorizontalPadding="5px"
                    StaticMenuItemStyle-VerticalPadding="2px"
                    >
                    <Items>
                        <asp:MenuItem Text="Tho&#225;t" Value="mnuClose" meta:resourcekey="MenuItemResource5" ImageUrl="~/Images/Menu/home.gif"></asp:MenuItem>
                        <%--<asp:MenuItem Text="Th&#234;m mới" Value="mnuNew" meta:resourcekey="MenuItemResource2" ImageUrl="~/Images/Menu/add.gif" ></asp:MenuItem>--%>
                        <%--<asp:MenuItem ImageUrl="~/Images/Menu/open.gif" Text="Sửa" Value="mnuEdit" meta:resourcekey="MenuItemResource1" ></asp:MenuItem>--%>
                        <asp:MenuItem SeparatorImageUrl="~/Images/Menu/separator_h.gif" ></asp:MenuItem>
                        <%--<asp:MenuItem ImageUrl="~/Images/Menu/delete.gif" Text="X&#243;a" Value="mnuDelete" meta:resourcekey="MenuItemResource3"></asp:MenuItem>--%>
                        <asp:MenuItem Text="Truy vấn" Value="mnuQuery" meta:resourcekey="MenuItemResource4" ImageUrl="~/Images/Menu/search.gif" SeparatorImageUrl="~/Images/Menu/separator_h.gif"></asp:MenuItem>
                        <asp:MenuItem ImageUrl="~/Images/Menu/approve.gif" Text="Export" Value="mnuExport" meta:resourcekey="MenuItemResource6"></asp:MenuItem>
                    </Items>
                </asp:Menu>
           </td>
           </tr>
        </table>

        <table style="width:100%;" id="eventSRC">
            <tr>
                <td style="width:209px;">
                    <fieldset style="height:40px;text-align:center;">
                        <legend><asp:Label ID="lblMaNganHang" runat="server" Text="Mã ngân hàng" meta:resourcekey="lblMaNganHangResource1"></asp:Label></legend>
                        <asp:TextBox ID="txtCICode" runat="server" Width="160px" meta:resourcekey="txtCICodeResource1" CssClass="citad-txt"></asp:TextBox>
                    </fieldset>
                </td>
                <td style="width: 322px">
                    <fieldset >
                        <legend><asp:Label ID="lblTinhTrang" runat="server" Text="Tình trạng" meta:resourcekey="lblTinhTrangResource1"></asp:Label></legend>                        
                        <table>
                          <tr>
                                <td style="width: 150px">
                        <asp:RadioButton ID="rbtDangHoatDong" runat="server" Text="Đang hoạt động" GroupName="TinhTrang" meta:resourcekey="rbtDangHoatDongResource1" /></td>
                                <td style="width: 150px">
                        <asp:RadioButton ID="rbtKhongHoatDong" runat="server" Text="Không hoạt động" GroupName="TinhTrang" meta:resourcekey="rbtKhongHoatDongResource1" /></td>
                                <td style="width: 84px">
                        <asp:RadioButton ID="rbtTatCa1" runat="server" Text="Tất cả" GroupName="TinhTrang" Checked="True" meta:resourcekey="rbtTatCa1Resource1" /></td>
                            </tr>
                        </table>
                    </fieldset>                    
                </td>
                <td>
             <fieldset>
             <legend><asp:Label ID="Label1" runat="server" Text="Font Export" meta:resourcekey="lblExportResource1"></asp:Label></legend>                        
              <table>
                            <tr>
                           
                        <td style="width: 77px">
                        <asp:RadioButton ID="rdoTCVN3" runat="server" Text="TCVN3" GroupName="FontExport" Checked="True" meta:resourcekey="rdoTCNV" Width="72px" /></td>
                        <td style="width: 84px">
                        <asp:RadioButton ID="rdoUnicode" runat="server" Text="Unicode" GroupName="FontExport" meta:resourcekey="rdoUNICODE" Width="56px" /></td>                         
                           </tr>
              </table>
             </fieldset>
             </td>
            </tr>
           
        </table>
        <table style="width:100%;" id="ciType">
         <tr>
          <td>
             <fieldset>
             <legend><asp:Label ID="lblCI_CLASS" runat="server" Text="Ngân hàng Nhà nước - Thương mại" meta:resourcekey="lblLoaiNHResource1"></asp:Label></legend>                        
              <table>
                            <tr>
                                <td style="width: 150px">
                        <asp:RadioButton ID="rdoCI_S" runat="server" Text="Nhà nước" GroupName="CI_TYPE" meta:resourcekey="rdoCI_S" Width="80px" /></td>
                                <td style="width: 150px">
                        <asp:RadioButton ID="rdoCI_C" runat="server" Text="Thương mại" GroupName="CI_TYPE" meta:resourcekey="rdoCI_C" Width="120px" /></td>
                                <td style="width: 84px">
                        <asp:RadioButton ID="rdoAll_SC" runat="server" Text="Tất cả" GroupName="CI_TYPE" Checked="True" meta:resourcekey="rbtTatCa1Resource1" Width="56px" /></td>
                            </tr>
                        </table>
             </fieldset>
             </td>
             <td>
             <fieldset>
             <legend><asp:Label ID="lblCI_TYPE" runat="server" Text="Hội sở chính - Thành viên" meta:resourcekey="lblLoaiNOResource1"></asp:Label></legend>                        
              <table>
                            <tr>
                                <td style="width: 150px">
                        <asp:RadioButton ID="rdoHO" runat="server" Text="Hội Sở" GroupName="CI_CLASS" meta:resourcekey="rdoHO" Width="88px" /></td>
                                <td style="width: 150px">
                        <asp:RadioButton ID="rdoBranch" runat="server" Text="Chi nhánh" GroupName="CI_CLASS" meta:resourcekey="rdoBranch" Width="80px" /></td>
                                <td style="width: 84px">
                        <asp:RadioButton ID="rdoAllHB" runat="server" Text="Tất cả" GroupName="CI_CLASS" Checked="True" meta:resourcekey="rbtTatCa1Resource1" Width="56px" /></td>
                            </tr>
                        </table>
             </fieldset>
             </td>
            
               <td>
             <fieldset>
             <legend><asp:Label ID="lblCI_DIRECT" runat="server" Text="Ngân hàng Trực tiếp - Gián tiếp" meta:resourcekey="lblLoaiDirectResource1"></asp:Label></legend>                        
              <table>
                            <tr>
                         <td style="width: 150px">
                        <asp:RadioButton ID="rdoDirect" runat="server" Text="Trực tiếp" GroupName="CI_DIRECT" meta:resourcekey="rdoDirect" Width="72px" /></td>
                                <td style="width: 150px">
                        <asp:RadioButton ID="rdoInDirect" runat="server" Text="Gián tiếp" GroupName="CI_DIRECT" meta:resourcekey="rdoInDirect" Width="72px" /></td>
                                <td style="width: 84px">
                        <asp:RadioButton ID="rdoAllDirect" runat="server" Text="Tất cả" GroupName="CI_DIRECT" Checked="True" meta:resourcekey="rbtTatCa1Resource1" Width="56px" /></td>
                            </tr>
                        </table>
             </fieldset>
             </td>
             </tr>
         </table>

        <table width="100%">
            <tr>
                <td align="right">
                    <asp:Label ID="lblTotal" runat="server" meta:resourcekey="lblTotalResource1" Text="Tổng số:"
                        Font-Bold="True"></asp:Label>
                    <asp:Label ID="lblCount" runat="server" Font-Bold="True"></asp:Label></td>
            </tr>
            
        </table>
        <asp:GridView DataKeyNames="ID" ID="grvCIList" runat="server" 
                CellPadding="1"
                meta:resourcekey="dgvListTrxResource1" 
                AllowPaging="True" 
                OnPageIndexChanging="grvCIList_PageIndexChanging" 
                OnRowDataBound="grvCIList_RowDataBound" 
                AutoGenerateColumns="False" 
                CssClass="grid" 
                OnSelectedIndexChanged="grvCIList_SelectedIndexChanged"
                >
                <FooterStyle CssClass="grid-footer" />
                <RowStyle CssClass="grid-row" />
                <SelectedRowStyle CssClass="grid-selectedRow" />
                <PagerStyle HorizontalAlign="Center" CssClass="grid-pager" />
                <HeaderStyle CssClass="grid-header" />
                <AlternatingRowStyle CssClass="grid-alternating" />      
                <Columns>
                    <asp:TemplateField meta:resourcekey="TemplateFieldResource1" Visible="false">
                        <HeaderTemplate>
                            <asp:Label ID="lblSelect" meta:resourcekey="lblSelectResource1" runat ="server" ></asp:Label>
                            <%--<asp:CheckBox ID="chkCheckAll" runat="server" onclick="return CheckAll(this,'chkOne');" meta:resourcekey="chkCheckAllResource1" />--%>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <input id="chkOne" type="checkbox" runat="server" />
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                        <HeaderStyle Width="20px" HorizontalAlign="Center" />
                    </asp:TemplateField> 
                    <asp:TemplateField HeaderText="STT" meta:resourcekey="TemplateFieldResource11"   >
                    <HeaderTemplate>
                        <asp:Label ID="lblSTT" Text ="STT" runat="server" meta:resourcekey="lblSTTResource1" ></asp:Label>
                    </HeaderTemplate>
                    <HeaderStyle HorizontalAlign="Center" Width="30px" />
                    <ItemStyle HorizontalAlign="Center" Width="30px" />
                    </asp:TemplateField>                   
                    <%--<asp:BoundField HeaderText="M&#227; ng&#226;n h&#224;ng" DataField="CI_CODE" meta:resourcekey="BoundFieldResource1" >
                        <ItemStyle HorizontalAlign="Center" />
                        <HeaderStyle HorizontalAlign="Center" Width="120px" />
                    </asp:BoundField>--%>
                     <asp:TemplateField meta:resourcekey="TemplateFieldResource1">
                        <HeaderTemplate>
                            <asp:Label runat="server" ID="lblCI_CODE_GRID" Text="Mã ngân hàng" meta:resourcekey="lblCI_CodeResource1"></asp:Label>
                        </HeaderTemplate>
                        <HeaderStyle Width="70px" HorizontalAlign="Center" />
                        <ItemTemplate>
                            <asp:LinkButton ID="lbtCI_CODE" runat="server" CommandName="Select" Text='<%# Bind("CI_CODE") %>'></asp:LinkButton>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                     </asp:TemplateField>
                    <asp:BoundField HeaderText="T&#234;n ng&#226;n h&#224;ng" DataField="CI_NAME" meta:resourcekey="BoundFieldResource2" >
                        <HeaderStyle Width="200px" />
                    </asp:BoundField>
                    <asp:BoundField HeaderText="T&#234;n chi nh&#225;nh" DataField="BRANCH_NAME" meta:resourcekey="BoundFieldResource4" >
                        <HeaderStyle Width="250px" />
                    </asp:BoundField>
                    <asp:BoundField HeaderText="T&#236;nh trạng" DataField="USED" meta:resourcekey="BoundFieldResource3" />                    
                    <asp:BoundField DataField="CI_CLASS" HeaderText="Loại ngân hàng" meta:resourcekey="BoundFieldResource5"  />
                    <asp:BoundField DataField="DIRECT_TYPE" HeaderText="Loại thành viên" meta:resourcekey="BoundFieldResource6"  />
                    
                    <asp:TemplateField HeaderText="Là Hội sở?" meta:resourcekey="TemplateFieldResource7" >
                        
                        <HeaderStyle   />
                        <ItemTemplate>
                            <asp:CheckBox ID="cboCI_TYPE" runat="server"    Enabled="false" />
                            <asp:TextBox ID="txtCI_TYPE" runat="server" Text='<%# Bind("CI_TYPE") %>' Visible="false" ></asp:TextBox>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <EmptyDataTemplate>
                    <asp:Label ID="lblEmptyDataGrid" runat="server" meta:resourcekey="lblEmptyDataGridResource1"
                        Text="Kh&#244;ng tồn tại"></asp:Label>
                </EmptyDataTemplate>
                
            </asp:GridView>
            <uc1:MessageBox ID="MessageBox1" runat="server" />
            <asp:HiddenField ID="hidSQL" runat="server" />
         </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>