<%@ Page Language="C#" MasterPageFile="~/MasterPages/Main.master" AutoEventWireup="true" CodeFile="ATMCashReconS.aspx.cs" Inherits="Business_ATMCashReconS"  %>
<%@ Register src="../UserControls/DatePicker.ascx" tagname="DatePicker" tagprefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

    <script language="javascript" type="text/javascript">
        function validate() {
            var message = "";
            if (document.getElementById("<%=DatePicker1.TextBoxClientID%>").value == "") {
                message += "You have to at enter the transaction date\n";
            }
            if (message.length > 0) {
                message = "please notice the following requirments:\n\n" + message;
                alert(message);
                return false;
            }
            return true;
        }
</script>
</asp:Content>


<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table class="body_MainTB" border="0" cellpadding="0" cellspacing="0">
                    <tr align="center">
                        <td valign="top">
                            <!------------------------------------body St  ---------------------------------------------->
                            <table border="0" cellpadding="0" cellspacing="0" class="body_formTitle">
                                <tr>
                                    <td>
                                        ATM Cash Reconciliation Summary </td>
                                </tr>
                            </table>
                            <br>
                            <!------------------------------------body End1 ----------------------------------------------->
                            <table border="0" cellpadding="0" cellspacing="0" class="contTB">
                                <tr>
                                    <td align="center">
                                        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="Frow">
                                            <tr>
                                                <td>
                                                </td>
                                            </tr>
                                        </table>
                                        <br />
                                        <asp:Label ID="lblError" runat="server" Text="" class="fieldError"></asp:Label>
                                        <table border="0" width=100% cellpadding="0" cellspacing="0" class="add_ItemTB">
                                                <tr>
                                                    <td class="tdNormal">
                                                        Replenishment date
                                                    </td>
                                                    <td>
                                                    <uc1:DatePicker ID="DatePicker1" runat="server" Width=250/>
                                                 </td>
                                                </tr>
                                                <tr>
                                                    <td class="tdNormal">
                                                        Record Type
                                                    </td>
                                                    <td colspan="4">
                                                        <asp:DropDownList ID="ddlRecordType" runat="server" Width="250px" class="fieldNormal" >
                                                            <asp:ListItem Value="0">All</asp:ListItem>
                                                            <asp:ListItem Value="009">Withdrawal</asp:ListItem>
                                                            <asp:ListItem Value="030">Deposit</asp:ListItem> 
                                                            <asp:ListItem Value="039">Recycle</asp:ListItem>                                                            
                                                        </asp:DropDownList>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="2" style="text-align:center">
                                                        <asp:Button ID="Button1" runat="server" Text="Search" CssClass="Btn_L_Normal" 
                                                            onclick="Button1_Click" OnClientClick="return validate()" />
                                                    </td>
                                                </tr>
                                            </table>
                                            <br />
                                        <asp:Panel ID="pnlResult" runat="server" Width="80%" Visible="false">
                                            <fieldset id="addItem">
                                             <legend id="addItem">ATM Summary</legend>
                                            </fieldset>
                                            <table border="0" width=100% cellpadding="0" cellspacing="0" class="add_ItemTB">
                                                <tr>
                                                    <td class="tdNormal" colspan=5>
                                                        <asp:GridView ID="GridView1" CssClass="gridMaster" Width ="100%" runat="server" AutoGenerateColumns="False"
                                                             DataKeyNames="record_status" AllowPaging="True" AllowSorting="True" 
                                                            CellPadding="4" ForeColor="#333333" GridLines="None" 
                                                            onrowcommand="GridView1_RowCommand" EmptyDataText="There are no Results">
                                                            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" HorizontalAlign="Right" />
                                                            <Columns>
                                                                <asp:BoundField DataField="record_status_display" HeaderText="Status" ItemStyle-Width="60%" />
                                                                <asp:BoundField DataField="atm_count" HeaderText="Atm Count" ItemStyle-Width="20%" />
                                                                <asp:BoundField DataField="atm_count_old" HeaderText="Atm Old Count" ItemStyle-Width="20%" />
                                                                <asp:ButtonField ButtonType="Image" ItemStyle-Width="20px" CommandName="v" 
                                                                    Text="View" ImageUrl="~/Images/document_view.jpg" >
                                                                </asp:ButtonField>
                                                            </Columns>
                                                            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                                            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                                            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="Black" />
                                                            <EditRowStyle BackColor="#999999" />
                                                            <AlternatingRowStyle BackColor="White" ForeColor="#284775" HorizontalAlign="Right" />
                                                        </asp:GridView>
                                                        </td>
                                                        <td>  </td>
                                                        <td>
                                                        <asp:GridView ID="GridView3" CssClass="gridMaster" Width ="100%" runat="server" AutoGenerateColumns="False"
                                                             DataKeyNames="recon_status" AllowPaging="True" AllowSorting="True" 
                                                            CellPadding="4" ForeColor="#333333" GridLines="None" 
                                                            onrowcommand="GridView3_RowCommand" EmptyDataText="There are no Results">
                                                            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" HorizontalAlign="Right" />
                                                            <Columns>
                                                                <asp:BoundField DataField="recon_status_display" HeaderText="Status" ItemStyle-Width="60%" />
                                                                <asp:BoundField DataField="atm_count" HeaderText="Atm Count" ItemStyle-Width="20%" />
                                                                <asp:BoundField DataField="atm_count_old" HeaderText="Atm Old Count" ItemStyle-Width="20%" />
                                                                <asp:ButtonField ButtonType="Image" ItemStyle-Width="20px" CommandName="v" 
                                                                    Text="View" ImageUrl="~/Images/document_view.jpg" >
                                                                </asp:ButtonField>
                                                            </Columns>
                                                            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                                            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                                            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="Black" />
                                                            <EditRowStyle BackColor="#999999" />
                                                            <AlternatingRowStyle BackColor="White" ForeColor="#284775" HorizontalAlign="Right" />
                                                        </asp:GridView>
                                                    </td>
                                                </tr>
                                            </table>
                                            <br />
                                            </asp:Panel>    
                                            <asp:Panel ID="pnlBR" runat="server" Width="100%" Visible="false">
                                                <fieldset id="addItem">
                                                 <legend id="addItem">ATM List</legend>
                                                </fieldset>
                                                <table border="0" width=100% cellpadding="0" cellspacing="0" class="add_ItemTB">
                                                <tr>
                                                    <td class="tdNormal" colspan=5>
                                                        <asp:GridView ID="GridView2" CssClass="gridMaster" Width ="100%" runat="server" AutoGenerateColumns="False"
                                                             DataKeyNames="atm_number" AllowPaging="True" AllowSorting="True" 
                                                            CellPadding="4" ForeColor="#333333" GridLines="None" 
                                                            onrowcommand="GridView2_RowCommand" EmptyDataText="There are no Results" 
                                                            onrowcreated="GridView2_RowCreated">
                                                            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" HorizontalAlign="Right" />
                                                            <Columns>
                                                                <asp:BoundField DataField="branch_code" HeaderText="Branch Code" />
                                                                <asp:BoundField DataField="atm_number" HeaderText="ATM No" />
                                                                <asp:BoundField DataField="record_type" HeaderText="Record Type" />
                                                                <asp:BoundField DataField="prev_replenishment_date" HeaderText="prev replenishment date" />
                                                                <asp:BoundField DataField="prev_replenishment_time" HeaderText="prev replenishment time" />
                                                                <asp:BoundField DataField="replenishment_date" HeaderText="replenishment date" />
                                                                <asp:BoundField DataField="replenishment_time" HeaderText="replenishment time" />
                                                                <asp:BoundField DataField="diff_amt" HeaderText="Diff Amount" />
                                                                <asp:ButtonField ButtonType="Image" ItemStyle-Width="30px" CommandName="v" 
                                                                    Text="View" ImageUrl="~/Images/document_view.jpg" >
                                                                </asp:ButtonField>
                                                            </Columns>
                                                            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                                            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                                            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="Black" />
                                                            <EditRowStyle BackColor="#999999" />
                                                            <AlternatingRowStyle BackColor="White" ForeColor="#284775" HorizontalAlign="Right" />
                                                        </asp:GridView>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td class="tdNormal" style="width:20%">Go To Page: <asp:DropDownList ID="ddlPages" runat="server" class="fieldNormal" 
                                                            AutoPostBack="True" Width=50px onselectedindexchanged="ddlPages_SelectedIndexChanged"></asp:DropDownList></td>
                                                    <td class="tdNormal">
                                                        </td>
                                                    <td class="tdNormal"></td>
                                                    <td class="tdNormal"></td>
                                                    <td class="tdNormal"></td>
                                                </tr>
                                            </table>
                                                <table border="0" cellpadding="0" cellspacing="0" class="action_TB_BgaddItem">
                                                    <tr>
                                                        <td>
                                                            <asp:Button ID="btnCancel" runat="server" Text="   Cancel   " 
                                                                class="Btn_M_Normal" CausesValidation="False" onclick="btnCancel_Click"/>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </asp:Panel>
                                                                            
                                        <!------------------------------------body End2 ----------------------------------------------->
                                        <br>
                                    </td>
                                </tr>
                            </table>
                            <!------------------------------------body End2 ----------------------------------------------->
                        </td>
                    </tr>
                </table>
</asp:Content>

