<%@ Page Language="C#" MasterPageFile="~/CITAD.Master" 
    AutoEventWireup="true" 
    Codebehind="Compare.aspx.cs"
    Inherits="CITAD.Modules.DoiChieu.Web.DoiChieu" 
    Culture="auto" 
    meta:resourcekey="PageResource1"
    UICulture="auto"
    Title="Đối chiếu" %>

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

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
        <ajaxToolkit:ToolkitScriptManager runat="Server" ID="ScriptManager1" EnableScriptGlobalization="True"
         EnableScriptLocalization="True" CombineScripts="True" EnablePageMethods="true"  />
    <div style="width:770px;">
        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="btnDoiChieu" EventName="Click" />
            </Triggers>
            <ContentTemplate>
                <table cellpadding="0" cellspacing="0">
                    <tr>
                        <td style="width: 690px">
                            <table cellpadding="0" cellspacing="0" width="100%" >
                                <tr>
                                    <td style="width: 140px">
                                        <fieldset style="text-align: center">
                                            <legend>
                                                <asp:Label ID="lblNgayGiaoDich" runat="server" meta:resourcekey="lblNgayGiaoDichResource1" Text="Ngày giao dịch" Width="80px"></asp:Label>
                                            </legend>                                            
                                            <asp:TextBox ID="txtNgayGiaoDich" runat="server" Width="70px" CssClass="citad-txt" MaxLength="10" AutoPostBack="True" OnTextChanged="txtNgayGiaoDich_TextChanged"></asp:TextBox>
                                            <asp:ImageButton id="imgCalendar" runat="server" ImageUrl="~/Images/Calendar.png" meta:resourcekey="imgCalendarResource1"></asp:ImageButton>
                                        </fieldset>
                                    </td>
                                    <td style="width: 220px">
                                        <fieldset id="FF" style="margin-left: 10px">
                                            <legend>
                                                <asp:Label ID="Label13" runat="server" meta:resourcekey="Label13Resource1" Text="Chiều giao dịch"></asp:Label>
                                            </legend>
                                            <table>
                                                <tr>
                                                    <td style="width: 85px" >
                                                        <asp:RadioButton ID="rdbdi" runat="server" Text="Đi" meta:resourcekey="RdbdiResource1"
                                                            Checked="True" GroupName="FF" AutoPostBack="True" OnCheckedChanged="rdbdi_CheckedChanged" /></td>
                                                    <td >
                                                        <asp:RadioButton ID="rdbDen" runat="server" Text="Đến" meta:resourcekey="RdbDenResource1"
                                                            GroupName="FF" AutoPostBack="True" OnCheckedChanged="rdbDen_CheckedChanged" /></td>
                                                </tr>
                                            </table>
                                        </fieldset>
                                    </td>
                                    <td style="padding-left:10px;">
                                        <fieldset id="LDV">
                                            <legend>
                                                <asp:Label ID="Label12" runat="server" meta:resourcekey="Label12Resource1" Text="Loại dịch vụ"></asp:Label>
                                            </legend>                                                
                                            <table>
                                                <tr>
                                                    <td>
                                                        <asp:RadioButton ID="rdbgiatrithap" runat="server" Text="Gi&#225; trị thấp"
                                                            meta:resourcekey="rdbgiatrithapResource1" GroupName="ldv" AutoPostBack="True" OnCheckedChanged="rdbgiatrithap_CheckedChanged" /></td>
                                                    <td>
                                                        <asp:RadioButton ID="rdbgiatricao" runat="server" Text="Gi&#225; trị cao"
                                                            meta:resourcekey="RdbgiatricaoResource1" GroupName="ldv" AutoPostBack="True" OnCheckedChanged="rdbgiatricao_CheckedChanged" /></td>
                                                    <td>
                                                        <asp:RadioButton ID="rdbtatca" runat="server" Text="Tất cả (LV,HV)"
                                                            meta:resourcekey="RdbtatcaResource1" Checked="True" GroupName="ldv" AutoPostBack="True" OnCheckedChanged="rdbtatca_CheckedChanged" /></td>
                                                </tr>
                                            </table>
                                        </fieldset>
                                    </td>
                                </tr>
                            </table>
                            <table width="100%">
                                <tr>
                                    <td align="right">
                                        <asp:Label ID="lblTongSo" runat="server" meta:resourcekey="lblTongSoResource1" Text="Tổng số" Enabled="False"></asp:Label>
                                        <asp:Label ID="lblCount" runat="server"></asp:Label></td>
                                </tr>
                            </table>
                    <asp:GridView ID="grvDoiChieu" runat="server" 
                        meta:resourcekey="GridView1Resource1" 
                        CellPadding="1"                         
                        AllowPaging="True" 
                        OnPageIndexChanging="grvDoiChieu_PageIndexChanging" 
                        OnRowDataBound="grvDoiChieu_RowDataBound" 
                        CssClass="grid.css" 
                        Width="100%"
                        style="margin-top:7px;" 
                        AutoGenerateColumns="False">
                        <PagerSettings Mode="NumericFirstLast" />
                        <RowStyle CssClass="grid-row" />
                        <SelectedRowStyle Font-Bold="True" CssClass="grid-selectedRow" />
                        <PagerStyle HorizontalAlign="Center" CssClass="grid-pager" />
                        <HeaderStyle Font-Bold="True" CssClass="grid-header" />
                        <AlternatingRowStyle CssClass="grid-alternating" />                  
                        <Columns>
                            <asp:BoundField HeaderText="STT" meta:resourcekey="BoundFieldResource0">
                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="False" />
                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                            </asp:BoundField>
                            <asp:BoundField DataField="CI_CODE" HeaderText="Ng&#226;n h&#224;ng gửi" meta:resourcekey="BoundFieldResource1">
                                <FooterStyle HorizontalAlign="Left" VerticalAlign="Middle" />
                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="False" />
                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Serial_No" HeaderText="Số hiệu giao dịch" meta:resourcekey="BoundFieldResource2">
                                <FooterStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="False" />
                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                            </asp:BoundField>
                            <asp:BoundField DataField="ChuThichVN" HeaderText="Ch&#250; th&#237;ch " meta:resourcekey="BoundFieldResource3">
                                <FooterStyle HorizontalAlign="Left" VerticalAlign="Middle" />
                                <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" Wrap="True" />
                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                            </asp:BoundField>
                        </Columns>
                        <EmptyDataTemplate>
                            <asp:Label ID="lblEmptyDataGrid" runat="server" meta:resourcekey="lblEmptyDataGridResource1"
                                Text="Kh&#244;ng tồn tại bản ghi"></asp:Label>
                        </EmptyDataTemplate>                        
                    </asp:GridView>
                <fieldset>
                    <legend>
                        <asp:Label ID="Label1" runat="server" Text="Ch&#234;nh lệch" meta:resourcekey="Label1Resource1"></asp:Label>
                    </legend>
                    <table>
                        <tr>
                            <td style="width: 269px">
                                <asp:Label ID="Label3" runat="server" Text="Số giao dịch c&#243; tại CI kh&#244;ng c&#243; tại RPC:"
                                    Width="247px" meta:resourcekey="Label3Resource1"></asp:Label>
                                </td>
                            <td align="right">
                                <asp:Label ID="lbliCI" runat="server" meta:resourcekey="lbliCIResource1" Text="0"
                                    ForeColor="Red" Style="text-align: right"></asp:Label></td>
                        </tr>
                        <tr>
                            <td style="width: 269px">
                                <asp:Label ID="Label2" runat="server" Text="Số giao dịch c&#243; tại RPC kh&#244;ng c&#243; tại CI:"
                                    Width="248px" meta:resourcekey="Label2Resource1"></asp:Label>
                                </td>
                            <td align="right">
                                <asp:Label ID="lbliRPC" runat="server" meta:resourcekey="lbliRPCResource1" Text="0"
                                    ForeColor="Red" Style="text-align: right"></asp:Label></td>
                        </tr>
                        <tr>
                            <td style="width: 269px">
                                <asp:Label ID="Label4" runat="server" Text="Số giao dịch kh&#244;ng khớp giữa RPC v&#224; CI:"
                                    Width="262px" meta:resourcekey="Label4Resource1"></asp:Label>
                                </td>
                            <td align="right">
                                <asp:Label ID="lbliCmp" runat="server" meta:resourcekey="lbliCmpResource1" Text="0"
                                    ForeColor="Red" Style="text-align: right"></asp:Label></td>
                        </tr>
                    </table>
                </fieldset>
                <fieldset>
                    <legend>
                        <asp:Label ID="Label11" runat="server" Text="Kết quả" meta:resourcekey="Label11Resource1"></asp:Label>
                    </legend>
                    <table>
                        <tr>
                            <td>
                                <asp:Label ID="Label5" runat="server" Text="Tổng số giao dịch c&#243; tại CI:" Width="185px"
                                    meta:resourcekey="Label5Resource1"></asp:Label></td>
                            <td style="text-align: right">
                                <asp:Label ID="lblTotalCI" runat="server" meta:resourcekey="lblTotalCIResource1"
                                    Text="0" ForeColor="Red" Style="text-align: right"></asp:Label></td>
                            <td align="right">
                                <asp:Label ID="Label7" runat="server" Text="Tổng nợ:  " Width="78px" meta:resourcekey="Label7Resource1"></asp:Label></td>
                            <td style="text-align: right">
                                <asp:Label ID="lblDebitCI" runat="server" meta:resourcekey="lblDebitCIResource1"
                                    Text="0" ForeColor="Red" Style="text-align: right"></asp:Label></td>
                            <td align="right">
                                <asp:Label ID="Label9" runat="server" Text="Tổng c&#243;:  " Width="70px" meta:resourcekey="Label9Resource1"></asp:Label></td>
                            <td style="text-align: right">
                                <asp:Label ID="lblCreditCI" runat="server" meta:resourcekey="lblCreditCIResource1"
                                    Text="0" ForeColor="Red" Style="text-align: right"></asp:Label></td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="Label6" runat="server" Text="Tổng số giao dịch c&#243; tại RPC:" Width="186px"
                                    meta:resourcekey="Label6Resource1"></asp:Label></td>
                            <td style="text-align: right">
                                <asp:Label ID="lblTotalRPC" runat="server" meta:resourcekey="lblTotalRPCResource1"
                                    Text="0" ForeColor="Red" Style="text-align: right"></asp:Label></td>
                            <td align="right">
                                <asp:Label ID="Label8" runat="server" Text="Tổng nợ:  " meta:resourcekey="Label8Resource1"
                                    Width="79px"></asp:Label></td>
                            <td style="text-align: right">
                                <asp:Label ID="lblDebitRPC" runat="server" meta:resourcekey="lblDebitRPCResource1"
                                    Text="0" ForeColor="Red" Style="text-align: right"></asp:Label></td>
                            <td align="right">
                                <asp:Label ID="Label10" runat="server" Text="Tổng c&#243;:  " Width="70px" meta:resourcekey="Label10Resource1"></asp:Label></td>
                            <td style="text-align: right">
                                <asp:Label ID="lblCreditRPC" runat="server" meta:resourcekey="lblCreditRPCResource1"
                                    Text="0" ForeColor="Red" Style="text-align: right"></asp:Label></td>
                            </tr>
                        </table>
                    </fieldset>
                        </td>
                        <td valign="top" style="padding-top:7px;padding-left:3px;">
                            <asp:Button ID="btnIn" runat="server" meta:resourcekey="btnInResource1" OnClick="btnIn_Click"
                                Text="In" Width="80px" CssClass="citad-btn" Enabled="False" /><br />
                            <asp:Button ID="btnDoiChieu" runat="server" OnClick="btnDoiChieu_Click" Text="Đối chiếu" meta:resourcekey="btnDoiChieuResource1" CssClass="citad-btn" />
                            <asp:Button ID="btnClose" runat="server" CssClass="citad-btn" Text="Thoát" meta:resourcekey="btnCloseResource1" OnClick="btnClose_Click" /></td>
                    </tr>
                </table>

                <ajaxToolkit:CalendarExtender id="CalendarExtender1" runat="server" 
                    TargetControlID="txtNgayGiaoDich" 
                    PopupButtonID="imgCalendar" 
                    Format="dd/MM/yyyy" 
                    Enabled="True">
                </ajaxToolkit:CalendarExtender>
                <ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender1" runat="server" 
                    TargetControlID="txtNgayGiaoDich"
                    Mask="99/99/9999" 
                    MaskType="Date" 
                    Enabled="True" />

                <uc1:MessageBox ID="MessageBox1" runat="server" />
            </ContentTemplate>
        </asp:UpdatePanel>
   </div>
    
</asp:Content>