<%@ Page Language="C#" EnableEventValidation="false" 
    AutoEventWireup="true" 
    MasterPageFile="~/CITAD.Master" 
    CodeBehind="frmTrx_FR_A.aspx.cs" 
    Inherits="CITAD.Modules.DuyetTraLoiYeuCauHoanChuyenDen.Web.frmTrx_FR_A" 
    Culture="auto" 
    meta:resourcekey="PageResource1" 
    UICulture="auto" %>

<%@ 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.onkeydown=KeyDown;

        function fcnShowO_CI_List(txtci_id)
        {            
            if (event.keyCode==115) //F4
            {
                if(!document.getElementById(txtci_id).readOnly)
                {
                    rValue = window.showModalDialog('../DanhSachNganHang/frmCIList.aspx' + '?randomNumber=' + Math.random(), "", strCIPopupFeature);
                    if(rValue!=undefined) 
                    {
                        document.getElementById(txtci_id).value = rValue;
                        __doPostBack(txtci_id,'');
                    }
                }
                event.keyCode=9;
            }
        }
    </script>
    <script language ="javascript" type ="text/javascript" >
        window.document.onkeyup=ShortcutKeys;
        function ShortcutKeys()
        {
                if(event.ctrlKey)
                {
//                    if(window.event.keyCode==69)
//                    {
//                        __doPostBack('ctl00$ContentPlaceHolder1$Menu1','mnuClose');
//                    }
                    if(window.event.keyCode==54) Ctrl + 6
                    {
                        __doPostBack('ctl00$ContentPlaceHolder1$Menu1','mnuApprove');
                    }
                    if(window.event.keyCode==50)
                    {
                        __doPostBack('ctl00$ContentPlaceHolder1$Menu1','mnuOpen');
                    }
                    if(window.event.keyCode==52)
                    {
                        __doPostBack('ctl00$ContentPlaceHolder1$Menu1','mnuIquiry');
                    }
                }
                //alert(event.keyCode);
 
                 if(event.keyCode == 13)
                {    
                var tablet = document.getElementById('eventSRC');                
                if(tablet.contains(event.srcElement)){
                    __doPostBack('ctl00$ContentPlaceHolder1$Menu1','mnuIquiry');                    
                }                
                }
        }
    </script>
      <script language="javascript" type="text/javascript" >
            window.onload = function()
            {
                try
                {
                    document.getElementById('<%=txtSerial_No.ClientID%>').focus();
                }
                catch(e){}
            }
    </script>
    <ajaxToolkit:ToolkitScriptManager runat="Server" ID="ScriptManager1" EnableScriptGlobalization="True"
        EnableScriptLocalization="True" CombineScripts="True" EnablePageMethods="true"  />
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <div>
                    <table class="citad-toolbar" cellSpacing=0 cellPadding=0 width=765><tr><td class="citad-toolbar-tdleft"></TD>
                    <td class="citad-toolbar-tdmain">
                        <asp:Menu id="Menu1" runat="server" 
                            CssClass="citad-menu" 
                            OnMenuItemClick="Menu1_MenuItemClick" 
                            StaticSubMenuIndent="10px" 
                            Orientation="Horizontal" 
                            Font-Size="11px" 
                            Font-Names="Verdana" 
                            DynamicHorizontalOffset="2" 
                            StaticMenuItemStyle-VerticalPadding="2px" 
                            StaticMenuItemStyle-HorizontalPadding="5px" 
                            StaticSelectedStyle-CssClass="citad-menu-selected" 
                            StaticMenuStyle-CssClass="citad-menu" 
                            StaticHoverStyle-CssClass="citad-menu-hover" 
                            meta:resourcekey="Menu1Resource1">
                        <Items>
                            <asp:MenuItem Text="Tho&#225;t" ImageUrl="~/Images/Menu/home.gif" NavigateUrl="~/Default.aspx" Value="mnuClose" meta:resourcekey="MenuItemResource1" SeparatorImageUrl="~/Images/toolbar/citad-toolbar-sperator.gif" ></asp:MenuItem>
                            <asp:MenuItem Text="Duyệt" Value="mnuApprove" meta:resourcekey="MenuItemResource3" SeparatorImageUrl="~/Images/toolbar/citad-toolbar-sperator.gif" ImageUrl="~/Images/Menu/approve.gif"></asp:MenuItem>
                            <asp:MenuItem Text="Chọn mở" Value="mnuOpen" meta:resourcekey="MenuItemResource2" SeparatorImageUrl="~/Images/toolbar/citad-toolbar-sperator.gif" ImageUrl="~/Images/Menu/open.gif"></asp:MenuItem>                            
                            <asp:MenuItem Text="Truy vấn" Value="mnuIquiry" 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>
                    </DIV>
                        <table cellSpacing=0 cellPadding=0 width=765 border=0>
                            <tr><td vAlign=top colSpan=3>
                            <fieldset>
                            <legend>
                                <asp:Label id="grbTrxType" runat="server" meta:resourcekey="grbTrxTypeResource1">Thông tin truy vấn</asp:Label>
                            </LEGEND>
                            <table id="eventSRC" cellSpacing="1" cellPadding="0">
                            <tr><td style="WIDTH: 141px" align=left>
                            <asp:Label id="lblSerial_No" runat="server" Text="Số giao dịch" meta:resourcekey="lblSerial_NoResource1"></asp:Label></TD>
                            <td><asp:TextBox id="txtSerial_No" runat="server" CssClass="citad-txt" meta:resourcekey="txtSerial_NoResource1" Width="89px" TabIndex="1"></asp:TextBox></TD>
                            <td style="WIDTH: 109px" align=right><asp:Label id="lblSendingBank" runat="server" Text="Ngân hàng gửi" meta:resourcekey="lblSendingBankResource1"></asp:Label>&nbsp;</TD>
                            <td colSpan=1><asp:TextBox id="txtSendingBank" runat="server" CssClass="citad-txt" meta:resourcekey="txtReceivingBankResource1" Width="77px" TabIndex="2"></asp:TextBox></TD>
                            <td style="WIDTH: 106px" align=right colSpan=1><asp:CheckBox id="chTRX_Date" runat="server" Text="Ngày tạo" meta:resourcekey="chTRX_DateResource1" OnCheckedChanged="chTRX_Date_CheckedChanged" AutoPostBack="True"></asp:CheckBox>&nbsp;</TD>
                            <td><asp:TextBox id="txtTRX_Date" runat="server" CssClass="citad-txt" meta:resourcekey="TextBox1Resource1" Width="81px" TabIndex="3"></asp:TextBox>
                                <asp:ImageButton ID="imgCalendar" runat="server" ImageUrl="~/Images/Calendar.png"
                                    meta:resourcekey="imgCalendarResource1" /></TD></TR>
                            <tr><td valign=middle colSpan=2>
                            <fieldset>
                            <legend><asp:Label id="Label1" runat="server" meta:resourcekey="Label1Resource1">Loại giao dịch</asp:Label>
                            </LEGEND>
                            <asp:RadioButton id="rdbLV" runat="server" Text="Giá trị thấp" CssClass="citad-RadioButton" meta:resourcekey="rdbLVResource1" GroupName="TrxType" TabIndex="4"></asp:RadioButton>
                            <asp:RadioButton id="rdbHV" runat="server" Text="Giá trị cao" CssClass="citad-RadioButton" meta:resourcekey="rdbHVResource1" GroupName="TrxType" TabIndex="5"></asp:RadioButton>
                            <asp:RadioButton id="rdbAll" runat="server" Text="Tất cả" CssClass="citad-RadioButton" meta:resourcekey="rdbAllResource1" GroupName="TrxType" Checked="True" TabIndex="6"></asp:RadioButton></FIELDSET></TD>
                            <TD style="WIDTH: 109px; HEIGHT: 27px" valign=middle align=right><asp:Label id="lblTrxStatus" runat="server" meta:resourcekey="lblTrxStatusResource1">Trạng thái</asp:Label>&nbsp;</TD>
                                <td colspan="3" style="height: 27px" valign="middle">
                                    <asp:DropDownList id="cboTrx_Status" runat="server" meta:resourcekey="cboTrx_StatusResource1" Width="296px" TabIndex="7">
                                    </asp:DropDownList></td>
                                    </TR></TABLE>
                                    </FIELDSET></TD></TR></TABLE>
                         <div>
                                <table width="100%">
                                    <tbody>
                                        <tr>
                                            <td align="right">
                                                <asp:Label ID="lblTongSo" runat="server" Text="Tổng số: " meta:resourcekey="lblTongSoResource1" Font-Bold="True" Width="80px"></asp:Label>
                                                <asp:Label ID="lblCount" runat="server" Font-Bold="True"></asp:Label></td>
                                        </tr>
                                    </tbody>
                                </table>
                            <asp:GridView id="grvListTrx" runat="server" 
                                CssClass="grid" 
                                meta:resourcekey="grvListTrxResource1" 
                                OnRowDataBound="grvListTrx_RowDataBound" 
                                AllowPaging="True" 
                                DataKeyNames="MSG_KEY,MAC_X,MSG_KEY_X" 
                                AutoGenerateColumns="False" 
                                CellPadding="2" 
                                OnSelectedIndexChanged="grvListTrx_SelectedIndexChanged" 
                                OnPageIndexChanging="grvListTrx_PageIndexChanging" 
                                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 Width="15px" HorizontalAlign="Center" />
                                        <HeaderStyle HorizontalAlign="Center" />
                                    </asp:TemplateField>
                                    <asp:TemplateField meta:resourcekey="TemplateFieldResource2"   >
                                        <HeaderTemplate  >
                                            <asp:Label ID="lblNo" Text ="STT" runat = "server" meta:resourcekey="lblNoResource1"></asp:Label>
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <%# Eval("No") %>
                                        </ItemTemplate> 
                                        <ItemStyle Width="25px" HorizontalAlign="Center" />
                                        <HeaderStyle HorizontalAlign="Center" />
                                    </asp:TemplateField>
                                    <asp:TemplateField meta:resourcekey="TemplateFieldResource4"    >
                                        <HeaderTemplate>                                            
                                            <asp:LinkButton runat="server" ID="lblSerial_No" Text="Số hiệu giao dịch" CommandName="Sort" CommandArgument="FR.SERIAL_NO" meta:resourcekey="lblSerial_NoResource2" />
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <asp:LinkButton ID="lbtSERIAL_NO" runat="server" CommandName="Select" Text='<%# Bind("SERIAL_NO") %>'></asp:LinkButton>
                                        </ItemTemplate> 
                                        <HeaderStyle HorizontalAlign="Center" />
                                        <ItemStyle HorizontalAlign="Center" />
                                    </asp:TemplateField>
                                    <asp:TemplateField meta:resourcekey="TemplateFieldResource5"   >
                                        <HeaderTemplate  >
                                            <asp:Label ID="lblTrx_type" Text ="Loại giao dịch" runat = "server" meta:resourcekey="lblTrx_typeResource1" ></asp:Label>
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <%# Eval("LOAIGIAODICH") %>
                                        </ItemTemplate> 
                                        <HeaderStyle HorizontalAlign="Center" />
                                        <ItemStyle HorizontalAlign="Center"  />
                                    </asp:TemplateField>
                                    <asp:TemplateField meta:resourcekey="TemplateFieldResource7"   >
                                        <HeaderTemplate  >
                                            <asp:LinkButton runat="server" ID="lblTrx_Amount" Text="Số tiền" CommandName="Sort" CommandArgument="AMOUNT_ORG" meta:resourcekey="lblTrx_AmountResource1" />
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <%# Eval("AMOUNT_ORG") %>
                                        </ItemTemplate> 
                                        <HeaderStyle HorizontalAlign="Center" />
                                        <ItemStyle HorizontalAlign="Right" />
                                    </asp:TemplateField>
                                    <asp:TemplateField   meta:resourcekey="TemplateFieldResource8"   >
                                        <HeaderTemplate  >
                                            <asp:Label ID="lblTrx_Status" Text ="T&#236;nh trạng" runat = "server" meta:resourcekey="lblTrx_StatusResource1" ></asp:Label>
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <%# Eval("TINHTRANG") %>
                                        </ItemTemplate> 
                                        <HeaderStyle HorizontalAlign="Center" />
                                        <ItemStyle HorizontalAlign="Left" />
                                    </asp:TemplateField>
                                    <asp:TemplateField meta:resourcekey="TemplateFieldResource9"  >
                                        <HeaderTemplate  >
                                            <asp:LinkButton runat="server" ID="lblO_CI_CODE" Text="Ngân hàng gửi" CommandName="Sort" CommandArgument="CI_CODE" meta:resourcekey="lblO_CI_CODEResource1" />
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <%# Eval("O_CI_CODE") %>
                                        </ItemTemplate> 
                                        <HeaderStyle HorizontalAlign="Center" />
                                        <ItemStyle HorizontalAlign="Center" />
                                    </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="lblGrdMessage" meta:resourcekey="lblGrdMessageResource1" Text ="Kh&#244;ng c&#243; bản ghi n&#224;o " runat ="server" ></asp:Label>
                                </EmptyDataTemplate>
                            </asp:GridView>
                            </DIV>
                            <uc1:MessageBox ID="MessageBox1" runat="server" />
                             <cc1:CalendarExtender id="CalendarExtender1" runat="server" Enabled="True" TargetControlID="txtTRX_Date" Format="dd/MM/yyyy" PopupButtonID="imgCalendar">
              </cc1:CalendarExtender>
                <ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender1" runat="server" Enabled="True"
                    Mask="99/99/9999" MaskType="Date" TargetControlID="txtTRX_Date">
                </ajaxToolkit:MaskedEditExtender>
            </ContentTemplate> 
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID ="Menu1" EventName ="MenuItemClick" />
        </Triggers> 
    </asp:UpdatePanel>
</asp:Content>