<%@ Page Language="C#" MasterPageFile="~/masterpage/MasterPage.master" AutoEventWireup="true" CodeFile="InactiveDistriburor.aspx.cs" 
Inherits="InactiveDistriburor" 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();
                                  $('#<%=DivGvAgentReport.ClientID %>').Scrollable();
                              }
                          )
</script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <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>
                            &nbsp;
                        </td>
                        <td>
                            &nbsp;
                        </td>
                        <td>
                            &nbsp;
                        </td>
                        <td>
                            &nbsp;
                        </td>
                        <td>
                            &nbsp;
                        </td>
                        <td>
                            &nbsp;
                        </td>
                        <td style="float: none; text-align: right; padding: 0 0 0 0px">
                            <asp:Button ID="btnNew" runat="server" class="button" Text="Add MDS" 
                                onclick="btnNew_Click" />&nbsp;&nbsp;&nbsp;
                            &nbsp;&nbsp;<asp:Button ID="btnActive" runat="server" class="button" 
                                Text="Active" onclick="btnActive_Click" />
                            
                        </td>
                    </tr>
                    <tr>
                        <td style="height: 10px; text-align:center" colspan="7"><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%" 
                         DataKeyNames="COURENTLEVEL" GridLines="None"  >
                        <HeaderStyle BackColor="#dddee0" Font-Bold="True" ForeColor="Black" />
                        <RowStyle Height="10px" /> 
                        <Columns>
                        <asp:TemplateField HeaderText="Select">
                        <ItemTemplate>
                            <asp:CheckBox ID="chkbox" runat="server" />
                        </ItemTemplate>
                        </asp:TemplateField>
                            <%--<asp:TemplateField HeaderText="S NO.">
                                <ItemTemplate>
                                    <%#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" ToolTip="Click To Get Transactions" 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") %>'>'></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>
                                    <%#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>
</asp:Content>

