<%@ Page Language="vb" MasterPageFile="~/CITAD.Master" 
    AutoEventWireup="false" 
    CodeBehind="Cancel.aspx.vb" 
    Inherits="CITAD.WEB.VB.Cancel" 
    Culture="auto" 
    meta:resourcekey="PageResource1"
    UICulture="auto" %>

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

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
        <script type="text/javascript">
	    window.document.onkeydown=KeyDown;
	    //=====================================
	    function formload()
	    {
	        document.getElementById('<%=txtRelation_No.ClientID %>').focus();
	    }
        window.document.onload = formload;
	</script>	
    <script language="javascript" type="text/javascript">
        window.document.onkeyup=ShortcutKeys;
        function ShortcutKeys()
        {
            if(event.ctrlKey)
            {
                if(window.event.keyCode==69)     //Ctrl + E 
                {
                    __doPostBack('ctl00$ContentPlaceHolder1$Menu1','tsbHome');
                }
                if(window.event.keyCode==52)    //Ctrl + 4 
                {
                    __doPostBack('ctl00$ContentPlaceHolder1$Menu1','btnQuerry');
                }       
                                                    
                if(window.event.keyCode==54)    //Ctrl + 6 
                {
                    __doPostBack('ctl00$ContentPlaceHolder1$Menu1','btnDetail');
                }        
             if(window.event.keyCode==49)    //Ctrl + 1 
                {
                    __doPostBack('ctl00$ContentPlaceHolder1$Menu1','tsbNew');
                }                                     
                
            }
            if(event.keyCode == 13)
            {    
                var tablet = document.getElementById('eventSRC');                
                if(tablet.contains(event.srcElement)){
                    __doPostBack('ctl00$ContentPlaceHolder1$Menu1','btnQuerry');                    
                }                
            }
         }
    </script>
    <ajaxToolkit:ToolkitScriptManager runat="Server" ID="ScriptManager1" EnableScriptGlobalization="True"
             EnableScriptLocalization="True" CombineScripts="True" EnablePageMethods="true"  />
    <div style="width:770px;">
         <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID ="Menu1" EventName ="MenuItemClick" />                   
            </Triggers>
             <ContentTemplate>
                 <table class="citad-toolbar" cellpadding="0" cellspacing="0" >
                <tr>
                    <td class="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" 
                            StaticHoverStyle-CssClass="citad-menu-hover"
                            StaticMenuStyle-CssClass="citad-menu" 
                            StaticSelectedStyle-CssClass="citad-menu-selected"
                            StaticMenuItemStyle-HorizontalPadding="5px"
                            StaticMenuItemStyle-VerticalPadding="2px">
                             <Items>
                              <asp:MenuItem meta:resourceKey="tsbHomeResource1" ImageUrl="~/Images/Menu/home.gif" SeparatorImageUrl="~/Images/toolbar/citad-toolbar-sperator.gif" Text="Home" Value="tsbHome" >
                              </asp:MenuItem>
                              <asp:MenuItem Text="Th&#234;m mới" meta:resourceKey="tsbNewResource1" ImageUrl="~/Images/Menu/add.gif" SeparatorImageUrl="~/Images/toolbar/citad-toolbar-sperator.gif" Value="tsbNew">
                              </asp:MenuItem>
                              <asp:MenuItem Text="Chi tiết" meta:resourceKey="tsbDetailResource1" ImageUrl="~/Images/Menu/open.gif" SeparatorImageUrl="~/Images/toolbar/citad-toolbar-sperator.gif" Value="btnDetail">
                              </asp:MenuItem>
                              <asp:MenuItem meta:resourceKey="tsbQueryResource1" Text="Truy vấn" ImageUrl="~/Images/Menu/search.gif"   Value="btnQuerry">
                              </asp:MenuItem>
                            </Items>
                        </asp:Menu>
                    </td>
                </tr>
                </table>
                <table style="width:100%;" id="eventSRC">
                <tr>
                    <td style="width: 83px;">
                        <asp:Label ID="lblRelation_No" runat="server" meta:resourcekey="Label1Resource1" Text="Số bút toán" Width="74px"></asp:Label></td>
                    <td style="width: 200px;">
                        <asp:TextBox ID="txtRelation_No" CssClass="citad-txt" runat="server" onpropertychange="Upper()" meta:resourcekey="txtRelation_NoResource1"></asp:TextBox></td>
                    <td style="width: 106px;">
                        <asp:Label ID="lblTrx_Status" runat="server" meta:resourcekey="lblTrx_StatusResource1">Tình trạng</asp:Label></td>
                    <td colspan="3">
                        <asp:DropDownList ID="cboTrx_Status" runat="server" Width="100%" meta:resourcekey="cboTrx_StatusResource1" CssClass="Combobox">
                        </asp:DropDownList></td>
                </tr>
                <tr>
                    <td colspan="2" valign="middle">
                        <fieldset><legend><asp:Label ID="grbTrxType" runat="server" meta:resourcekey="grbTrxTypeResource1">Loại giao dịch</asp:Label></legend>                       
                            <asp:RadioButton ID="rdbLV" runat="server" meta:resourcekey="rdbLVResource1"  AutoPostBack="False" GroupName="TrxType111"
                                Text="Giá trị thấp" />
                            <asp:RadioButton ID="rdbHV" runat="server" meta:resourcekey="rdbHVResource1"  AutoPostBack="False" GroupName="TrxType111"
                                Text="Giá trị cao" />
                            <asp:RadioButton ID="rdbAll" runat="server" meta:resourcekey="rdbAllResource1"  AutoPostBack="False" Checked="True"
                                GroupName="TrxType111" Text="Tất cả" /></fieldset>
                    </td>
                    <td style="width: 106px;" valign="middle">
                        <asp:Label ID="lblRCI" runat="server" meta:resourcekey="lblRCIResource1" Text="Ngân hàng nhận" Width="98px"></asp:Label></td>
                    <td style="width: 135px;" valign="middle">
                        <asp:TextBox ID="txtRCICode" CssClass="citad-txt" runat="server" meta:resourcekey="TextBox1Resource1" Width="143px"></asp:TextBox></td>
                    <td style="width: 105px;" valign="middle">
                        <asp:Label ID="lblSerial_No"  runat="server" meta:resourcekey="lblSerial_NoResource1" Text="Số hiệu giao dịch" Width="107px"></asp:Label></td>
                    <td style="width: 125px;" valign="middle">
                        <asp:TextBox ID="txtSerial_No" CssClass="citad-txt" runat="server" meta:resourcekey="TextBox2Resource1" Width="113px" AutoPostBack="True"></asp:TextBox></td>
                </tr>
                    <tr>
                        <td colspan="6" align="right">
                            <asp:Label ID="lblTongSo" runat="server" Text="Tổng số: " Font-Bold="True" meta:resourcekey="lblTongSo"></asp:Label>
                            <asp:Label ID="lblCount" runat="server" Font-Bold="True"></asp:Label></td>
                    </tr>
            </table>
                <asp:GridView ID="grvListTrx" runat="server" 
                    CellPadding="2" 
                    meta:resourcekey="dgvListTrxResource1" 
                    AllowPaging="True" 
                    AutoGenerateColumns="False" 
                    DataKeyNames="MSG_KEY_TBLCANCEL_TRX,MSG_KEY_TBLTRANSACTIONMSG_ORG" 
                    CssClass="grid" 
                    OnSelectedIndexChanged="grvListTrx_SelectedIndexChanged">
                    <FooterStyle CssClass="grid-footer" />
                    <RowStyle CssClass="grid-row" />
                    <SelectedRowStyle CssClass="grid-selectedRow" />
                    <PagerStyle HorizontalAlign="Center" CssClass="grid-pager" />
                    <HeaderStyle CssClass="grid-header" />
                    <AlternatingRowStyle CssClass="grid-alternating" />
                    <Columns>
                        <asp:TemplateField meta:resourcekey="TemplateFieldResource1">
                          <HeaderTemplate>
                                    <asp:CheckBox ID="chkCheckAll" runat="server" onclick="return CheckAll(this,'chkOne');" Text="" />
                                </HeaderTemplate>
                                
                            <ItemTemplate>
                                    <input id="chkOne" type="checkbox" runat="server" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="STT_FAKE" HeaderText="STT" meta:resourcekey="BoundFieldResource1" >
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:BoundField DataField="RELATION_NO" HeaderText="Số b&#250;t to&#225;n" meta:resourcekey="BoundFieldResource2" >
                            <ItemStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="Số hiệu giao dịch" meta:resourcekey="BoundFieldResource3">
                            <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 DataField="TRX_TYPE_FAKE" HeaderText="Loại giao dịch" meta:resourcekey="BoundFieldResource4" >
                            <ItemStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <asp:BoundField DataField="No_Co_Fake" HeaderText="Nợ/C&#243;" meta:resourcekey="BoundFieldResource5" >
                            <ItemStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <asp:BoundField DataField="AMOUNT" HeaderText="Số tiền" meta:resourcekey="BoundFieldResource6" >
                            <ItemStyle HorizontalAlign="Right" />
                        </asp:BoundField>
                        <asp:BoundField DataField="STATUS_FAKE" HeaderText="T&#236;nh trạng" meta:resourcekey="BoundFieldResource7" >
                            <ItemStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <asp:BoundField DataField="R_CI_CODE" HeaderText="M&#227; ng&#226;n h&#224;ng nhận" meta:resourcekey="BoundFieldResource8" >
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                    </Columns>
                    <EmptyDataTemplate>
                        <asp:Label ID="lblEmptyDataGrid" runat="server" meta:resourcekey="lblGrdMsgEmptyResource1"
                    Text="Kh&#244;ng tồn tại"></asp:Label>
                    </EmptyDataTemplate>
                </asp:GridView>
                 <uc1:MessageBox ID="MessageBox1" runat="server" />
             </ContentTemplate>
        </asp:UpdatePanel>
    </div>
</asp:Content> 