<%@ page language="C#" masterpagefile="~/MasterPages/Main.master" autoeventwireup="true" inherits="SettlSearch, App_Web_ljw4lk3m" viewStateEncryptionMode="Always" maintainScrollPositionOnPostBack="true" %>

<%@ Register Src="../UserControls/DatePicker.ascx" TagName="DatePicker" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <script language="javascript" type="text/javascript">
        function KeyPressFuncIsWholeNumber() {

            if (event.keyCode < 48 || event.keyCode > 58) { event.returnValue = false; }
        }
        function SaveConfirmation(Message) {
            var userSelection;

            userSelection = confirm(Message);

            if (userSelection) {
                return true;
            } else {
                return false;
            }
        }

        function scrollWin() {
            window.scrollBy(0, 500);

        }
        function scrollWinUp() {
            window.scrollBy(0, -500);
            return false;
        }
        function CheckAll(Checkbox) {

            var GridView1 = document.getElementById("<%=gvMcAcq.ClientID %>");
            for (i = 1; i < GridView1.rows.length; i++) {
                GridView1.rows[i].cells[0].getElementsByTagName("INPUT")[0].checked = Checkbox.checked;
            }
        }


    </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>
                            <asp:Label ID="lblTitle" runat="server" Text="Label"></asp:Label>
                            
                        </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">
                                <%if (selectedCardScheme == "Visa" || selectedCardScheme == "MCacq" || selectedCardScheme == "VISA_BILL_M" || selectedCardScheme == "VISA_BILL_Q" || selectedCardScheme == "MC_BILL")
                                  {  %>
                                <tr>
                                    <td class="tdNormal" style="width:10%">&nbsp;Product
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="ddlProducts" runat="server" DataTextField="PRODUCT_NAME" Width="250px"
                                            DataValueField="ID" class="fieldNormal" AutoPostBack="True" 
                                            onselectedindexchanged="ddlProducts_SelectedIndexChanged">
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                 <%} %>

                                <% if ((Helper.IsMultiCurrencyProduct_CS(ddlProducts.SelectedValue)))
                                    {  %>
                                <tr>
                                    <td class="tdNormal">Currency
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="ddlCurrency" runat="server" DataTextField="Curr_Name" Width="250px"
                                            DataValueField="CardScheme_Curr_ID" class="fieldNormal">
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <%} %>
                                <tr>
                                    <td class="tdNormal">File Date
                                    </td>
                                    <td>
                                        <uc1:DatePicker ID="dt_SettleDate" runat="server" width="250" />
                                    </td>
                                </tr>
                            <td colspan="2" style="text-align: center">
                                <asp:Button ID="Button3" runat="server" Text="Search" CssClass="Btn_L_Normal" OnClick="ButtonSearch_Click" /> &nbsp;&nbsp;
                                        &nbsp;&nbsp;
                                        <asp:Button ID="btnGenDtlReport" runat="server" Text="Detail Report" CssClass="Btn_L_Normal1"
                                            OnClientClick="" OnClick="btnGenDtlReport_Click" Width="108px" />&nbsp;&nbsp;&nbsp;&nbsp;
                                            <% if (selectedCardScheme == "Visa")
                                                 { %>
                                        <asp:Button ID="btnGenSumReport" runat="server" Text="Visa Summary Report" CssClass="Btn_L_Normal1"
                                            OnClientClick="" OnClick="btnGenSumReport_Click" Width="128px" />&nbsp;&nbsp;
                                            <%} %>
                                            <% if (selectedCardScheme == "Amex")
                                                 { %>
                                        <asp:Button ID="Button1" runat="server" Text="Amex Summary Report" CssClass="Btn_L_Normal1"
                                            OnClientClick="" OnClick="btnGenAmexSumReport_Click" Width="128px" />&nbsp;&nbsp;
                                            <%} %>
                                            <% if (selectedCardScheme == "Maestro")
                                                 { %>
                                        <asp:Button ID="Button2" runat="server" Text="MDS Summary Report" CssClass="Btn_L_Normal1"
                                            OnClientClick="" OnClick="btnGenMDSSumReport_Click" Width="128px" />&nbsp;&nbsp;
                                            <%} %>
                                            <% if (selectedCardScheme == "MC_BILL")
                                                 { %>
                                        <asp:Button ID="btnMCSumReport" runat="server" Text="Summary Report" CssClass="Btn_L_Normal1"
                                            OnClientClick="" OnClick="btnMCSumReport_Click" Width="128px" />&nbsp;&nbsp;
                                            <%} %>
                                            &nbsp;<asp:Label ID="lbl_File_Number" runat="server" class="fieldNormal" Text="" Visible="false"></asp:Label>
                                        <asp:Label ID="lbl_Status" runat="server" class="fieldNormal" Text="" Visible="false"></asp:Label>
                                        <br />
                                    </td>
                                    <tr>
                                        <td colspan="2" style="text-align: center"></td>
                                    </tr>
                    </tr>
                </table>
                  <br />
                   <asp:Panel ID="PanelMcAcq" runat="server" Width="50%" Visible="false">
                       <fieldset id="addItem">
                        <legend id="addItem">Select Mastercard Acquirer File: </legend>
                                     
                    </fieldset>
                    <table border="0" width="60%" cellpadding="0" cellspacing="0" class="add_ItemTB">
                        <tr>
                            <td class="tdNormal" colspan="5">
                                <asp:GridView ID="gvMcAcq" CssClass="gridMaster" Width="100%" runat="server" AutoGenerateColumns="False"
                                    DataKeyNames="File_Number" CellPadding="4"    OnRowCreated="gvMcAcq_RowCreated"
                                    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:TemplateField>
                                                    <HeaderStyle Width="5" />
                                                    <HeaderTemplate>
                                                        <asp:CheckBox ID="chkAll" runat="server" onclick="CheckAll(this)" />
                                                    </HeaderTemplate>
                                                    <ItemTemplate>
                                                        &nbsp &nbsp
                                                        <asp:CheckBox ID="chkRow" runat="server" />
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                        <asp:BoundField DataField="File_Number" HeaderText="File Name" />
                                        <asp:BoundField DataField="File Name" HeaderText="File Name" />
                                        <asp:BoundField DataField="Settlement Cycle" HeaderText="Settlement Cycle" />
                                        <asp:BoundField DataField="Setttlement Amount" HeaderText="Settlement Amount" />
                                      <%--  <asp:BoundField DataField="Settlement Currency Code" HeaderText=" Settlement Currency Code" />--%>
                                        <asp:BoundField DataField="Setttlement Result" HeaderText="Status" />
                             
                                     </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>
                       
                        <caption>
                            &nbsp;</caption>
                           
                    </table>
                    <table border="0" width="100%" cellpadding="0" cellspacing="0" class="add_ItemTB">
                       <tr>
                            <td class="tdNormal" style="width: 73%">  
                            <asp:Button ID="ProcessMcAcqSettlementCycle" runat="server" Text="Process" CssClass="Btn_L_Normal"
                                    OnClick="bttn_ProcessdMcAcqSettlementCycle" OnClientClick="return SaveConfirmation('Are you sure to process')" /> </td>
                            <td class="tdNormal" style="width: 10%">
                            </td>
                          
                        </tr></table>
                  
                            </asp:Panel>
                   <asp:Panel ID="pnlUploadFees" runat="server" Width="50%" Visible="false">
                       <fieldset id="addItem">
                        <legend id="addItem">Upload Swift Fees File: </legend>
                                     
                    </fieldset>
                    <table border="0" width="60%" cellpadding="0" cellspacing="0" class="add_ItemTB">
                        <tr>
                            <td class="tdNormal" style="width: 15%">
                                Choose File
                            </td>
                            <td colspan="3" style="width: 50%">
                                <asp:FileUpload ID="FileUpload1" runat="server" class="fieldWithBtn" />
                            </td>
                            <td class="tdNormal" style="width:3%"> </td>
                            <td class="tdNormal">
                                <asp:Button ID="btnUpload" runat="server" Text="Upload" class="Btn_L_Normal" 
                                    onclick="btnUpload_Click" />
                                    <asp:Button ID="btnUpload1" runat="server" Text="Process File" class="Btn_L_Normal" 
                                    onclick="btnUpload1_Click" />
                            </td>
                        </tr>
                       
                        <caption>
                            &nbsp;</caption>
                           
                    </table>
                    <table border="0" width="100%" cellpadding="0" cellspacing="0" class="add_ItemTB">
                       <tr>
                            <td class="tdNormal" style="width: 73%">  
                            <asp:Button ID="Button4" runat="server" Text="Process" CssClass="Btn_L_Normal"
                                    OnClick="bttn_ProcessdMcAcqSettlementCycle" 
                                    OnClientClick="return SaveConfirmation('Are you sure to process')" 
                                    Visible="False" /> </td>
                            <td class="tdNormal" style="width: 10%">
                            </td>
                          
                        </tr></table>
                  
                            </asp:Panel>
                
                <asp:Panel ID="pnlResult" runat="server" Width="100%" Visible="false">
                    <fieldset id="addItem">
                        <legend id="addItem">Settlements</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="csr_code" AllowPaging="false" AllowSorting="True" ShowFooter="true"
                                    CellPadding="4" ForeColor="#333333" GridLines="None" OnRowCommand="GridView1_RowCommand"
                                    OnRowCreated="GridView1_RowCreated" EmptyDataText="There are no Results">
                                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" HorizontalAlign="Right" />
                                    <Columns>
                                        <asp:BoundField DataField="Event_Name" HeaderText="Account Name" />
                                        <asp:BoundField DataField="From_Account" HeaderText="Dr. Account" />
                                        <asp:BoundField DataField="To_Account" HeaderText="Cr. Account" />
                                        <asp:BoundField DataField="Narrative" HeaderText="Narrative" />
                                        <asp:BoundField DataField="Cardscheme_Curr_Name" HeaderText="Currency" />
                                        <asp:BoundField DataField="DbAmt" DataFormatString="{0:0.00}" HeaderText="Dr. Amount" />
                                        <asp:BoundField DataField="CRAmt" DataFormatString="{0:0.00}" HeaderText="Cr. Amount" />
                                        <asp:BoundField DataField="evnt_code" HeaderText="evnt_code" />
                                        <asp:BoundField DataField="file_number" HeaderText="file_number" Visible="True" />
                                        <asp:BoundField DataField="CS_GL_Desc" HeaderText="Status" />
                                        <asp:BoundField DataField="EDITABLE" HeaderText="EDITABLE" />
                                        <asp:ButtonField ButtonType="Image" ItemStyle-Width="30px" CommandName="v" Text="View"
                                            ImageUrl="~/Images/document_view.jpg">
                                            <ItemStyle Width="30px" />
                                        </asp:ButtonField>
                                        <asp:ButtonField ButtonType="Image" ItemStyle-Width="20px" CommandName="d" Text="Delete"
                                            ImageUrl="~/Images/delete.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>
                        <caption>
                            &nbsp;</caption>
                    </table>
                    <table border="0" width="100%" cellpadding="0" cellspacing="0" class="add_ItemTB">
                       <tr>
                            <td class="tdNormal" style="width: 73%">
                                <% if (GridView1.Rows.Count >= 1)
                                { %>
                                <% if (lbl_Status.Text == "000" || lbl_Status.Text == "008")
                                   { %>
                                  <asp:Button ID="bttn_AddDiff" runat="server" Text="Add Diff Entry" CssClass="Btn_L_Normal"
                                    OnClick="bttn_AddDiff_Click" />
                                 <%}
                                } %>
                            </td>
                            <td class="tdNormal" style="width: 10%">Difference(CR-DB):
                            </td>
                            <td class="tdNormal">
                                <asp:Label ID="lbl_CR_DR_Diff" runat="server" Text="" class="fieldError"></asp:Label>
                            </td>
                        </tr>
                         <%--<tr>
                            <td class="tdNormal" style="width: 73%">
                             
                            </td>
                            <td class="tdNormal" style="width: 10%">
                            </td>
                            <td class="tdNormal">
                               
                            </td>
                        </tr>--%>
                    </table>
                    <asp:Label ID="Lbl_MannualDif" runat="server" Text="" class="fieldError"></asp:Label>
                    <br />
                <asp:Panel ID="pnlAddMannualDiff" runat="server" Width="100%" Visible="false">
                    <fieldset id="addItem">
                        <legend id="addItem">Add New Diff. Entry
                                      <%if (selected_RC_code == 15) //VISA show product only for visa
                                        { %>  <%=ddlProducts.SelectedItem.Text%><%} %></legend>
                    </fieldset>
                    <table border="0" width="100%" cellpadding="0" cellspacing="0" class="add_ItemTB">
                        <tr>
                            <td class="tdNormal" style="width: 15%">Account Name
                            </td>
                            <td class="tdNormal" style="width: 20%">
                                <asp:DropDownList ID="ddl_CS_EventList" class="fieldNormal" runat="server" Width="250"
                                    DataTextField="Event_Name" DataValueField="Cs_Evnt_Code" AutoPostBack="true"
                                    OnSelectedIndexChanged="ddl_CS_EventList_SelectedIndexChanged">
                                </asp:DropDownList>
                            </td>
                            <td class="tdNormal" style="width: 15%">Amount
                            </td>
                            <td class="tdNormal" style="width: 20%">
                                <asp:TextBox ID="txtAmount" runat="server" class="fieldNormal" Width="50%"></asp:TextBox>
                                <asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="txtAmount" Type="Double"></asp:RangeValidator>
                                <asp:DropDownList ID="ddlGLtype" runat="server" Width="30%">
                                    <asp:ListItem Value="DB">DB</asp:ListItem>
                                    <asp:ListItem Value="CR">CR</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                            <td style="width: 25%"></td>
                        </tr>
                        <tr>
                            <td class="tdNormal" style="width: 15%">Debit Account
                            </td>
                            <td class="tdNormal" style="width: 30%">
                                <asp:Label ID="lbl_FromAcct" runat="server" class="fieldNormal" Text=""></asp:Label>
                            </td>
                            <td class="tdNormal" style="width: 15%">Credit Account
                            </td>
                            <td class="tdNormal" style="width: 30%">
                                <asp:Label ID="lbl_ToAcct" runat="server" class="fieldNormal" Text=""></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td class="tdNormal" style="width: 15%">Narrative
                            </td>
                            <td class="tdNormal" style="width: 30%">
                                <asp:Label ID="lbl_Narr" runat="server" class="fieldNormal" Text=""></asp:Label>
                            </td>
                            <td class="tdNormal" style="width: 15%">Settlement Currency
                            </td>
                            <td class="tdNormal" style="width: 30%">
                                <asp:Label ID="lbl_Sett_Curr" runat="server" class="fieldNormal" Text=""></asp:Label>
                            </td>
                        </tr>
                    </table>
                    <table border="0" cellpadding="0" cellspacing="0" class="action_TB_BgaddItem">
                        <tr>
                            <td>
                                <asp:Button ID="btnCancelPost" runat="server" Text="   Cancel   " class="Btn_M_Normal"
                                    CausesValidation="False" OnClick="btnCancelPost_Click" />
                                <asp:Button ID="btnSavePost" runat="server" Text="   Save   " class="Btn_M_Normal"
                                    OnClick="btnSavePost_Click" OnClientClick="return SaveConfirmation('Ar you sure to pass mannual entry')" />
                            </td>
                        </tr>
                    </table>
                </asp:Panel>

                    <fieldset id="addItem">
                        <legend id="addItem">VAT</legend>
                    </fieldset>

                    <table border="0" width="100%" cellpadding="0" cellspacing="0" class="add_ItemTB">
                        <tr>
                            <td class="tdNormal" colspan="5">
                                <asp:GridView ID="GridViewVAT" CssClass="gridMaster" Width="100%" runat="server" AutoGenerateColumns="False"
                                    DataKeyNames="csr_code" AllowPaging="false" AllowSorting="True" ShowFooter="true"
                                    CellPadding="4" ForeColor="#333333" GridLines="None" OnRowCommand="GridViewVAT_RowCommand"
                                    OnRowCreated="GridViewVAT_RowCreated" EmptyDataText="There are no Results">
                                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" HorizontalAlign="Right" />
                                    <Columns>
                                        <asp:BoundField DataField="Event_Name" HeaderText="Account Name" />
                                        <asp:BoundField DataField="From_Account" HeaderText="Dr. Account" />
                                        <asp:BoundField DataField="To_Account" HeaderText="Cr. Account" />
                                        <asp:BoundField DataField="Narrative" HeaderText="Narrative" />
                                        <asp:BoundField DataField="Cardscheme_Curr_Name" HeaderText="Currency" />
                                        <asp:BoundField DataField="DbAmt" DataFormatString="{0:0.00}" HeaderText="Amount" />
                                        <asp:BoundField DataField="CRAmt" DataFormatString="{0:0.00}" HeaderText="Cr. Amount" Visible="false" />
                                        <asp:BoundField DataField="evnt_code" HeaderText="evnt_code" />
                                        <asp:BoundField DataField="file_number" HeaderText="file_number" Visible="True" />
                                        <asp:BoundField DataField="CS_GL_Desc" HeaderText="Status" />
                                        <asp:BoundField DataField="EDITABLE" HeaderText="EDITABLE" />
                                        <asp:ButtonField ButtonType="Image" ItemStyle-Width="30px" CommandName="v" Text="View"
                                            ImageUrl="~/Images/document_view.jpg">
                                            <ItemStyle Width="30px" />
                                        </asp:ButtonField>
                                        <%-- <asp:ButtonField  ButtonType="Image" ItemStyle-Width="20px" CommandName="d" Text="Delete"
                                                        ImageUrl="~/Images/delete.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>
                        <caption>
                            &nbsp;</caption>
                    </table>
                    <table border="0" width="100%" cellpadding="0" cellspacing="0" class="add_ItemTB">
                        
                        <tr id="rowBttn" runat=server >
                            <td style="text-align: left">
                                <% if (GridView1.Rows.Count >= 1)
                                    { %>
                                <% if (lbl_Status.Text == "000" || lbl_Status.Text == "008")
                                    { %>
                              <asp:Button ID="btnReprocess" runat="server" Text="Reprocess" CssClass="Btn_L_Normal1"
                                    OnClick="btnReprocess_Click" Width="111px" OnClientClick="return SaveConfirmation('Are you sure to send all the entries for Reprocess')" />
                                <asp:Button ID="bttn_Approval" runat="server" Text="Submit for Approval " CssClass="Btn_L_Normal1"
                                    OnClick="ButtonSubmitForApproval_Click" Width="120px" OnClientClick="return SaveConfirmation('Are you sure to send all the entries for approval')" />
                                <%} %>
                                <% if (lbl_Status.Text == "001")
                                    { %>
                                <asp:Button ID="bttn_CreateGL" runat="server" Text="Approve" CssClass="Btn_L_Normal"
                                    OnClick="bttn_ApproveAndCreateGL" OnClientClick="return SaveConfirmation('Are you sure to process the GL')" />
                                <asp:Button ID="bttn_Reject" runat="server" Text="Reject" CssClass="Btn_L_Normal1"
                                    OnClick="ButtonRejectForApproval_Click" Width="111px" OnClientClick="return SaveConfirmation('Are you sure to cancel all the entries')" />
                                <%} %>
                                <%} %>
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
                <br />

                <asp:Panel ID="pnlResultFees" runat="server" Width="100%" Visible="false">
                    <fieldset id="addItem">
                        <legend id="addItem">Settlements Fees</legend>
                    </fieldset>
                    <table border="0" width="100%" cellpadding="0" cellspacing="0" class="add_ItemTB">
                        <tr>
                            <td class="tdNormal" colspan="5">
                                <asp:GridView ID="GridView3" CssClass="gridMaster" Width="100%" runat="server" AutoGenerateColumns="False"
                                    DataKeyNames="Cst_Code" AllowPaging="False" AllowSorting="True" ShowFooter="true"
                                    CellPadding="4" ForeColor="#333333" GridLines="None" 
                                     EmptyDataText="There are no Results" onrowcommand="GridView3_RowCommand" 
                                    OnRowCreated="GridView3_RowCreated" >
                                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" HorizontalAlign="Right" />
                                    <Columns>
                                        <asp:BoundField DataField="Event_Name" HeaderText="Account Name" />
                                        <asp:BoundField DataField="From_Account" HeaderText="Dr. Account" />
                                        <asp:BoundField DataField="To_Account" HeaderText="Cr. Account" />
                                        <asp:BoundField DataField="Amount" DataFormatString="{0:0.00}" HeaderText="Amount" />
                                        <asp:BoundField DataField="AMOUNT_SIGN" DataFormatString="{0:0.00}" HeaderText="Db/Cr" />
                                        <asp:BoundField DataField="Narrative" HeaderText="Narrative" />
                                        <asp:BoundField DataField="file_number" HeaderText="file_number" Visible="True" />
                                        <asp:BoundField DataField="CS_GL_Desc" HeaderText="Status" />
                                        <asp:ButtonField ButtonType="Image" ItemStyle-Width="20px" CommandName="d" Text="Delete"
                                            ImageUrl="~/Images/delete.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: 73%">
                             <% if (GridView3.Rows.Count >= 1)
                                { %>
                                <% if (lbl_Status.Text == "000" || lbl_Status.Text == "008")
                                   { %>
                                  <asp:Button ID="Button7" runat="server" Text="Add Manual Entry" 
                                    CssClass="Btn_L_Normal" onclick="Button7_Click"
                                     />
                                     <asp:Button ID="Button8" runat="server" Text="Submit for Approval " CssClass="Btn_L_Normal1"
                                     Width="120px" 
                                    OnClientClick="return SaveConfirmation('Are you sure to send all the entries for approval')" 
                                    onclick="Button8_Click" />
                                 <%} %>
                                 <% if (lbl_Status.Text == "001")
                                    { %>
                                <asp:Button ID="Button9" runat="server" Text="Approve" CssClass="Btn_L_Normal"
                                     OnClientClick="return SaveConfirmation('Are you sure to process the GL')" 
                                    onclick="Button9_Click" />
                                <asp:Button ID="Button10" runat="server" Text="Reject" CssClass="Btn_L_Normal1"
                                     Width="111px" 
                                    OnClientClick="return SaveConfirmation('Are you sure to cancel all the entries')" 
                                    onclick="Button10_Click" />
                                <%} %>
                                <%} %>
                            </td>
                            <td class="tdNormal" style="width: 10%">
                            </td>
                            <td class="tdNormal">
                               
                            </td>
                        </tr>
                        <caption>
                            &nbsp;</caption>
                    </table>
                    
                     <br />
                </asp:Panel>

              
                <br />
                <asp:Panel ID="pnlAddFee" runat="server" Width="100%" Visible="false">
                    <fieldset id="addItem">
                        <legend id="addItem">Add New Diff. Entry
                                      </legend>
                    </fieldset>
                    <table border="0" cellpadding="0" cellspacing="0" class="add_ItemTB">
                        <tr>
                            <td class="tdNormal" style="width: 15%">Account Name
                            </td>
                            <td class="tdNormal" style="width: 20%">
                                <asp:DropDownList ID="ddlAccountFee" class="fieldNormal" runat="server" Width="250"
                                    DataTextField="Event_Name" DataValueField="Cs_Evnt_Code" 
                                    AutoPostBack="true" onselectedindexchanged="ddlAccountFee_SelectedIndexChanged"
                                    >
                                </asp:DropDownList>
                            </td>
                            <td class="tdNormal" style="width: 15%">Amount
                            </td>
                            <td class="tdNormal" style="width: 20%">
                                <asp:TextBox ID="txtAmountFee" runat="server" class="fieldNormal" Width="50%"></asp:TextBox>
                                <asp:RangeValidator ID="RangeValidator2" runat="server" ControlToValidate="txtAmountFee" Type="Double"></asp:RangeValidator>
                                <asp:DropDownList ID="DropDownList2" runat="server" Width="30%">
                                    <asp:ListItem Value="DB">DB</asp:ListItem>
                                    <asp:ListItem Value="CR">CR</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                            <td style="width: 25%"></td>
                        </tr>
                        <tr>
                            <td class="tdNormal" style="width: 15%">
                            </td>
                            <td class="tdNormal" style="width: 20%">
                                
                            </td>
                            <td class="tdNormal" style="width: 15%">Reference Number
                            </td>
                            <td class="tdNormal" style="width: 20%">
                                <asp:TextBox ID="txtRefNum" runat="server" class="fieldNormal" Width="50%"></asp:TextBox>
                                
                            </td>
                            <td style="width: 25%"></td>
                        </tr>
                        <tr>
                            <td class="tdNormal" style="width: 15%">Debit Account
                            </td>
                            <td class="tdNormal" style="width: 30%">
                                <asp:Label ID="lblDBAccountFee" runat="server" class="fieldNormal" Text=""></asp:Label>
                            </td>
                            <td class="tdNormal" style="width: 15%">Credit Account
                            </td>
                            <td class="tdNormal" style="width: 30%">
                                <asp:Label ID="lblCRAccountFee" runat="server" class="fieldNormal" Text=""></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td class="tdNormal" style="width: 15%">Narrative
                            </td>
                            <td class="tdNormal" style="width: 30%">
                                <asp:Label ID="lblNarFee" runat="server" class="fieldNormal" Text=""></asp:Label>
                            </td>
                            <td class="tdNormal" style="width: 15%">Settlement Currency
                            </td>
                            <td class="tdNormal" style="width: 30%">
                                <asp:Label ID="lblSettleCurFee" runat="server" class="fieldNormal" Text=""></asp:Label>
                            </td>
                        </tr>
                    </table>
                    <table border="0" cellpadding="0" cellspacing="0" class="action_TB_BgaddItem">
                        <tr>
                            <td>
                                <asp:Button ID="Button5" runat="server" Text="   Cancel   " class="Btn_M_Normal"
                                    CausesValidation="False" OnClick="Button5_Click" />
                                <asp:Button ID="Button6" runat="server" Text="   Save   " class="Btn_M_Normal"
                                    OnClick="Button6_Click" 
                                    OnClientClick="return SaveConfirmation('Ar you sure to pass mannual entry')" />
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
                <br />
                <asp:Panel ID="pnlBR" runat="server" Width="50%" Visible="false">
                    <fieldset id="addItem">
                        <legend id="addItem">Settlement Details:
                                        <asp:Label ID="lbl_Detail" runat="server" Text=""></asp:Label></legend>
                    </fieldset>
                    <table border="0" width="60%" 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="Sre_ID" 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="Sre_ID" HeaderText="SRE ID" />
                                        <asp:BoundField DataField="Settl_Date" HeaderText="Settlement Date" />
                                        <%--   <asp:BoundField DataField="Cr_Amount" HeaderText="Cr Amount" />
                                                    <asp:BoundField DataField="Dr_Amount" HeaderText="Dr Amount" />--%>
                                        <asp:BoundField DataField="clrng_Amt" HeaderText="Clearing Amount" />
                                        <asp:BoundField DataField="Settl_Amt" HeaderText="Settlement Amount" />
                                        <%--  <asp:BoundField DataField="Amt_Sign" HeaderText="Sign" />--%>
                                    </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="ddlPages2" runat="server" class="fieldNormal" AutoPostBack="True"
                                                Width="50px" OnSelectedIndexChanged="ddlPages2_SelectedIndexChanged">
                                            </asp:DropDownList>
                            </td>
                            <td class="tdNormal"></td>
                            <td class="tdNormal"></td>
                            <td class="tdNormal"></td>
                            <td class="tdNormal"></td>
                        </tr>
                        <br />  <br />
                        <tr>
                        
                            <td class="tdNormal"></td>
                            <td class="tdNormal"></td>
                             <td class="tdNormal" style="width: 20%">
                                        <asp:Button ID="btnCancel" runat="server" Text="Close VAT & Txn. Details" class="Btn_L_Normal1"
                                    CausesValidation="False" OnClick="btnCancel_Click" />
                            </td>
                            <td class="tdNormal"></td>
                            <td class="tdNormal"></td>
                        </tr>
                    </table>
                  
                </asp:Panel>
                <!------------------------------------body End2 ----------------------------------------------->
                
            </td>
        </tr>
    </table>
    <!------------------------------------body End2 ----------------------------------------------->
    </td>
        </tr>
    </table>
</asp:Content>
