<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage/AdminMasterPage.master" AutoEventWireup="true" CodeFile="AdvanceSearch.aspx.cs" 
Inherits="Admin_AdvanceSearch" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

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

<script src="script/func.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table width="100%" >
           
             <tr>
                            <td width="27%">
                                &nbsp;
                            </td>
                            <td width="14%">
                                Select User Type
                            </td>
                            <td width="1%">
                                <strong>:</strong>
                            </td>
                            <td width="58%">
                                <asp:DropDownList ID="ddlUserInfo" runat="server" Width="225px" OnSelectedIndexChanged="ddlUserInfo_SelectedIndexChanged"
                                    AutoPostBack="true">
                                    <asp:ListItem Value="0">Select Type</asp:ListItem>
                                    <asp:ListItem Value="1">White Label</asp:ListItem>
                                    <asp:ListItem Value="2">Master Distributor</asp:ListItem>
                                    <asp:ListItem Value="3">Distributor</asp:ListItem>
                                    <asp:ListItem Value="4">Agent</asp:ListItem>
                                    <asp:ListItem Value="5">Advance Search</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        
                        <tr>
                            <td colspan="4" height="25px" style="text-align:center"><asp:Label ID="lbl_error" runat="server"></asp:Label></td>
                        </tr>               
            
            
            <tr>
                <td>
                </td>
                <td>
                    User ID
                </td>
                <td>
                    :
                </td>
                <td>
                    <asp:TextBox ID="txt_UserID" runat="server" class="style" ValidationGroup="test" MaxLength="30"
                        Style="width: 232px;"></asp:TextBox>&nbsp;&nbsp;&nbsp; Please fill only one field
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                    E-Mail ID
                </td>
                <td>
                    :
                </td>
                <td>
                    <asp:TextBox ID="txt_EMail_ID" runat="server" class="style" ValidationGroup="test" MaxLength="60"
                        Style="width: 232px;"></asp:TextBox>             </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                     Mobile No.
                </td>
                <td>
                    :
                </td>
                <td>
                    <asp:TextBox ID="txt_Authorized_Mobile_No" runat="server" class="style" ValidationGroup="test"
                        Style="width: 232px;" onkeypress="return digitonly(this,event)" MaxLength="10"></asp:TextBox>
                </td>
            </tr>                  
           
            <tr>
                <td colspan="4" style="text-align: center; padding: 20px 0 0 0">
                    <asp:Button ID="Button1" runat="server" Text="Submit" class="button"
                        OnClick="Button1_Click" />
                    
                </td>
            </tr>
           <div id="div_gridview" runat="server">
            <tr>
                <td colspan="11" style="text-align: right; padding: 10px">                    
                    <asp:Button ID="btnForWeb" CssClass="button active" runat="server" Text="For Web"
                        OnClick="btnForWeb_Click" />
                    <asp:Button ID="btnForSms" CssClass="button active" runat="server" Text="For SMS"
                        OnClick="btnForSms_Click" />&nbsp;&nbsp;&nbsp;
                        
                        <asp:Button ID="btnForWebSD" CssClass="button active" runat="server" Text="For Web"
                        OnClick="btnForWebDS_Click" />
                    <asp:Button ID="btnForSmsDS" CssClass="button active" runat="server" Text="For SMS"
                        OnClick="btnForSmsDS_Click" />&nbsp;&nbsp;&nbsp;
                        
                        <asp:Button ID="btnForWebMDS" CssClass="button active" runat="server" Text="For Web"
                        OnClick="btnForWebMDS_Click" />
                    <asp:Button ID="btnForSmsMDS" CssClass="button active" runat="server" Text="For SMS"
                        OnClick="btnForSmsMDS_Click" />&nbsp;&nbsp;&nbsp;
                        
                        <asp:Button ID="btnForWebWL" CssClass="button active" runat="server" Text="For Web"
                        OnClick="btnForWebWL_Click" />
                    <asp:Button ID="btnForSmsWL" CssClass="button active" runat="server" Text="For SMS"
                        OnClick="btnForSmsWL_Click" />
                </td>
            </tr>            
            <tr>
                <td colspan="4" align="center" style="text-align: center; height: 2px">
                    <asp:Label ID="lblsucess" runat="server"></asp:Label>
                </td>
            </tr>             
            <tr>
                    <td align="center" colspan="4">
                    
                        <asp:GridView ID="GridViewAgent" runat="server" AutoGenerateColumns="False" BorderColor="#CCCCCC"
                            BackColor="White" Font-Bold="False" Font-Italic="False" Font-Overline="False"
                            Font-Strikeout="False" Font-Underline="False" 
                            DataKeyNames="FLAG" Width="1330px" BorderStyle="None" BorderWidth="1px" CellPadding="3"
                            ShowHeader="true" CssClass="HeaderFreeze" ShowFooter="true" >
                            <PagerSettings Mode="NextPreviousFirstLast" NextPageText="Next" PreviousPageText="Previous" />
                            <RowStyle HorizontalAlign="Center" ForeColor="#000066" />
                            <Columns>
                                <asp:TemplateField HeaderText="S.NO">
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chk1" runat="server" />
                                        <%#Container.DataItemIndex+1 %>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="DATEOFJOINING" HeaderText="Reg. Date" />
                                <asp:BoundField DataField="FIRSTNAME" HeaderText="Name" />
                                <asp:TemplateField HeaderText="AG ID">
                                    <ItemTemplate>
                                        <asp:Label ID="lbl_username" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.USERNAME") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="PASSWORD" HeaderText="Password" />
                                <asp:BoundField DataField="EMAILID" HeaderText="E-mail Id" />
                                <asp:BoundField DataField="MOBILENO" HeaderText="Mobile No." />
                                <asp:BoundField DataField="NETAMOUNT" HeaderText="Balance" />
                                <asp:BoundField DataField="FLAG" HeaderText="Web Stat" />
                                <asp:BoundField DataField="FLAGSMS" HeaderText="SMS Stat" />
                                <asp:BoundField DataField="Mpin1" HeaderText="MPIN" />
                                <asp:BoundField DataField="UPPERLEVEL" HeaderText="DS ID" />
                                <asp:BoundField DataField="MDWLabel" HeaderText="MD/WL ID" />
                                <asp:TemplateField Visible="false">
                                    <ItemTemplate>
                                        <asp:Label ID="lbl_loginid" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.LOGINID") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <FooterStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" VerticalAlign="Middle" />
                            <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                            <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" HorizontalAlign="Center" />
                            <HeaderStyle BackColor="#DBE4E8" Font-Bold="True" ForeColor="Black" HorizontalAlign="Left" />
                            <EditRowStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                            <AlternatingRowStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                        </asp:GridView>
                        
                        <asp:GridView ID="GridViewDS" runat="server" AutoGenerateColumns="False" BorderColor="#CCCCCC"
                            BackColor="White" Font-Bold="False" Font-Italic="False" Font-Overline="False"
                            Font-Strikeout="False" Font-Underline="False" DataKeyNames="FLAG" Width="1330px"
                            BorderStyle="None" BorderWidth="1px" CellPadding="3" ShowHeader="true" CssClass="HeaderFreeze"
                             ShowFooter="true" >
                            <PagerSettings Mode="NextPreviousFirstLast" NextPageText="Next" PreviousPageText="Previous" />
                            <RowStyle HorizontalAlign="Center" ForeColor="#000066" />
                            <Columns>
                                <asp:TemplateField HeaderText="S.NO">
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chk2" runat="server" />
                                        <%#Container.DisplayIndex+1%>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="DATEOFJOINING" HeaderText="Reg. Date" />
                                <asp:BoundField DataField="FIRSTNAME" HeaderText="Name" />
                                <asp:TemplateField HeaderText="DS ID">
                                    <ItemTemplate>
                                        <asp:Label ID="lbl_username" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.USERNAME") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="PASSWORD" HeaderText="Password" />
                                <asp:BoundField DataField="EMAILID" HeaderText="E-mail Id" />
                                <asp:BoundField DataField="MOBILENO" HeaderText="Mobile No." />
                                <asp:BoundField DataField="NETAMOUNT" HeaderText="Balance" />
                                <asp:BoundField DataField="FLAG" HeaderText="Web Stat" />
                                <asp:BoundField DataField="FLAGSMS" HeaderText="SMS Stat" />
                                <asp:BoundField DataField="Mpin1" HeaderText="MPIN" />
                                <asp:BoundField DataField="usercount" HeaderText="#AG" />
                                <asp:BoundField DataField="UPPERLEVEL" HeaderText="MD/WL ID" />
                                <asp:TemplateField Visible="false">
                                    <ItemTemplate>
                                        <asp:Label ID="lbl_loginid" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.LOGINID") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>                                                   
                            </Columns>
                            <FooterStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" VerticalAlign="Middle" />
                            <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                            <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" HorizontalAlign="Center" />
                            <HeaderStyle BackColor="#DBE4E8" Font-Bold="True" ForeColor="Black" HorizontalAlign="Left" />
                            <EditRowStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                            <AlternatingRowStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                        </asp:GridView>
                        
                        <asp:GridView ID="GridViewMDS" runat="server" AutoGenerateColumns="False" BorderColor="#CCCCCC"
                            BackColor="White" Font-Bold="False" Font-Italic="False" Font-Overline="False"
                            Font-Strikeout="False" Font-Underline="False" DataKeyNames="FLAG" Width="1330px"
                            BorderStyle="None" BorderWidth="1px" CellPadding="3" ShowHeader="true" CssClass="HeaderFreeze"
                             ShowFooter="true">
                            <PagerSettings Mode="NextPreviousFirstLast" NextPageText="Next" PreviousPageText="Previous" />
                            <RowStyle HorizontalAlign="Center" ForeColor="#000066" />
                            <Columns>
                                <asp:TemplateField HeaderText="S.NO">
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chk3" runat="server" />
                                        <%#Container.DisplayIndex+1%>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="" Visible="false">
                                    <ItemTemplate>
                                        <asp:Label ID="lbl_LOGINID" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.LOGINID") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="UPPERLEVEL" HeaderText="Distributor Id" Visible="false" />
                                <asp:BoundField DataField="DATEOFJOINING" HeaderText="Reg. Date" />
                                <asp:BoundField DataField="FIRSTNAME" HeaderText="Name" />
                                <asp:BoundField DataField="USERNAME" HeaderText="MDS ID" />
                                <asp:BoundField DataField="PASSWORD" HeaderText="Password" />
                                <asp:BoundField DataField="EMAILID" HeaderText="E-mail Id" />
                                <asp:BoundField DataField="MOBILENO" HeaderText="Mobile No." />
                                <asp:BoundField DataField="NETAMOUNT" HeaderText="Balance" />
                                <asp:TemplateField HeaderText="Status">
                                    <ItemTemplate>                                                            
                                        <asp:Label ID="lblStatusWeb" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.FLAG") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="TOTALCASH" HeaderText="Total Amount" />
                                <asp:BoundField HeaderText="#DS" DataField="Distributorcount" />
                                <asp:BoundField HeaderText="#AG" DataField="Agentcount" />
                            </Columns>
                            <FooterStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" VerticalAlign="Middle" />
                            <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                            <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" HorizontalAlign="Center" />
                            <HeaderStyle BackColor="#DBE4E8" Font-Bold="True" ForeColor="Black" HorizontalAlign="Left" />
                            <EditRowStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                            <AlternatingRowStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                        </asp:GridView>
                        
                        <asp:GridView ID="GridViewWL" runat="server" AutoGenerateColumns="False" BorderColor="#CCCCCC"
                            BackColor="White" Font-Bold="False" Font-Italic="False" Font-Overline="False"
                            Font-Strikeout="False" Font-Underline="False" DataKeyNames="FLAG" Width="1330px"
                            BorderStyle="None" BorderWidth="1px" CellPadding="3" ShowHeader="true" CssClass="HeaderFreeze" ShowFooter="true">
                            <PagerSettings Mode="NextPreviousFirstLast" NextPageText="Next" PreviousPageText="Previous" />
                            <RowStyle HorizontalAlign="Center" ForeColor="#000066" />
                            <Columns>
                                <asp:TemplateField HeaderText="S.NO">
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chk1" runat="server" />
                                        <%#Container.DisplayIndex+1%>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="" Visible="false">
                                    <ItemTemplate>
                                        <asp:Label ID="lbl_LOGINID" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.LOGINID") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="UPPERLEVEL" HeaderText="Distributor Id" Visible="false" />
                                <asp:BoundField DataField="DATEOFJOINING" HeaderText="Reg. Date" />
                                <asp:BoundField DataField="FIRSTNAME" HeaderText="Name" />
                                <asp:TemplateField HeaderText="WL ID">
                                    <ItemTemplate>
                                        <a href="<%# DataBinder.Eval(Container, "DataItem.DomainName")%>" target="_blank"
                                            title="<%# DataBinder.Eval(Container, "DataItem.DomainName")%>">
                                            <%# DataBinder.Eval(Container, "DataItem.USERNAME")%></a>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="PASSWORD" HeaderText="Password" />
                                <asp:BoundField DataField="EMAILID" HeaderText="E-mail Id" />
                                <asp:BoundField DataField="MOBILENO" HeaderText="Mobile No." />
                                <asp:BoundField DataField="NETAMOUNT" HeaderText="Balance" />
                                <asp:TemplateField HeaderText="Status">
                                    <ItemTemplate>
                                        <asp:Label ID="lblStatusWeb" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.FLAG") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="TOTALCASH" HeaderText="Total Amount" />
                                <asp:BoundField HeaderText="#DS" DataField="Distributorcount" />
                                <asp:BoundField HeaderText="#AG" DataField="Agentcount" />
                            </Columns>
                            <FooterStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" VerticalAlign="Middle" />
                            <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                            <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" HorizontalAlign="Center" />
                            <HeaderStyle BackColor="#DBE4E8" Font-Bold="True" ForeColor="Black" HorizontalAlign="Left" />
                            <EditRowStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                            <AlternatingRowStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                        </asp:GridView>
                    </td>
                </tr>
           </div> 
        </table>
</asp:Content>

