<%@ Page EnableEventValidation ="false" Language="C#" 
    MasterPageFile="~/CITAD.Master" 
    AutoEventWireup="true" 
    CodeBehind="frmDetailConf.aspx.cs" 
    Inherits="CITAD.Modules.KiemTraLenhChuyenTien.Web.frmDetailConf" 
    Title="Kế toán giao dịch bổ sung 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">
    <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 + 6
                        $get('ctl00$ContentPlaceHolder1$btnConfirm').click();
                        break;
                    case 55://Ctrl + 7
                        $get('ctl00$ContentPlaceHolder1$btnReject').click();
                        break;
                    case 56://Ctrl + 8
                        $get('ctl00$ContentPlaceHolder1$btnReturn').click();
                        break;
                    case 37://Ctrl + <-
                        $get('ctl00$ContentPlaceHolder1$btnPrevios').click();
                        break;
                    case 39://Ctrl + ->
                        $get('ctl00$ContentPlaceHolder1$btnNext').click();
                        break;
                    case 69://Ctrl + E
                        $get('ctl00$ContentPlaceHolder1$btnClose').click();
                        break;
                }
            }
        }
    </script> 

    <ajaxToolkit:ToolkitScriptManager runat="Server" ID="ScriptManager1" EnableScriptGlobalization="True"
             EnableScriptLocalization="True" CombineScripts="True" EnablePageMethods="true"  />
    <asp:UpdatePanel ID="UpdatePanel5" runat="server">
        <ContentTemplate>
    <div style="width:770px;" id="divMain">
        <table cellpadding="0" cellspacing="0">
            <tr>
                <td rowspan="2" style="width: 674px">
                    <fieldset style="margin-top:2px;">
                        <table cellpadding="0" cellspacing="1">
                            <tr>
                                <td style="width: 106px">
                                <asp:Label ID="lblRelation_No" runat="server" Text="Số b&#250;t to&#225;n" meta:resourcekey="lblRelation_NoResource1" ></asp:Label></td>
                                <td style="width: 213px">
                                <asp:TextBox ID="txtRelation_No" runat="server" CssClass="citad-txt" Width="195px" MaxLength="40" AutoPostBack="True" OnTextChanged="txtRelation_No_TextChanged" 
                                    onpropertychange="Upper()" onblur="Blur(this)" meta:resourcekey="txtRelation_NoResource1" TabIndex="1" ></asp:TextBox>
                                <asp:Label ID="Label1" runat="server" ForeColor="Red" Text="*"></asp:Label></td>
                                <td align="right" style="width: 108px">
                                <asp:Label ID="lblServ_Code" runat="server" Text="Loại giao dịch" meta:resourcekey="lblServ_CodeResource1"></asp:Label>&nbsp;</td>
                                <td>
                                <asp:DropDownList ID="cboServ_Code" runat="server" Width="235px" meta:resourcekey="cboServ_CodeResource1" TabIndex="2" >
                                </asp:DropDownList><asp:Label ID="Label2" runat="server" ForeColor="Red" Text="*"></asp:Label></td>
                            </tr>
                        </table>
                    <table cellpadding="0" cellspacing="1">
                        <tr>
                            <td style="width: 106px">
                                <asp:Label ID="lblO_CI_ID" runat="server" Text="Ng&#226;n h&#224;ng gửi" meta:resourcekey="lblO_CI_IDResource1" ></asp:Label></td>
                            <td colspan="2">
                                <table cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td>
                                            <asp:TextBox ID="txtOCI_Code" runat="server" CssClass="citad-txt citad-txtReadonly" Width="85px" ReadOnly="True" MaxLength="12" meta:resourcekey="txtOCI_CodeResource1" TabIndex="-1" ></asp:TextBox>
                                        </td>
                                        <td style="padding-left:4px;">
                                            <asp:Label ID="lblOCI_Name" runat="server" ForeColor="#0046D5" meta:resourcekey="lblOCI_NameResource1" ></asp:Label>
                                        </td>
                                    </tr>
                                </table>
                                </td>
                            <td style="width: 67px">
                                <asp:Label ID="lblDate" runat="server" Text="Ng&#224;y lệnh" meta:resourcekey="lblDateResource1" ></asp:Label></td>
                            <td>
                                <asp:TextBox ID="txtDate" runat="server" CssClass="citad-txt citad-txtReadonly" Width="68px" ReadOnly="True" meta:resourcekey="txtDateResource1" TabIndex="-1" ></asp:TextBox><asp:TextBox
                                    ID="txtTime" runat="server" CssClass="citad-txt citad-txtReadonly" Width="68px" style="margin-left:2px" ReadOnly="True" meta:resourcekey="txtTimeResource1" TabIndex="-1" ></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td style="width: 106px">
                                <asp:Label ID="lblRCI_ID" runat="server" Text="Ng&#226;n h&#224;ng nhận" meta:resourcekey="lblRCI_IDResource1" ></asp:Label></td>
                            <td colspan="2">
                                <table cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td>
                                            <asp:TextBox ID="txtRCI_Code" runat="server" CssClass="citad-txt txtPopup" Width="85px" MaxLength="12" meta:resourcekey="txtRCI_CodeResource1" TabIndex="3" ></asp:TextBox><asp:Label
                                                ID="Label3" runat="server" ForeColor="Red" Text="*"></asp:Label>
                                        </td>
                                        <td style="padding-left:4px;">
                                                <asp:Label ID="lblRCI_Name" runat="server" ForeColor="#0046D5" meta:resourcekey="lblRCI_NameResource1" ></asp:Label></td>
                                    </tr>
                                </table>
                                </td>
                            <td style="width: 67px">
                                <asp:Label ID="lblUser_ID" runat="server" Text="TELLER ID" meta:resourcekey="lblUser_IDResource1" ></asp:Label></td>
                            <td>
                                <asp:TextBox ID="txtUser_ID" runat="server" CssClass="citad-txt citad-txtReadonly" Width="143px" ReadOnly="True" meta:resourcekey="txtUser_IDResource1" TabIndex="-1" ></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td style="width: 106px">
                                <asp:Label ID="lblAmount" runat="server" Text="Số tiền chuyển" meta:resourcekey="lblAmountResource1" ></asp:Label></td>
                            <td colspan="2">
                                <asp:TextBox ID="txtAmount" runat="server" CssClass="citad-txt" Width="180px" style="text-align:right;" MaxLength="30" meta:resourcekey="txtAmountResource1" TabIndex="4" onchange="fcnAmountBlur(this);"  ></asp:TextBox><asp:Label
                                    ID="Label4" runat="server" ForeColor="Red" Text="*"></asp:Label>
                                <asp:TextBox Text="VND" ID="txtCurrency" runat="server" CssClass="citad-txt citad-txtReadonly" Width="32px" ReadOnly="True" meta:resourcekey="txtCurrencyResource1" TabIndex="-1" ></asp:TextBox></td>
                            <td style="width: 67px">
                                <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 citad-txtReadonly" Width="143px" ReadOnly="True" meta:resourcekey="txtSerial_NoResource1" TabIndex="-1" ></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td style="width: 106px">
                                <asp:Label ID="lblSD_Time" runat="server" Text="Thời điểm gửi lệnh" meta:resourcekey="lblSD_TimeResource1" ></asp:Label></td>
                            <td>
                                <asp:TextBox ID="txtDisplaySDTime" runat="server" CssClass="citad-txt citad-txtReadonly" Width="180px" ReadOnly="True" meta:resourcekey="txtDisplaySDTimeResource1" TabIndex="-1" ></asp:TextBox></td>
                            <td style="width: 152px" align="right">
                                <asp:Label ID="lblTrx_Status" runat="server" Text="T&#236;nh trạng giao dịch" meta:resourcekey="lblTrx_StatusResource1" ></asp:Label>&nbsp;</td>
                            <td colspan="2">
                                <asp:TextBox ID="txtStatus" runat="server" CssClass="citad-txt citad-txtReadonly" Width="211px" ReadOnly="True" Font-Bold="True" ForeColor="Red" meta:resourcekey="txtStatusResource1" TabIndex="-1"></asp:TextBox></td>
                        </tr>
                    </table>
                    </fieldset>
                    <fieldset><legend>
                        <asp:Label ID="GroupBox1" runat="server" Text="Th&#244;ng tin người gửi" meta:resourcekey="GroupBox1Resource1" ></asp:Label></legend>
                        <table id="TABLE1" cellpadding="0" cellspacing="1" >
                            <tr>
                                <td style="width: 106px">
                                    <asp:Label ID="lblSD_Name" runat="server" Text="T&#234;n" meta:resourcekey="lblSD_NameResource1" ></asp:Label></td>
                                <td align="left" colspan="4">
                                    <asp:TextBox ID="txtSD_Name" runat="server" CssClass="citad-txt" Width="550px" MaxLength="70"  ReadOnly="True" meta:resourcekey="txtSD_NameResource1" TabIndex="-1"></asp:TextBox><asp:Label ID="Label5" runat="server" ForeColor="Red" Text="*"></asp:Label></td>
                            </tr>
                            <tr>
                                <td style="width: 106px">
                                    <asp:Label ID="lblSD_ADDR" runat="server" Text="Địa chỉ" meta:resourcekey="lblSD_ADDRResource1" ></asp:Label></td>
                                <td colspan="4">
                                    <asp:TextBox ID="txtSD_ADDR" runat="server" CssClass="citad-txt" Width="550px" MaxLength="70" ReadOnly="True" meta:resourcekey="txtSD_ADDRResource1" TabIndex="-1"></asp:TextBox></td>
                            </tr>
                        </table>
                        <table cellpadding="0" cellspacing="1">
                            <tr>
                                <td style="width: 104px">
                                    <asp:Label ID="lblSD_ACCNT" runat="server" Text="Số t&#224;i khoản" meta:resourcekey="lblSD_ACCNTResource1" ></asp:Label></td>
                                <td style="width: 239px">
                                    <asp:TextBox ID="txtSD_ACCNT" runat="server" CssClass="citad-txt" Width="180px" MaxLength="25"  ReadOnly="True" meta:resourcekey="txtSD_ACCNTResource1" TabIndex="-1"></asp:TextBox><asp:Label ID="Label6" runat="server" ForeColor="Red" Text="*"></asp:Label></td>
                                <td align="right" style="width: 90px">
                                    <asp:Label ID="lblSD_Code" runat="server" Text="M&#227;" meta:resourcekey="lblSD_CodeResource1" ></asp:Label>&nbsp;</td>
                                <td>
                                    <asp:TextBox ID="txtSD_Code" runat="server" CssClass="citad-txt"
                                        Width="219px" MaxLength="20" ReadOnly="True" meta:resourcekey="txtSD_CodeResource1" TabIndex="-1"></asp:TextBox></td>
                            </tr>
                            <tr>
                                <td style="width: 104px">
                                    <asp:Label ID="lblO_Indirect" runat="server" Text="Tại" meta:resourcekey="lblO_IndirectResource1" ></asp:Label></td>
                                <td colspan="3">
                                    <table cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td>
                                                <asp:TextBox ID="txtO_Indirect_Code" runat="server" CssClass="citad-txt txtPopup" Width="85px" meta:resourcekey="txtO_Indirect_CodeResource1" TabIndex="5" ></asp:TextBox><asp:Label
                                                    ID="Label14" runat="server" ForeColor="Red" Text="*"></asp:Label>
                                            </td>
                                            <td style="padding-left:4px;">
                                                    <asp:Label ID="lblO_Indirect_Name" runat="server" ForeColor="#0046D5" meta:resourcekey="lblO_Indirect_NameResource1" ></asp:Label></td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </fieldset>
                    <fieldset><legend><asp:Label ID="GroupBox2" runat="server" Text="Th&#244;ng tin người nhận" meta:resourcekey="GroupBox2Resource1" ></asp:Label></legend>
                        <table cellpadding="0" cellspacing="1">
                            <tr>
                                <td style="width: 106px">
                                <asp:Label ID="lblRV_Name" runat="server" Text="T&#234;n" meta:resourcekey="lblRV_NameResource1" ></asp:Label></td>
                                <td align="left" colspan="4">
                                <asp:TextBox ID="txtRV_Name" runat="server" CssClass="citad-txt" Width="550px" MaxLength="70" ReadOnly="True" meta:resourcekey="txtRV_NameResource1" TabIndex="-1"></asp:TextBox><asp:Label ID="Label7" runat="server" ForeColor="Red" Text="*"></asp:Label></td>
                            </tr>
                            <tr>
                                <td style="width: 106px">
                                <asp:Label ID="lblRV_ADDR" runat="server" Text="Địa chỉ" meta:resourcekey="lblRV_ADDRResource1" ></asp:Label></td>
                                <td colspan="4">
                                <asp:TextBox ID="txtRV_ADDR" runat="server" CssClass="citad-txt" Width="550px" MaxLength="70" ReadOnly="True" meta:resourcekey="txtRV_ADDRResource1" TabIndex="-1"></asp:TextBox></td>
                            </tr>
                        </table>
                        <table cellpadding="0" cellspacing="1">
                            <tr>
                                <td style="width: 109px">
                                <asp:Label ID="lblRV_ACCNT" runat="server" Text="Số t&#224;i khoản" meta:resourcekey="lblRV_ACCNTResource1" ></asp:Label></td>
                                <td style="width: 267px">
                                <asp:TextBox ID="txtRV_ACCNT" runat="server" CssClass="citad-txt" Width="180px" MaxLength="25" ReadOnly="True" meta:resourcekey="txtRV_ACCNTResource1" TabIndex="-1"></asp:TextBox><asp:Label ID="Label8" runat="server" ForeColor="Red" Text="*"></asp:Label></td>
                                <td style="width: 71px" align="right">
                                <asp:Label ID="lblRV_Code" runat="server" Text="Code" meta:resourcekey="lblRV_CodeResource1"></asp:Label>&nbsp;</td>
                                <%--<td style="width: 232px">
                                <asp:TextBox ID="txtRV_Code" runat="server" CssClass="citad-txt"
                                    Width="219px" MaxLength="8" meta:resourcekey="txtRV_CodeResource1" TabIndex="14"></asp:TextBox>
                                </td>--%>
                                <td style="width: 232px">
                                                <table cellpadding="0" cellspacing="0">
                                                <tr>
                                                    <td>
                                                        <asp:TextBox ID="txtRV_Code" runat="server" CssClass="citad-txt"
                                                            Width="85px" meta:resourcekey="txtRV_CodeResource1" TabIndex="14" MaxLength="8" ></asp:TextBox><asp:Label
                                                             ID="lblMaKH" runat="server" Enabled="false" ForeColor="Red" Text="*" meta:resourcekey="Label14Resource1"></asp:Label>
                                                             
                                                    </td>
                                                    <td style="padding-left: 4px;">
                                                        <asp:Label ID="lblRV_Code_Name" runat="server" ForeColor="#0046D5" meta:resourcekey="lblRV_Code_NameResource1"></asp:Label></td>
                                                </tr>
                                            </table>
                                        </td>
                            </tr>
                            <tr>
                                <td style="width: 109px">
                                <asp:Label ID="lblR_Indirect_ID" runat="server" Text="Tại" meta:resourcekey="lblR_Indirect_IDResource1" ></asp:Label></td>
                                <td style="width: 267px">
                                <table cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td>
                                            <asp:TextBox ID="txtR_Indirect_Code" runat="server" CssClass="citad-txt txtPopup" Width="85px" meta:resourcekey="txtR_Indirect_CodeResource1" TabIndex="6" ></asp:TextBox><asp:Label
                                                ID="Label15" runat="server" ForeColor="Red" Text="*"></asp:Label>
                                        </td>
                                        <td style="padding-left:4px;">
                                                <asp:Label ID="lblR_Indirect_Name" runat="server" ForeColor="#0046D5" meta:resourcekey="lblR_Indirect_NameResource1"></asp:Label></td>
                                    </tr>
                                </table>
                                </td>
                                <td colspan="1" align="right" style="width: 71px">
        <asp:Label ID="lblTax_Code" runat="server" Text="Mã số thuế " meta:resourcekey="lblTax_CodeResource1"></asp:Label>&nbsp;</td>
                                <td colspan="1" style="width: 232px">
        <asp:TextBox ID="txtTax_Code" runat="server" CssClass="citad-txt" Width="219px" MaxLength="25" meta:resourcekey="txtTax_CodeResource1" TabIndex="17"></asp:TextBox></td>
                            </tr>
                        </table>
                        <table cellpadding="0" cellspacing="1">
                            <tr>
                                <td colspan="2" style="width: 95px;">
                                <asp:Label ID="lblReference" runat="server" Text="Chương - khoản tiểu mục" meta:resourcekey="lblReferenceResource1" Width="102px" ></asp:Label></td>
                                <td colspan="1" style="height: 14px; width: 504px;">
                                <asp:TextBox ID="txtReference" runat="server" CssClass="citad-txt" Width="553px" MaxLength="5" ReadOnly="True" meta:resourcekey="txtReferenceResource1" TabIndex="-1"></asp:TextBox></td>
                            </tr>
                        </table>
                    </fieldset>
                    <fieldset id="fdsInterbankMarket" runat="server" visible="False">
                                <legend>
                                    <asp:Label ID="lblLNH" meta:resourcekey="lblLNHResource1" runat="server" Text="Thông tin giao dịch trên thị trường LNH"></asp:Label>
                                </legend>
                                <table cellpadding="0" cellspacing="1" >
                                    <tr>
                                        <td style="width: 106px" >
                                            <asp:Label ID="lblNgayGiaoDich" runat="server" Text="Ngày giao dịch"></asp:Label></td>
                        
                        <td style="width: 107px" >
                            <asp:TextBox ID="dtpTRX_Date" runat="server" 
                                Width="70px" MaxLength="8" ReadOnly="true" CssClass="citad-txt"  TabIndex="18"></asp:TextBox>

                        </td>
                        <td align="right" style="padding-right:3px;width: 78px">
                            <asp:Label ID="lblLoaiGiaoDich" meta:resourcekey="lblLoaiGiaoDichResource1" runat="server" Text="Loại giao dịch"></asp:Label>
                        </td>
                        <td><asp:TextBox ID="txtTrxType" runat="server"  TabIndex="18"
                                Width="30px" MaxLength="3" ReadOnly="true" CssClass="citad-txt"></asp:TextBox>
                        
                            </td>
                      <td colspan="3" style="width:170px;"><asp:Label ID="lblTrxType" style="margin-left:3px;"  ForeColor="#0046D5" runat="server" Text="" /></td>
                        <td align="right" style="padding-right:3px">
                            <asp:Label ID="lblLaiSuat" meta:resourcekey="lblLaiSuatResource1" runat="server" Text="Lãi suất"></asp:Label>
                        </td>
                        <td><asp:TextBox ID="txtLaiSuat" runat="server" meta:resourcekey="dtpTRX_DateResource1" TabIndex="18"
                                Width="35px" MaxLength="5" ReadOnly="true" CssClass="citad-txt"></asp:TextBox> 
                                <asp:Label ID="lblNam" meta:resourcekey="lblNamResource1" runat="server" Text="Năm"/>
                                </td>
                    </tr>
                    <tr>
                    <td><asp:Label ID="lblKyHan" meta:resourcekey="lblKyHanResource1" runat="server" Text="Kỳ hạn"></asp:Label></td>
                    <td>
                    <asp:TextBox ID="txtKyHan" runat="server"  TabIndex="18"
                                Width="50px" MaxLength="4" CssClass="citad-txt" ReadOnly="true"></asp:TextBox>
                                <asp:Label ID="lblNgay" meta:resourcekey="lblNgayResource1" runat="server" Text="Ngày"></asp:Label>
                    </td>
                    <td align="right" style="padding-right:3px"><asp:Label ID="lblLoaiTien" runat="server" Text="Loại tiền" />
                    </td>
                    <td><asp:TextBox ID="txtCurrency2" runat="server"  TabIndex="18"
                                Width="30px" MaxLength="3" ReadOnly="true" CssClass="citad-txt" /></td>
                    <td><asp:Label ID="lblCurrency" runat="server" ForeColor="#0046D5" /></td>
                    <td align="right" style="padding-right:3px">
                    <asp:Label ID="lblLoaiGTCG" meta:resourcekey="lblLoaiGTCGResource1" style="margin-left:3px;" runat="server" Text="Loại GTCG" />
                    </td>
                    <td><asp:TextBox ID="txtValuablePapers" runat="server"  TabIndex="18"
                                Width="40px" MaxLength="4" ReadOnly="true" CssClass="citad-txt"></asp:TextBox>
                                </td>
                                <td colspan="2"><asp:Label ID="lblValuablePapers" style="margin-left:3px;" ForeColor="#0046D5" runat="server" Text="" /></td>
                    </tr>
                </table>
                
                </fieldset>
                    <fieldset style="margin-top:5px;">
                        <table cellpadding="0" cellspacing="1">
                            <tr>
                                <td style="width: 106px" valign="top">
                                <asp:Label ID="lblContent" runat="server" Text="Nội dung lệnh chuyển tiền" meta:resourcekey="lblContentResource1" Width="100px" ></asp:Label></td>
                                <td>
                                <asp:TextBox ID="txtContent" Height="42px"  runat="server" CssClass="citad-txt" TextMode="MultiLine"
                                    Width="550px" MaxLength="210" ReadOnly="True" meta:resourcekey="txtContentResource1" TabIndex="-1"></asp:TextBox></td>
                                <td valign="top">
                                    <asp:Label ID="Label9" runat="server" ForeColor="Red" Text="*"></asp:Label></td>
                            </tr>
                        </table>
                    <table cellpadding="0" cellspacing="1">
                        <tr>
                            <td style="width: 106px">
                                <asp:Label ID="lblOPRT1" runat="server" Text="Loại nghiệp vụ 1" meta:resourcekey="lblOPRT1Resource1" ></asp:Label></td>
                            <td style="width: 204px">
                                <asp:TextBox ID="txtOPRT1" runat="server" CssClass="citad-txt" Width="40px" MaxLength="2" ReadOnly="True" meta:resourcekey="txtOPRT1Resource1" TabIndex="-1"></asp:TextBox>
                                <asp:Label ID="lblDisplay_OP1" runat="server" ForeColor="#0046D5" meta:resourcekey="lblDisplay_OP1Resource1" ></asp:Label></td>
                            <td style="width: 110px">
                                <asp:Label ID="lblOPRT2" runat="server" Text="Loại nghiệp vụ 2" meta:resourcekey="lblOPRT2Resource1" ></asp:Label></td>
                            <td>
                                <asp:TextBox ID="txtOPRT2" runat="server" CssClass="citad-txt" Width="40px" MaxLength="3" ReadOnly="True" meta:resourcekey="txtOPRT2Resource1" TabIndex="-1"></asp:TextBox><asp:Label
                                    ID="Label11" runat="server" ForeColor="Red" Text="*"></asp:Label>
                                <asp:Label ID="lblDisplay_OP2" runat="server" ForeColor="#0046D5" meta:resourcekey="lblDisplay_OP2Resource1" ></asp:Label></td>
                        </tr>
                        <tr>
                            <td style="width: 106px">
                                <asp:Label ID="lblFee_Flag" runat="server" Text="M&#227; loại t&#237;nh ph&#237;" meta:resourcekey="lblFee_FlagResource1" ></asp:Label></td>
                            <td style="width: 204px"><asp:DropDownList ID="cboFee_Flag" runat="server" Width="180px" Enabled="False" meta:resourcekey="cboFee_FlagResource1" TabIndex="-1">
                                <asp:ListItem Value="1" meta:resourcekey="ListItemResource1" Text="T&#237;nh mức ph&#237; 1" ></asp:ListItem>
                                <asp:ListItem Value="2" meta:resourcekey="ListItemResource2" Text="T&#237;nh mức ph&#237; 2" ></asp:ListItem>
                            </asp:DropDownList></td>
                            <td style="width: 110px">
                                <asp:Label ID="lblFeeCI" runat="server" Text="Ng&#226;n h&#224;ng chịu ph&#237;" meta:resourcekey="lblFeeCIResource1" ></asp:Label>&nbsp;</td>
                            <td>
                            <table cellpadding="0" cellspacing="0">
                                <tr>
                                    <td>
                                        <asp:TextBox ID="txtFeeCICode" runat="server" CssClass="citad-txt" Width="85px" MaxLength="12" ReadOnly="True" meta:resourcekey="txtFeeCICodeResource1" TabIndex="-1"></asp:TextBox>
                                    </td>
                                    <td style="padding-left:4px;">
                                        <asp:Label ID="lblFeeCIName" runat="server" ForeColor="#0046D5" meta:resourcekey="lblFeeCINameResource1" ></asp:Label></td>
                                </tr>
                            </table>
                            </td>
                        </tr>
                    </table>  
                    </fieldset>
                    <fieldset id="fdsDebit" runat="server">
                        <legend>
                            <asp:Label ID="lblDebit" runat="server" Text="Trả lời" meta:resourcekey="lblDebitResource1" ></asp:Label></legend>
                        <asp:RadioButton ID="rdbAccept" meta:resourcekey="rdbAcceptResource1" runat="server" Text="Chấp nhận" Checked="True" GroupName="debit" Enabled="False" TabIndex="-1" />
                        <asp:RadioButton ID="rdbReject" meta:resourcekey="rdbRejectResource1" runat="server" Text="Từ chối" GroupName="debit" Enabled="False" TabIndex="-1" /><br />
                        <asp:TextBox ID="txtReject_Reason" runat="server" CssClass="citad-txt citad-txtReadOnly"
                            Height="30px" ReadOnly="True" TextMode="MultiLine" Width="667px" TabIndex="-1"></asp:TextBox>
                    </fieldset>
                </td>
                <td valign="top" align="right" style="padding-left: 4px;padding-top:2px">
                    <table cellpadding="0" cellspacing="0" style="padding-bottom:5px;">
                    <tr>
                        <td>
                            <asp:Button ID="btnConfirm" runat="server" CssClass="citad-btn" Text="Duyệt" OnClick="btnConfirm_Click" meta:resourcekey="btnConfirmResource1" TabIndex="10" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Button ID="btnReturn" OnClientClick="return fcnConfirmReturnReject();" runat="server" CssClass="citad-btn" Text="Trả lại" OnClick="btnReturn_Click" meta:resourcekey="btnReturnResource1" TabIndex="11" />
                            <asp:Button ID="btnReject" OnClientClick="return fcnConfirmReturnReject();" runat="server" CssClass="citad-btn" Text="Tho&#225;i" OnClick="btnReject_Click" meta:resourcekey="btnRejectResource1" TabIndex="12" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Button ID="btnPrevios" runat="server" CssClass="citad-btn" Text="Trước" OnClick="btnPrevios_Click" meta:resourcekey="btnPreviosResource1" TabIndex="13" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Button ID="btnNext" runat="server" CssClass="citad-btn" Text="Tiếp theo" OnClick="btnNext_Click" meta:resourcekey="btnNextResource1" TabIndex="14" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Button ID="btnClose" runat="server" CssClass="citad-btn" Text="Đ&#243;ng" OnClick="btnClose_Click" meta:resourcekey="btnCloseResource1" TabIndex="15" />
                        </td>
                    </tr>
                    <tr>
                        <td align="center">
                            <asp:Label ID="lblCount" runat="server" Text="Tổng số" Font-Bold="True" ForeColor="#0046D5" meta:resourcekey="lblCountResource1" ></asp:Label><br />
                            <asp:Label ID="lblTongSo" runat="server" Text="0/0" Font-Bold="True" ForeColor="#0046D5" meta:resourcekey="lblTongSoResource1" ></asp:Label>
                        </td>
                    </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td align="right" valign="bottom">
                    <asp:Button ID="btnImport" runat="server" CssClass="citad-btn" Text="Import" Visible="False" meta:resourcekey="btnImportResource1" />                    
                </td>
            </tr>
        </table>
        </div>
        <asp:Label ID="lblSD_Indentify" runat="server" Text="Số CMND/hộ chiếu" meta:resourcekey="lblSD_IndentifyResource1" Visible="False" ></asp:Label><asp:TextBox ID="txtSD_Indentify" runat="server" CssClass="citad-txt" Width="180px" MaxLength="25" ReadOnly="True" meta:resourcekey="txtSD_IndentifyResource1" TabIndex="-1" Visible="False"></asp:TextBox>
        <asp:Label ID="lblRV_Indentify" runat="server" Text="Số CMND/hộ chiếu" meta:resourcekey="lblRV_IndentifyResource1" Visible="False" ></asp:Label>
        <asp:TextBox ID="txtRV_Indentify" runat="server" CssClass="citad-txt"
            Width="180px" MaxLength="25" ReadOnly="True" meta:resourcekey="txtRV_IndentifyResource1" TabIndex="-1" Visible="False"></asp:TextBox>
            &nbsp;

        <asp:HiddenField ID="hidTrx_Type" runat="server" />
        <asp:HiddenField ID="hidO_CI_ID" runat="server" />
        <asp:HiddenField ID="hidTrx_Date" runat="server" />
        <asp:HiddenField ID="hidR_CI_ID" runat="server" />
        <asp:HiddenField ID="hidSD_Time" runat="server" />
        <asp:HiddenField ID="hidTrx_Status" runat="server" />
        <asp:HiddenField ID="hidO_Indirect_ID" runat="server" />
        <asp:HiddenField ID="hidR_Indirect_ID" runat="server" />
        <asp:HiddenField ID="hidFeeCI_ID" runat="server" />
        <asp:HiddenField ID="hidMsg_Key" runat="server" />
        <asp:HiddenField ID="hidTAD_ID" runat="server" />
        <asp:HiddenField ID="hidMAC" runat="server" />
        <asp:HiddenField ID="hidMsg_Type" runat="server" />
        <asp:HiddenField ID="hidInput_Type" runat="server" />
        <asp:HiddenField ID="hidE_Sign" runat="server" />
        <asp:HiddenField ID="hidProcess" runat="server" />
        <asp:HiddenField ID="hidMsg_Reason" runat="server" />

        <asp:HiddenField ID="hidFocusControlName" runat="server" />

        <asp:HiddenField ID="hidlblRCI_Name" runat="server" />
        <asp:HiddenField ID="hidlblO_Indirect_Name" runat="server" />
        <asp:HiddenField ID="hidlblR_Indirect_Name" runat="server" />

        <ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender2" runat="server"
            TargetControlID="txtAmount" 
            Mask="99,999,999,999,999,999,999" 
            MaskType="Number" 
            InputDirection="RightToLeft" 
            AcceptNegative="Left"
            ErrorTooltipEnabled="True"
            CultureName="vi-VN" 
            Enabled="True"
            AutoComplete="false"
            />
        <ajaxToolkit:FilteredTextBoxExtender ID="ftbRelation_No" runat="server" 
            TargetControlID="txtRelation_No"
            FilterMode="ValidChars"
            ValidChars="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ -_" Enabled="True"
            />
        <ajaxToolkit:FilteredTextBoxExtender ID="ftbRCI_Code" runat="server" 
            TargetControlID="txtRCI_Code"
            ValidChars="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ -_" Enabled="True"
            />
        <ajaxToolkit:FilteredTextBoxExtender ID="ftbO_Indirect_Code" runat="server" 
            TargetControlID="txtO_Indirect_Code"
            FilterType="Custom, Numbers"
            ValidChars="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ -_" Enabled="True"
            />
        <ajaxToolkit:FilteredTextBoxExtender ID="ftbR_Indirect_Code" runat="server" 
            TargetControlID="txtR_Indirect_Code"
            FilterType="Custom, Numbers"
            ValidChars="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ -_" Enabled="True"
            />

        <uc1:MessageBox ID="MessageBox1" runat="server" />
        </ContentTemplate>
    </asp:UpdatePanel>
    <script type="text/javascript">
        try
        {
            Sys.Net.WebRequestManager.add_invokingRequest(onInvoke);
            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(onEndRequest);
        }
        catch(err){}

        function pageUnload()
        {
            try
            {
                Sys.Net.WebRequestManager.remove_invokingRequest(onInvoke);
                Sys.WebForms.PageRequestManager.getInstance().remove_endRequest(onEndRequest);
            }
            catch(err){}
        }

        var activeControl;
        function onInvoke(sender, args)
        {
            try
            {
                activeControl = document.activeElement;
                $get('<%=hidlblRCI_Name.ClientID %>').value=$get('<%=lblRCI_Name.ClientID %>').innerHTML;
                $get('<%=hidlblO_Indirect_Name.ClientID %>').value=$get('<%=lblO_Indirect_Name.ClientID %>').innerHTML;
                $get('<%=hidlblR_Indirect_Name.ClientID %>').value=$get('<%=lblR_Indirect_Name.ClientID %>').innerHTML;
            }
            catch(err){}
        }
        
        function onEndRequest(sender, args)
        {
            fcnUpdateUI();
        }

        function fcnUpdateUI()
        {
            if(document.getElementById('MBox').style.display == "none")
            {
                try
                {
                    var focusControlName=$get('<%=hidFocusControlName.ClientID %>').value;
                    if(focusControlName!="")
                    {
                        var ctlFocusControl = $get(focusControlName)
                        if (ctlFocusControl.disabled!='disabled' || ctlFocusControl.disabled!=true) ctlFocusControl.focus();
                        $get('<%=hidFocusControlName.ClientID %>').value = "";
                    }
                }
                catch (err)
                {
                }
            }
            $get('<%=lblRCI_Name.ClientID %>').innerHTML = $get('<%=hidlblRCI_Name.ClientID %>').value;
            $get('<%=lblO_Indirect_Name.ClientID %>').innerHTML = $get('<%=hidlblO_Indirect_Name.ClientID %>').value;
            $get('<%=lblR_Indirect_Name.ClientID %>').innerHTML = $get('<%=hidlblR_Indirect_Name.ClientID %>').value;
        }

        function onMBoxOK_Click()
        {
            try
            {
                var focusControlName=$get('<%=hidFocusControlName.ClientID %>').value;
                if(focusControlName!="")
                {
                    var ctlFocusControl = $get(focusControlName)
                    if (ctlFocusControl.disabled!='disabled' || ctlFocusControl.disabled!=true) ctlFocusControl.focus();
                    $get('<%=hidFocusControlName.ClientID %>').value = "";
                }
                else
                {
                    $get(activeControl.id).focus();
                }
            }
            catch (err)
            {
            }
        }

    </script>
<script type="text/javascript">
    //=======================================================

    //Hàm xử lý khi ô ci code bị thay đổi giá trị
    function fcnShowCIListOnChange(sender)
    {
        if(sender.readOnly)
        {
            return;
        }

        var v_ci_code = sender.value;
        if(v_ci_code.trim().length>0)
        {
            if(sender.id.match("txtRCI_Code")!=null)
            {
                if(sender.value.trim()==$get('<%= txtOCI_Code.ClientID %>').value.trim())
                {
                    sender.value = "";
                    fcnShowCIListOnChange(sender);
                    fcnShowPopupCIList(sender.id);
                }
                else
                {
                    PageMethods.fcnGetCI(v_ci_code,'1',GetRCI);
                }
            }
            else if(sender.id.match("txtO_Indirect_Code")!=null)
            {
                PageMethods.fcnGetCI(v_ci_code,'0',GetO_Indirect_CI);
            }
            else if(sender.id.match("txtR_Indirect_Code")!=null)
            {
                PageMethods.fcnGetCI(v_ci_code,'0',GetR_Indirect_CI);
            }
        }
        else
        {
            if(sender.id.match("txtRCI_Code"))
            {
                $get('<%= lblRCI_Name.ClientID %>').innerHTML = "";
                $get('<%= hidR_CI_ID.ClientID %>').value = "";
                $get('<%= hidlblRCI_Name.ClientID %>').value = "";
            }
            else if(sender.id.match("txtO_Indirect_Code"))
            {
                $get('<%= lblO_Indirect_Name.ClientID %>').innerHTML = "";
                $get('<%= hidO_Indirect_ID.ClientID %>').value = "";
                $get('<%= hidlblO_Indirect_Name.ClientID %>').value = "";
            }
            else if(sender.id.match("txtR_Indirect_Code"))
            {
                $get('<%= lblR_Indirect_Name.ClientID %>').innerHTML = "";
                $get('<%= hidR_Indirect_ID.ClientID %>').value = "";
                $get('<%= hidlblR_Indirect_Name.ClientID %>').value = "";
            }
        }
    }

    //Hàm xử lý khi ô ci code bị thay đổi giá trị
    function fcnShowCIListOnChangeF4(txtci_id)
    {
        var v_ci_code = $get(txtci_id).value;
        if(txtci_id.match("txtRCI_Code"))
        {
            PageMethods.fcnGetCI(v_ci_code,'1',GetRCI);
        }
        else if(txtci_id.match("txtO_Indirect_Code"))
        {
            PageMethods.fcnGetCI(v_ci_code,'0',GetO_Indirect_CI);
        }
        else if(txtci_id.match("txtR_Indirect_Code"))
        {
            PageMethods.fcnGetCI(v_ci_code,'0',GetR_Indirect_CI);
        }
    }

    //Hàm xử lý hiện danh sách ngân hàng
    function fcnShowPopupCIList(sender)
    {
        if(sender.readOnly)
        {
            return;
        }

        var strCICode = sender.value.trim();
        if (sender.id.match("txtRCI_Code"))
        {
            rValue = window.showModalDialog('../DanhSachNganHang/CIList.aspx' + '?randomNumber=' + Math.random() + "&CICode=" + strCICode + "&Direct=1&NotCICode=" + $get('<%= txtOCI_Code.ClientID %>').value,"",popupCIFeature);
        }
        else
        {
            rValue = window.showModalDialog('../DanhSachNganHang/CIList.aspx' + '?randomNumber=' + Math.random() + "&CICode=" + strCICode,"",popupCIFeature);
        }

        if(rValue!=undefined)
        {
            sender.value = rValue[1];
            if(sender.id.match("txtRCI_Code"))
            {
                $get('<%= lblRCI_Name.ClientID %>').innerHTML = rValue[2];
                $get('<%= lblRCI_Name.ClientID %>').style.color = 'blue';
                $get('<%= hidR_CI_ID.ClientID %>').value = rValue[0];
                $get('<%= hidlblRCI_Name.ClientID %>').value = rValue[2];
            }
            else if(sender.id.match("txtO_Indirect_Code"))
            {
                $get('<%= lblO_Indirect_Name.ClientID %>').innerHTML = rValue[2];
                $get('<%= lblO_Indirect_Name.ClientID %>').style.color = 'blue';
                $get('<%= hidO_Indirect_ID.ClientID %>').value = rValue[0];
                $get('<%= hidlblO_Indirect_Name.ClientID %>').value = rValue[2];
            }
            else if(sender.id.match("txtR_Indirect_Code"))
            {
                $get('<%= lblR_Indirect_Name.ClientID %>').innerHTML = rValue[2];
                $get('<%= lblR_Indirect_Name.ClientID %>').style.color = 'blue';
                $get('<%= hidR_Indirect_ID.ClientID %>').value = rValue[0];
                $get('<%= hidlblR_Indirect_Name.ClientID %>').value = rValue[2];
            }
        }
    }
    
    var v_isShowPopup = false;
    //Hàm xử lý khi người dùng ấn nút F4
    function fcnShowCIList(sender)
    {
        if (event.keyCode==115) //F4
        {
            var f_blur = sender.onblur;
            sender.onblur = null;
            fcnShowPopupCIList(sender);
            sender.onblur = f_blur;
            v_isShowPopup = true;
            event.keyCode=9;
        }
    }
    //Ngân hàng nhận
    function GetRCI(Results)
    {
        var objRCI = $get('<%= txtRCI_Code.ClientID %>');
        if(Results[0].length==0)
        {
            $get('<%= lblRCI_Name.ClientID %>').innerHTML = Results[1];
            $get('<%= lblRCI_Name.ClientID %>').style.color = 'red';
            $get('<%= hidlblRCI_Name.ClientID %>').value = Results[1];
            $get('<%= hidR_CI_ID.ClientID %>').value = Results[0];

            if(!v_isShowPopup)
            {
                fcnShowPopupCIList(objRCI);
            }
            v_isShowPopup = false;
        }
        else
        {
            if($get('<%= txtRCI_Code.ClientID %>').value!=$get('<%= txtOCI_Code.ClientID %>').value)
            {
                $get('<%= lblRCI_Name.ClientID %>').innerHTML = Results[1];
                $get('<%= lblRCI_Name.ClientID %>').style.color = 'blue';
                $get('<%= hidlblRCI_Name.ClientID %>').value = Results[1];
                $get('<%= hidR_CI_ID.ClientID %>').value = Results[0];
            }
            else
            {
                $get('<%= lblRCI_Name.ClientID %>').innerHTML = "";
                $get('<%= hidlblRCI_Name.ClientID %>').value = "";
                $get('<%= hidR_CI_ID.ClientID %>').value = "";
                if(!v_isShowPopup)
                {
                    fcnShowPopupCIList(objRCI);
                }
                v_isShowPopup = false;
            }
        }
    }

    //Ngân hàng gửi gián tiếp
    function GetO_Indirect_CI(Results)
    {
        var objO_I_CI = $get('<%= txtO_Indirect_Code.ClientID %>');
        if(Results[0].length==0)
        {
            $get('<%= lblO_Indirect_Name.ClientID %>').innerHTML = Results[1];
            $get('<%= lblO_Indirect_Name.ClientID %>').style.color = 'red';
            $get('<%= hidlblO_Indirect_Name.ClientID %>').value = Results[1];
            $get('<%= hidO_Indirect_ID.ClientID %>').value = Results[0];

            if(!v_isShowPopup)
            {
                fcnShowPopupCIList(objO_I_CI);
            }
            v_isShowPopup = false;
        }
        else
        {
            $get('<%= lblO_Indirect_Name.ClientID %>').innerHTML = Results[1];
            $get('<%= lblO_Indirect_Name.ClientID %>').style.color = 'blue';
            $get('<%= hidlblO_Indirect_Name.ClientID %>').value = Results[1];
            $get('<%= hidO_Indirect_ID.ClientID %>').value = Results[0];
        }
    }

    //Ngân hàng nhận gián tiếp
    function GetR_Indirect_CI(Results)
    {
        var objR_I_CI = $get('<%= txtR_Indirect_Code.ClientID %>');
        if(Results[0].length==0)
        {
            $get('<%= lblR_Indirect_Name.ClientID %>').innerHTML = Results[1];
            $get('<%= lblR_Indirect_Name.ClientID %>').style.color = 'red';
            $get('<%= hidlblR_Indirect_Name.ClientID %>').value = Results[1];
            $get('<%= hidR_Indirect_ID.ClientID %>').value = Results[0];

            if(!v_isShowPopup)
            {
                fcnShowPopupCIList(objR_I_CI);
            }
            v_isShowPopup = false;
        }
        else
        {
            $get('<%= lblR_Indirect_Name.ClientID %>').innerHTML = Results[1];
            $get('<%= lblR_Indirect_Name.ClientID %>').style.color = 'blue';
            $get('<%= hidlblR_Indirect_Name.ClientID %>').value = Results[1];
            $get('<%= hidR_Indirect_ID.ClientID %>').value = Results[0];
        }
    }
</script>
<script type="text/javascript">
    window.document.onkeydown=KeyDown;

    function fcnConfirmReturnReject()
    {
        rValue = window.showModalDialog('../LyDoThoaiDuyet/frmReason.aspx' + '?randomNumber=' + Math.random(),"",strReasonPopupFeature);
        if(rValue!=undefined)
        {
            document.getElementById('<%=hidMsg_Reason.ClientID %>').value = rValue;
            return true;
        }
        return false;
    }
</script>
</asp:Content>