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

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div id="request">

        <script type="text/javascript" src="../Javascript/datetimepicker_css.js"></script>
        <script type="text/javascript" src="../Javascript/datetimepicker.js"></script>
        <script language="JavaScript" type="text/JavaScript" src="../JavaScript/CFunc.js"></script>
        <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" class="active">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">Account
                        Summary</a>
                </td>
            </tr>
           
            <tr>
                <td style="height: 30px; padding-left: 300px" colspan="4" align="center">
                </td>
            </tr>
            <tr>
                <td colspan="4">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td width="3%">
                            </td>
                            <td width="12%">
                               From Date
                            </td>
                            <td width="1%">
                                <strong>:</strong>
                            </td>
                            <td width="40%">
                                <asp:TextBox ID="txtFrmDate" runat="server" Width="150px" onkeypress="return digitonly(this,event)"
                                    CausesValidation="True"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfvFrmDate" runat="server" ErrorMessage="Please Enter Date from"
                                    ControlToValidate="txtFrmDate" Display="None" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                <cc1:ValidatorCalloutExtender ID="vceFromDate" runat="server" TargetControlID="rfvFrmDate">
                                </cc1:ValidatorCalloutExtender>                               
                                <cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtFrmDate"
                                    PopupPosition="Right" Format="yyyy-MM-dd">
                                </cc1:CalendarExtender>
                            </td>
                            <td width="13%">
                                To Date
                            </td>
                            <td width="1%">
                                <strong>:</strong>
                            </td>
                            <td width="30%">
                                <asp:TextBox ID="txtToDate" runat="server" Width="150px" onkeypress="return digitonly(this,event)"
                                    CausesValidation="True"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfvToDate" runat="server" ErrorMessage="Please Enter To Date"
                                    ControlToValidate="txtToDate" Display="None" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                <cc1:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" TargetControlID="rfvToDate">
                                </cc1:ValidatorCalloutExtender>                               
                                <cc1:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="txtToDate"
                                    PopupPosition="Right" Format="yyyy-MM-dd">
                                </cc1:CalendarExtender> 
                            </td>
                        </tr>
                        <tr><td></td><td>Select Service</td><td>:</td>
                            <td colspan="7" style="height: 10px">
                            
                               <asp:DropDownList ID="DDLSelService" runat="server" Width="185px" CausesValidation="True">
                                    <asp:ListItem>Select</asp:ListItem>
                                    <asp:ListItem Value="2">Mobile Recharge</asp:ListItem>
                                    <asp:ListItem Value="3">DTH Recharge</asp:ListItem>
                                    <asp:ListItem Value="4">Data Card Recharge</asp:ListItem>
                                    <asp:ListItem Value="5">Money Transfer</asp:ListItem>
                                    <asp:ListItem Value="6">Flight</asp:ListItem>
                                    <asp:ListItem Value="7">Train</asp:ListItem>
                                    <asp:ListItem Value="8">Bill Payment</asp:ListItem>
                                    <asp:ListItem Value="9">AEPS</asp:ListItem>
                                    <%--<asp:ListItem Value="6">Premium Payment</asp:ListItem>
                                    <asp:ListItem Value="7">Pan Card</asp:ListItem>
                                    <asp:ListItem Value="8">Digital Signature</asp:ListItem>
                                    <asp:ListItem Value="9">ALL Services</asp:ListItem>--%>
                                </asp:DropDownList>
                                <asp:RequiredFieldValidator ID="rfvSelService" InitialValue="Select" runat="server"
                                    ControlToValidate="DDLSelService" Display="None" SetFocusOnError="True" ErrorMessage="Please Select Service"> </asp:RequiredFieldValidator>
                                <cc1:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" TargetControlID="rfvSelService"
                                    runat="server">
                                </cc1:ValidatorCalloutExtender></td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td>
                                
                            </td>
                            <td>
                                <strong></strong>
                            </td>
                            <td>
                                <asp:Button ID="btndownload" runat="server"  Text="Download Report" 
                                           onclick="btndownload_Click"  />
                            </td>
                            <td>
                            </td>
                            <td>
                            </td>
                            <td style="float: none; text-align: center; padding: 0 0 0 40px">
                                <asp:Button ID="BtnSubmit" runat="server" Text="Submit" Width="90px" class="button"
                                    OnClick="BtnSubmit_Click" />
                            </td>
                        </tr>
                        <%--<tr>
                            <td>
                            </td>
                            <td colspan="6">
                                       <asp:Button ID="btndownload" runat="server"  Text="Download Report" 
                                           onclick="btndownload_Click"  />
                            </td>
                        </tr>--%>
                        <tr>
                            <td>
                            </td>
                            <td colspan="6" style="text-align:center">
                                <asp:Label ID="lblerror" runat="server" Font-Bold="true"></asp:Label>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td align="left" valign="middle" height="370" style="padding-left: 0px; padding-right: 0px" colspan="4">
                    <asp:GridView ID="GvTransactionReport" runat="server" AutoGenerateColumns="False" AllowPaging="true" AllowSorting="true" 
                          GridLines="None" PageSize="50" 
                        CellPadding="4" ForeColor="#333333" Width="100%" HorizontalAlign="Center" EmptyDataText="No Data Available" 
                        OnPageIndexChanging="GvTransactionReport_PageIndexChanging">
                        <Columns>
                            <asp:TemplateField HeaderText="Sl.">
                                <ItemTemplate>
                                    <%#Container.DataItemIndex+1 %>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="TRANSACTION_DATETIME" HeaderText="Txn Date & Time" />
                            <asp:BoundField DataField="REFERENCE_NUMBER" HeaderText="Txn.ID." />
                            <asp:BoundField DataField="SERVICE_NAME" HeaderText="Service Name" />
                            <asp:BoundField DataField="OperatorName" HeaderText="Operator" />
                            <asp:BoundField DataField="MobileNo" HeaderText="Mobile No." />
                            <asp:BoundField DataField="REQUEST_AMOUNT" HeaderText="Req.Amt." />
                            <asp:BoundField DataField="TOTAL_COMMISSION" HeaderText="Margin" />
                            <asp:BoundField DataField="NET_AMOUNT" HeaderText="Net. Amt" />
                            <asp:BoundField DataField="STATUS" HeaderText="Status" />
                            <asp:BoundField DataField="OperatorTxnID" HeaderText="operator ID " />
                        </Columns>
                        <FooterStyle BackColor="#dddee0" Font-Bold="True" ForeColor="Black" />
                        <PagerStyle BackColor="#dddee0" ForeColor="Black" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <HeaderStyle BackColor="#dddee0" Font-Bold="True" ForeColor="Black" />
                        <EditRowStyle BackColor="#2461BF" />
                        <AlternatingRowStyle BackColor="White" />
                    </asp:GridView>
                     <asp:SqlDataSource ID="dsdetails" runat="server" ConnectionString="server=184.154.101.215;database=egenservices_;uid=sa;pwd=3gen$R^ic3$;"
                       SelectCommandType="StoredProcedure"  InsertCommand="USP_ALLTRANSACTION_REPORT" DataSourceMode="DataSet"/> 

                       <asp:GridView ID="GridView_Train" runat="server" AutoGenerateColumns="False" AllowPaging="true" AllowSorting="true" 
                          GridLines="None" PageSize="50" 
                        CellPadding="4" ForeColor="#333333" Width="100%" HorizontalAlign="Center" EmptyDataText="No Data Available" Visible="false" >
                        <Columns>
                            <asp:TemplateField HeaderText="Sl.">
                                <ItemTemplate>
                                    <%#Container.DataItemIndex+1 %>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="TRANSACTION_DATETIME" HeaderText="Txn Date & Time" />
                            <asp:BoundField DataField="REFERENCE_NUMBER" HeaderText="Txn.ID." />
                            <asp:BoundField DataField="SERVICE_NAME" HeaderText="Service Name" />
                            <asp:BoundField DataField="OperatorName" HeaderText="Booking Date" />
                            <asp:BoundField DataField="MobileNo" HeaderText="Mobile No." />
                            <asp:BoundField DataField="REQUEST_AMOUNT" HeaderText="Req.Amt." />
                            <asp:BoundField DataField="TOTAL_COMMISSION" HeaderText="Margin" />
                            <asp:BoundField DataField="NET_AMOUNT" HeaderText="Net. Amt" />
                            <asp:BoundField DataField="STATUS" HeaderText="Status" />
                            <asp:BoundField DataField="OperatorTxnID" HeaderText="PNR " />
                        </Columns>
                        <FooterStyle BackColor="#dddee0" Font-Bold="True" ForeColor="Black" />
                        <PagerStyle BackColor="#dddee0" ForeColor="Black" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <HeaderStyle BackColor="#dddee0" Font-Bold="True" ForeColor="Black" />
                        <EditRowStyle BackColor="#2461BF" />
                        <AlternatingRowStyle BackColor="White" />
                    </asp:GridView>

                     <asp:GridView ID="gv_DMT" runat="server" AutoGenerateColumns="False" AllowPaging="true" AllowSorting="true" 
                          GridLines="None" PageSize="50" 
                        CellPadding="4" ForeColor="#333333" Width="100%" HorizontalAlign="Center" EmptyDataText="No Data Available" Visible="false" >
                        <Columns>
                            <asp:TemplateField HeaderText="Sl.">
                                <ItemTemplate>
                                    <%#Container.DataItemIndex+1 %>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="TRANSACTION_DATETIME" HeaderText="Txn Date & Time" />
                            <asp:BoundField DataField="REFERENCE_NUMBER" HeaderText="Txn.ID." />
                            <asp:BoundField DataField="OperatorName" HeaderText="Operator" />
                            <asp:BoundField DataField="MobileNo" HeaderText="Mobile No." />
                            <asp:BoundField DataField="REQUEST_AMOUNT" HeaderText="Req.Amt." />
                            <asp:BoundField DataField="TOTAL_COMMISSION" HeaderText="Margin" />
                            <asp:BoundField DataField="NET_AMOUNT" HeaderText="Net. Amt" />
                            <asp:BoundField DataField="STATUS" HeaderText="Status" />
                            <asp:BoundField DataField="OperatorTxnID" HeaderText="operator ID " />
                            <asp:BoundField DataField="AccountNo" HeaderText="Bank A/C No" />
                        </Columns>
                        <FooterStyle BackColor="#dddee0" Font-Bold="True" ForeColor="Black" />
                        <PagerStyle BackColor="#dddee0" ForeColor="Black" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <HeaderStyle BackColor="#dddee0" Font-Bold="True" ForeColor="Black" />
                        <EditRowStyle BackColor="#2461BF" />
                        <AlternatingRowStyle BackColor="White" />
                    </asp:GridView>
                </td>
            </tr>
            <!--<tr>
  <td colspan="3"></td>
  <td style="padding:0 0 0 70px;"><input type="button" class="button"  value="Submit" style="margin:15px 0 0 0;" /></td>
   </tr>-->
            <tr>
                <td colspan="4" style="height: 30px"><asp:ScriptManager ID="ScriptManager1" runat="server">
                    </asp:ScriptManager>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
