<%@ Page Language="C#" AutoEventWireup="true" 
    EnableEventValidation="false"
    MasterPageFile="~/CITAD.Master" 
    CodeBehind="frmTrx_LM_A.aspx.cs" 
    Inherits="CITAD.Modules.DuyetTraLoiTraSoatDen.Web.frmTrx_LM_A" 
    Culture="auto" 
    meta:resourcekey="PageResource1" 
    UICulture="auto" 
    Title="Danh sách yêu cầu Tra soát đến"%>

<%@ Register Src="../../Controls/MessageBox.ascx" TagName="MessageBox" TagPrefix="uc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    
    <script language ="javascript" type ="text/javascript" >
        window.document.onkeyup=ShortcutKeys;
        function ShortcutKeys()
        {
            if(event.ctrlKey)
            {
                if(window.event.keyCode==69)
                {
                    __doPostBack('ctl00$ContentPlaceHolder1$Menu1','tsbClose');
                }
                if(window.event.keyCode==52)
                {
                    __doPostBack('ctl00$ContentPlaceHolder1$Menu1','tsbQuery');
                }
                if(window.event.keyCode==54)
                {
                    __doPostBack('ctl00$ContentPlaceHolder1$Menu1','mnuApprove');
                }
                if(window.event.keyCode==50)
                {
                    __doPostBack('ctl00$ContentPlaceHolder1$Menu1','tsbOpen');
                }
            }
            
            if(event.keyCode == 13)
            {    
                var tablet = document.getElementById('eventSRC');                
                if(tablet.contains(event.srcElement))
                {
                    __doPostBack('ctl00$ContentPlaceHolder1$Menu1','tsbQuery');                    
                }                
            }	
        }
        function fcnOnkeypress()
        {
            if(event.keyCode == 13)
            {
                __doPostBack('ctl00$ContentPlaceHolder1$Menu1','tsbQuery');
                return false;
            }
        }
    </script>
     <script language="javascript" type="text/javascript" >
        window.onload = function()
        {
            try
            {
                document.getElementById('<%=txtSerial_No.ClientID%>').focus();
            }
            catch(e){}
        }
    </script>
        <cc1: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" 
                TabIndex="8"
                >
                    <Items>
                        <asp:MenuItem Text="Đ&#243;ng" ImageUrl="~/Images/Menu/home.gif" Value="tsbClose" meta:resourcekey="MenuItemResource1" SeparatorImageUrl="~/Images/Menu/separator_h.gif" ></asp:MenuItem>                        
                        <asp:MenuItem Text="Duyệt" ImageUrl="~/Images/Menu/approve.gif" Value="mnuApprove" meta:resourcekey="MenuItemResource2" SeparatorImageUrl="~/Images/Menu/separator_h.gif" ></asp:MenuItem>
                        <asp:MenuItem Text="Chi tiết" ImageUrl="~/Images/Menu/open.gif" Value="tsbOpen" meta:resourcekey="MenuItemResource3" SeparatorImageUrl="~/Images/Menu/separator_h.gif" ></asp:MenuItem>
                        <asp:MenuItem Text="Truy vấn" ImageUrl="~/Images/Menu/search.gif" Value="tsbQuery" meta:resourcekey="MenuItemResource4" ></asp:MenuItem>
                    </Items>
                <StaticMenuStyle CssClass="citad-menu" />
                <StaticSelectedStyle CssClass="citad-menu-selected" />
                <StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
                <StaticHoverStyle CssClass="citad-menu-hover" />
            </asp:Menu>
       </td>
       </tr>
    </table>
        <table id="eventSRC">
         <tr>
                <td style="text-align: right;">
                    <asp:Label ID="lblSerial_No" runat="server" Text="Số hiệu giao dịch" meta:resourcekey="lblSerial_NoResource1"></asp:Label></td>
                <td>
                    <asp:TextBox ID="txtSerial_No" onkeypress="return fcnOnkeypress();" CssClass="citad-txt" runat="server" Width="107px" meta:resourcekey="txtSerial_NoResource1" TabIndex="5"></asp:TextBox></td>
                <td style="text-align: right;">
                    <asp:Label ID="lblBankB" runat="server" Text="Ngân hàng gửi" meta:resourcekey="lblBankBResource1"></asp:Label></td>
                <td>
                    <asp:TextBox ID="txtBankB"  CssClass="citad-txt" runat="server" Width="100px" meta:resourcekey="txtBankBResource1" TabIndex="6"></asp:TextBox></td>
                <td style=" text-align: right;">
                    <asp:CheckBox ID="chkRV_Date" runat="server" 
                        Text="Ngày tạo" meta:resourcekey="chkRV_DateResource1" AutoPostBack="True" OnCheckedChanged="chkRV_Date_CheckedChanged" /></td>
                <td style="text-align: left;">
                    <asp:TextBox ID="txtRV_Date"  CssClass="citad-txt" runat="server" Width="100px" meta:resourcekey="txtRV_DateResource1" MaxLength="10" TabIndex="7"></asp:TextBox>
                    <asp:ImageButton ID="imgCalendar" runat="server" ImageUrl="~/Images/Calendar.png"
                        meta:resourcekey="imgCalendarResource1" /></td>
            </tr>
            <tr>
                <td colspan="4" valign="bottom">
                    <fieldset id="fsTrxType" style="width: 369px" >
                        <legend>
                            <asp:Label ID="grbTrxType" runat="server" Text="Loại giao dịch" meta:resourcekey="grbTrxTypeResource1"></asp:Label></legend>                        
                        <asp:RadioButton ID="rdbLV" runat="server" GroupName="TrxType" Text="Giá trị thấp"
                            Width="105px" meta:resourcekey="rdbLVResource1" TabIndex="1" />
                        <asp:RadioButton ID="rdbHV" runat="server" GroupName="TrxType" Text="Giá trị cao"
                            Width="115px" meta:resourcekey="rdbHVResource1" TabIndex="2" />
                        <asp:RadioButton ID="rdbAll" runat="server" Checked="True" GroupName="TrxType" Text="Tất cả"
                            Width="62px" meta:resourcekey="rdbAllResource1" TabIndex="3" />
                    </fieldset>
                </td>
                <td align="left" style="text-align: right;" valign="middle">
                    <asp:Label ID="lblTrxStatus" runat="server" Text="Tình trạng" meta:resourcekey="lblTrxStatusResource1"></asp:Label></td>
                <td valign="middle">
                    <asp:DropDownList ID="cboTrxStatus" runat="server" meta:resourcekey="cboTrxStatusResource1" Width="240px" TabIndex="4">
                    </asp:DropDownList></td>
            </tr>
        </table>
        <table width="100%">
            <tr>
                <td align="right">
                    <asp:Label ID="lblTongSo" runat="server" meta:resourcekey="lblTongSoResource1" Text="Tổng số"></asp:Label>
                    <asp:Label ID="lblCount" runat="server"></asp:Label></td>
            </tr>
        </table>
        <asp:GridView ID="dgvTrxList" runat="server"
            AllowPaging="True"
            AutoGenerateColumns="False"
            DataKeyNames="MSG_KEY,MAC,MSG_KEYX,MACX" 
            meta:resourcekey="dgvTrxListResource1"
            CellPadding="1"
            CssClass="grid" Width="100%" 
            OnPageIndexChanging="dgvTrxList_PageIndexChanging" 
            OnRowDataBound="dgvTrxList_RowDataBound" 
            OnSelectedIndexChanged="dgvTrxList_SelectedIndexChanged" 
            AllowSorting="True" 
            OnSorting="dgvTrxList_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>
                        <input id="chkAll" onclick="CheckAll(this)" type="checkbox" />
                    </HeaderTemplate>
                    <ItemStyle HorizontalAlign="Center" Width="15px" />
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemTemplate>
                        <input id="chkOne" runat="server" type="checkbox" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField meta:resourcekey="TemplateFieldResource2" >
                    <HeaderTemplate>
                        <asp:Label ID="lblNo" runat="server"  Text="STT" meta:resourcekey="lblNoResource1"></asp:Label>
                    </HeaderTemplate>
                    <ItemStyle HorizontalAlign ="Center" Width="25px" />
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemTemplate>
                        <%# Eval("No") %>
                    </ItemTemplate>
                </asp:TemplateField>
                  <asp:TemplateField meta:resourcekey="TemplateFieldResource1">
                        <HeaderTemplate>                            
                            <asp:LinkButton runat="server" ID="lblSO_HIEU_GIAO_DICH" Text="Số hiệu giao dịch" CommandName="Sort" CommandArgument="LM.SERIAL_NO" meta:resourcekey="lblSO_HIEU_GIAO_DICHResource1" />
                        </HeaderTemplate>
                        <HeaderStyle Width="60px" HorizontalAlign="Center" />
                        <ItemTemplate>
                            <asp:LinkButton ID="lbtSO_HIEU_GIAO_DICH" runat="server" CommandName="Select" Text='<%# Bind("SERIAL_NO") %>'></asp:LinkButton>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                
                <asp:TemplateField meta:resourcekey="TemplateFieldResource4" >
                    <HeaderTemplate>
                        <asp:Label ID="lblTrx_type" runat="server" 
                            Text="Loại giao dịch" meta:resourcekey="lblTrx_typeResource1"></asp:Label>
                    </HeaderTemplate>
                    <ItemStyle HorizontalAlign="Left" />
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemTemplate>
                        <%# Eval("LOAIGIAODICH") %>
                    </ItemTemplate>
                </asp:TemplateField>

                <asp:TemplateField meta:resourcekey="TemplateFieldResource5" >
                    <HeaderTemplate>
                        <asp:Label ID="lblTrx_Status" runat="server" 
                            Text="T&#236;nh trạng" meta:resourcekey="lblTrx_StatusResource1"></asp:Label>
                    </HeaderTemplate>
                    <ItemStyle HorizontalAlign="Left" />
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemTemplate>
                        <%# Eval("TINHTRANG") %>
                    </ItemTemplate>
                </asp:TemplateField>
                
                <asp:TemplateField meta:resourcekey="TemplateFieldResource6" >
                    <HeaderTemplate>
                        <asp:LinkButton runat="server" ID="lblR_CI_CODE" Text="Ng&#226;n h&#224;ng gửi" CommandName="Sort" CommandArgument="O_CI_CODE" meta:resourcekey="lblR_CI_CODEResource1" />
                    </HeaderTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemTemplate>
                        <%# Eval("O_CI_CODE") %>
                    </ItemTemplate>
                </asp:TemplateField>

                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:HiddenField ID="hidESIGN_MESSAGE" runat="server" />
                    </ItemTemplate>
                    <ItemStyle CssClass="invisible" />
                    <HeaderStyle CssClass="invisible" />
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:HiddenField ID="hidESIGN_CONTENT" runat="server" />
                    </ItemTemplate>
                    <ItemStyle CssClass="invisible" />
                    <HeaderStyle CssClass="invisible" />
                </asp:TemplateField>
            </Columns> 
            <EmptyDataTemplate>
                <asp:Label ID="lblGrdEmptyMessage" runat="server" 
                    Text="Kh&#244;ng c&#243; bản ghi n&#224;o " meta:resourcekey="lblGrdEmptyMessageResource1"></asp:Label>
            </EmptyDataTemplate>
        </asp:GridView>
        <uc1:MessageBox ID="MessageBox1" runat="server" />
        <ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" Enabled="True"
            Format="dd/MM/yyyy" PopupButtonID="imgCalendar" TargetControlID="txtRV_Date">
        </ajaxToolkit:CalendarExtender>
        <cc1:MaskedEditExtender ID="MaskedEditExtender1" runat="server" 
            TargetControlID="txtRV_Date"
            Mask="99/99/9999" 
            MaskType="Date" 
            ErrorTooltipEnabled="True" 
            Enabled="True">
        </cc1:MaskedEditExtender>
    </div>
    </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>