<%@ Page Language="C#" MasterPageFile="~/CITAD.Master"  
    AutoEventWireup="true" 
    CodeBehind="frmLetterMsgCreate_List.aspx.cs" 
    Inherits="CITAD.Modules.TaoLenhTraSoat.Web.frmLetterMsgCreate_List" 
    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 type="text/javascript">
	    //window.document.onkeydown=KeyDown;
	    window.document.onkeyup=ShortcutKeys;
        function ShortcutKeys()
        {
            if(event.ctrlKey)
            {
                if(window.event.keyCode==69)
                {
                    __doPostBack('ctl00$ContentPlaceHolder1$Menu1','mnuClose');
                }
                if(window.event.keyCode==54)
                {                        
                    __doPostBack('ctl00$ContentPlaceHolder1$Menu1','mnuAdd')
                }
                if(window.event.keyCode==50)
                {
                    __doPostBack('ctl00$ContentPlaceHolder1$Menu1','mnuOpen');
                }
                if(window.event.keyCode==52)
                {
                    __doPostBack('ctl00$ContentPlaceHolder1$Menu1','mnuQuery');
                }
            }
            if(event.keyCode == 13)
            {
                var tablet = document.getElementById('eventSRC');
                if(tablet.contains(event.srcElement)){
                    __doPostBack('ctl00$ContentPlaceHolder1$Menu1','mnuQuery');
                }
            }
        }
        function formload()
        {
            document.getElementById('<%=txtSerialNo.ClientID %>').focus();
        }
        function fcnOnkeypress()
        {
            if(event.keyCode == 13)
            {
                __doPostBack('ctl00$ContentPlaceHolder1$Menu1','mnuQuery');
                return false;
            }
        }
	</script>
   
    <cc1:ToolkitScriptManager runat="Server" ID="ScriptManager1" EnableScriptGlobalization="True"
             EnableScriptLocalization="True" CombineScripts="True" EnablePageMethods="true"  />
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="chkTRX_Date" EventName="CheckedChanged" />
                <asp:AsyncPostBackTrigger ControlID="Menu1" EventName="MenuItemClick" />
            </Triggers>
            <ContentTemplate>
          <table border="0" width="770" cellpadding="0" cellspacing="0">
            <tr valign="middle">
                <td style="width:100%">
                    <table class="citad-toolbar" cellpadding="0" cellspacing="0" width="100%">
                            <tr valign="middle"><td class="citad-toolbar-tdleft"></td>
                            <td class="citad-toolbar-tdmain" align="left">
                                <asp:Menu ID="Menu1" runat="server" OnMenuItemClick="Menu1_MenuItemClick"
                                    Font-Names="Verdana"
                                    Font-Size="11px"
                                    
                                    Orientation="Horizontal" 
                                    CssClass="citad-menu" 
                                    StaticSubMenuIndent="10px" 
                                    meta:resourcekey="Menu1Resource1">
                                    <Items>
                                        <asp:MenuItem Text="Đ&#243;ng" Value="mnuClose"  ImageUrl="~/Images/Menu/home.gif" meta:resourcekey="MenuItemResource1"></asp:MenuItem>
                                        <asp:MenuItem ImageUrl="~/Images/Menu/separator_h.gif" Selectable="False" Enabled="False" meta:resourcekey="MenuItemResource2"></asp:MenuItem>
                                        <asp:MenuItem Text="Th&#234;m mới" Value="mnuAdd" ImageUrl="~/Images/Menu/add.gif" meta:resourcekey="MenuItemResource3"></asp:MenuItem>
                                        <asp:MenuItem Text="Chi tiết" Value="mnuOpen" ImageUrl="~/Images/Menu/open.gif" meta:resourcekey="MenuItemResource4"></asp:MenuItem>
                                        <asp:MenuItem Text="Truy vấn" Value="mnuQuery" ImageUrl="~/Images/Menu/search.gif" meta:resourcekey="MenuItemResource5"></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>
                </td>
            </tr>
            <tr valign="top">
                <td align="center" colspan="3" rowspan="3" valign="top" style="width:100%">
                    <table border="0" width="100%" cellpadding="0" cellspacing="0">
                            <tr>
                                <td colspan="3">
                                    <fieldset class="fieldset">                                        
                                        <table cellpadding="0" cellspacing="0" border="0" width="100%"  id="eventSRC">
                                            <tr>
                                                <td>
                                                    <table width="100%" cellpadding="0" cellspacing="0">
                                                        <tr>
                                                            <td><asp:Label ID="lblSerialNo" runat = "server" Text="Số b&#250;t to&#225;n" meta:resourcekey="lblSerialNoResource1"></asp:Label></td>
                                                            <td><asp:TextBox ID="txtSerialNo" onkeypress="return fcnOnkeypress();" onpropertychange="Upper()" runat="server" meta:resourcekey="txtSerialNoResource1" 
                                                                    Width="80px" MaxLength="40" CssClass="citad-txt"></asp:TextBox></td>
                                                            <td>
                                                                <asp:Label ID="lblReceiveBank" runat="server" Text="Ng&#226;n h&#224;ng nhận" meta:resourcekey="lblReceiveBankResource1"></asp:Label>
                                                            </td>
                                                            <td><asp:TextBox ID="txtBankB" runat="server" meta:resourcekey="txtBankBResource1" Width="80px" MaxLength="12" CssClass="citad-txt"></asp:TextBox></td>
                                                        </tr>
                                                    </table>
                                                </td>
                                                <td>
                                                    <table width="100%" cellpadding="0" cellspacing="0">
                                                        <tr>
                                                            <td style="width: 80px; height: 22px;"><asp:Label ID="lblTrxStatus" runat = "server" Text="T&#236;nh trạng" meta:resourcekey="lblTrxStatusResource1"></asp:Label></td>
                                                            <td align="left" style="height: 22px"><asp:DropDownList ID="cboTrxStatus"  runat="server" Width="230px" meta:resourcekey="cboTrxStatusResource1" CssClass="select"></asp:DropDownList></td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <fieldset class="fieldset">
                                                        <legend><asp:Label ID="lblTrxType" runat="server" Text="Loại giao dịch" meta:resourcekey="lblTrxTypeResource1"></asp:Label></legend>
                                                        <table style="width: 100%" cellpadding="0" cellspacing="0">
                                                            <tr>
                                                                <td><asp:RadioButton ID="rdbLV" runat="server" Text="Gi&#225; trị thấp" GroupName="grpLoaDichVu" meta:resourcekey="rdbLVResource1"/></td>
                                                                <td><asp:RadioButton ID="rdbHV" runat="server" Text="Gi&#225; trị cao" GroupName="grpLoaDichVu" meta:resourcekey="rdbHVResource1"/></td>
                                                                <td><asp:RadioButton ID="rdbAll" runat="server" Text="Tất cả" GroupName="grpLoaDichVu" meta:resourcekey="rdbAllResource1"/></td>
                                                            </tr>
                                                        </table>
                                                    </fieldset>
                                                </td>
                                                <td>
                                                    <table width="100%" cellpadding="0" cellspacing="0">
                                                        <tr>
                                                            <td style="width: 80px"><asp:CheckBox ID="chkTRX_Date" runat="server" Text="Ng&#224;y tạo" AutoPostBack="True" meta:resourcekey="chkTRX_DateResource1" OnCheckedChanged="chkTRX_Date_CheckedChanged" Width="102px" /></td>
                                                            <td align="left"><asp:TextBox ID="dtpTRX_Date" runat="server" meta:resourcekey="dtpTRX_DateResource1" Width="70px" MaxLength="8" CssClass="citad-txt"></asp:TextBox>
                                                                <asp:ImageButton ID="imgCalendar" runat="server" ImageUrl="~/Images/Calendar.png"
                                                                    meta:resourcekey="imgCalendarResource1" /></td>
                                                            <td><cc1:MaskedEditExtender ID="mee" runat="server" TargetControlID="dtpTRX_Date" Mask="99/99/9999" MaskType="Date" AcceptNegative="Left" ErrorTooltipEnabled="True" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder="" Enabled="True" />
                                                            <cc1:MaskedEditValidator ID="MaskedEditValidator5" runat="server" ControlExtender="mee" ControlToValidate="dtpTRX_Date" EmptyValueMessage="Date is required" InvalidValueMessage="Date is invalid" Display="Dynamic" EmptyValueBlurredText="*" InvalidValueBlurredMessage="*" ValidationGroup="MKE" ErrorMessage="mee" meta:resourcekey="MaskedEditValidator5Resource1" />
                                                            <cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="dtpTRX_Date" Format="dd/MM/yyyy" Enabled="True" PopupButtonID="imgCalendar"></cc1:CalendarExtender>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td style="width: 80px">
                                                            </td>
                                                            <td align="left">
                                                            </td>
                                                            <td align="right">
                                                                <asp:Label ID="lblTongSo" runat="server" Text="Tổng số: " meta:resourcekey="lblTongSo" Font-Bold="True"></asp:Label>
                                                                <asp:Label ID="lblCount" runat="server" Font-Bold="True"></asp:Label></td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                        </table>
                                    </fieldset>
                                </td>
                            </tr>                            
                            <tr>
                                <td colspan="3" align="left" valign="top" style="width:100%">
                                    
                                        <table width="100%" cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td style="width:100%">
                                                <asp:GridView DataKeyNames="ID" ID="grvTrxList" runat="server" 
                                                    CellPadding="2" 
                                                    AllowPaging="True" 
                                                    AutoGenerateColumns="False" 
                                                    OnPageIndexChanging="grvTrxList_PageIndexChanging" 
                                                    OnRowDataBound="grvTrxList_RowDataBound" 
                                                    meta:resourcekey="grvTrxListResource1" 
                                                    CssClass="grid" 
                                                    OnSelectedIndexChanged="grvTrxList_SelectedIndexChanged" 
                                                    AllowSorting="True" 
                                                    OnSorting="grvTrxList_Sorting">
                                                    <FooterStyle CssClass="grid-footer" />
                                                    <RowStyle CssClass="grid-row" />
                                                    <SelectedRowStyle CssClass="grid-selectedRow" />
                                                    <PagerStyle CssClass="grid-pager" HorizontalAlign="Center" />
                                                    <HeaderStyle CssClass="grid-header" />
                                                    <AlternatingRowStyle CssClass="grid-alternating" />
                                                    <Columns>
                                                        <asp:TemplateField meta:resourcekey="TemplateFieldResource1">
                                                            <HeaderStyle HorizontalAlign="Center" />
                                                            <ItemStyle HorizontalAlign="Center" />
                                                            <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>                                                            
                                                        </asp:TemplateField>
                                                        <asp:BoundField HeaderText="STT" meta:resourcekey="BoundFieldResource7">
                                                            <ItemStyle HorizontalAlign="Center" />
                                                        </asp:BoundField>                                                        
                                                        <asp:BoundField HeaderText="Số b&#250;t to&#225;n" DataField="RELATION_NO" meta:resourcekey="BoundFieldResource1" SortExpression="RELATION_NO" >
                                                            <HeaderStyle HorizontalAlign="Center" />
                                                            <ItemStyle HorizontalAlign="Left" />
                                                        </asp:BoundField>                                                        
                                                        <asp:TemplateField HeaderText="Số hiệu giao dịch" meta:resourcekey="BoundFieldResource2" SortExpression="SERIAL_NO">
                                                            <HeaderStyle HorizontalAlign="Center" Width="80px" />
                                                            <ItemStyle HorizontalAlign="Center" />
                                                            <ItemTemplate>
                                                                <asp:LinkButton ID="lbtSERIAL_NO" runat="server" CommandName="Select" Text='<%# Bind("SERIAL_NO") %>'></asp:LinkButton>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:BoundField HeaderText="Loại giao dịch" meta:resourcekey="BoundFieldResource3"/>
                                                        <asp:BoundField HeaderText="Nợ/C&#243;" meta:resourcekey="BoundFieldResource8">
                                                            <HeaderStyle Width="100px" HorizontalAlign="Center" />
                                                            <ItemStyle HorizontalAlign="Left" />
                                                        </asp:BoundField>
                                                        <asp:BoundField HeaderText="Số tiền" DataField="AMOUNT" meta:resourcekey="BoundFieldResource4" SortExpression="AMOUNT">
                                                            <ItemStyle HorizontalAlign="Right" />
                                                            <HeaderStyle HorizontalAlign="Center" />
                                                        </asp:BoundField>
                                                        <asp:BoundField HeaderText="T&#236;nh trạng" meta:resourcekey="BoundFieldResource5">
                                                            <HeaderStyle HorizontalAlign="Center" />
                                                        </asp:BoundField>
                                                        <asp:BoundField HeaderText="Ng&#226;n h&#224;ng nhận" DataField="CI_CODE" meta:resourcekey="BoundFieldResource6" SortExpression="CI_CODE">
                                                            <HeaderStyle HorizontalAlign="Center" />
                                                        </asp:BoundField>
                                                    </Columns>
                                                    <EmptyDataTemplate>
                                                        <asp:Label ID ="lblMsg4Grid" Text = "Kh&#244;ng c&#243; bản ghi n&#224;o" runat="server" meta:resourcekey="lblMsg4GridResource1"></asp:Label>
                                                    </EmptyDataTemplate>
                                                </asp:GridView>
                                            </td>
                                        </tr>                                        
                                    </table>
                                    
                                </td>
                            </tr>
                        </table>
                </td>
            </tr>
        </table>
        <%--<asp:Panel ID="Panel1" runat="server" Style="display: none" CssClass="modalPopup" Width="400px" meta:resourcekey="Panel1Resource1">
            <p style="font-size:14px;"><asp:Label ID="lblTieuDeThongBao" runat="server" Text="Th&#244;ng b&#225;o" meta:resourcekey="lblTieuDeThongBaoResource1"></asp:Label></p>
            <p><asp:Label ID="lblMessage" runat="server" Text="Label" meta:resourcekey="lblMessageResource1"></asp:Label></p>
            <p style="text-align: center;">
                <asp:Button ID="OkButton" runat="server" Text="OK" CssClass="citad-btn" Width="70px" meta:resourcekey="OkButtonResource1" />                        
            </p>
        </asp:Panel> --%>   
                <uc1:MessageBox id="MessageBox1" runat="server">
                </uc1:MessageBox>
                <br />
    <%--<asp:HiddenField ID="hidModalPopup" runat="server" />
       <cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server" 
            TargetControlID="hidModalPopup"
            PopupControlID="Panel1" 
            BackgroundCssClass="modalBackground" 
            OkControlID="OkButton" DynamicServicePath="" Enabled="True"
            />--%>            
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>