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


<%@ Register Src="~/UserControls/Common/ScreenGroup/ScreenGroup.ascx" TagName="ScreenGroupControl" TagPrefix="ScreenGroup" %>
<%@ Register Src="~/Pages/StudentManagement/student-plugin-custom-search.ascx" TagName="customsearch" TagPrefix="plugin" %>
<%@ Register Src="~/Pages/StudentManagement/student-plugin-custom-field.ascx" TagName="customfield" TagPrefix="plugin" %>
<%@ Register Src="~/Pages/StudentManagement/student-plugin-order.ascx" TagName="customorder" TagPrefix="plugin" %>
<%@ Register Src="~/Pages/StudentManagement/student-plugin-report.ascx" TagName="customreport" TagPrefix="plugin" %>
<%@ Register Src="~/Pages/StudentManagement/student-plugin-alert.ascx" TagName="customalert" TagPrefix="plugin" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <link href="../../App_Themes/jquery-ui.css" rel="stylesheet" />
    <%--<link href="../../App_Themes/custom-search.css" rel="stylesheet" />--%>

    <div id="divContentPage" class="divcontentpagemargin">
        <!--Loading msg start-->
        <div class="hls-bg"></div>
        <div id="dvLoadingmsg" class="hls-wrap1">
            <div class="hls-container">
                <div class="hls-content">
                    <div class="dsh-syndicate">
                        <div class="shippingcard">
                            <span id="spnloadingimg">
                                <img src="../../../Images/loading-2.gif" /></span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!--Loading msg end-->
        <div class="dashBoardLeftCont">
            <div class="himssuHeader3WireBox">
                <table>
                    <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="102"
                        Visible="true" runat="server" />
                </table>
            </div>
        </div>
        <div class="whiteboxpaddingleft row">
            <div class="himssuHeader1WireBox card card-box">
                <div class="himsBoxHeader card-head">
                    <div class="himsBoxTitle">
                        <div class="headerText fLeft">
                            <header>
                                <i class="fas fa-cog"></i>&nbsp;  Maintenance
                            </header>
                        </div>
                    </div>
                </div>
                <div class="himsBoxContent card-body padd-0">
                    <div class="contentHolder">
                        <div class="tableContainer tabs-style-iconbox">
                            <div class="addproducttab tabs-style-iconboxinner">
                                <a id="CustomSearch" href="javascript:;" group="ProductTab" onclick="OpenProductTab(this,'CustomSearch');" class="active fancyTab"><i class="fas fa-search"></i>&nbsp;Student Custom Search</a>
                                <a id="CustomField" href="javascript:;" onclick="OpenProductTab(this,'CustomField');" group="ProductTab" class="fancyTab"><i class="fas fa-pencil-alt"></i>&nbsp;Custom Field</a>
                                <a id="OrderBy" href="javascript:;" onclick="OpenProductTab(this,'OrderBy');" group="ProductTab" class="fancyTab"><i class="fas fa-sort-alpha-up"></i>&nbsp;Order By</a>
                                <a id="ReportList" href="javascript:;" onclick="OpenProductTab(this,'ReportList');" group="ProductTab" class="fancyTab"><i class="fas fa-file-alt"></i>&nbsp;Report List</a>
                                <a id="Alert" href="javascript:;" onclick="OpenProductTab(this,'Alert');" group="ProductTab" class="fancyTab"><i class="fas fa-exclamation-triangle"></i>&nbsp;Alert</a>
                            </div>
                            <plugin:customsearch ID="customsearch1" runat="server" />
                            <plugin:customfield ID="customfield1" runat="server" />
                            <plugin:customorder ID="customorder1" runat="server" />
                            <plugin:customreport ID="customreport1" runat="server" />
                            <plugin:customalert ID="customalert1" runat="server" />
                        </div>
                        <div class="alignCenter pTop5 col-md-12">
                            <input type="button" id="btnSearch" value="&#xf002; Search" onclick="SearchStudents();" class="fas btn btn-search" />
                            <input type="button" id="btnClear" value="&#xf0e2; Reset" onclick="ResetControls();" class="fas btn btn-reset" />
                            <input type="button" id="btnGenerateReport" value="&#xf15b; Generate Report" onclick="GenerateReport();" class="fas btn btn-report" />
                            <%-- <input type="button" id="btnGetStudentData" value="&#xf15b; Get Student Data" class="fas btn btn-search" onclick="btnGetStudentData_Click" />--%>
                            <%--<asp:Button ID="btnGetStudentData" runat="server" Text="Show Popup" OnClientClick="ShowPopup(a,b)" class="fas btn btn-search" />--%>
                            <%--<input type="button" id="btnGetStudentData" value="Get Data" onclick="ShowPopup();" class="fas btn btn-search" />--%>
                            <button type="button" id="btnStudentDataGet" data-dismiss="modal" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" onclick="return GetData()">
                                Get Student Details
                            </button>

                            <asp:Button ID="btnGenerate" runat="server" Text="Generate" ClientIDMode="Static" class=" btn btn-generate" OnClick="btnGenerate_Click" Style="display: none;" />
                            <asp:Button ID="btnView" runat="server" Text="Generate" ClientIDMode="Static" class=" btn btn-generate" OnClick="btnView_Click" Style="display: none;" />
                            <asp:Button ID="btnSaveReport" runat="server" Text="Save Report" ClientIDMode="Static" class=" btn btn-generate" OnClick="btnSaveReport_Click" Style="display: none;" />
                        </div>

                        <div>
                            <div class="himssuHeader6WireBox col-md-12 pTop15 gridviewfont">
                                <div class="himsBoxHeader card-head inner">

                                    <div class="himsBoxTitle">
                                        <%-- <div class="gridHeaderText">
                                                <header>
                                                    <label>List</label>
                                                </header>
                                            </div>--%>
                                        <div class="pull-right mt12 display-flex">
                                            <input type="hidden" id="hdnPageIndex" value="1" />
                                            <ul id="pagging" class="pagination pagination-sm" style="float: right;">
                                            </ul>
                                            &nbsp;<label id="lblTotalRecords" style="margin-top: 12px;"></label>&nbsp;                                                                      
                                        </div>
                                    </div>
                                </div>
                                <div class="himsBt table-responsive">
                                    <table class="table table-striped table-hover table-bordered ">
                                        <thead>
                                            <tr>
                                                <th scope="col"></th>
                                                <th scope="col">Organization</th>
                                                <th scope="col">Batch</th>
                                                <th scope="col">Id No</th>
                                                <th scope="col">Name</th>
                                                <th scope="col">Class</th>
                                                <th scope="col">Status</th>
                                            </tr>
                                        </thead>
                                        <tbody id="tblStudentList">
                                            <tr>
                                                <td colspan="7">No Records Available</td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <%-- <div id="MyPopup" class="modal fade" role="dialog">
            <div class="modal-dialog" style="max-width: 1200px; margin: 0px auto; height: 700px">
                <!-- Modal content-->
                <div class="modal-content" style="height: 594px">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal">
                            &times;</button>
                        <h4 class="modal-title"></h4>
                    </div>
                    <div class="modal-body">
                    </div>
                    <%--<div class="modal-footer">
                        <button type="button" class="btn btn-danger" data-dismiss="modal">
                            Close</button>
                    </div>
                </div>
            </div>
        </div>--%>
        <div class="modal fade popup-data" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
            <div class="modal-dialog modal-dialog modal-xl" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <h5 class="modal-title" id="exampleModalLabel">Student Details
                              <button type="button" class="btn btn-primary clsSave" style="margin-left: 502px">
                                  Save
                              </button>
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                <span aria-hidden="true">&times;</span>
                            </button>

                        </h5>

                    </div>
                    <div class="modal-body">
                        <a href="#" class="previous">&laquo; Previous</a>
                        <a href="#" class="next">Next &raquo;</a>

                        <div class="table-responsive">
                            <div style="overflow-y: auto;" class="clsValidation"></div>
                            <div id="divStudentLoading" style="display: none; text-align: center; font-size: 16px; color: #000; font-weight: bold;"></div>

                            <table id="tlbStudentData" class="table table-striped table-bordered table-hover">
                            </table>

                        </div>
                    </div>
                    <%-- <div class="modal-footer">
                        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
                        <button type="button" class="btn btn-primary">Save changes</button>
                    </div>--%>
                </div>
            </div>
        </div>
    </div>
    <style type="text/css">
        @media (min-width: 1200px) {
            .modal-xl {
                max-width: 1140px;
            }
        }

        @media (min-width: 992px) {
            .modal-lg, .modal-xl {
                max-width: 1348px;
            }
        }

        .clsVal {
            height: auto;
            padding: 0px 10px;
            overflow-y: auto;
            width: 100%;
            min-height: auto;
            max-height: 100px;
            font-size: 13px;
            color: #000;
            border: 1px solid #e83c06;
            border-radius: 4px;
        }

        #Prev {
            text-decoration: none;
            display: inline-block;
            padding: 8px 16px;
        }

            #Prev:hover {
                background-color: #ddd;
                color: black;
            }

        .previous {
            background-color: #f1f1f1;
            color: black;
        }

        .next {
            background-color: #4CAF50;
            color: white;
        }

        .round {
            border-radius: 50%;
        }

        .DropdownValue {
            width: 100px;
        }
        /*Changes for Mantis Id: 0033011 By Hemali*/
        .disable {
            cursor: default;
            pointer-events: none;
        }
    </style>
    <%--<script data-main="../../JavaScript/rjs/student-custom-search" src="../../JavaScript/rjs/require.js"></script>--%>


    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/student-custom-search")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
    <script>
        $(document).ready(function () {

            if(<%=this.IsSMSAlert%> == 1)
            {
                $("#rdoSMS").attr('disabled', false);
                $("#rdoSMS").attr('checked', true);
            }
            else{
                $("#rdoSMS").attr('disabled', true);
                $("#rdoSMS").attr('checked', false);
            }

            if(<%=this.IsEmailAlert%> == 1)            
                $("#rdoMail").attr('disabled', false);
            else 
                $("#rdoMail").attr('disabled', true);

            if(<%=this.IsNotificationAlert%> == 1)            
                $("#rdoMobile").attr('disabled', false);
            else
                $("#rdoMobile").attr('disabled', true);          
        });
    </script>

    <%--<script type="text/javascript">
        function ShowPopup() {
            //$("#MyPopup .modal-title").html(title);
            //$("#MyPopup .modal-body").html("abc");
            $("#MyPopup").modal("show");

            //alert(body);
           // alert($('#drpSelectedFields option').length);

            //$('#drpSelectedFields option').each(function (i, selected) {
            //    //alert($(selected).text());
            //    //.data('original-title');
            //    //if ($(selected).attr('table-name') == "rollno") {
            //    //}

            //    //alert($(selected).attr('table-name'));

            //});

        }
    </script>--%>
    <%--<script type="text/javascript">
        function GetData() {
            var tablename = "";
            var fieldname = "";
            var controltype = "";
            var mastertablename = "";
            $('#drpSelectedFields option').each(function (i, selected) {
                //alert($(selected).attr('table-name'));
                tablename = tablename + $(selected).attr('table-name') + ",";
                fieldname = fieldname + $(selected).attr('field-name') + ",";
                controltype = controltype + $(selected).attr('control-type') + ",";
                mastertablename = mastertablename + $(selected).attr('master-table-name') + ",";
            });

            var lastChar = tablename.slice(-1);
            if (lastChar == ',') {
                tablename = tablename.slice(0, -1);
            }
            var lastChar1 = fieldname.slice(-1);
            if (lastChar1 == ',') {
                fieldname = fieldname.slice(0, -1);
            }
            var lastChar2 = controltype.slice(-1);
            if (lastChar2 == ',') {
                controltype = controltype.slice(0, -1);
            }
            var lastChar3 = mastertablename.slice(-1);
            if (lastChar3 == ',') {
                mastertablename = mastertablename.slice(0, -1);
            }


        }
    </script>--%>
</asp:Content>
