<%@ page language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_Admission_AdmissionMeritList, App_Web_hveyzx0y" 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/AutoComplete/AutoCompleteControl.ascx" TagName="AutoCompleteControl"
    TagPrefix="acc" %>
<%@ Register Src="~/UserControls/Common/CommonSearch/CommonSearch.ascx" TagName="CommonSearchUserControl"
    TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/DatePicker/DatePickerControl.ascx" TagName="DatePickerControl"
    TagPrefix="Date" %>
<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="ResonMasterUpdatePanel" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <div class="hls-bg"></div>
            <uc1:CommonSearchUserControl ID="CommonSearchControl" Visible="false" runat="server" />
            <div id="divContentPage" class="divcontentpagemargin">

                <div class="dashBoardLeftCont">
                    <div class="himssuHeader3WireBox">
                        <table>
                            <tr>
                                <td>
                                    <div class="leftUlMenu">
                                        <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="112"
                                            Visible="true" runat="server" />
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="whiteboxpaddingleft row">
                    <div class="himssuHeader1WireBox card card-box" id="SearchDiv" runat="server" visible="True">
                        <div class="himsBoxHeader card-head">
                            <asp:Panel ID="Panel1" runat="server">
                                <div class="leftdiv">
                                </div>
                                <div class="himsBoxTitle">
                                    <div class="headerText">
                                        <header>
                                            <i class="fas fa-list-alt"></i>
                                            <asp:Label ID="Label3" runat="server" Text="Admission Merit List"></asp:Label>
                                        </header>

                                    </div>
                                </div>
                            </asp:Panel>
                        </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="SearchForClassLabel" runat="server" Text="Class" SkinID="MandatoryLabel"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:DropDownList runat="server" ID="SearchForClassDropDownList" SkinID="CustomWidthDropDownList"
                                                    CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" AutoPostBack="true" OnSelectedIndexChanged="SearchForClassDropDownList_SelectedIndexChanged">
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="StatusLabel" runat="server" Text="Admission Status"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:DropDownList runat="server" ID="AdmissionStatusDropDownList" 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="FirstNameSearchLabel" runat="server" Text="First Name"></asp:Label>--%>
                                                <asp:Label ID="MinObtainMarkLabel" runat="server" Text="Min. Obtain Marks"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:TextBox ID="MinObtainMarkTextbox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                    runat="server" MaxLength="100" SkinID="CustomWidthTextbox" onkeypress="OnlyNumericEntry1()"></asp:TextBox>
                                            </div>
                                        </div>
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <%--<asp:Label ID="FirstNameSearchLabel" runat="server" Text="First Name"></asp:Label>--%>
                                                <asp:Label ID="MaxObtainMarkLabel" runat="server" Text="Max. Obtain Marks"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:TextBox ID="MaximumObtainMarkTextbox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                    runat="server" MaxLength="100" SkinID="CustomWidthTextbox" onkeypress="OnlyNumericEntry2()"></asp:TextBox>
                                            </div>
                                        </div>                                      
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="DivisionLabel" runat="server" Text="Convert to Division" SkinID="MandatoryLabel"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:DropDownList runat="server" ID="DivisonDropDownList" 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="AdmissionCategoryLabel" runat="server" Text="Fees Category" SkinID="MandatoryLabel"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:DropDownList runat="server" ID="AdmissionCategoryDropDownList" 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="FromDateLabel" runat="server" Text="From Discussion Date"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <Date:DatePickerControl DisplayDatePicker="true" ID="FromDatePickerControl" runat="server" />
                                            </div>
                                        </div>
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="ToDateLabel" runat="server" Text="To Discussion Date"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <Date:DatePickerControl DisplayDatePicker="true" ID="ToDatePickerControl" runat="server" />
                                            </div>
                                        </div>
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <%--<asp:Label ID="FirstNameSearchLabel" runat="server" Text="First Name"></asp:Label>--%>
                                                <asp:Label ID="MinMaritMarkLabel" runat="server" Text="Min. Merit Marks"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:TextBox ID="MinMaritMarkTextbox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                    runat="server" MaxLength="100" SkinID="CustomWidthTextbox" onkeypress="OnlyNumericEntry1()"></asp:TextBox>
                                            </div>
                                        </div>
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <%--<asp:Label ID="FirstNameSearchLabel" runat="server" Text="First Name"></asp:Label>--%>
                                                <asp:Label ID="MaxMaritMarkLabel" runat="server" Text="Max. Merit Marks"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:TextBox ID="MaxMaritMarkTextbox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                    runat="server" MaxLength="100" SkinID="CustomWidthTextbox" onkeypress="OnlyNumericEntry1()"></asp:TextBox>
                                            </div>
                                        </div>
                                        <div class="alignCenter pTop5 col-md-12">
                                            <asp:Button ID="SearchButton" runat="server" Text="&#xf002; Search" OnClick="SearchButton_Click"
                                                SkinID="0" CssClass="btn-search btn fas" />
                                            <asp:Button ID="UploadToExcelLinkButton" Text="&#xf093; Export To Excel"
                                                runat="server" SkinID="0" CssClass="btn btn-examcommon fas" CausesValidation="false" Visible="false"></asp:Button>
                                            <asp:Button ID="SendAlertButton" runat="server" Text="&#xf1d8; Send Alert" OnClick="SendAlertButton_Click" SkinID="0" CssClass="btn-send btn fas" />
                                            <asp:Button ID="ConvertButton" runat="server" Text="&#xf079; Convert" OnClick="ConvertButton_Click" SkinID="0" CssClass="btn-assign btn fas" />
                                            <asp:Button ID="ResetButton" runat="server" Text="&#xf0e2; Reset" OnClick="ResetButton_Click" SkinID="0" CssClass="btn-reset btn fas" />
                                        </div>

                                        <div runat="server" id="resultdiv" class="himssuHeader1WireBox col-md-12 pTop5">
                                            <div class="headerText ">
                                                <div class="himsBoxTitle">
                                                    <div class="fRight col-md-3 display-flex">

                                                        <asp:DropDownList ID="ApplyDropDownList" CssClass="form-control" runat="server" AutoPostBack="True" SkinID="CustomWidthDropDownList">
                                                        </asp:DropDownList>&nbsp;&nbsp;
                                                        <asp:Button ID="ApplyButton" runat="server" SkinID="0" Text="Apply All" CssClass="btn btn-apply"
                                                            OnClick="ApplyButton_Click" />
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="table-responsive pTop10">
                                                <asp:GridView ID="AdmissionFormGridView" runat="server" AutoGenerateColumns="False"
                                                    OnRowDataBound="AdmissionStatusGridviewDropdDown_RowDataBound" OnPageIndexChanging="AdmissionFormGridView_PageIndexChanging"
                                                    AllowPaging="false" SkinID="" ShowHeader="true" PagerSettings-Visible="false"
                                                    CssClass="table table-striped table-bordered tab-content table-hover" DataKeyNames="Id,AdmissionStatusId,StatusId">
                                                    <Columns>
                                                        <asp:BoundField DataField="FormNo" HeaderText="Form No" HeaderStyle-HorizontalAlign="Left"
                                                            ItemStyle-Width="8%" />
                                                        <asp:BoundField DataField="Name" HeaderText="Name" HeaderStyle-HorizontalAlign="Left"
                                                            ItemStyle-Width="40%" />
                                                        <asp:BoundField DataField="ContactNo" HeaderText="Contact No." HeaderStyle-HorizontalAlign="Left"
                                                            ItemStyle-Width="10%" />
                                                         <asp:BoundField DataField="DiscussionDate" HeaderText="Discussion Date" HeaderStyle-HorizontalAlign="Left"
                                                            ItemStyle-Width="10%" DataFormatString="{0:dd/MM/yyyy}" />
                                                        <asp:BoundField DataField="obtain" HeaderText="Obtain Marks" HeaderStyle-HorizontalAlign="Left"
                                                            HtmlEncode="false" ItemStyle-Width="8%" />
                                                        <asp:TemplateField HeaderText="Merit List Status" ItemStyle-HorizontalAlign="Left"
                                                            ItemStyle-Wrap="true" ItemStyle-Width="10%">
                                                            <ItemTemplate>
                                                                <asp:DropDownList ID="AdmissionStatusGridviewDropdDown" runat="server" SkinID="CustomWidthDropDownList"
                                                                    onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" Width="160px">
                                                                </asp:DropDownList>
                                                            </ItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Left" />
                                                            <ItemStyle HorizontalAlign="Left" />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField >
                                                            <HeaderTemplate>
                                                                <label class="rt-chkbox rt-chkbox-outline">
                                                                    <asp:CheckBox ID="HeaderAlertCheckBox" runat="server" onClick="checkAllRows(this);" />
                                                                    <span></span>
                                                                </label>
                                                            </HeaderTemplate>
                                                            <ItemTemplate>
                                                                <label class="rt-chkbox rt-chkbox-outline">
                                                                    <asp:CheckBox ID="AlertCheckBox" runat="server" onClick="checkUncheckHeaderCheckBox(this);" />
                                                                    <span></span>
                                                                </label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField ItemStyle-Wrap="true" ItemStyle-Width="10%" HeaderText="Convert Status">
                                                            <ItemStyle HorizontalAlign="Center" />
                                                            <ItemTemplate>
                                                                <asp:Label ID="StatusLabel" runat="server" Text="" />
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                    </Columns>
                                                </asp:GridView>
                                            </div>
                                        </div>
                                    </asp:Panel>
                                </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 data-main="../../JavaScript/rjs/encrypt/admission-meritlist-encrypt" src="../../JavaScript/rjs/require.js"></script>--%>
      <script data-main='<%=ResolveUrl("~/JavaScript/rjs/admission-meritlist")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
    <script type="text/javascript">
        function checkAllRows(obj) {
            var objGridview = obj.parentNode.parentNode.parentNode;
            var list = objGridview.getElementsByTagName("input");
            for (var i = 0; i < list.length; i++) {
                var objRow = list[i].parentNode.parentNode;
                if (list[i].type == "checkbox" && obj != list[i]) {
                    if (obj.checked) {

                        list[i].checked = true;
                    }
                    else {
                        list[i].checked = false;
                    }
                }
            }
        }
        function checkUncheckHeaderCheckBox(obj) {
            var objRow = obj.parentNode.parentNode;
            var objGridView = objRow.parentNode;
            var list = objGridView.getElementsByTagName("input");
            for (var i = 0; i < list.length; i++) {
                var objHeaderChkBox = list[0];
                var checked = true;
                if (list[i].type == "checkbox" && list[i] != objHeaderChkBox) {
                    if (!list[i].checked) {
                        checked = false;
                        break;
                    }
                }
            }
            objHeaderChkBox.checked = checked;
        }

        function showmodalpopup() {
            $(".hls-bg").show();
            $(".container").hide();
            $("#Popupdiv").show();
            setTimeout(function () {
                $("#Popupdiv").hide();
                $(".hls-bg").hide();
                $(".container").show();
            }, 4000);
        };


    </script>
</asp:Content>
