<%@ Page Language="vb" MasterPageFile="~/CITAD.Master" 
    EnableEventValidation="false"
    AutoEventWireup="false" 
    CodeBehind="AppCancel.aspx.vb" 
    Inherits="CITAD.WEB.VB.AppCancel" 
    Culture="auto" 
    meta:resourcekey="PageResource1" 
    UICulture="auto"
    Title="Tạo yêu cầu hủy giao dịch" %>

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

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script type="text/javascript">
	    function formload()
	    {
	        document.getElementById('<%=txtRelation_No.ClientID %>').focus();
	    }
	</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==57)    //Ctrl + 9 
                {
                    __doPostBack('ctl00$ContentPlaceHolder1$Menu1','tsbApprove');
                }
            }
            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">
    <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 meta:resourcekey="tsbNewResource1" ImageUrl="~/Images/Menu/approve.gif" Text="Duyệt" Value="mnuApprove"></asp:MenuItem>
                        <asp:MenuItem meta:resourceKey="tsbDetailResource1" ImageUrl="~/Images/Menu/open.gif" Text="Chi tiết" Value="btnDetail"></asp:MenuItem>
                        <asp:MenuItem meta:resourceKey="tsbQueryResource1" ImageUrl="~/Images/Menu/search.gif" Text="Truy vấn" Value="btnQuerry"></asp:MenuItem>
                    </Items>
                 </asp:Menu>
                </td>
            </tr>
            </table>

            <table style="width:100%;" id="eventSRC">
            <tr>
                <td style="width: 89px; height: 25px;">
                    <asp:Label ID="lblRelation_No" runat="server" meta:resourcekey="Label1Resource1">Số bút toán</asp:Label></td>
                <td style="width: 200px; height: 25px;">
                    <asp:TextBox ID="txtRelation_No" onpropertychange="Upper()" runat="server" meta:resourcekey="txtRelation_NoResource1" Width="148px" CssClass="citad-txt"></asp:TextBox>
                </td>
                <td style="width: 106px; height: 25px;">
                    <asp:Label ID="lblTrx_Status" runat="server" meta:resourcekey="lblTrx_StatusResource1">Tình trạng</asp:Label></td>
                <td colspan="3" style="height: 25px">
                    <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" Text="Giá trị thấp" GroupName="TrxType" />
                        <asp:RadioButton ID="rdbHV" runat="server" meta:resourcekey="rdbHVResource1" Text="Giá trị cao" GroupName="TrxType" />
                        <asp:RadioButton ID="rdbAll" runat="server" meta:resourcekey="rdbAllResource1" Checked="True" Text="Tất cả" GroupName="TrxType" />
                    </fieldset>
                </td>
                <td style="width: 106px" valign="middle">
                    <asp:Label ID="lblRCI" runat="server" meta:resourcekey="lblRCIResource1" Text="Ngân hàng nhận"></asp:Label></td>
                <td style="width: 135px" valign="middle">
                    <asp:TextBox ID="txtRCICode" CssClass="citad-txt" runat="server" meta:resourcekey="TextBox1Resource1" AutoPostBack="True"></asp:TextBox></td>
                <td style="width: 105px" valign="middle">
                    <asp:Label ID="lblSerial_No"  runat="server" meta:resourcekey="lblSerial_NoResource1">Số hiệu giao dịch</asp:Label></td>
                <td style="width: 125px" valign="middle">
                    <asp:TextBox ID="txtSerial_No" CssClass="citad-txt" runat="server" meta:resourcekey="TextBox2Resource1" AutoPostBack="True"></asp:TextBox></td>
            </tr>
                <tr>
                    <td colspan="6" valign="middle" 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" 
            CssClass="grid" 
            meta:resourcekey="dgvListTrxResource1" 
            AllowPaging="True" 
            AutoGenerateColumns="False" 
            DataKeyNames="MSG_KEY_TBLCANCEL_TRX,MSG_KEY_TBLTRANSACTIONMSG_ORG,TRX_STATUS,MAC" 
            OnPageIndexChanging="grvListTrx_PageIndexChanging"
            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 meta:resourcekey="TemplateFieldResource1">
                    <HeaderTemplate>
                        <asp:Label runat="server" ID="lblSERIAL_NO_GRID" Text="Số hiệu giao dịch" meta:resourcekey="lblSerial_NoResource1"></asp:Label>
                    </HeaderTemplate>
                    <HeaderStyle Width="70px" HorizontalAlign="Center" />
                    <ItemTemplate>
                        <asp:LinkButton ID="lbtSERIAL_NO" runat="server" CommandName="Select" Text='<%# Bind("SERIAL_NO") %>'></asp:LinkButton>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                </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="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>
                <asp:TemplateField ItemStyle-CssClass="invisible" HeaderStyle-CssClass="invisible">
                    <ItemTemplate>
                        <asp:HiddenField ID="hidESIGN_MESSAGE" runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField ItemStyle-CssClass="invisible" HeaderStyle-CssClass="invisible">
                    <ItemTemplate>
                        <asp:HiddenField ID="hidESIGN_CONTENT" runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <EmptyDataTemplate>
                <asp:Label ID="lblEmptyDataGrid" runat="server" meta:resourcekey="lblEmptyDataGridResource1"
            Text="Kh&#244;ng tồn tại"></asp:Label>
            </EmptyDataTemplate>
        </asp:GridView>
           <hr />
       <asp:TextBox ID="txtMessage" runat="server" BorderStyle="None" BorderWidth="0px"
            Height="122px" ReadOnly="True" TextMode="MultiLine" Visible="False" Width="100%" meta:resourcekey="txtMessageResource1"></asp:TextBox>
            
            <uc1:MessageBox ID="MessageBox1" runat="server" />
        </ContentTemplate>
              <Triggers>
                   <asp:AsyncPostBackTrigger ControlID ="Menu1" EventName ="MenuItemClick" />                   
              </Triggers>
        </asp:UpdatePanel>
    </div>
</asp:Content> 