<%@ page language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_ZCRM_StudentStrength, App_Web_evaixfwi" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Src="~/UserControls/Common/ScreenGroup/ScreenGroup.ascx" TagName="ScreenGroupControl"
    TagPrefix="ScreenGroup" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <link href="../../../App_Themes/responsiv-popup.css" rel="stylesheet" />
    <asp:UpdatePanel ID="FeeAdminUpdatePanel" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <div id="divContentPage" class="divcontentpagemargin">
                <div class="dashBoardLeftCont">
                    <div class="himssuHeader3WireBox">
                        <table>
                            <tr>
                                <td>
                                    <div class="himsBoxContent">
                                        <div class="leftUlMenu">
                                            <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="227"
                                                Visible="true" runat="server" />
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>

                <div class="row whiteboxpaddingleft">
                    <div class="himssuHeader2WireBox" style="z-index: 1;">
                        <div class="contentHolder" style="padding-top: 0px; padding-left: 0px; padding-right: 0px">
                            <div class="himssuHeader1WireBox card card-box">
                                <div class="himsBoxHeader card-head">
                                    <div class="leftdiv">
                                    </div>
                                    <div class="himsBoxTitle">
                                        <div class="headerText">
                                            <header>
                                                <i class="fas fa-graduation-cap"></i>
                                                <asp:Label ID="MainLabel1" runat="server" Text="Student Strength"></asp:Label>
                                            </header>
                                        </div>
                                    </div>
                                </div>
                                <div class="himsBoxContent card-body " style="padding-bottom: 10px">
                                    <div class="contentHolder">
                                        <div class="tableContainer">
                                            <cc1:TabContainer Width="100%" ID="StudentStrengthTabContainer" runat="server" CssClass="ajax__myTab nav nav-tabs tabs-style-iconbox ajax__tab_container ajax__tab_default" AutoPostBack="true" meta:resourcekey="FeeAllocationTabContainerResource1" ActiveTabIndex="1">



                                                <cc1:TabPanel Width="100%" ID="StudentStrengthTabPanel" runat="server" HeaderText="Student Strength">
                                                    <HeaderTemplate>
                                                        <ul class="nav nav-tabs tabs-style-iconboxinner ajaxnavtabs">
                                                            <li class="fancyTab"><a><i class="fas"></i>Student Strength </a></li>
                                                        </ul>
                                                    </HeaderTemplate>
                                                    <ContentTemplate>
                                                        <asp:Panel ID="DetailPanel" runat="Server">
                                                            <div class="contentHolder">
                                                                <div class="outerBox pTop5 col-md-3">
                                                                    <div class="controlLabelWidth">
                                                                        <asp:Label ID="CRMLicenceIdLable" runat="server" Text="CRM Licence Id"></asp:Label>
                                                                    </div>
                                                                    <div class="fLeft pRight5">
                                                                        <asp:TextBox ID="CRMLicenceIdNameTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                                            SkinID="CustomWidthTextBox" runat="server" MaxLength="10"> </asp:TextBox>
                                                                    </div>
                                                                </div>
                                                                <div class="outerBox pTop5 col-md-3">
                                                                    <div class="controlLabelWidth">
                                                                        <asp:Label ID="OrgGroupIdLabel" runat="server" Text="Org Group Id"></asp:Label>
                                                                    </div>
                                                                    <div class="fLeft pRight5">
                                                                        <asp:TextBox ID="OrgGroupIdTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                                            SkinID="CustomWidthTextBox" runat="server" MaxLength="5"> </asp:TextBox>
                                                                    </div>
                                                                </div>
                                                                <div class="outerBox pTop5 col-md-3">
                                                                    <div class="controlLabelWidth">
                                                                        <asp:Label ID="OrgGroupNameLabel" runat="server" Text="Org Group Name"></asp:Label>
                                                                    </div>
                                                                    <div class="fLeft pRight5">
                                                                        <asp:TextBox ID="OrgGroupNameTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                                            SkinID="CustomWidthTextBox" runat="server" MaxLength="10"> </asp:TextBox>
                                                                    </div>
                                                                </div>
                                                                <div class="cBoth">
                                                                </div>
                                                                <div class="outerBox pTop5 col-md-3">
                                                                    <div class="controlLabelWidth">
                                                                        <asp:Label ID="CustomerStatus1Label" runat="server" Text="Customer Status"></asp:Label>
                                                                    </div>
                                                                    <div class="fLeft pRight5">
                                                                        <asp:DropDownList ID="CustomerStatusDropDownList" runat="server" CssClass="form-control" SkinID="CustomWidthDropDownList"
                                                                            onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" />
                                                                    </div>
                                                                </div>
                                                                <%--<div class="outerBox pTop5 col-md-3">
                                                                    <div class="controlLabelWidth">
                                                                        <asp:Label ID="InstallationTypeLabel" runat="server" Text="Installation Type"></asp:Label>
                                                                    </div>
                                                                    <div class="fLeft pRight5">
                                                                        <asp:DropDownList ID="InstallationTypeDropDownList" runat="server" CssClass="form-control" SkinID="CustomWidthDropDownList"
                                                                            onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" />
                                                                    </div>
                                                                </div>--%>

                                                                <div id="FilterStatusDiv" runat="server" visible="true">
                                                                    <div class="outerBox11 pTop5 col-md-3">
                                                                        <div class="controlLabelWidth">
                                                                            <asp:CheckBox ID="StatusCheckBox" runat="server" AutoPostBack="True" OnCheckedChanged="StatusCheckBox_CheckedChanged" />
                                                                            <asp:Label ID="StatusHeadLabel" runat="server" Text="Installation Type" class="pLeft5"></asp:Label>
                                                                        </div>
                                                                        <div id="StatusDiv" runat="server" class="fLeft pRight5 chck-dropdown-onclick bg-lghtgrey outerBox11 col-md-12 overflow-x-hidden padd-0">
                                                                            <asp:CheckBoxList ID="StatusCheckBoxList" runat="server">
                                                                            </asp:CheckBoxList>
                                                                        </div>
                                                                    </div>
                                                                </div>

                                                                <div class="outerBox pTop5 col-md-3">
                                                                    <div class="controlLabelWidth">
                                                                        <asp:Label ID="ChannelLabel" runat="server" Text="Channel"></asp:Label>
                                                                    </div>
                                                                    <div class="fLeft pRight5">
                                                                        <asp:DropDownList ID="ChannelDropDownList" runat="server" CssClass="form-control" SkinID="CustomWidthDropDownList"
                                                                            onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" />
                                                                    </div>
                                                                </div>

                                                                <div class="cBoth">
                                                                </div>
                                                                <div class="alignCenter pTop5">
                                                                    <asp:Button ID="SearchButton" runat="Server" OnClick="SearchButton_Click"
                                                                        SkinID="0" CssClass="btn-search btn fas" Text="&#xf002; Search" />
                                                                    <asp:Button ID="ClearButton" runat="server" Text="&#xf0e2; Reset" CssClass="btn-reset btn fas" SkinID="0" OnClick="ClearButton_Click" />
                                                                    <asp:Button ID="ExportButton" runat="server" OnClick="ExportButton_Click" Text="&#xf093; Export" CssClass="btn-examcommon btn fas" SkinID="0" />
                                                                    <asp:Button ID="EmailButton" runat="server" OnClick="EmailButton_Click" Text="&#xf1d8; Send Alert" CssClass="btn-send btn fas" SkinID="0" />
                                                                </div>
                                                                <br />
                                                                <div class="cBoth">
                                                                </div>
                                                                <b><asp:Label ID="TotalRecordLabel" CssClass="pull-right" runat="server" style="font-size:16px;padding-right:15px;"></asp:Label></b>
                                                                <div id="DetailDiv" visible="false" runat="server" class="himssuHeader7WireBox col-md-12">
                                                                    <div id="Div4" runat="server" class="table-responsive">
                                                                        <asp:GridView ID="StudentStrengthGridView" runat="server" Width="100%" AutoGenerateColumns="False"
                                                                            CssClass="table table-striped table-bordered table-hover" SkinID="" ShowHeader="true" PagerSettings-Visible="false"
                                                                            EmptyDataText="No Records Found !!" OnRowDataBound="StudentStrengthGridView_RowDataBound" DataKeyNames="OrgGroupId,DatabaseName">
                                                                            <Columns>
                                                                                <%--  <asp:BoundField DataField="CRMLicenceId" HeaderText="CRM Licence Id" HeaderStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />--%>
                                                                                <asp:TemplateField HeaderText="Status" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%"
                                                                                    ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                                                    <ItemTemplate>
                                                                                        <asp:Label ID="CustomerStatusLabel" runat="server" Text='<%#Bind("CustomerStatus")%>'></></asp:Label>
                                                                                    </ItemTemplate>
                                                                                </asp:TemplateField>



                                                                                <asp:TemplateField HeaderText="CRM Licence" ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="true" ItemStyle-Width="5%"
                                                                                    HeaderStyle-HorizontalAlign="Left">
                                                                                    <ItemTemplate>
                                                                                        <asp:Label ID="CRMLicenceIdLabel" runat="server" Text='<%#Bind("CRMLicenceId")%>'></asp:Label>
                                                                                    </ItemTemplate>
                                                                                </asp:TemplateField>
                                                                                <%--  <asp:BoundField DataField="OrgGroupId" HeaderText="Org Group Id" HeaderStyle-HorizontalAlign="Left" ItemStyle-Width="5%"/>--%>
                                                                                <asp:TemplateField HeaderText="OrgGroup Id" ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="true" ItemStyle-Width="5%"
                                                                                    HeaderStyle-HorizontalAlign="Left">
                                                                                    <ItemTemplate>
                                                                                        <asp:Label ID="OrgGroupIdLabel" runat="server" Text='<%#Bind("OrgGroupId")%>'></asp:Label>
                                                                                    </ItemTemplate>
                                                                                </asp:TemplateField>
                                                                                <%--  <asp:BoundField DataField="OrgGroupName" HeaderText="Org Group Name" HeaderStyle-HorizontalAlign="Left" ItemStyle-Width="10%"/>--%>
                                                                                <asp:TemplateField HeaderText="OrgGroup Name" ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="true" ItemStyle-Width="20%"
                                                                                    HeaderStyle-HorizontalAlign="Left">
                                                                                    <ItemTemplate>
                                                                                        <asp:Label ID="OrgGroupNameLabel" runat="server" Text='<%#Bind("OrgGroupName")%>'></asp:Label>
                                                                                    </ItemTemplate>
                                                                                </asp:TemplateField>
                                                                                <%-- <asp:BoundField DataField="InstallationType" HeaderText="Installation Type" HeaderStyle-HorizontalAlign="Left" ItemStyle-Width="10%"/>--%>
                                                                                <asp:TemplateField HeaderText="Installation Type" ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="true" ItemStyle-Width="10%"
                                                                                    HeaderStyle-HorizontalAlign="Left">
                                                                                    <ItemTemplate>
                                                                                        <asp:Label ID="InstallationTypeLabel" runat="server" Text='<%#Bind("InstallationType")%>'></asp:Label>
                                                                                    </ItemTemplate>
                                                                                </asp:TemplateField>
                                                                                <asp:TemplateField HeaderText="Campus Type" ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="true" ItemStyle-Width="10%"
                                                                                    HeaderStyle-HorizontalAlign="Left">
                                                                                    <ItemTemplate>
                                                                                        <asp:LinkButton ID="CampusLinkButton" runat="server" Text='<%#Eval("CampusType") %>' OnClientClick='openpopup(this);' OnClick="CampusLinkButton_Click"></asp:LinkButton>

                                                                                    </ItemTemplate>
                                                                                </asp:TemplateField>
                                                                                <%--   <asp:BoundField DataField="Channel" HeaderText="Channel" HeaderStyle-HorizontalAlign="Left" ItemStyle-Width="5%"/>--%>
                                                                                <asp:TemplateField HeaderText="Channel" ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="true" ItemStyle-Width="5%"
                                                                                    HeaderStyle-HorizontalAlign="Left">
                                                                                    <ItemTemplate>
                                                                                        <asp:Label ID="ChannelLabel" runat="server" Text='<%#Bind("Channel")%>'></asp:Label>
                                                                                    </ItemTemplate>
                                                                                </asp:TemplateField>
                                                                                <%--                                                                     <asp:BoundField DataField="CustomerStatus" HeaderText="Customer Status" HeaderStyle-HorizontalAlign="Left" />--%>

                                                                                <asp:TemplateField HeaderText="CRM Student" ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="true" ItemStyle-Width="5%"
                                                                                    HeaderStyle-HorizontalAlign="Left">
                                                                                    <ItemTemplate>
                                                                                        <asp:Label ID="NoOfStudentLabel" runat="server" Text=""></asp:Label>
                                                                                    </ItemTemplate>
                                                                                </asp:TemplateField>
                                                                                <asp:TemplateField HeaderText="Active Student" ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="true" ItemStyle-Width="5%"
                                                                                    HeaderStyle-HorizontalAlign="Left">
                                                                                    <ItemTemplate>
                                                                                        <asp:Label ID="ActiveStudentLabel" runat="server" Text=""></asp:Label>
                                                                                    </ItemTemplate>
                                                                                </asp:TemplateField>
                                                                                <asp:TemplateField HeaderText="Total Student" ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="true" ItemStyle-Width="5%"
                                                                                    HeaderStyle-HorizontalAlign="Left">
                                                                                    <ItemTemplate>
                                                                                        <asp:Label ID="TotalStudentLabel" runat="server" Text=""></asp:Label>
                                                                                    </ItemTemplate>
                                                                                </asp:TemplateField>
                                                                                <asp:TemplateField HeaderText="App Count" ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="true" ItemStyle-Width="5%"
                                                                                    HeaderStyle-HorizontalAlign="Left">
                                                                                    <ItemTemplate>
                                                                                        <asp:Label ID="TotalRegisterdLabel" runat="server" Text=""></asp:Label>
                                                                                    </ItemTemplate>
                                                                                </asp:TemplateField>
                                                                                <asp:TemplateField HeaderText="Fee" ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="true" ItemStyle-Width="5%"
                                                                                    HeaderStyle-HorizontalAlign="Left">
                                                                                    <ItemTemplate>
                                                                                        <asp:Label ID="FeeLabel" runat="server" Text=""></asp:Label>
                                                                                    </ItemTemplate>
                                                                                </asp:TemplateField>
                                                                                <asp:TemplateField HeaderText="Exam" ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="true" ItemStyle-Width="5%"
                                                                                    HeaderStyle-HorizontalAlign="Left">
                                                                                    <ItemTemplate>
                                                                                        <asp:Label ID="ExamLabel" runat="server" Text=""></asp:Label>
                                                                                    </ItemTemplate>
                                                                                </asp:TemplateField>
                                                                                <asp:TemplateField HeaderText="Certi" ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="true" ItemStyle-Width="5%"
                                                                                    HeaderStyle-HorizontalAlign="Left">
                                                                                    <ItemTemplate>
                                                                                        <asp:Label ID="CertificateLabel" runat="server" Text=""></asp:Label>
                                                                                    </ItemTemplate>
                                                                                </asp:TemplateField>
                                                                                <asp:TemplateField HeaderText="Atte" ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="true" ItemStyle-Width="5%"
                                                                                    HeaderStyle-HorizontalAlign="Left">
                                                                                    <ItemTemplate>
                                                                                        <asp:Label ID="AttendanceLabel" runat="server" Text=""></asp:Label>
                                                                                    </ItemTemplate>
                                                                                </asp:TemplateField>

                                                                                <asp:TemplateField HeaderText="Emp" ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="true" ItemStyle-Width="5%"
                                                                                    HeaderStyle-HorizontalAlign="Left">
                                                                                    <ItemTemplate>
                                                                                        <asp:Label ID="EmployeeLabel" runat="server" Text=""></asp:Label>
                                                                                    </ItemTemplate>
                                                                                </asp:TemplateField>
                                                                                <asp:TemplateField HeaderText="Alert" ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="true" ItemStyle-Width="5%"
                                                                                    HeaderStyle-HorizontalAlign="Left">
                                                                                    <ItemTemplate>
                                                                                        <asp:Label ID="AlertLabel" runat="server" Text=""></asp:Label>
                                                                                    </ItemTemplate>
                                                                                </asp:TemplateField>
                                                                                <asp:TemplateField HeaderText="Account" ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="true" ItemStyle-Width="5%"
                                                                                    HeaderStyle-HorizontalAlign="Left">
                                                                                    <ItemTemplate>
                                                                                        <asp:Label ID="AccountLabel" runat="server" Text=""></asp:Label>
                                                                                    </ItemTemplate>
                                                                                </asp:TemplateField>
                                                                                <asp:TemplateField HeaderText="Payroll" ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="true" ItemStyle-Width="5%"
                                                                                    HeaderStyle-HorizontalAlign="Left">
                                                                                    <ItemTemplate>
                                                                                        <asp:Label ID="PayrollLabel" runat="server" Text=""></asp:Label>
                                                                                    </ItemTemplate>
                                                                                </asp:TemplateField>
                                                                                <asp:TemplateField HeaderText="TimeTable" ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="true" ItemStyle-Width="5%"
                                                                                    HeaderStyle-HorizontalAlign="Left">
                                                                                    <ItemTemplate>
                                                                                        <asp:Label ID="TimeTableLabel" runat="server" Text=""></asp:Label>
                                                                                    </ItemTemplate>
                                                                                </asp:TemplateField>
                                                                                <asp:TemplateField HeaderText="Academic" ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="true" ItemStyle-Width="5%"
                                                                                    HeaderStyle-HorizontalAlign="Left">
                                                                                    <ItemTemplate>
                                                                                        <asp:Label ID="AcademicLabel" runat="server" Text=""></asp:Label>
                                                                                    </ItemTemplate>
                                                                                </asp:TemplateField>
                                                                                <asp:TemplateField HeaderText="Db Status" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%"
                                                                                    ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                                                    <ItemTemplate>
                                                                                        <asp:Label ID="DatabaseStatusLabel" runat="server" Text=""></asp:Label>
                                                                                    </ItemTemplate>
                                                                                </asp:TemplateField>
                                                                            </Columns>
                                                                        </asp:GridView>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </asp:Panel>
                                                    </ContentTemplate>
                                                </cc1:TabPanel>

                                                <cc1:TabPanel Width="100%" ID="StudentStrengthDetailsTabPanel" runat="server" HeaderText="Student Strength Details">
                                                    <HeaderTemplate>
                                                        <ul class="nav nav-tabs tabs-style-iconboxinner ajaxnavtabs">
                                                            <li class="fancyTab"><a><i class="fas"></i>Student Strength Details </a></li>
                                                        </ul>
                                                    </HeaderTemplate>
                                                    <ContentTemplate>
                                                        <div class="contentHolder">
                                                            <div class="outerBox pTop5 col-md-3">
                                                                <div class="controlLabelWidth">
                                                                    <asp:Label ID="CRMLicenceLabel" runat="server" Text="CRM Licence Id"></asp:Label>
                                                                </div>
                                                                <div class="fLeft pRight5">
                                                                    <asp:TextBox ID="CRMLicenceTextBox" SkinID="CustomWidthTextBox" runat="server" MaxLength="10" TextMode="Number" AutoPostBack="true" OnTextChanged="CRMLicenceTextBox_TextChanged"></asp:TextBox>
                                                                </div>
                                                            </div>


                                                            <div class="outerBox pTop5 col-md-3">
                                                                <div class="controlLabelWidth">
                                                                    <asp:Label ID="OrgGroupLabel" runat="server" Text="Org Group"></asp:Label>
                                                                </div>
                                                                <div class="fLeft pRight5">
                                                                    <asp:DropDownList ID="OrgGroupDropDownList" runat="server" CssClass="form-control" SkinID="CustomWidthDropDownList" OnSelectedIndexChanged="OrgGroupDropDownList_SelectedIndexChanged" AutoPostBack="True" />
                                                                </div>
                                                            </div>

                                                            <div class="outerBox pTop5 col-md-3">
                                                                <div class="controlLabelWidth">
                                                                    <asp:Label ID="DetailsOrgGroupBatchLabel" runat="server" Text="Org Group Batch"></asp:Label>
                                                                </div>
                                                                <div class="fLeft pRight5">
                                                                    <asp:DropDownList ID="DetailsOrgGroupBatchDropDownList" runat="server" CssClass="form-control" SkinID="CustomWidthDropDownList" AutoPostBack="True" OnSelectedIndexChanged="DetailsOrgGroupBatchDropDownList_SelectedIndexChanged" />
                                                                </div>
                                                            </div>
                                                            <div id="NoofStudentOrgDiv" runat="server" visible="false">
                                                                <div class="himssuHeader1WireBox col-md-12 pTop5">
                                                                    <div class="table-responsive">
                                                                        <table class="table table-striped table-bordered table-hover">
                                                                            <tr>
                                                                                <td>Org Name</td>
                                                                                <td>CRM Student</td>
                                                                                <td>Temp Student</td>
                                                                                <td>Total Active Student</td>
                                                                                <td>Total Student</td>
                                                                                <td>Difference</td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td>
                                                                                    <asp:Label ID="ClinetLabel" runat="server"></asp:Label></td>
                                                                                <td>
                                                                                    <asp:Label ID="CRMStudentLabel" runat="server"></asp:Label></td>
                                                                                <td>
                                                                                    <asp:Label ID="TempStudentLabel" runat="server"></asp:Label></td>
                                                                                <td>
                                                                                    <asp:Label ID="TotalActiveLabel" runat="server"></asp:Label></td>
                                                                                <td>
                                                                                    <asp:Label ID="TotalLabel" runat="server"></asp:Label></td>
                                                                                <td>
                                                                                    <asp:Label ID="DeferenceLabel" runat="server"></asp:Label></td>
                                                                            </tr>
                                                                        </table>
                                                                    </div>
                                                                    <div class="himsBoxHeader  card-head inner">
                                                                        <div class="leftdiv">
                                                                        </div>
                                                                        <div class="himsBoxTitle">
                                                                            <div class="headerText fLeft">
                                                                                <header>
                                                                                    <asp:Label ID="NoofStudent_Label" runat="server" Text="Org Wise Total Student" Font-Bold="True"></asp:Label>
                                                                                </header>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                    <div class="himsBoxContent table-responsive">
                                                                        <asp:GridView runat="server" ID="NoofStudentGridView" AutoGenerateColumns="False"
                                                                            EmptyDataText="No Records Found !!" CssClass="table table-striped table-bordered table-hover" DataKeyNames="OrgId">
                                                                            <Columns>
                                                                                <asp:BoundField DataField="Code" HeaderText="Code">
                                                                                    <HeaderStyle HorizontalAlign="Left" />
                                                                                    <ItemStyle Width="20%" />
                                                                                </asp:BoundField>
                                                                                <asp:BoundField DataField="OrgName" HeaderText="Org Name">
                                                                                    <HeaderStyle HorizontalAlign="Left" />
                                                                                    <ItemStyle Width="40%" />
                                                                                </asp:BoundField>
                                                                                <asp:TemplateField HeaderText="Active Student">
                                                                                    <ItemTemplate>
                                                                                        <asp:Label ID="ActiveStudentLabel" runat="server" Text='<%#Eval("StudentCount") %>'></asp:Label>
                                                                                    </ItemTemplate>
                                                                                    <ItemStyle Width="20%" />
                                                                                </asp:TemplateField>
                                                                                <asp:BoundField DataField="TotalCount" HeaderText="Total Student">
                                                                                    <HeaderStyle HorizontalAlign="Left" />
                                                                                    <ItemStyle Width="20%" />
                                                                                </asp:BoundField>
                                                                            </Columns>
                                                                            <PagerSettings Visible="False" />
                                                                        </asp:GridView>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </ContentTemplate>
                                                </cc1:TabPanel>

                                            </cc1:TabContainer>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div id="popupdiv" title="Batch Admin" class="modal fadeIn">
                    <div class="modal-dialog">

                        <!-- Modal content-->
                        <div class="modal-content">

                            <button id="btnClose" title="Close (Esc)" type="button" class="hls-close" onclick="Closepopup();"></button>

                            <div class="modal-body">
                                <div class="outerBox pTop5 col-md-6">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="Label1" runat="server" Text="Group Batch"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:DropDownList runat="server" ID="OrgGroupBatchDropDownList" SkinID="CustomWidthDropDownList"
                                            CssClass="form-control">
                                        </asp:DropDownList>
                                    </div>
                                </div>

                                <div class="outerBox pTop5 col-md-6">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="OrganizationLabel" Text="Organization" runat="server"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:DropDownList ID="OrganizationDropDownList" runat="server"
                                            SkinID="CustomWidthDropDownList" CssClass="form-control">
                                        </asp:DropDownList>
                                    </div>
                                </div>
                                <div class="cBoth">
                                </div>

                                <div class="alignCenter col-md-12 pb15 pTop5">
                                    <input type="button" class="btn-search btn fas" id="SearchModelButton" name="Search" value="Search" onclick="getdata();" />
                                    <input type="button" class="btn-clear btn fas" id="ResetButton" name="Clear" value="Clear" onclick="dataclear();" />

                                </div>


                                <table class="table table-bordered table-striped table-hover" id="batchGrid">
                                    <tr>
                                        <th>Organization
                                        </th>
                                        <th>Group Batch
                                        </th>
                                        <th>Batch
                                        </th>
                                        <th>From Date
                                        </th>
                                        <th>To Date
                                        </th>
                                        <th>IsActive
                                        </th>
                                        <th>IsInContext
                                        </th>
                                        <th>IsHistory
                                        </th>
                                    </tr>
                                    <tbody id="dvGridData">
                                    </tbody>
                                </table>

                            </div>

                        </div>
                    </div>
                </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>


    <script type="text/javascript">

        function LoadingMsg(msg1, msg2) {
            $('.hls-bg').show();
            $('#spnmain1msg').html(msg1);
            $('#spnmain2msg').html(msg2);
            $('#popupdiv').show();
        }
        function CloseLoading() {
            $('.hls-bg').hide();
            $('#popupdiv').hide();
        }
        function Closepopup() {
            $('.hls-bg').hide();
            $('#popupdiv').hide();
        }
        function openpopup(obj) {

            var text = obj.innerText;
            if (text == "Mix") {
                window.setTimeout(function () {
                    CloseLoading();
                    $('.hls-bg').show();
                    $('#popupdiv').show();
                }, 500);
            }
        }


        function getdata() {

            <%-- document.getElementById('<%= SearchModelButton.ClientID %>').click()--%>

            var OrgGroupBatch = 0;
            if ($("#ctl00_CP_OrgGroupBatchDropDownList").prop('selectedIndex') <= 0) {

                alert('Select group Batch');
                return;
            }
            else {
                OrgGroupBatch = $('#ctl00_CP_OrgGroupBatchDropDownList').val();
            }

            var Org = 0;
            if ($("#ctl00_CP_OrganizationDropDownList").prop('selectedIndex') <= 0) {

                Org = 0;
            }
            else {
                Org = $("#ctl00_CP_OrganizationDropDownList").val();
            }
            $.ajax({
                type: "POST",
                url: "/Pages/ZCRM/StudentStrength.aspx/GetBatchDetail",
                data: '{"OrgGroupBatch":"' + OrgGroupBatch + '","Org":"' + Org + '"}',
                contentType: "application/json;charset=utf-8",
                dataType: "json",
                success: function (data) {

                    var datas = $.parseJSON(data.d);

                    if (datas.PickGrid != '') {

                        $('#dvGridData').html('');
                        $('#dvGridData').html(datas.PickGrid);
                    }
                    else {
                        $('#dvGridData').html('');
                        $('#dvGridData').html("<tr>No Records found !</tr>");
                    }
                },
                error: function () {

                }
            });


        }

        function dataclear() {
            $('#dvGridData').html('');
            $('#ctl00_CP_OrgGroupBatchDropDownList').val("-1");
            $('#ctl00_CP_OrganizationDropDownList').val("-1");
        }

        function CheckActiveClick(obj) {
            var BatchId = 0;
            var IsActive = 0;
            var IsContext = 0;
            var IsHistory = 0;
            var cnt = 0;
            var OrgId = 0;
            var BatchGroupId = 0;
            var len = $('#dvGridData tr').length;
            var str = '<table> \r\n';
            BatchId = $(obj).parent().parent().attr('attrBatchId');
            OrgId = $(obj).parent().parent().attr('attrorgId');

            if ($(obj).is(':checked')) {
                IsActive = 1;
            }
            str = str + '<BatchDatas BatchId =' + "'" + BatchId + "'" + ' OrgId=' + "'" + OrgId + "'" + ' Active=' + "'" + 1 + "'" + ' Context=' + "'" + 0 + "'" + ' History=' + "'" + 0 + "'" + ' />';
            str = str + '</table>'
            $.ajax({
                type: "POST",
                url: "/Pages/ZCRM/StudentStrength.aspx/Edit_Data",
                data: '{"BatchData":"' + str + '"}',
                contentType: "application/json;charset=utf-8",
                dataType: "json",
                success: function () {

                    getdata();
                },
                error: function () {

                }
            });
        }

        function CheckContextClick(obj) {
            var BatchId = 0;

            var IsContext = 0;

            var cnt = 0;
            var OrgId = 0;
            var BatchGroupId = 0;
            var len = $('#dvGridData tr').length;
            var str = '<table> \r\n';
            BatchId = $(obj).parent().parent().attr('attrBatchId');
            OrgId = $(obj).parent().parent().attr('attrorgId');
            BatchGroupId = $(obj).parent().parent().attr('attrBatchGroupId');
            if ($(obj).is(':checked')) {
                IsContext = 1;
            }
            str = str + '<BatchDatas BatchId =' + "'" + BatchId + "'" + ' OrgId=' + "'" + OrgId + "'" + ' BatchGroupId=' + "'" + BatchGroupId + "'" + ' Context=' + "'" + 1 + "'" + ' History=' + "'" + 0 + "'" + ' />';
            str = str + '</table>'
            $.ajax({
                type: "POST",
                url: "/Pages/ZCRM/StudentStrength.aspx/Edit_Data",
                data: '{"BatchData":"' + str + '"}',
                contentType: "application/json;charset=utf-8",
                dataType: "json",
                success: function () {

                    getdata();
                },
                error: function () {

                }
            });
        }

        function CheckHistoryClick(obj) {
            var BatchId = 0;
            var IsActive = 0;
            var IsContext = 0;
            var IsHistory = 0;
            var cnt = 0;
            var OrgId = 0;
            var BatchGroupId = 0;
            var len = $('#dvGridData tr').length;
            var str = '<table> \r\n';
            BatchId = $(obj).parent().parent().attr('attrBatchId');
            OrgId = $(obj).parent().parent().attr('attrorgId');
            BatchGroupId = $(obj).parent().parent().attr('attrBatchGroupId');
            if ($(obj).is(':checked')) {
                IsActive = 1;
            }
            str = str + '<BatchDatas BatchId =' + "'" + BatchId + "'" + ' OrgId=' + "'" + OrgId + "'" + ' BatchGroupId=' + "'" + BatchGroupId + "'" + ' Active=' + "'" + 0 + "'" + ' Context=' + "'" + 0 + "'" + ' History=' + "'" + 1 + "'" + ' IsHistory=' + "'" + $(obj).is(":checked") + "'" + ' />';
            str = str + '</table>'
            $.ajax({
                type: "POST",
                url: "/Pages/ZCRM/StudentStrength.aspx/Edit_Data",
                data: '{"BatchData":"' + str + '"}',
                contentType: "application/json;charset=utf-8",
                dataType: "json",
                success: function () {
                    getdata();

                },
                error: function () {

                }
            });
        }

        //function EditData()
        //{
        //    var BatchId = 0;
        //    var IsActive = 0;
        //    var IsContext = 0;
        //    var IsHistory = 0;
        //    var cnt = 0;
        //    var OrgId = 0;
        //    var BatchGroupId = 0;
        //    var len = $('#dvGridData tr').length;
        //    var str = '<table> \r\n';
        //    $('#dvGridData tr').each(function () {
        //        cnt = cnt + 1;
        //        BatchId = $(this).attr('attrBatchId');
        //        OrgId = $(this).attr('attrorgId');
        //        BatchGroupId = $(this).attr('attrBatchGroupId');

        //        if($(this).find('.cssactive').is(':checked'))
        //        {
        //            IsActive = 1;
        //        }
        //        else
        //        {
        //            IsActive = 0;
        //        }
        //        if ($(this).find('.csscontext').is(':checked')) {
        //            IsContext = 1;
        //        }
        //        else
        //        {
        //            IsContext = 0;
        //        }

        //        if ($(this).find('.csshistory').is(':checked')) {
        //            IsHistory = 1;
        //        }
        //        else
        //        {
        //            IsHistory = 0;
        //        }
        //        str = str + '<BatchDatas BatchId =' + "'" + BatchId + "'" + ' OrgId=' + "'" + OrgId + "'" + ' BatchGroupId=' + "'" + BatchGroupId + "'" + ' IsActive=' + "'" + IsActive + "'" + ' IsContext=' + "'" + IsContext + "'" + ' IsHistory=' + "'" + IsHistory + "'" + ' />';
        //    });
        //    if(cnt == len)
        //    {
        //        str = str + '</table>'
        //        $.ajax({
        //            type: "POST",
        //            url: "/Pages/ZCRM/StudentStrength.aspx/Edit_Data",
        //            data: '{"BatchData":"' + str + '"}',
        //            contentType: "application/json;charset=utf-8",
        //            dataType: "json",
        //            success: function () {

        //                alert('save successfully');
        //            },
        //            error: function () {

        //            }
        //        });
        //    }
        //}

    </script>
</asp:Content>

