<%@ Page Language="C#" MasterPageFile="~/CITAD.Master" 
    AutoEventWireup="true" 
    Codebehind="BangKetQuaGiaoDichCuoiNgay.aspx.cs"
    Inherits="CITAD.Modules.BangKetQuaGiaoDichCuoiNgay.BangKetQuaGiaoDichCuoiNgay"
    Culture="auto" 
    meta:resourcekey="PageResource1"
    UICulture="auto"
    EnableEventValidation ="false" %>

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

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script type="text/javascript">
        window.document.onkeyup=ShortcutKeys;
        function ShortcutKeys()
        {
            if(event.ctrlKey)
            {
                if(window.event.keyCode==69) //Đóng
                {
                    __doPostBack('ctl00$ContentPlaceHolder1$Menu1','mnuClose');
                }
                else if(window.event.keyCode==52) //Truy vấn
                {
                    __doPostBack('ctl00$ContentPlaceHolder1$Menu1','mnuIquiry');
                }
                else if(window.event.keyCode==53) //in
                {
                    __doPostBack('ctl00$ContentPlaceHolder1$Menu1','mnuPrint');
                }
            }
        }
    </script>
    <div style="width:770px;">
    <ajaxToolkit:ToolkitScriptManager runat="Server" ID="ScriptManager1" EnableScriptGlobalization="True"
         EnableScriptLocalization="True" CombineScripts="True" EnablePageMethods="true"  />
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
    <table class="toolbar" cellpadding="0" cellspacing="0">
        <tr>
            <td class="toolbar-tdleft">
            </td>
            <td class="toolbar-tdmain">
                <asp:Menu ID="Menu1" runat="server" 
                    DynamicHorizontalOffset="2" 
                    Font-Names="Verdana"
                    Font-Size="11px" 
                    OnMenuItemClick="Menu1_MenuItemClick" 
                    Orientation="Horizontal"
                    CssClass="citad-menu" 
                    StaticSubMenuIndent="10px" 
                    meta:resourcekey="Menu1Resource1"
                    StaticHoverStyle-CssClass="citad-menu-hover" 
                    StaticSelectedStyle-CssClass="citad-menu-selected"
                    StaticMenuItemStyle-HorizontalPadding="5px" 
                    StaticMenuItemStyle-VerticalPadding="2px">
                    <Items>
                        <asp:MenuItem Text="Home" Value="mnuClose" meta:resourcekey="MenuItemResource1" NavigateUrl="~/Default.aspx"
                            SeparatorImageUrl="~/Images/toolbar/citad-toolbar-sperator.gif" ImageUrl="~/Images/Menu/home.gif">
                        </asp:MenuItem>
                        <asp:MenuItem Text="In" Value="mnuPrint" meta:resourcekey="MenuItemResource2" ImageUrl="~/Images/Menu/print.gif">
                        </asp:MenuItem>
                        <asp:MenuItem Text="Truy vấn" Value="mnuIquiry" meta:resourcekey="MenuItemResource4"
                            ImageUrl="~/Images/Menu/search.gif"></asp:MenuItem>
                    </Items>
                    <StaticSelectedStyle CssClass="citad-menu-selected" />
                    <StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
                    <StaticHoverStyle CssClass="citad-menu-hover" />
                </asp:Menu>
            </td>
        </tr>
    </table>
            <table>
                <tr>
                    <td style="width: 110px">
                        <asp:Label ID="Label1" runat="server" Width="98px" meta:resourcekey="Label1Resource1"
                            Text="Ngày giao dịch"></asp:Label>
                        <asp:TextBox ID="txtTrxDate" runat="server" Width="70px" meta:resourcekey="txtTrxDateResource1"
                            CssClass="citad-txt" AutoPostBack="True" OnTextChanged="txtTrxDate_TextChanged"></asp:TextBox>
                        <asp:ImageButton ID="imgCalendar" runat="server" ImageUrl="~/Images/Calendar.png"
                            meta:resourcekey="imgCalendarResource1" /></td>
                    <td style="width: 91px" align="right">
                        <asp:Label ID="Label5" runat="server" Width="82px" meta:resourcekey="Label5Resource1"
                            Text="Loại dịch vụ"></asp:Label></td>
                    <td style="width: 181px">
                        <asp:DropDownList ID="cboServiceType" runat="server" Width="170px" meta:resourcekey="cboServiceTypeResource1" AutoPostBack="True" OnSelectedIndexChanged="cboServiceType_SelectedIndexChanged">
                        </asp:DropDownList></td>
                    <td style="width: 128px" align="right">
                        <asp:CheckBox ID="chkHoiSoChinh" runat="server" Text="Hội sở chính" Width="110px"
                            OnCheckedChanged="chkHoiSoChinh_CheckedChanged" AutoPostBack="True" meta:resourcekey="chkHoiSoChinhResource1" Enabled="False" /></td>
                    <td>
                        <asp:DropDownList ID="cboThanhVien" runat="server" Width="167px" meta:resourcekey="cboThanhVienResource1" Enabled="False" AutoPostBack="True" OnSelectedIndexChanged="cboThanhVien_SelectedIndexChanged">
                        </asp:DropDownList></td>
                </tr>
            </table>
            <table width="100%">
                <tr>
                    <td align="right">
                        <asp:Label ID="lblTongSo" runat="server" meta:resourcekey="lblTongSoResource1"
                            Text="Tổng số" Visible="False"></asp:Label>
                        <asp:Label ID="lblCount" runat="server"></asp:Label>
                        
                        </td>
                </tr>
                <tr>
                    <td align="right">
                        <asp:Label ID="lblTongSoTrang" runat="server" meta:resourcekey="lblTongSoResource2" Text="Tổng số trang" Enabled="False" Visible ="false" ></asp:Label>
                       <asp:Label ID="lblCountTrang" runat="server"></asp:Label>
                     </td>
                 </tr>
            </table>

            <asp:GridView ID="grvListTrans" runat="server" 
                AllowPaging="True"
                AutoGenerateColumns="False"
                AllowSorting="True"
                meta:resourcekey="grvListTransResource1"
                CellPadding="2"
                OnRowDataBound="grvListTrans_RowDataBound"
                CssClass="grid"
                OnPageIndexChanging="grvListTrans_PageIndexChanging">
                <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" />
                <EmptyDataTemplate>
                    <asp:Label ID="lblEmptyDataGrid" runat="server" meta:resourcekey="lblEmptyDataGridResource1"
                        Text="Kh&#244;ng tồn tại bản ghi"></asp:Label>
                </EmptyDataTemplate>
                <Columns>
                    <asp:BoundField DataField="TT" HeaderText="TT" meta:resourcekey="BoundFieldResource1">
                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="30px" />
                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="30px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="NganHang_ID" HeaderText="NganHang_ID" Visible="False"
                        meta:resourcekey="BoundFieldResource2" />
                    <asp:BoundField HeaderText="M&#227; ng&#226;n h&#224;ng" DataField="MaNganHang" meta:resourcekey="BoundFieldResource3">
                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="80px" />
                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="80px" />
                    </asp:BoundField>
                    <asp:BoundField HeaderText="T&#234;n ng&#226;n h&#224;ng" DataField="TenNganHang"
                        meta:resourcekey="BoundFieldResource4">
                        <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" />
                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="200px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="DoanhSoNo" HeaderText="Doanh số Nợ" meta:resourcekey="BoundFieldResource5">
                        <ItemStyle HorizontalAlign="Right" VerticalAlign="Middle" />
                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                    </asp:BoundField>
                    <asp:BoundField DataField="DoanhSoCo" HeaderText="Danh số C&#243;" meta:resourcekey="BoundFieldResource6">
                        <ItemStyle HorizontalAlign="Right" VerticalAlign="Middle" />
                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                    </asp:BoundField>
                    <asp:BoundField DataField="ChenhLechNo" HeaderText="Ch&#234;nh lệch Nợ" meta:resourcekey="BoundFieldResource7">
                        <ItemStyle HorizontalAlign="Right" VerticalAlign="Middle" />
                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                    </asp:BoundField>
                    <asp:BoundField DataField="ChenhLechCo" HeaderText="Ch&#234;nh lệch C&#243;" meta:resourcekey="BoundFieldResource8">
                        <ItemStyle HorizontalAlign="Right" VerticalAlign="Middle" />
                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                    </asp:BoundField>
                </Columns>
            </asp:GridView>
            <table>
                <tr>
                    <td style="width: 100px" align="right">
                        <asp:Label ID="Label3" runat="server" Style="color: maroon" Font-Bold="True"
                            meta:resourcekey="Label3Resource1" Text="Tổng Nợ"></asp:Label></td>
                    <td style="width: 138px">
                        <asp:Label ID="lblSumDebit" runat="server" meta:resourcekey="lblSumDebitResource1"></asp:Label></td>
                    <td>
                        <asp:Label ID="Label4" runat="server" Text="Tổng Có" Style="color: maroon" Font-Bold="True"
                            meta:resourcekey="Label4Resource1"></asp:Label></td>
                    <td style="width: 131px">
                        <asp:Label ID="lblSumCredit" runat="server" meta:resourcekey="lblSumCreditResource1"></asp:Label></td>
                    <td>
                        <asp:Label ID="Label2" runat="server" Style="color: maroon" Font-Bold="True"
                            meta:resourcekey="Label2Resource1" Text="Chênh lệch phải trả"></asp:Label></td>
                    <td>
                        <asp:Label ID="lblDifferent" runat="server" meta:resourcekey="lblDifferentResource1"></asp:Label></td>
                </tr>
            </table>
            <ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" Enabled="True"
                Format="dd/MM/yyyy" PopupButtonID="imgCalendar" TargetControlID="txtTrxDate">
            </ajaxToolkit:CalendarExtender>
            <ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="txtTrxDate"
            Mask="99/99/9999" MaskType="Date" ErrorTooltipEnabled="True" CultureAMPMPlaceholder=""
            CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder=""
            CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder=""
            Enabled="True"></ajaxToolkit:MaskedEditExtender>

    <ajaxToolkit:MaskedEditValidator ID="MaskedEditValidator1" runat="server" ControlExtender="MaskedEditExtender1"
        ControlToValidate="txtTrxDate" EmptyValueMessage="Date is required" InvalidValueMessage="Date is invalid"
        Display="Dynamic" EmptyValueBlurredText="*" InvalidValueBlurredMessage="*" ValidationGroup="MKE"
        ErrorMessage="MaskedEditValidator1" meta:resourcekey="MaskedEditValidator1Resource1"></ajaxToolkit:MaskedEditValidator>
            <uc1:MessageBox ID="MessageBox1" runat="server" />
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="Menu1" EventName="MenuItemClick" />
        </Triggers>
    </asp:UpdatePanel>
    </div>
</asp:Content>