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

<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() {
     $('#<%=gvActiveAgent.ClientID %>').Scrollable();
//     $('#<%=GvTransactionReport.ClientID %>').Scrollable();
     }
)
</script>


</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div id="request">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">           
            <tr>
                <td style="height: 10px" colspan="4">
                </td>
            </tr>
            <tr>
                <td colspan="4">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td colspan="6">
                                &nbsp;
                            </td>
                            
                            <td style="float: none; text-align: right; padding: 0 0 0 0px">
                                
                                <asp:Button ID="btnnew" runat="server" Text="Add MDS" class="button" 
                                    onclick="btnnew_Click" />&nbsp;
                                     &nbsp;&nbsp;<asp:Button ID="btnActive" runat="server" Text="Inactive" class="button" onclick="btnActive_Click" />
                                     &nbsp;&nbsp;&nbsp;<asp:Button ID="btnActiveAgForWeb" runat="server" 
                                    class="button" Text="For Web" onclick="btnActiveAgForWeb_Click" />
                                     &nbsp;&nbsp;&nbsp;<asp:Button ID="btnDeAcAgForSMS" runat="server" 
                                    class="button" Text="For SMS" onclick="btnDeAcAgForSMS_Click" />
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 10px; text-align:center" colspan="8"><asp:Label ID="lblerror" runat="server"></asp:Label>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td colspan="7">
                    <div id="DIV_gvIncomeReport" runat="server">
                    <asp:GridView ID="gvActiveAgent" runat="server" AutoGenerateColumns="false"  Width="100%" GridLines="None" 
                         DataKeyNames="COURENTLEVEL" 
                        onpageindexchanging="gvActiveAgent_PageIndexChanging"  >
                        <HeaderStyle BackColor="#dddee0" Font-Bold="True" ForeColor="Black" />
                        <Columns>
                        <asp:TemplateField HeaderText="SL.">
                        <ItemTemplate>
                            <asp:CheckBox ID="chkbox" runat="server" />
                            <%--<%#Container.DataItemIndex+1 %>--%>
                        </ItemTemplate>                        
                        </asp:TemplateField>                            
                            <asp:TemplateField HeaderText="MDS Id" >
                                <ItemTemplate>
                                    <asp:Label ID="lblCurrentLevel" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.USERNAME") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            
                            <asp:BoundField DataField="OFFICECITY" HeaderText="City" />
                            <asp:BoundField DataField="OFFICESTATE" HeaderText="State" />
                            <asp:BoundField DataField="MOBILENO" HeaderText="Mobile No." />
                            <asp:BoundField DataField="EMAILID" HeaderText="Email Id" />
                            <asp:BoundField DataField="TOTALCASH" HeaderText="Total Fund" />
                            <asp:BoundField DataField="BALANCE" HeaderText="Balance" />
                            <asp:TemplateField HeaderText="# DS">
                                <ItemTemplate>
                                    <asp:LinkButton ID="btnNoOfAgent" runat="server" ForeColor="Black" Text='<%# DataBinder.Eval(Container,"DataItem.NumberOfAgent") %>'
                                     OnCommand="btnNoOfTxn_Command" OnClientClick="return newwindow1(GetDataAccOperators.aspx);"   ></asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="DistributorCurrentLevel" Visible="false" >
                                <ItemTemplate>
                                    <asp:Label ID="lblDistributorCurrentLevel" runat="server" Text='<%# DataBinder.Eval(Container,"DataItem.COURENTLEVEL") %>'>&apos;&gt;</asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                    </div>
                    <div id="DivGvAgentReport" runat="server">
                    <%--<div id="DivGvTransactionReport" runat="server" visible="false" style="padding-top:10px"> --%>
                   <asp:GridView ID="GvTransactionReport" runat="server" AutoGenerateColumns="False" GridLines="None"
                        CellPadding="4" ForeColor="#333333" Width="100%" HorizontalAlign="Center" DataKeyNames="FLAG,FLAGSMS"
                            EmptyDataText="No Data Available" 
                            onrowdatabound="GvTransactionReport_RowDataBound">
                        <Columns>
                            <asp:TemplateField HeaderText="SL.">
                                <ItemTemplate>
                                    <asp:CheckBox ID="chk1" runat="server" />
                                    <%#Container.DataItemIndex+1 %>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="DS Id" >
                                <ItemTemplate>
                                    <asp:Label ID="lblCurrentLevel" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.USERNAME") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>                            
                            <asp:BoundField DataField="OFFICECITY" HeaderText="City" />
                            <asp:BoundField DataField="OFFICESTATE" HeaderText="State" />
                            <asp:BoundField DataField="MOBILENO" HeaderText="Mobile No." />
                            <asp:BoundField DataField="EMAILID" HeaderText="Email Id" />
                            <asp:BoundField DataField="TOTALCASH" HeaderText="Total Fund" />
                            <asp:BoundField DataField="BALANCE" HeaderText="Balance" />
                            <asp:TemplateField HeaderText="For Web">
                            <ItemTemplate>
                            <asp:Button ID="btn_flag" runat="server" oncommand="btn_flag_Command" Visible="false" />
                               <asp:Label ID="lblStatusWeb" runat="server"></asp:Label>
                                <asp:Label ID="lbl_loginid" runat="server" 
                                    Text='<%# DataBinder.Eval(Container, "DataItem.LOGINID") %>' Visible="false"></asp:Label>                            
                            </ItemTemplate>
                        </asp:TemplateField>
                        
                         <asp:TemplateField HeaderText="For SMS">
                            <ItemTemplate>                               
                                <asp:Label ID="lbl_StatusSms" runat="server"></asp:Label>                            
                            </ItemTemplate>
                        </asp:TemplateField>
                        </Columns>
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#2461BF" 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" />
                    </asp:GridView>
                   </div>
                </td>
            </tr>
            
            
            <tr>
                <td colspan="4" style="height: 30px">
                </td>
            </tr>
        </table>
    </div>
</asp:Content>

