<%@ Page Language="C#" 
    MasterPageFile="~/CITAD.Master" 
    AutoEventWireup="true" 
    CodeBehind="frmLetterMsgApprove.aspx.cs" 
    Inherits="CITAD.Modules.KiemSoatLenhTraSoat.Web.frmLetterMsgApprove" 
    Culture="auto" meta:resourcekey="PageResource1" 
    UICulture="auto" Title="Kiểm soát yêu cầu tra soát" %>

<%@ 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 type="text/javascript">
	    window.document.onkeydown=KeyDown;	    
        function fcnApproveReturnReject()
        {
            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>

    <ajaxToolkit:ToolkitScriptManager runat="Server" ID="ScriptManager1" EnableScriptGlobalization="True"
             EnableScriptLocalization="True" CombineScripts="True" EnablePageMethods="true"  />
    <div>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server"> 
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="txtRelation_No_Org" EventName="TextChanged" />
        </Triggers>
        <ContentTemplate>
            <table border="0" width="770" style="background-color: #FFFFFF; border-collapse:collapse; height: 1px;">
                <tr>
                    <td valign="top" style="width: 680px">
                            <table cellpadding="2">
                                <tr>
                                    <td style="width: 110px">
                                        <asp:Label ID="lblO_CI_CODE" runat="server" Text="Ngân hàng gửi" meta:resourcekey="lblO_CI_CODEResource1"></asp:Label></td>
                                    <td>
                                        <asp:TextBox ID="txtO_CI_CODE" runat="server" Width="80px"  meta:resourcekey="txtO_CI_CODEResource1" CssClass="citad-txtReadonly" TabIndex="-1"></asp:TextBox></td>
                                    <td align="left" style="width: 193px" >
                                        <asp:Label ID="lblO_CI_Name" runat="server" meta:resourcekey="lblO_CI_NameResource1"></asp:Label></td>
                                    <td align="right">
                                        <asp:Label ID="lblSerial_No" runat="server" Text="Số điện tra soát" meta:resourcekey="lblSerial_NoResource1" Width="100px"></asp:Label></td>
                                    <td align="right">
                                        <asp:TextBox ID="txtSerial_No" runat="server" Width="140px"  meta:resourcekey="txtSerial_NoResource1" CssClass="citad-txtReadonly" TabIndex="-1"></asp:TextBox></td>
                                </tr>
                                <tr>
                                    <td style="width: 110px">
                                        <asp:Label ID="lblR_CI_CODE" runat="server" Text="Ngân hàng nhận" meta:resourcekey="lblR_CI_CODEResource1"></asp:Label></td>
                                    <td>
                                        <asp:TextBox ID="txtR_CI_CODE" runat="server" Width="80px"  meta:resourcekey="txtR_CI_CODEResource1" CssClass="citad-txtReadonly" TabIndex="-1"></asp:TextBox></td>
                                    <td align="left" style="width: 193px" >
                                        <asp:Label ID="lblR_CI_Name" runat="server" meta:resourcekey="lblR_CI_NameResource1"></asp:Label></td>
                                    <td align="right">
                                        <asp:Label ID="lblUser_ID" runat="server" Text="Teller ID" meta:resourcekey="lblUser_IDResource1"></asp:Label></td>
                                    <td align="right">
                                        <asp:TextBox ID="txtUser_ID" runat="server" Width="140px"  meta:resourcekey="txtUser_IDResource1" CssClass="citad-txtReadonly" TabIndex="-1"></asp:TextBox></td>
                                </tr>
                                <tr>
                                    <td style="width: 110px">
                                        <asp:Label ID="lblSD_Time" runat="server" Text="Thời điểm tra soát" meta:resourcekey="lblSD_TimeResource1"></asp:Label></td>
                                    <td colspan="2">
                                        <asp:TextBox ID="txtSD_Time" runat="server" Width="150px"  meta:resourcekey="txtSD_TimeResource1" CssClass="citad-txtReadonly" TabIndex="-1"></asp:TextBox></td>
                                    <td align="right">
                                        <asp:Label ID="lblTrx_Date" runat="server" Text="Thời điểm tạo lệnh" meta:resourcekey="lblTrx_DateResource1" Width="110px"></asp:Label></td>
                                    <td align="right">
                                        <asp:TextBox ID="txtTrx_Date" runat="server"  Width="140px" meta:resourcekey="txtTrx_DateResource1" CssClass="citad-txtReadonly" TabIndex="-1"></asp:TextBox></td>
                                </tr>
                                <tr>
                                    <td colspan="5" align="right">
                                        <asp:Label ID="lblTrx_Status" runat="server" Text="Tình trạng giao dịch" meta:resourcekey="lblTrx_StatusResource1" Width="110px"></asp:Label>
                                        <asp:TextBox ID="txtTrx_Status" runat="server" BackColor="LightSkyBlue" Width="200px" Font-Bold="True" ForeColor="Brown" meta:resourcekey="txtTrx_StatusResource1" CssClass="citad-txtReadonly" TabIndex="-1"></asp:TextBox></td>
                                </tr>                                
                            </table>
                            
                                    <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: 116px" >
                                                    <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 citad-txtReadonly"  TabIndex="-1"></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="-1"
                                                Width="30px" MaxLength="3" ReadOnly="true" CssClass="citad-txt citad-txtReadonly"></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="-1"
                                                Width="35px" MaxLength="5" ReadOnly="true" CssClass="citad-txt citad-txtReadonly"></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="-1"
                                                    Width="50px" MaxLength="4" CssClass="citad-txt citad-txtReadonly" 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="-1"
                                                    Width="30px" MaxLength="3" ReadOnly="true" CssClass="citad-txt citad-txtReadonly" /></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="-1"
                                                    Width="40px" MaxLength="4" ReadOnly="true" CssClass="citad-txt citad-txtReadonly"></asp:TextBox>
                                                    </td>
                                                    <td colspan="2"><asp:Label ID="lblValuablePapers" style="margin-left:3px;" ForeColor="#0046D5" runat="server" Text="" /></td>
                                        </tr>
                                    </table>
                        
                                     </fieldset>
                            
                                        <fieldset>
                                            <legend><asp:Label ID="lblLetterContent" runat="server" Text="Nội dung tra soát" meta:resourcekey="lblLetterContentResource1"></asp:Label></legend>
                                            <table>
                                                <tr>
                                                    <td style="width: 110px">
                                                        <asp:Label ID="lblTrx_Date_Org" runat="server" Text="Ngày giao dịch" meta:resourcekey="lblTrx_Date_OrgResource1"></asp:Label>
                                                        </td>
                                                    <td style="width: 86px">
                                                        <asp:TextBox ID="txtTrx_Date_Org" runat="server" Width="80px" TabIndex="1" MaxLength="8" meta:resourcekey="txtTrx_Date_OrgResource1" CssClass="citad-txtReadonly"></asp:TextBox></td>                                                        
                                                    <td>
                                                    </td>
                                                    <td align="right">
                                                        <asp:Label ID="lblAmount" runat="server" Text="Số tiền" meta:resourcekey="lblAmountResource1"></asp:Label></td>
                                                    <td>
                                                        <asp:TextBox ID="txtAmount" runat="server" Width="120px" style="text-align: right"  meta:resourcekey="txtAmountResource1" CssClass="citad-txtReadonly" TabIndex="-1"></asp:TextBox></td>
                                                </tr>
                                                <tr>
                                                    <td style="width: 110px">
                                                        <asp:Label ID="lblRelation_No_Org" runat="server" Text="Số bút toán" meta:resourcekey="lblRelation_No_OrgResource1"></asp:Label></td>
                                                    <td style="width: 86px">
                                                        <asp:TextBox ID="txtRelation_No_Org" runat="server" Width="80px" AutoPostBack="True" OnTextChanged="txtRelation_No_Org_TextChanged" TabIndex="2" MaxLength="40" meta:resourcekey="txtRelation_No_OrgResource1" 
                                                            onpropertychange="Upper()" onblur="Blur(this)" CssClass="citad-txtReadonly"></asp:TextBox></td>
                                                    <td>
                                                        <fieldset>
                                                            <legend><asp:Label ID="grbFlow_Lag" runat="server" Text="Giao dịch" meta:resourcekey="grbFlow_LagResource1"></asp:Label></legend>
                                                            <table>
                                                                <tr>
                                                                    <td><asp:RadioButton ID="rdbSend" runat="server" Text="Đi" GroupName="grpGiaoDich" meta:resourcekey="rdbSendResource1" /></td>
                                                                    <td><asp:RadioButton ID="rdbReceive" runat="server" Text="Đến" GroupName="grpGiaoDich" meta:resourcekey="rdbReceiveResource1"/></td>
                                                                </tr>
                                                            </table>
                                                        </fieldset>
                                                        </td>
                                                    <td align="right">
                                                        <asp:Label ID="lblO_InDirect_Org" runat="server" Text="NH có TK gửi" meta:resourcekey="lblO_InDirect_OrgResource1"></asp:Label></td>
                                                    <td align="left">
                                                        <table cellpadding="0" cellspacing="0">
                                                            <tr>
                                                                <td>
                                                        <asp:TextBox ID="txtO_InDirect_CODE_Org" runat="server" Width="80px"  meta:resourcekey="txtO_InDirect_CODE_OrgResource1" CssClass="citad-txtReadonly" TabIndex="-1"></asp:TextBox></td>
                                                                <td>
                                                                    &nbsp;<asp:Label ID="lblO_InDirect_CODE_Org_Name" runat="server" meta:resourcekey="lblO_InDirect_CODE_Org_NameResource1" Text="aa"></asp:Label>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td style="width: 110px">
                                                        <asp:Label ID="lblSerial_No_Org" runat="server" Text="Số giao dịch" meta:resourcekey="lblSerial_No_OrgResource1"></asp:Label></td>
                                                    <td style="width: 86px">
                                                        <asp:TextBox ID="txtSerial_No_Org" runat="server" Width="80px"  meta:resourcekey="txtSerial_No_OrgResource1" CssClass="citad-txtReadonly" TabIndex="-1"></asp:TextBox></td>
                                                    <td>
                                                        <fieldset>
                                                            <legend><asp:Label ID="grbTrx_Type_Org" runat="server" Text="Giá trị" meta:resourcekey="grbTrx_Type_OrgResource1"></asp:Label></legend>
                                                            <table>
                                                                <tr>
                                                                    <td><asp:RadioButton ID="rdbLV" runat="server" Text="Thấp" GroupName="grpGiaTri" meta:resourcekey="rdbLVResource1" /></td>
                                                                    <td><asp:RadioButton ID="rdbHV" runat="server" Text="Cao" GroupName="grpGiaTri" meta:resourcekey="rdbHVResource1" /></td>
                                                                </tr>
                                                            </table>
                                                        </fieldset></td>
                                                    <td align="right">
                                                        <asp:Label ID="lblR_InDirect_Org" runat="server" Text="NH có TK nhận" meta:resourcekey="lblR_InDirect_OrgResource1"></asp:Label>&nbsp;
                                                        </td>
                                                    <td align="left">
                                                        <table cellpadding="0" cellspacing="0">
                                                            <tr>
                                                                <td>
                                                        <asp:TextBox ID="txtR_InDirect_CODE_Org" runat="server" Width="80px"  meta:resourcekey="txtR_InDirect_CODE_OrgResource1" CssClass="citad-txtReadonly" TabIndex="-1"></asp:TextBox></td>
                                                                <td>
                                                                    &nbsp;<asp:Label ID="lblR_InDirect_CODE_Org_Name" runat="server" meta:resourcekey="lblR_InDirect_CODE_Org_NameResource1" Text="111"></asp:Label></td>
                                                            </tr>
                                                        </table>
                                                    </td>
                                                </tr>
                                            </table>
                                            <table>
                                                <tr>
                                                    <td style="width: 110px">
                                                        <asp:Label ID="lblLetter_Content" runat="server" Text="Nội dung yêu cầu tra soát" meta:resourcekey="lblLetter_ContentResource1"></asp:Label></td>
                                                    <td>
                                                        <asp:TextBox ID="txtLetter_Content" runat="server" Height="75px" TextMode="MultiLine" Width="545px"  TabIndex="-1" meta:resourcekey="txtLetter_ContentResource1" CssClass="citad-txtReadonly"></asp:TextBox></td>
                                                </tr>
                                                <tr>
                                                    <td style="width: 110px">
                                                        <asp:Label ID="lblTrx_DateX" runat="server" Text="Thời điểm xử lý tại NH nhận" meta:resourcekey="lblTrx_DateXResource1"></asp:Label></td>
                                                    <td>
                                                        <asp:TextBox ID="txtTrx_DateX" runat="server"  meta:resourcekey="txtTrx_DateXResource1" CssClass="citad-txtReadonly" TabIndex="-1"></asp:TextBox></td>
                                                </tr>
                                                <tr>
                                                    <td style="width: 110px">
                                                        <asp:Label ID="lblLetter_ContentX" runat="server" Text="Nội dung ngân hàng nhận trả lời" meta:resourcekey="lblLetter_ContentXResource1"></asp:Label></td>
                                                    <td>
                                                        <asp:TextBox ID="txtLetter_ContentX" runat="server" Height="75px" TextMode="MultiLine" Width="545px"  meta:resourcekey="txtLetter_ContentXResource1" CssClass="citad-txtReadonly" TabIndex="-1"></asp:TextBox></td>
                                                </tr>
                                            </table>
                                        </fieldset>
                    </td>
                    <td valign="top" align="center">
                        <table>
                            <tr>
                                <td><asp:Button ID="btnApprove" runat="server" Text="Duyệt" OnClick="btnApprove_Click" meta:resourcekey="btnApproveResource1" TabIndex="3" CssClass="citad-btn" /></td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Button ID="btnReturn" runat="server" Text="Trả lại" OnClick="btnReturn_Click" meta:resourcekey="btnReturnResource1" TabIndex="5" CssClass="citad-btn" />
                                    <asp:Button ID="btnReject" runat="server" Text="Thoái" OnClick="btnReject_Click" meta:resourcekey="btnRejectResource1" TabIndex="4" CssClass="citad-btn" /></td>
                            </tr>
                            <tr>
                                <td><asp:Button ID="btnPrevious" runat="server" Text="Trước" OnClick="btnPrevious_Click" meta:resourcekey="btnPreviousResource1" TabIndex="6" CssClass="citad-btn" /></td>
                             </tr>
                            <tr>
                                <td><asp:Button ID="btnNext" runat="server" Text="Tiếp" OnClick="btnNext_Click" meta:resourcekey="btnNextResource1" TabIndex="7" CssClass="citad-btn" /></td>
                            </tr>
                            <tr>
                                <td><asp:Button ID="btnPrint" runat="server" Text="In" OnClick="btnPrint_Click" meta:resourcekey="btnPrintResource1" TabIndex="8" CssClass="citad-btn" /></td>
                            </tr>
                            <tr>
                                <td><asp:Button ID="btnClose" runat="server" Text="Đóng" meta:resourcekey="btnCloseResource1" OnClick="btnClose_Click" TabIndex="9" CssClass="citad-btn"/></td>
                            </tr>
                            <tr>
                                <td style="vertical-align:middle; text-align:center;">
                                    <table cellpadding="2" cellspacing="2" border="1" style="border-collapse:collapse" width="90%">
                                        <tr>
                                            <td align="center" valign="middle">
                                                <asp:Label ID="lblTongSo" runat="server" Text="Tổng số:" meta:resourcekey="lblTongSoResource1"></asp:Label>
                                                <asp:Label ID="lblTotal" runat="server" Text="0/0" meta:resourcekey="lblTotalResource1"></asp:Label>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
            <asp:HiddenField ID="hidMsg_Key" runat="server" />
            <asp:HiddenField ID="hidMAC" runat="server" />
            <asp:HiddenField ID="hidMsg_Reason" runat="server" />

            <uc1:MessageBox id="MessageBox1" runat="server">
            </uc1:MessageBox>
            <!--Sign-->

            <asp:HiddenField ID="hidESIGN_MESSAGE" runat="server" />
            <asp:HiddenField ID="hidESIGN_CONTENT" runat="server" />

            <!--end Sign-->
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
</asp:Content>