<%@ Page Language="C#" MasterPageFile="~/masterpage/MasterPage.master" AutoEventWireup="true" CodeFile="SMSReport.aspx.cs" 
Inherits="Agent_SMSReport" Title="eGen Services" %>

<%@ 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">

 <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" class="active">SMS Report</a>
                    <span style="padding-left: 100px;">&nbsp;</span><a href="AccountSummery.aspx" >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="7%">
                                 Date
                            </td>
                            <td width="1%">
                                <strong>:</strong>
                            </td>
                            <td width="50%">
                                <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" runat="server" TargetControlID="rfvFrmDate">
                                </cc1:ValidatorCalloutExtender>                               
                                
                               <cc1:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="txtFrmDate" PopupPosition="Right">
                                   </cc1:CalendarExtender>                                
                            </td>
                            <td width="8%">To Date</td>
                            <td width="1%"><strong>:</strong></td>
                            <td width="33"><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" runat="server" TargetControlID="rfvToDate">
                                </cc1:ValidatorCalloutExtender>                               
                                
                               <cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtToDate" PopupPosition="Right">
                                   </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 style="padding-left:50px;" colspan="3"><asp:Button ID="btnSubmit" runat="server" Text="Submit" class="button" onclick="btnSubmit_Click" 
                                     /></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 align="left" valign="middle" height="370" style="padding-left: 0px; padding-right: 0px" colspan="4">
                    <asp:GridView ID="GvSMSReport" runat="server" AutoGenerateColumns="False" AllowSorting="true" 
                          GridLines="None" PageSize="20" AllowPaging="true" 
                        CellPadding="4" ForeColor="#333333" Width="100%" HorizontalAlign="Center" 
                        EmptyDataText="No Data Available" onpageindexchanging="GvSMSReport_PageIndexChanging" 
                       >
                       
                        <Columns>
                            <asp:TemplateField HeaderText="Sl.">
                                <ItemTemplate>
                                    <%#Container.DataItemIndex+1 %>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="date" HeaderText="Request Date & Time" Visible="false" />
                            <asp:BoundField DataField="mobileno" HeaderText="Mobile No" Visible="false" />
                            <asp:BoundField DataField="URL" HeaderText="Request SMS" />
                            <asp:BoundField DataField="ResponceMsg" HeaderText="Responce SMS" />                            
                        </Columns>
                        <FooterStyle BackColor="#dddee0" Font-Bold="True" ForeColor="Black" />
                        <PagerStyle BackColor="#dddee0" ForeColor="Black" HorizontalAlign="Center" Height="20px" />
                        <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"/> 
                     
                </td>
            </tr>
            <tr>
            <td colspan="32"><asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager></td>
            </tr>
    </table>
</asp:Content>

