<%@ Page EnableEventValidation="false" Language="C#" 
    MasterPageFile="~/CITAD.Master" 
    AutoEventWireup="true" 
    CodeBehind="frmConf.aspx.cs" 
    Inherits="CITAD.Modules.KiemTraLenhChuyenTien.Web.frmConf" 
    Title="Kế toán giao dịch bổ xung lệnh chuyển tiền" 
    Culture="auto"     
    UICulture="auto"
    meta:resourcekey="PageResource1" %>

<%@ Register Src="../../Controls/MessageBox.ascx" TagName="MessageBox" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">    
<div class="divMain">
    <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 54://Ctrl + 6
                        __doPostBack('ctl00$ContentPlaceHolder1$Menu1','mnuConf');
                        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');
                }
            }
        }
        function fcnOnkeypress()
        {
            if(event.keyCode == 13)
            {
                __doPostBack('ctl00$ContentPlaceHolder1$Menu1','mnuQuery');
                return false;
            }
        }
    </script>
    <script type="text/javascript">
	    window.document.onkeydown=KeyDown;
	    //=====================================
	    function formload()
	    {
	        document.getElementById('<%=txtRelation_No.ClientID %>').focus();
	    }
        window.document.onload = formload;
	</script>
    <ajaxToolkit:ToolkitScriptManager runat="Server" ID="ScriptManager1" EnableScriptGlobalization="True"
             EnableScriptLocalization="True" CombineScripts="True" EnablePageMethods="true"  />
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
    <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át" Value="mnuClose" meta:resourcekey="MenuItemResource5" ImageUrl="~/Images/Menu/home.gif" SeparatorImageUrl="~/Images/menu/separator_h.gif"></asp:MenuItem>
                    <asp:MenuItem Text="Duyệt" Value="mnuConf" meta:resourcekey="MenuItemResource2" ImageUrl="~/Images/Menu/approve.gif" SeparatorImageUrl="~/Images/menu/separator_h.gif"></asp:MenuItem>
                    <asp:MenuItem Text="Chi tiết" Value="mnuDetail" meta:resourcekey="MenuItemResource3" ImageUrl="~/Images/Menu/open.gif" SeparatorImageUrl="~/Images/menu/separator_h.gif"></asp:MenuItem>
                    <asp:MenuItem Text="Truy vấn" Value="mnuQuery" meta:resourcekey="MenuItemResource4" ImageUrl="~/Images/Menu/search.gif"></asp:MenuItem>
                </Items>
            <StaticMenuStyle CssClass="citad-menu" />
            <StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
            <StaticSelectedStyle CssClass="citad-menu-selected" />
            <StaticHoverStyle CssClass="citad-menu-hover" />
            </asp:Menu>
       </td>
       </tr>
    </table>
    <table id="eventSRC">
        <tr>
            <td style="width: 83px">
                <asp:Label ID="lblRelation_No" runat="server" meta:resourcekey="Label1Resource1" Text="Số bút toán"></asp:Label></td>
            <td style="width: 178px">
                <asp:TextBox ID="txtRelation_No" CssClass="citad-txt" runat="server" meta:resourcekey="txtRelation_NoResource1" onkeypress="return fcnOnkeypress();" onpropertychange="Upper()" Width="135px" MaxLength="40"></asp:TextBox></td>
            <td style="width: 97px">
                <asp:Label ID="lblTrx_Status" runat="server" meta:resourcekey="lblTrx_StatusResource1" Text="Tình trạng"></asp:Label></td>
            <td colspan="2">
                <asp:DropDownList ID="cboTrx_Status" runat="server" Width="232px" meta:resourcekey="cboTrx_StatusResource1">
                </asp:DropDownList></td>
            <td colspan="1">
                <asp:CheckBox ID="chkTimChinhXac" runat="server" Checked="True" Text="Tìm chính xác" meta:resourcekey="chkTimChinhXacResource1"/></td>
        </tr>
        <tr>
            <td colspan="2" valign="middle">
                <fieldset><legend><asp:Label ID="grbTrxType" runat="server" meta:resourcekey="grbTrxTypeResource1" Text="Loại giao dịch"></asp:Label></legend>
                    <asp:RadioButton ID="rdbLV" runat="server" meta:resourcekey="rdbLVResource1" Text="Giá trị thấp" GroupName="TrxType" />
                    <asp:RadioButton ID="rdbHV" runat="server" meta:resourcekey="rdbHVResource1" Text="Giá trị cao" GroupName="TrxType" />
                    <asp:RadioButton ID="rdbAll" runat="server" meta:resourcekey="rdbAllResource1" Checked="True" Text="Tất cả" GroupName="TrxType" />
                </fieldset>
            </td>
            <td style="width: 97px" valign="middle">
                <asp:Label ID="lblRCI" runat="server" meta:resourcekey="lblRCIResource1" Text="Ngân hàng nhận"></asp:Label></td>
            <td style="width: 135px" valign="middle">
                <asp:TextBox ID="txtRCICode" CssClass="citad-txt" runat="server" meta:resourcekey="TextBox1Resource1" Width="135px" MaxLength="12"></asp:TextBox></td>
            <td style="width: 105px" valign="middle">
                <asp:Label ID="lblSerial_No"  runat="server" meta:resourcekey="lblSerial_NoResource1" Text="Số hiệu giao dịch"></asp:Label></td>
            <td style="width: 125px" valign="middle">
                <asp:TextBox ID="txtSerial_No" CssClass="citad-txt" runat="server" meta:resourcekey="TextBox2Resource1" Width="135px" MaxLength="8"></asp:TextBox></td>
        </tr>
        <tr>
            <td align="right" colspan="6" valign="middle">
                <asp:Label ID="lblTongSo" runat="server" Font-Bold="True" meta:resourcekey="lblTongSo" Text="Tổng số:"></asp:Label>
                <asp:Label ID="lblCount" runat="server" Font-Bold="True"></asp:Label></td>
        </tr>
    </table>   
            <asp:GridView DataKeyNames="ID, MAC, SERIAL_NO" ID="grvListTrx" runat="server" 
                CellPadding="1"
                meta:resourcekey="dgvListTrxResource1" 
                AllowPaging="True" 
                OnPageIndexChanging="grvListTrx_PageIndexChanging" 
                OnRowDataBound="grvListTrx_RowDataBound" 
                AutoGenerateColumns="False" 
                CssClass="grid"
                OnSelectedIndexChanged="grvListTrx_SelectedIndexChanged" AllowSorting="True" OnSorting="grvListTrx_Sorting" 
                >
                <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">
                        <HeaderTemplate>
                            <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 DataField="RELATION_NO" HeaderText="Số b&#250;t to&#225;n" meta:resourcekey="BoundFieldResource1" SortExpression="RELATION_NO">
                        <HeaderStyle Width="60px" HorizontalAlign="Center" />
                        <ItemStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:TemplateField meta:resourcekey="TemplateFieldResource1">
                        <HeaderTemplate>
                            <%--<asp:Label runat="server" ID="lblSERIAL_NO_GRID" Text="Số hiệu giao dịch" meta:resourcekey="lblSerial_NoResource1"></asp:Label>--%>
                            <asp:LinkButton runat="server" ID="lblSERIAL_NO_GRID" Text="Số hiệu giao dịch" CommandName="Sort" CommandArgument="SERIAL_NO" meta:resourcekey="lblSerial_NoResource1" />
                        </HeaderTemplate>
                        <HeaderStyle Width="70px" HorizontalAlign="Center" />
                        <ItemTemplate>
                            <asp:LinkButton ID="lbtSERIAL_NO" runat="server" CommandName="Select" Text='<%# Bind("SERIAL_NO") %>'></asp:LinkButton>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                     </asp:TemplateField>
                    <asp:BoundField HeaderText="Loại giao dịch" meta:resourcekey="BoundFieldResource3">
                        <HeaderStyle Width="100px" HorizontalAlign="Center" />
                        <ItemStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField HeaderText="Nợ c&#243;" meta:resourcekey="BoundFieldResource4">
                        <HeaderStyle Width="100px" HorizontalAlign="Center" />
                        <ItemStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField HeaderText="Số tiền" DataField="AMOUNT" meta:resourcekey="BoundFieldResource5" SortExpression="AMOUNT">
                        <HeaderStyle Width="100px"  HorizontalAlign="Center"/>
                        <ItemStyle HorizontalAlign="Right" />
                    </asp:BoundField>
                    <asp:BoundField HeaderText="T&#236;nh trạng" meta:resourcekey="BoundFieldResource6">
                        <HeaderStyle Width="180px" HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField HeaderText="M&#227; ng&#226;n h&#224;ng nhận" DataField="CI_CODE" meta:resourcekey="BoundFieldResource7" SortExpression="CI_CODE" >
                        <ItemStyle HorizontalAlign="Center" />
                        <HeaderStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                </Columns>
                <EmptyDataTemplate>
                    <asp:Label ID="lblEmptyDataGrid" runat="server" meta:resourcekey="lblEmptyDataGridResource1"
                        Text="Kh&#244;ng tồn tại"></asp:Label>
                </EmptyDataTemplate>
                <PagerSettings Mode="NumericFirstLast" />
            </asp:GridView>
            <asp:HiddenField ID="txtRCIID" runat="server" />
            <uc1:MessageBox ID="MessageBox1" runat="server" />
            </ContentTemplate>
        </asp:UpdatePanel>
</div>
</asp:Content>