<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/Main.master" AutoEventWireup="true"
    CodeFile="ManualGLEntry.aspx.cs" Inherits="Business_ManualGLEntry" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<%@ Register Src="../UserControls/DatePicker.ascx" TagName="DatePicker" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <script src="../Scripts/jquery-1.9.0.min.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">

        function KeyPressFuncNotSpecialCharecter() {
            if ((event.keyCode >= 47 && event.keyCode <= 57) || (event.keyCode >= 65 && event.keyCode <= 90) || (event.keyCode >= 97 && event.keyCode <= 122)) {
                event.returnValue = true;
            }
            else {
                event.returnValue = false;
            }
        }
        function KeyPressFuncIsWholeNumber() {
            if (event.keyCode < 48 || event.keyCode > 57) {
                event.returnValue = false;
            }
        }
    </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>
                            Manual GL Entry
                        </td>
                    </tr>
                </table>
                <br />
                <!------------------------------------body End1 ----------------------------------------------->
                <asp:Panel ID="panel1" runat="server" Width="100%" Style="text-align: left">
                    <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 />
                                <table border="0" width="100%" cellpadding="0" cellspacing="0" class="add_ItemTB">
                                    <tr runat="server" id="rowATM2">
                                        <td class="tdNormal">
                                            ATM No
                                        </td>
                                        <td>
                                            <asp:ScriptManager ID="ScriptManager1" runat="server">
                                            </asp:ScriptManager>
                                            <asp:TextBox ID="txtATMNo" runat="server" class="fieldNormal" Width="250" MaxLength="4"></asp:TextBox>
                                            <ajaxToolkit:AutoCompleteExtender ID="AutoCompleteExtender1" ServiceMethod="GetCompletionList"
                                                MinimumPrefixLength="1" CompletionInterval="10" EnableCaching="false" CompletionSetCount="1"
                                                TargetControlID="txtATMNo" FirstRowSelected="false" runat="server">
                                            </ajaxToolkit:AutoCompleteExtender>
                                        </td>
                                        <td class="tdNormal">
                                        </td>
                                        <td class="tdNormal">
                                            Replenishment Date <span style="color: Red">*</span>
                                        </td>
                                        <td class="tdNormal">
                                            <uc1:DatePicker ID="dtSearchReplDate" runat="server" width="250" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tdNormal">
                                            ATM&nbsp; Type
                                        </td>
                                        <td>
                                            <asp:DropDownList ID="ddlSearchRecordType" runat="server" Width="250px" class="fieldNormal">
                                                <asp:ListItem Value="030">Deposit</asp:ListItem>
                                                <asp:ListItem Value="009">Dispense</asp:ListItem>
                                                <asp:ListItem Value="039">Recycle</asp:ListItem>
                                            </asp:DropDownList>
                                        </td>
                                        <td class="tdNormal">
                                        </td>
                                        <td class="tdNormal">
                                            Record Status
                                        </td>
                                        <td class="tdNormal">
                                            <asp:DropDownList ID="ddlRecordStatus" runat="server" Width="250px" class="fieldNormal"
                                                AutoPostBack="False" DataTextField="brs_desc" DataValueField="brs_id">
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="5" style="text-align: center">
                                            <asp:Button ID="btnSearch" runat="server" Text="Search" CssClass="Btn_L_Normal" OnClick="btnSearch_Click" />
                                            &nbsp;&nbsp;&nbsp;&nbsp;
                                            <%--   <asp:Button ID="btnGenReport" runat="server" Text="Generate Report" CssClass="Btn_L_Normal"
                                            OnClientClick="" OnClick="btnGenReport_Click" Width="128px" />--%>
                                        </td>
                                    </tr>
                                </table>
                                <br />
                                <asp:Label ID="lblError" runat="server" Text="" class="fieldError"></asp:Label>
                                <br />
                                <asp:LinkButton ID="lnkAtmCashReconSummary" runat="server" Text="Redirect to ATM Cash Recon Summary"
                                    Visible="false" OnClick="lnkAtmCashReconSummary_Click"></asp:LinkButton>
                                <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="bard_id" AllowPaging="True" AllowSorting="True" CellPadding="4"
                                                ForeColor="#333333" GridLines="None" EmptyDataText="There are no Results" OnRowCommand="GridView1_RowCommand"
                                                OnRowCreated="GridView1_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="Repl_curr" HeaderText="Currency" />
                                                    <asp:BoundField DataField="replenishment_date" HeaderText="Replenishment Date" />
                                                    <asp:BoundField DataField="replenishment_time" HeaderText="Replenishment Time" />
                                                    <asp:BoundField DataField="opening_balance" HeaderText="Opening Balance" />
                                                    <asp:BoundField DataField="closing_balance" HeaderText="Closing Balance" />
                                                    <asp:BoundField DataField="record_status" HeaderText="Record Status" />
                                                    <asp:BoundField DataField="teller" HeaderText="Account No." />
                                                    <asp:ButtonField ButtonType="Image" ItemStyle-Width="20px" CommandName="a" Text="Approve"
                                                        ImageUrl="~/Images/approve.jpg"></asp:ButtonField>
                                                    <asp:ButtonField ButtonType="Image" ItemStyle-Width="20px" CommandName="d" Text="Decline"
                                                        ImageUrl="~/Images/reject.jpg"></asp:ButtonField>
                                                    <asp:ButtonField ButtonType="Image" CommandName="i" Text="Ignore" ImageUrl="~/Images/delete.jpg" />
                                                    <asp:BoundField DataField="atm_no" HeaderText="ATM Number" />
                                                    <asp:BoundField DataField="repl_date" HeaderText="Repl Date" />
                                                    <asp:BoundField DataField="repl_status" HeaderText="status" />

                                                    <asp:BoundField DataField="atm_type" HeaderText="atm type" />
                                                    <asp:BoundField DataField="repl_curr_code" HeaderText="repl_curr_code" />
                                                    <asp:BoundField DataField="Retract_Amt" HeaderText="Retract_Amt" />
                                                </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>
                                <!------------------------------------body End2 ----------------------------------------------->
                                <br>
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
                <table border="0" cellpadding="0" cellspacing="0" class="contTB">
                    <tr>
                        <td align="center">
                            <asp:Label ID="lblError1" runat="server" class="fieldError" Visible="False"></asp:Label>
                            <br />
                            <asp:Panel ID="pnlControls" runat="server" Width="100%" Visible="False" Style="text-align: left">
                                <fieldset id="addItem">
                                    <legend id="addItem">Manual GL Entry</legend>
                                </fieldset>
                                <table border="0" cellpadding="0" cellspacing="0" class="add_ItemTB">
                                    <tr>
                                        <td class="tdNormal">
                                            ATM Number
                                        </td>
                                        <td class="tdNormal">
                                            <asp:TextBox ID="txtTerminalID" runat="server" class="fieldNormal" MaxLength="8"></asp:TextBox>
                                        </td>
                                        <td class="tdNormal">
                                        </td>
                                        <td class="tdNormal" style="width: 15%">
                                             <asp:Label ID="lbl_Retract" runat="server"  Text="Retract" ></asp:Label>   
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:TextBox ID="txtGlRetract" runat="server" class="fieldNormal" Enabled="false"
                                                ReadOnly="true" MaxLength="14"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tdNormal" style="width: 15%">
                                            Replenishment Date
                                        </td>
                                        <td class="tdNormal">
                                            <asp:TextBox ID="txtReplDate" runat="server" class="fieldNormal" MaxLength="16"></asp:TextBox>
                                            <uc1:DatePicker ID="dtReplDate" runat="server" Visible="False" width="250" />
                                        </td>
                                        <td class="tdNormal">
                                        </td>
                                        <td class="tdNormal" style="width: 15%">
                                            Replenishment Time
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            (HH:MM:SS)<br />
                                            <asp:TextBox ID="txtReplTime" runat="server" class="fieldNormal" MaxLength="8"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tdNormal" style="width: 15%">
                                            ATM Type
                                        </td>
                                        <td class="tdNormal">
                                            <asp:DropDownList ID="ddlReplType" runat="server" class="fieldNormal">
                                                <asp:ListItem Value="009">Dispense</asp:ListItem>
                                                <asp:ListItem Value="030">Deposit</asp:ListItem>
                                                <asp:ListItem Value="039">Recycle</asp:ListItem>
                                            </asp:DropDownList>
                                        </td>
                                        <td class="tdNormal">
                                        </td>
                                        <td class="tdNormal" style="width: 15%">
                                            Replenishment Currency
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            <asp:DropDownList ID="ddlCurrency" runat="server" class="fieldNormal" DataTextField="currency"
                                                DataValueField="iso_code">
                                            </asp:DropDownList>
                                            <asp:TextBox ID="txtReplCurrency" runat="server" class="fieldNormal" MaxLength="16"
                                                Visible="False"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tdNormal" style="width: 15%">
                                            GL Account No
                                        </td>
                                        <td class="tdNormal">
                                            <asp:TextBox ID="txtGLAccountNo" runat="server" class="fieldNormal" MaxLength="16"></asp:TextBox>
                                        </td>
                                        <td class="tdNormal">
                                        </td>
                                        <td class="tdNormal" style="width: 15%">
                                            &nbsp;
                                        </td>
                                        <td class="tdNormal" style="width: 30%">
                                            &nbsp;
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="5">
                                            <fieldset id="addItem">
                                                <legend id="addItem">GL</legend>
                                            </fieldset>
                                            <table border="0" cellpadding="0" cellspacing="0" class="add_ItemTB">
                                                <tr>
                                                    <td class="tdNormal" style="width: 15%">
                                                        Opening Balance
                                                    </td>
                                                    <td class="tdNormal" style="width: 30%">
                                                        <asp:TextBox ID="txtOpeningBalance" runat="server" class="fieldNormal" MaxLength="20"></asp:TextBox>
                                                    </td>
                                                    <td class="tdNormal">
                                                    </td>
                                                    <td class="tdNormal" style="width: 15%">
                                                        Closing Balance
                                                    </td>
                                                    <td class="tdNormal" style="width: 30%">
                                                        <asp:TextBox ID="txtClosingBalance" runat="server" class="fieldNormal" MaxLength="20"></asp:TextBox>
                                                    </td>
                                                </tr>
                                            </table>
                                        </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" />
                                            <asp:Button ID="btnApprove" runat="server" Text="   Approve  " class="Btn_M_Normal"
                                                OnClick="btnApprove_Click" />
                                            <%--<asp:Button ID="btnSave" runat="server" Text="   Save   " class="Btn_M_Normal" onclick="btnSave_Click"  />--%>
                                        </td>
                                    </tr>
                                </table>
                            </asp:Panel>
                            <!------------------------------------body End2 ----------------------------------------------->
                            <br />
                        </td>
                    </tr>
                </table>
                <!------------------------------------body End2 ----------------------------------------------->
            </td>
        </tr>
    </table>
</asp:Content>
