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

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/UserControls/GridViewPager/GridViewPager.ascx" TagName="GridViewPager" TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/Common/ScreenGroup/ScreenGroup.ascx" TagName="ScreenGroupControl" TagPrefix="ScreenGroup" %>
<%@ Register Src="~/UserControls/DatePicker/DatePickerControl.ascx" TagName="DatePickerControl" TagPrefix="DPC" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <link href="../../App_Themes/responsiv-popup.css" rel="stylesheet" />
    <link type="text/css" href="../../App_Themes/sweetalert.css" rel="stylesheet" />
    <script type="text/javascript" src="../../JavaScript/sweetalert.min.js"></script>
    <script type="text/javascript" src="../../JavaScript/sweetalert-dev.js"></script>
    <asp:UpdatePanel ID="IncidentLogUpdatePanel" 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="103"
                                                Visible="true" runat="server" />
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div class="whiteboxpaddingleft row">
                        <div class="himssuHeader2WireBox  card card-box">
                            <div class="himssuHeader1WireBox">
                                <div class="himsBoxHeader  card-head">
                                    <div class="leftdiv">
                                    </div>
                                    <div class="himsBoxTitle">
                                        <div class="headerText">
                                            <header>
                                                <i class="fas fa-search"></i>
                                                <asp:Label ID="Label1" runat="server" Text="Apply"></asp:Label>
                                            </header>
                                        </div>
                                    </div>
                                </div>
                                <div class="himsBoxContent card-body">
                                    <asp:Panel ID="DetailPanel" runat="Server">
                                        <div class="contentHolder">
                                            <asp:Panel ID="SearchCriteriaPanel" runat="Server">
                                                <div class="outerBox pTop5 col-md-3">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="AdmissionCategoryLabel" runat="server" Text="Fees Category" SkinID="MandatoryLabel">
                                                        </asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:DropDownList runat="server" ID="AdmissionCategoryDropDownList" SkinID="CustomWidthDropDownList"
                                                            onmouseleave="showHideTooltip()" CssClass="form-control" onmouseenter="showHideTooltip()">
                                                        </asp:DropDownList>
                                                    </div>
                                                </div>
                                                <div class="outerBox pTop5 col-md-3">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="ClassLabel" runat="server" Text="Class" SkinID="MandatoryLabel"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:DropDownList runat="server" ID="ClassDropDownList" SkinID="CustomWidthDropDownList"
                                                            CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                            AutoPostBack="true" OnSelectedIndexChanged="ClassDropDownList_OnSelectedIndexChanged">
                                                        </asp:DropDownList>
                                                    </div>
                                                </div>
                                                <div class="outerBox pTop5 col-md-3">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="DivisionLabel" runat="server" Text="Division" SkinID="MandatoryLabel"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:DropDownList runat="server" ID="DivisionDropDownList" SkinID="CustomWidthDropDownList"
                                                            CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()">
                                                        </asp:DropDownList>
                                                    </div>
                                                </div>

                                                <div class="outerBox pTop5 col-md-3">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="AdmissionDateLabel" runat="server" Text="Admission Date" SkinID="MandatoryLabel"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <DPC:DatePickerControl ID="AdmissionDateDatePickerControl" runat="server" DisplayDatePicker="true" />
                                                    </div>
                                                </div>
                                                <div class="outerBox pTop5 col-md-3">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="SearchStartingRollNoLabel" runat="server" Text="Starting Roll No"
                                                            SkinID="MandatoryLabel"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <cc1:FilteredTextBoxExtender ID="SearchStartingRollNoExtender" runat="server" TargetControlID="SearchStartingRollNoTextBox"
                                                            Enabled="True" FilterType="Numbers">
                                                        </cc1:FilteredTextBoxExtender>
                                                        <asp:TextBox ID="SearchStartingRollNoTextBox" runat="server" onmouseleave="showHideTooltip()"
                                                            SkinID="CustomWidthTextBox" onmouseenter="showHideTooltip()"></asp:TextBox>
                                                    </div>
                                                </div>
                                                <div class="outerBox pTop5 col-md-3">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="SearchEndingRollNoLabel" runat="server" Text="Ending Roll No" SkinID="MandatoryLabel"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <cc1:FilteredTextBoxExtender ID="SearchEndingRollNoExtender" runat="server" TargetControlID="SearchEndingRollNoTextBox"
                                                            Enabled="True" FilterType="Numbers">
                                                        </cc1:FilteredTextBoxExtender>
                                                        <asp:TextBox ID="SearchEndingRollNoTextBox" runat="server" onmouseleave="showHideTooltip()"
                                                            SkinID="CustomWidthTextBox" onmouseenter="showHideTooltip()"></asp:TextBox>
                                                    </div>
                                                </div>

                                                <div class="outerBox pTop5 col-md-3" runat="server" id="PrefixDiv">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="SearchPrefixLabel" runat="server" Text="Prefix for ID No"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:TextBox ID="SearchPrefixTextBox" runat="server" onmouseleave="showHideTooltip()"
                                                            SkinID="CustomWidthTextBox" onmouseenter="showHideTooltip()" MaxLength="20"></asp:TextBox>
                                                    </div>
                                                </div>
                                                <div class="outerBox pTop5 col-md-3">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="SearchStartingIDNoLabel" runat="server" Text="Starting ID No"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" TargetControlID="SearchStartingIDNoTextBox"
                                                            Enabled="True" FilterType="Numbers">
                                                        </cc1:FilteredTextBoxExtender>
                                                        <asp:TextBox ID="SearchStartingIDNoTextBox" runat="server" onmouseleave="showHideTooltip()"
                                                            SkinID="CustomWidthTextBox" onmouseenter="showHideTooltip()" MaxLength="20"></asp:TextBox>
                                                    </div>
                                                </div>
                                                <div class="alignCenter pTop5 col-md-12">
                                                    <asp:Button ID="ApplyButton" Text="Apply" runat="Server" OnClick="ApplyButton_Click"
                                                        SkinID="0" CssClass="btn btn-apply" />
                                                </div>
                                            </asp:Panel>
                                            <div id="Div1" class="himssuHeader6WireBox col-md-12" runat="server" visible="false">
                                                <div class="himsBoxHeader" id="GridViewPagerDiv" runat="server" visible="True">
                                                    <div class="leftdiv">
                                                    </div>
                                                    <div class="himsBoxTitle">
                                                        <div class="gridHeaderText fLeft">
                                                            <%--<header>
                                                            <asp:Label ID="GridViewLabel" Text="Prepare Student Database" runat="server" /></header>--%>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="himsBoxContent table-responsive">
                                                    <asp:GridView ID="AcademicGridView" runat="server" AutoGenerateColumns="False"
                                                        EmptyDataText="No Records Found !!" OnRowDataBound="AcademicGridView_OnRowDataBound"
                                                        AllowPaging="false" ShowHeader="true" DataKeyNames="ClassId,DivisionId" CssClass="table table-striped table-bordered table-hover">
                                                        <Columns>
                                                            <asp:TemplateField HeaderText="Roll No" ItemStyle-Width="4%" ItemStyle-Wrap="true"
                                                                HeaderStyle-HorizontalAlign="Left">
                                                                <ItemTemplate>
                                                                    <cc1:FilteredTextBoxExtender ID="RollNoExtender" runat="server" TargetControlID="RollNoTextBox"
                                                                        FilterType="Numbers" Enabled="True">
                                                                    </cc1:FilteredTextBoxExtender>
                                                                    <asp:TextBox ID="RollNoTextBox" runat="server" Text='<%# Bind("RollNo") %>' SkinID="CustomWidthTextBox" Width="99%"></asp:TextBox>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="ID No" ItemStyle-Width="9%" ItemStyle-Wrap="true"
                                                                HeaderStyle-HorizontalAlign="Left">
                                                                <ItemTemplate>
                                                                    <cc1:FilteredTextBoxExtender ID="IDNoExtender" runat="server" TargetControlID="IDNoTextBox"
                                                                        FilterType="Numbers">
                                                                    </cc1:FilteredTextBoxExtender>
                                                                    <asp:TextBox ID="IDNoTextBox" runat="server" Text='<%# Bind("Code") %>' SkinID="CustomWidthTextBox"
                                                                        Width="99%" MaxLength="20"></asp:TextBox>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Registration Number" ItemStyle-Width="10%" ItemStyle-Wrap="true"
                                                                HeaderStyle-HorizontalAlign="Left">
                                                                <ItemTemplate>
                                                                    <asp:TextBox ID="RegistrationNumberTextBox" runat="server" SkinID="CustomWidthTextBox" Width="99%"></asp:TextBox>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Surname" ItemStyle-Width="9%" ItemStyle-Wrap="true"
                                                                HeaderStyle-HorizontalAlign="Left">
                                                                <ItemTemplate>
                                                                    <asp:TextBox ID="LastNameTextBox" runat="server" SkinID="CustomWidthTextBox" Width="99%"
                                                                        MaxLength="100"></asp:TextBox>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Name" ItemStyle-Width="9%" ItemStyle-Wrap="true"
                                                                HeaderStyle-HorizontalAlign="Left">
                                                                <ItemTemplate>
                                                                    <asp:TextBox ID="FirstNameTextBox" runat="server" SkinID="CustomWidthTextBox" Width="99%"
                                                                        MaxLength="100"></asp:TextBox>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Father Name" ItemStyle-Width="9%" ItemStyle-Wrap="true"
                                                                HeaderStyle-HorizontalAlign="Left">
                                                                <ItemTemplate>
                                                                    <asp:TextBox ID="MiddleNameTextBox" runat="server" SkinID="CustomWidthTextBox" Width="99%"
                                                                        MaxLength="100"></asp:TextBox>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Date Of Birth" ItemStyle-Width="10%" ItemStyle-Wrap="true"
                                                                HeaderStyle-HorizontalAlign="Left">
                                                                <ItemTemplate>

                                                                    <DPC:DatePickerControl ID="DateOfBirthTextBox" runat="server" DisplayDatePicker="true" SkinID="CustomWidthTextBox" />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Gender" ItemStyle-Width="7%" ItemStyle-Wrap="true"
                                                                HeaderStyle-HorizontalAlign="Left">
                                                                <ItemTemplate>
                                                                    <asp:DropDownList runat="server" ID="GenderDropDownList" onmouseleave="showHideTooltip()" CssClass="form-control"
                                                                        onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList" Width="99%">
                                                                    </asp:DropDownList>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Religion" ItemStyle-Width="7%" ItemStyle-Wrap="true"
                                                                HeaderStyle-HorizontalAlign="Left">
                                                                <ItemTemplate>
                                                                    <asp:DropDownList runat="server" ID="ReligionDropDownList" onmouseleave="showHideTooltip()" CssClass="form-control"
                                                                        onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList" Width="99%">
                                                                    </asp:DropDownList>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Caste Category" ItemStyle-Width="7%" ItemStyle-Wrap="true"
                                                                HeaderStyle-HorizontalAlign="Left">
                                                                <ItemTemplate>
                                                                    <asp:DropDownList runat="server" ID="CastCategoryDropDownList" onmouseleave="showHideTooltip()" CssClass="form-control"
                                                                        onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList" Width="99%">
                                                                    </asp:DropDownList>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Parent Contact No" ItemStyle-Width="9%" ItemStyle-Wrap="true"
                                                                HeaderStyle-HorizontalAlign="Left">
                                                                <ItemTemplate>
                                                                    <asp:TextBox ID="ParentContactNoTextBox" runat="server" SkinID="CustomWidthTextBox"
                                                                        Width="99%" MaxLength="100"></asp:TextBox>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Parent Email Id" ItemStyle-Width="10%" ItemStyle-Wrap="true"
                                                                HeaderStyle-HorizontalAlign="Left">
                                                                <ItemTemplate>
                                                                    <asp:TextBox ID="ParentEmailIdTextBox" runat="server" SkinID="CustomWidthTextBox"
                                                                        Width="99%" MaxLength="100"></asp:TextBox>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                        </Columns>
                                                        <PagerSettings Visible="False" />
                                                    </asp:GridView>
                                                </div>
                                            </div>
                                        </div>
                                    </asp:Panel>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="swal2-container swal2-fade swal2-shown" style="overflow-y: auto;" id="swalId"></div>
                    <div id="Popupdiv" style="display: none;">

                        <div class="sweet-alert showSweetAlert visible" style="display: block; background-color: #ffcccc; margin-top: -100px;">
                            <div class="sa-icon sa-error" style="display: none;">
                                <span class="sa-x-mark">
                                    <span class="sa-line sa-left"></span>
                                    <span class="sa-line sa-right"></span>
                                </span>
                            </div>
                            <div class="sa-icon sa-warning" style="display: none;">
                                <span class="sa-body"></span>
                                <span class="sa-dot"></span>
                            </div>
                            <div class="sa-icon sa-info" style="display: none;"></div>
                            <div class="sa-icon sa-success" style="display: none;">
                                <span class="sa-line sa-tip"></span>
                                <span class="sa-line sa-long"></span>

                                <div class="sa-placeholder"></div>
                                <div class="sa-fix"></div>
                            </div>
                            <div class="sa-icon sa-custom" style="display: none;"></div>
                            <h3><b>You have exceeded limit of students for your existing plan.</h3>
                            </b>
                    <p></p>
                        </div>

                    </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <script type="text/javascript" language="javascript">
        function showmodalpopup() {

            //$("#popupdiv").dialog({

            //    width: 430,
            //    height: 100,
            //    modal: true,
            //    open: function (event, ui) {
            //        setTimeout(function () {
            //            $("#popupdiv").hide();
            //        }, 1000);
            //    }
            //});
            $(".hls-bg").show();
            $(".container").hide();
            $("#Popupdiv").show();
            setTimeout(function () {
                $("#Popupdiv").hide();
                $(".hls-bg").hide();
                $(".container").show();
            }, 4000);

        };
    </script>

    <%--<script data-main="../../JavaScript/rjs/encrypt/prepare-studentdatabase-encrypt" src="../../JavaScript/rjs/require.js"></script>--%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/prepare-studentdatabase")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
</asp:Content>
