<%@ Page Language="C#" MasterPageFile="~/masterpage/MasterPage.master" AutoEventWireup="true" EnableEventValidation="false"
    CodeFile="AccountSummery.aspx.cs" Inherits="AccountSummery" Title="eGen Service" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">

    <script src="../Javascrolling/jquery-1.4.1.min.js" type="text/javascript"></script>

    <script src="../Javascrolling/ScrollableGridPlugin.js" type="text/javascript"></script>
 <script type="text/javascript" language="javascript">
     $(document).ready(function() {
     $('#<%=gvAccountReport.ClientID %>').Scrollable();
     }
)
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div id="request">

        <script src="../javascript/scriptvalidation.js" type="text/javascript"></script>

        <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
            <tr>
                <td colspan="4" class="hdr">
                    <a href="TransactionReport.aspx">Transaction Report </a><span style="padding-right: 100px;">
                        &nbsp;</span> <span>&nbsp;</span><a href="SMSReport.aspx">SMS Report</a>
                    <span style="padding-left: 100px;">&nbsp;</span><a href="AccountSummery.aspx" class="active">Account
                        Summary</a>
                </td>
            </tr>
            <tr>
                <td style="height: 30px" colspan="4">
                    
                </td>
            </tr>
            <tr>
                <td colspan="4">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td width="3%">
                            </td>
                            <td width="12%">
                                 FromDate
                            </td>
                            <td width="1%">
                                <strong>:</strong>
                            </td>
                            <td width="40%">
                                <asp:TextBox ID="txtFrmDate" runat="server" Width="150px" onkeypress="return digitonly(this,event)"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfvFrmDate" runat="server" ErrorMessage="Please Enter Date from"
                                    ControlToValidate="txtFrmDate" Display="None"> </asp:RequiredFieldValidator>
                                <cc1:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" TargetControlID="rfvFrmDate"
                                    runat="server">
                                </cc1:ValidatorCalloutExtender>
                                
                                <cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtFrmDate" PopupPosition="Right" Format="yyyy-MM-dd">
                                </cc1:CalendarExtender>                                
                            </td><td>ToDate</td><td>:</td>
                            <td>
                                <asp:TextBox ID="txtToDate" runat="server" Width="150px" onkeypress="return digitonly(this,event)"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfvToDate" runat="server" ErrorMessage="Please Enter To Date"
                                    ControlToValidate="txtToDate" Display="None"> </asp:RequiredFieldValidator>
                                <cc1:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" TargetControlID="rfvToDate"
                                    runat="server">
                                </cc1:ValidatorCalloutExtender>
                                
                                <cc1:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="txtToDate" PopupPosition="Right" Format="yyyy-MM-dd">
                                </cc1:CalendarExtender>                                
                            </td>
                                                     
                        </tr>
                        <tr>
                            <td colspan="7" style="height: 10px; text-align:center">
                                                            
                            </td>
                        </tr>
                        <tr>
                        <td ></td>
                            <td colspan="3" style="padding:0 0 0 5px; text-align:left;">
                                    <asp:Button ID="btndownload" runat="server"  Text="Download Report" 
                                    onclick="btndownload_Click" />
                            </td>
                            <td colspan="3" style="text-align:right; padding: 0 115px 0 0px">
                            <asp:Label ID="lblBalance" runat="server" Text=" Opening Balance :" Visible="false"></asp:Label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:Button ID="btnSubmit" runat="server" Text="Submit" class="button" 
                                    onclick="btnSubmit_Click" />
                            <asp:Label ID="lblopeningbalance" runat="server" Visible="false" ></asp:Label>
                               </td>
                            
                        </tr>
                        <tr>
                            <td colspan="7" style="text-align:center; font-weight:bold" ><asp:Label ID="lblerror" runat="server" ></asp:Label>
                                
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td colspan="7">
                
               <%-- <asp:Panel ID="scrollableGridArea" runat="server" style="overflow:scroll; height: 250px; width: 900px" ScrollBars="Auto">             
                    
                </asp:Panel>--%>
                <asp:GridView ID="gvAccountReport" runat="server" AutoGenerateColumns="false" HeaderStyle-CssClass="fixedHeader"
                        GridLines="None" AllowPaging="true" AllowSorting="true" PageSize="50"
                        Width="100%" HorizontalAlign="Center" ShowFooter="True"                           
                        onpageindexchanging="gvAccountReport_PageIndexChanging">
                        <FooterStyle BackColor="#dddee0" Font-Bold="True" ForeColor="Black" />
                        <PagerStyle BackColor="#dddee0" ForeColor="White" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <HeaderStyle BackColor="#dddee0" Font-Bold="True" ForeColor="Black" />
                        <EditRowStyle BackColor="#2461BF" />
                        <AlternatingRowStyle BackColor="White" />
                        <Columns>
                            <asp:TemplateField HeaderText="Sl.">
                                <ItemTemplate>
                                    <%#Container.DataItemIndex+1 %>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField HeaderText="Txn Date Time" DataField="TRANSACTION_DATETIME" />
                            <asp:BoundField HeaderText="Service" DataField="SERVICE_NAME" />
                            <asp:BoundField HeaderText="Txn Id" DataField="REFERENCE_NUMBER" />
                            <asp:BoundField HeaderText="Mobile No." DataField="MobileDTHNumber"/>
                            <asp:BoundField HeaderText="Amount" DataField="REQUEST_AMOUNT"/>
                            <asp:BoundField HeaderText="Margin" DataField="total_commission"/>
                            <asp:BoundField HeaderText="Charge" DataField="TOTAL_SERVICE_CHARGE"/>
                            <asp:BoundField HeaderText="Net.Amt" DataField="NET_AMOUNT"  />
                            <asp:BoundField HeaderText="Type" DataField="ACTION_ON_AMOUNT"/>
                            <asp:BoundField HeaderText="Balance" DataField="FINAL_BAL_AMOUNT"/>
                            <asp:BoundField HeaderText="Status" DataField="Status" />
                        </Columns>
                        <EditRowStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                        <AlternatingRowStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                    </asp:GridView>
                </td>
            </tr>           
            <tr>
                <td colspan="4" style="height: 30px"><asp:ScriptManager ID="ScriptManager1" runat="server">
                    </asp:ScriptManager>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
