<%@ Page Language="C#" MasterPageFile="~/masterpage/MasterPage.master" AutoEventWireup="true" CodeFile="SMSReport.aspx.cs" 
Inherits="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 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; padding-left: 300px" align="center">
                </td>
            </tr>
            
            <tr>
                <td>
                    <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="180px" 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="validcallextfrom" runat="server" TargetControlID="rfvFrmDate">
                                </cc1:ValidatorCalloutExtender>
                                <cc1:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="txtFrmDate" PopupPosition="Right">
                                </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="180px" 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="ValidatorCalloutExtender3" runat="server" TargetControlID="rfvToDate">
                                </cc1:ValidatorCalloutExtender>
                                <cc1:CalendarExtender runat="server" ID="CalendarExtender2" TargetControlID="txtToDate" PopupPosition="Right">
                                </cc1:CalendarExtender> 
                            </td>
                        </tr>
                        <tr>
                            <td colspan="7" style="height: 10px">
                            
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            
                                 <td>Select User Type
                            </td>
                            <td><strong>:</strong>
                            </td>
                            
                            <td >
                               <asp:DropDownList ID="DDL_UserType" runat="server" Width="185px" 
                                    CausesValidation="True" AutoPostBack="true" 
                                    onselectedindexchanged="DDL_UserType_SelectedIndexChanged">
                                    <asp:ListItem>Select</asp:ListItem>
                                    <asp:ListItem Value="1">MDS</asp:ListItem>
                                    <asp:ListItem Value="2">Distributor</asp:ListItem>
                                    <asp:ListItem Value="3">Agent</asp:ListItem>                                    
                                </asp:DropDownList>
                                <asp:RequiredFieldValidator ID="rfvSelService" InitialValue="Select" runat="server"
                                    ControlToValidate="DDL_UserType" Display="None" SetFocusOnError="True" ErrorMessage="Please Select User Type"> </asp:RequiredFieldValidator>
                                <cc1:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" TargetControlID="rfvSelService"
                                    runat="server">
                                </cc1:ValidatorCalloutExtender> 
                            </td>
                          <td><asp:Label ID="lbluserid" runat="server" Text="Select User Id"></asp:Label>
                            </td>
                            <td>
                                </td>
                                <td> <asp:DropDownList ID="ddl_partner_id" runat="server" Width="185px" CausesValidation="True">
                                    <asp:ListItem>Select User Id</asp:ListItem>
                                                                       
                                </asp:DropDownList>
                                <asp:RequiredFieldValidator ID="rfv_partner_id" InitialValue="Select" runat="server"
                                    ControlToValidate="ddl_partner_id" Display="None" SetFocusOnError="True" ErrorMessage="Please Select User Id"> </asp:RequiredFieldValidator>
                                <cc1:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" TargetControlID="rfv_partner_id"
                                    runat="server">
                                </cc1:ValidatorCalloutExtender></td>
                             
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td colspan="3">
                                       <asp:Button ID="btndownload" runat="server"  Text="Download Report" 
                                           onclick="btndownload_Click" style="height: 26px" />
                            </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" 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">
                    <asp:GridView ID="GvSMSReport" runat="server" AutoGenerateColumns="False" 
                        AllowPaging="true" AllowSorting="true" 
                          GridLines="None" PageSize="20" 
                        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="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" />
                        <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>
                <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
            </tr>
            </table>
</asp:Content>

