<%@ page language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_Admission_SortedAdmissionForm, App_Web_0bicqyzg" 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">
    <asp:UpdatePanel ID="ResonMasterUpdatePanel" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <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="fa fa-sort-amount-asc"></i>
                                            <asp:Label ID="Label3" runat="server" Text="Sorted Admission Form"></asp:Label>
                                        </header>
                                    </div>
                                </div>
                            </asp:Panel>
                        </div>
                        <div class="himsBoxContent card-body">
                            <asp:Panel ID="DetailPanel" runat="Server">
                                <div class="contentHolder">
                                    <div id="Div1" class="himssuHeader6WireBox col-md-12 gridviewfont" runat="server">
                                        <%-- <div class="himsBoxHeader card-head inner" id="GridViewPagerDiv" runat="server" visible="True">
                                                            <div class="leftdiv">
                                                            </div>
                                                            <div class="himsBoxTitle">
                                                                <div class="headerText">
                                                                    <header>
                                                                        <asp:Label ID="GridViewLabel" Text="Student List" runat="server" />
                                                                    </header>
                                                                </div>
                                                            </div>
                                                        </div>--%>
                                        <div class="pTop5 col-md-3">
                                            <%-- <asp:GridView ID="AlertGridView" runat="server" Width="100%" AutoGenerateColumns="False"
                                                                EmptyDataText="No Records Found !!" CssClass="table table-striped table-bordered  table-hover"
                                                                AllowPaging="false" ShowHeader="true" DataKeyNames="ClassId">
                                                                <Columns>
                                                                    <asp:TemplateField HeaderStyle-HorizontalAlign="Center">
                                                                        <HeaderTemplate>
                                                                            <label class="rt-chkbox rt-chkbox-outline">
                                                                                <asp:CheckBox ID="HeaderSelectCheckBox" onclick="CheckAll(this);" runat="server" />
                                                                                <span></span>
                                                                            </label>
                                                                        </HeaderTemplate>
                                                                        <ItemStyle HorizontalAlign="Center" Width="5%" />
                                                                        <ItemTemplate>
                                                                            <label class="rt-chkbox rt-chkbox-outline">
                                                                                <asp:CheckBox ID="SelectCheckBox" runat="server" />
                                                                                <span></span>
                                                                            </label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                  <asp:BoundField DataField="ClassId" HeaderText="Roll No" ItemStyle-Width="15%" Visible="false" HeaderStyle-HorizontalAlign="Left"></asp:BoundField>
                                                                    <asp:BoundField DataField="ClassName" HeaderText="Name" ItemStyle-Width="80%" HeaderStyle-HorizontalAlign="Left"></asp:BoundField>
                                                                </Columns>
                                                                <PagerSettings Visible="False" />
                                                            </asp:GridView>--%>
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="SearchForClassLabel" runat="server" Text="Class"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:DropDownList CssClass="form-control" runat="server" ID="SearchForClassDropDownList" SkinID="CustomWidthDropDownList"
                                                    onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()">
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                        <asp:Panel ID="SearchCriteriaPanel" runat="Server">
                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <%--<asp:Label ID="FirstNameSearchLabel" runat="server" Text="First Name"></asp:Label>--%>
                                                    <asp:Label ID="FormNoLabel" runat="server" Text="Form No"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:TextBox ID="FormNoTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                        runat="server" SkinID="CustomWidthTextbox" onkeypress="OnlyNumericEntry()"></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="FirstNameLabel" runat="server" Text="First Name"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:TextBox ID="FirstNameTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                        runat="server" MaxLength="100" SkinID="CustomWidthTextbox"></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="LastNameLabel" runat="server" Text="Last Name"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:TextBox ID="LastNameTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                        runat="server" MaxLength="100" SkinID="CustomWidthTextbox"></asp:TextBox>
                                                </div>
                                            </div>
                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="MinMeritMarkLabel" runat="server" Text="Min. Merit Marks"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:TextBox ID="MinMeritMarkTextbox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                        runat="server" MaxLength="100" SkinID="CustomWidthTextbox" onkeypress="OnlyNumericEntry()"></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="MaxMeritMarkLabel" runat="server" Text="Max. Merit Marks"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:TextBox ID="MaximumMeritMarkTextbox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                        runat="server" MaxLength="100" SkinID="CustomWidthTextbox" onkeypress="OnlyNumericEntry()"></asp:TextBox>
                                                </div>
                                            </div>
                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="SortedStatusLabel" runat="server" Text="Sorted Status"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:DropDownList runat="server" ID="SortedStatusDropDownList" 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="CastCategoryLabel" runat="server" Text="Caste Category"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:DropDownList runat="server" ID="CastCategoryDropDownList" 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="MeritMarksSortedByLabel" runat="server" Text="Merit Marks Sorted By"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:DropDownList runat="server" ID="MeritMarksSortedByDropDownList" 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="ProcessStatusLabel" runat="server" Text="Process Status"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:DropDownList runat="server" ID="ProcessStatusDropDownList" 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="ConvertStatusLabel" runat="server" Text="Convert Status"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:DropDownList runat="server" ID="ConvertStatusDropDownList" SkinID="CustomWidthDropDownList"
                                                        CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()">
                                                        <asp:ListItem Text="-All-" Value="0"></asp:ListItem>
                                                        <asp:ListItem Text="Converted" Value="1"></asp:ListItem>
                                                        <asp:ListItem Text="Not Converted" Value="2"></asp:ListItem>
                                                    </asp:DropDownList>
                                                </div>
                                            </div>
                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="Label2" runat="server" Text=""></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <br />
                                                    <asp:CheckBox ID="SMSSend" runat="server" Text="Alert" OnCheckedChanged="SMSSend_CheckedChanged" AutoPostBack="true" />
                                                </div>
                                            </div>
                                            <div class="cBoth"></div>
                                            <div id="HideDiv" runat="server" visible="false">
                                                <div class="outerBox11 pTop5 col-md-11">
                                                    <asp:CheckBoxList ID="SourceTypeCheckBoxList" runat="server" RepeatDirection="Horizontal"
                                                        OnSelectedIndexChanged="SourceTypeCheckBoxList_SelectedIndexChanged" AutoPostBack="true">
                                                        <asp:ListItem Text="SMS" Value="1"></asp:ListItem>
                                                        <asp:ListItem Text="Email" Value="2"></asp:ListItem>
                                                        <asp:ListItem Text="WhatsApp" Value="3"></asp:ListItem>
                                                    </asp:CheckBoxList>
                                                </div>
                                                <br />
                                                <div class="outerBox11 pTop5 col-md-3">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="TemplateIdLabel" runat="server" Text="Template Id"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:TextBox ID="SMSTemplateIDTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                            runat="server" SkinID="CustomWidthTextbox"></asp:TextBox>
                                                    </div>
                                                </div>
                                                <div class="cBoth"></div>
                                                <div class="outerBox pTop5 mb-3 col-md-12">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="MessageLabel" runat="server" Text="Message"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:TextBox ID="MessageTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                            Height="50px" SkinID="MultilineTextBox" runat="server" MaxLength="1000"
                                                            TextMode="MultiLine" OnTextChanged="MessageTextBox_TextChanged" AutoPostBack="true" placeholder="Dear [Name], your form no is [FormNo]."></asp:TextBox>
                                                        <div class="row col-md-12 padd-0">
                                                            <div id="CharCountDiv" runat="server" class="col-md-6 padd-2">
                                                                <asp:Label ID="ForCharLabel" runat="server" Text="Number Of Character : "></asp:Label>
                                                                <asp:Label ID="NumberOfCharLabel" runat="server" Font-Bold="true"></asp:Label>
                                                                <asp:Label ID="ForMessageLabel" runat="server" Text="Number Of Message :" CssClass="ml-1"></asp:Label>
                                                                <asp:Label ID="NumberOfMessageLabel" runat="server" Font-Bold="true"></asp:Label>
                                                            </div>
                                                            <div class="col-md-6">
                                                                <asp:Label ID="ExampleText" runat="server" Text="(Dear [Name], your form no is [FormNo].)"></asp:Label>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <br />
                                                <div class="pTop5 alignCenter col-md-12">
                                                    <asp:Button ID="SendButton" runat="server" Text="&#xf1d8; Send" SkinID="CustomButton"
                                                        OnClick="SendButton_Click" CssClass="btn-send btn fas" />
                                                </div>
                                            </div>
                                            <%-- ========================================================================= --%>
                                            <div class="alignCenter col-md-12 pTop5 pb5">
                                                <asp:Button ID="SearchButton" runat="server" Text="&#xf002; Search" OnClick="SearchButton_Click"
                                                    SkinID="0" CssClass="btn-search btn fas" />
                                                <asp:Button ID="ResetButton" runat="server" Text="&#xf0e2; Reset" OnClick="ResetButton_Click"
                                                    SkinID="0" CssClass="btn-reset btn fas" />
                                                <asp:Button ID="UploadToExcelLinkButton" Text="&#xf093; Export" runat="server" SkinID="0" CausesValidation="false"
                                                    Visible="false" CssClass="btn btn-examcommon fas"></asp:Button>
                                                <%--<asp:Button ID="SendButton" Text="&#xf1d8; Send" runat="Server" OnClick="SendButton_Click"
                                                SkinID="0" CssClass="btn-send btn fas" Visible="false"/>--%>
                                            </div>

                                            <div runat="server" id="resultdiv" class="himssuHeader1WireBox col-md-12 pTop5 table-responsive">
                                                <asp:GridView ID="AdmissionFormGridView" runat="server" AutoGenerateColumns="False" AllowSorting="true"
                                                    OnRowDataBound="AdmissionFormGridView_RowDataBound" OnPageIndexChanging="AdmissionFormGridView_PageIndexChanging"
                                                    AllowPaging="false" SkinID="SortHeaderGridView" OnSorting="AdmissionFormGridView_Sorting" ShowHeader="true"
                                                    PagerSettings-Visible="false" CssClass="table table-striped table-bordered table-hover" DataKeyNames="Id,AdmissionFormId,ContactNo,ContactEmail">
                                                    <Columns>
                                                        <asp:TemplateField HeaderText="Select" HeaderStyle-HorizontalAlign="Center"
                                                            ItemStyle-Wrap="true">
                                                            <HeaderTemplate>
                                                                <label class="rt-chkbox rt-chkbox-outline">
                                                                    <asp:CheckBox ID="HeaderSelectCheckBox" runat="server" Enabled="true" AutoPostBack="true"
                                                                        Visible="true" OnCheckedChanged="HeaderSelectCheckBox_checked" />
                                                                    <span></span>
                                                                </label>
                                                                </label>
                                                            </HeaderTemplate>
                                                            <ItemStyle HorizontalAlign="Center" />
                                                            <HeaderStyle HorizontalAlign="Center" />
                                                            <ItemTemplate>
                                                                <label class="rt-chkbox rt-chkbox-outline">
                                                                    <asp:CheckBox ID="SelectCheckBox" runat="server" />
                                                                    <span></span>
                                                                </label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <%-- <asp:BoundField DataField="FormNo" SortExpression="FormNo" HeaderText="Form No" HeaderStyle-HorizontalAlign="Left" />--%>
                                                        <asp:TemplateField HeaderText="Form No" SortExpression="FormNo" HeaderStyle-HorizontalAlign="Left"
                                                            ItemStyle-Wrap="true">
                                                            <ItemTemplate>
                                                                <asp:Label ID="FormNoLabel" runat="server" Text='<%# Bind("FormNo") %>'></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:BoundField DataField="ClassName" SortExpression="ClassName" HeaderText="Class Name" HeaderStyle-HorizontalAlign="Left" />
                                                        <%--<asp:BoundField DataField="Name" SortExpression="Name" HeaderText="Name" HeaderStyle-HorizontalAlign="Left" />--%>
                                                        <asp:TemplateField HeaderText="Name" SortExpression="Title" HeaderStyle-HorizontalAlign="Left"
                                                            ItemStyle-Wrap="true">
                                                            <ItemTemplate>
                                                                <asp:Label ID="NameLabel" runat="server" Text='<%# Bind("Name") %>'></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:BoundField DataField="ContactNo" HeaderText="Contact No." HeaderStyle-HorizontalAlign="Left" />
                                                        <asp:BoundField DataField="MeritMarks" SortExpression="MeritMarks" HeaderText="Merit Marks" HeaderStyle-HorizontalAlign="Left" />
                                                        <asp:BoundField DataField="MeritGrade" SortExpression="MeritGrade" HeaderText="Merit Grade"
                                                            HeaderStyle-HorizontalAlign="Left" />
                                                        <asp:TemplateField HeaderText="Discussion Date" HeaderStyle-HorizontalAlign="Center">
                                                            <ItemTemplate>
                                                                <%--<asp:TextBox ID="DiscussionTextBox" runat="server" ></asp:TextBox>--%>
                                                                <Date:DatePickerControl DisplayDatePicker="true" ID="DiscussionDatePicker" Text='<%# Eval("DiscussionDate")%> ' runat="server" />
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:BoundField DataField="CasteCategory" SortExpression="CasteCategory" HeaderText="Caste Category" HeaderStyle-HorizontalAlign="Left" />
                                                    </Columns>
                                                </asp:GridView>
                                            </div>
                                        </asp:Panel>
                                    </div>
                                </div>
                            </asp:Panel>
                        </div>
                    </div>
                </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <%--  <script data-main="../../JavaScript/rjs/encrypt/stored-admission-form-encrypt" src="../../JavaScript/rjs/require.js"></script>--%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/stored-admission-form")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
</asp:Content>
