<%@ page language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_Attendance_StudentRegister, App_Web_nh2irgi4" 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="Date" %>
<%@ Register Src="~/UserControls/Common/EmployeeSearch/EmployeeSearch.ascx" TagName="EmployeeSearchControl" TagPrefix="hims" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <asp:UpdatePanel ID="IncidentLogUpdatePanel" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <hims:EmployeeSearchControl ID="EmployeeSearch" Visible="false" runat="server" />
            <div id="divContentPage" class="divcontentpagemargin">
                <div class="dashBoardLeftCont">
                    <div class="himssuHeader3WireBox">
                        <div class="himssuHeader3WireBox">
                            <table>
                                <tr>
                                    <td>
                                        <div class="himsBoxContent">
                                            <div class="leftUlMenu">
                                                <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="110"
                                                    Visible="true" runat="server" />
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div class="row whiteboxpaddingleft">
                            <div class="himssuHeader5WireBox card card-box">
                                <div class="himsBoxHeader card-head">
                                    <div class="leftdiv">
                                    </div>
                                    <div class="himsBoxTitle">
                                        <div class="headerText">
                                            <header>
                                                <i class="fas fa-registered"></i>
                                                <asp:Label ID="Label1" runat="server" Text="Register"></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="SearchClassLabel" runat="server" Text="Class" SkinID="MandatoryLabel"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:DropDownList runat="server" ID="SearchClassDropDownList" SkinID="CustomWidthDropDownList"
                                                            CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" AutoPostBack="true"
                                                            OnSelectedIndexChanged="SearchClassDropDownList_OnSelectedIndexChanged">
                                                        </asp:DropDownList>
                                                    </div>
                                                </div>
                                                <div class="outerBox pTop5 col-md-3">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="SearchDivisionLabel" runat="server" Text="Division" SkinID="MandatoryLabel"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:DropDownList runat="server" ID="SearchDivisionDropDownList" SkinID="CustomWidthDropDownList"
                                                            CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" AutoPostBack="true"
                                                            OnSelectedIndexChanged="SearchDivisionDropDownList_OnSelectedIndexChanged">
                                                        </asp:DropDownList>
                                                    </div>
                                                </div>
                                                <div class="outerBox pTop5 col-md-3">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="AttendanceDateLabel" runat="server" Text="Attendance Date" SkinID="MandatoryLabel"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <Date:DatePickerControl DisplayDatePicker="true" ID="AttendanceDatePickerControl" runat="server" />
                                                    </div>
                                                </div>

                                                <div class="outerBox pTop5 col-md-3">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="AttendanceTypeLabel" runat="server" Text="Attendance Type" SkinID="MandatoryLabel"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:DropDownList runat="server" ID="AttendanceTypeDropDownList" SkinID="CustomWidthDropDownList"
                                                            CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" AutoPostBack="true"
                                                            OnSelectedIndexChanged="AttendanceTypeDropDownList_OnSelectedIndexChanged">
                                                        </asp:DropDownList>
                                                    </div>
                                                </div>
                                                <div id="SubjectDiv" runat="server" visible="false">
                                                    <div class="outerBox pTop5 col-md-3">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="SubjectLabel" runat="server" Text="Subject"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <asp:DropDownList runat="server" ID="SubjectDropDownList" SkinID="CustomWidthDropDownList"
                                                                CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" AutoPostBack="true"
                                                                OnSelectedIndexChanged="SubjectDropDownList_OnSelectedIndexChanged">
                                                            </asp:DropDownList>
                                                        </div>
                                                    </div>
                                                    <div id="SubjectBatchDiv" runat="server" visible="false">
                                                        <div class="outerBox pTop5 col-md-3">
                                                            <div class="controlLabelWidth">
                                                                <asp:Label ID="SubjectBatchLabel" runat="server" Text="Subject Batch"></asp:Label>
                                                            </div>
                                                            <div class="fLeft pRight5">
                                                                <asp:DropDownList runat="server" ID="SubjectBatchDropDownList" SkinID="CustomWidthDropDownList"
                                                                    CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()">
                                                                </asp:DropDownList>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="outerBox pTop5 col-md-3">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="RepeatCountLabel" runat="server" Text="Repeat Count" Visible="false"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <asp:DropDownList runat="server" ID="RepeatCountDropDownList" SkinID="CustomWidthDropDownList"
                                                                CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" Visible="false">
                                                            </asp:DropDownList>
                                                            <asp:HiddenField ID="RepeatCountHiddenField" runat="server" />
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="outerBox pTop5 col-md-3">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="EmployeeCodeLabel" runat="server" Text="Employee Code"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5 display-flex">
                                                        <asp:TextBox ID="EmployeeCodeTextBox"
                                                            SkinID="CustomWidthTextBox" runat="server" MaxLength="100"
                                                            AutoPostBack="true"
                                                            OnTextChanged="EmployeeCodeTextBox_TextChanged"> </asp:TextBox>
                                                        <asp:ImageButton SkinID="FindImage" ToolTip="Drug Search" ID="EmployeeCodeImageButton"
                                                            runat="server" ImageUrl="../../../../Images/icons/icon_find.gif" />
                                                        <asp:HiddenField ID="EmployeeIdHiddenField" runat="server" />
                                                    </div>
                                                </div>
                                                <div class="outerBox pTop5 col-md-3">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="EmployeeNameLabel" runat="server" Text="Employee Name"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:TextBox ID="EmployeeNameTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                            SkinID="CustomWidthTextBox" runat="server" MaxLength="100"> </asp:TextBox>

                                                    </div>
                                                </div>
                                                <div class="outerBox pTop5 col-md-3">
                                                    <div class="fLeft">
                                                        <asp:CheckBox ID="StopAutoAlertCheckBox" runat="server" Text="Stop Auto Alert" />
                                                    </div>
                                                </div>
                                                <div class="alignCenter pTop5 col-md-12">
                                                    <asp:Button ID="ApplyButton" Text="&#xf00c; Apply" runat="Server" OnClick="ApplyButton_Click" SkinID="0" CssClass="fas btn btn-assign " />
                                                     <asp:Button ID="GetFirstPeriodDataButton" Text="&#xf00c; Get First Period Data" runat="Server" OnClick="GetFirstPeriodDataButton_Click" SkinID="0" CssClass="fas btn btn-assign " Visible="false" />
                                                     <asp:Button ID="ManualPunchButton" runat="server" Visible="false" CssClass="btn-examcommon btn fas" SkinID="0" Text="&#xf093; Push Data" OnClick="ManualPunchButton_Click" />
                                                </div>
                                            </asp:Panel>
                                            <div id="Div1" class="himssuHeader7WireBox col-md-12 pTop5" runat="server" visible="false">
                                                <div id="GridViewPagerDiv" runat="server" visible="True">
                                                    <div class="leftdiv">
                                                    </div>
                                                    <div class="himsBoxTitle">
                                                        <div class="gridHeaderText fLeft ">
                                                            <asp:Label ID="TNoteLabel" Text="" runat="server" />
                                                            <asp:Label ForeColor="Red" ID="NoteLabel" Text="" runat="server" />
                                                            <asp:Label ID="TotalStudentLabel" Text="" runat="server" />
                                                            <asp:Label ID="PresentStudentLabel" Text="" runat="server" />
                                                            <asp:Label ID="AbsentStudentLabel" Text="" runat="server" />
                                                            <asp:Label ID="AbsentStudentRollNoLabel" Text="" runat="server" />
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="himsBoxContent table-responsive">
                                                    <div id="GridViewMessageDiv" class="himsBoxContentMsg" runat="server"
                                                        visible="False">
                                                    </div>
                                                    <asp:GridView ID="StudentRegisterGridView" runat="server" AutoGenerateColumns="False"
                                                        EmptyDataText="No Records Found !!" OnRowDataBound="StudentRegisterGridView_RowDataBound"
                                                        AllowPaging="false"
                                                        ShowHeader="true"
                                                        DataKeyNames="AcademicId,AbsentReasonId,AttendanceTagId"
                                                        CssClass="table table-striped table-bordered table-hover">
                                                        <Columns>
                                                            <asp:TemplateField HeaderStyle-HorizontalAlign="Center" Visible="false">
                                                                <HeaderTemplate>
                                                                    <label class="rt-chkbox rt-chkbox-outline">
                                                                        <asp:CheckBox ID="HeaderSelectCheckBox" onclick="CheckAll(this);"
                                                                            runat="server" AutoPostBack="true" OnCheckedChanged="HeaderSelectCheckBox_OnCheckedChanged" />
                                                                        <span></span>
                                                                    </label>
                                                                </HeaderTemplate>
                                                                <ItemStyle HorizontalAlign="Center" Width="5%" />
                                                                <ItemTemplate>
                                                                    <label class="rt-chkbox rt-chkbox-outline">
                                                                        <asp:CheckBox ID="SelectCheckBox" runat="server" Checked='<%# Bind("IsDeleted") %>'
                                                                            AutoPostBack="true" OnCheckedChanged="SelectCheckBox_OnCheckedChanged" />
                                                                        <span></span>
                                                                    </label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:BoundField DataField="RollNo" HeaderText="Roll No" ItemStyle-Width="3%" HeaderStyle-HorizontalAlign="Left"></asp:BoundField>
                                                            <asp:TemplateField HeaderText="ID No" ItemStyle-Width="10%">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="IdNoLabel" runat="server" Text='<%#Eval("Code") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:BoundField DataField="Name" HeaderText="Name" ItemStyle-Width="30%" HeaderStyle-HorizontalAlign="Left"></asp:BoundField>
                                                            <asp:TemplateField ItemStyle-Wrap="true">
                                                                <HeaderTemplate>
                                                                    <label class="rt-chkbox rt-chkbox-outline">
                                                                        <asp:CheckBox ID="HeaderIsPresentCheckBox" runat="server" onClick="checkAllRows(this);"  OnCheckedChanged="HeaderSelectCheckBox_OnCheckedChanged" AutoPostBack="true"/>
                                                                        <span></span>
                                                                        Present
                                                                    </label>


                                                                </HeaderTemplate>
                                                                <ItemStyle HorizontalAlign="Center" />
                                                                <ItemTemplate>
                                                                    <label class="rt-chkbox rt-chkbox-outline" runat="server">
                                                                        <asp:CheckBox ID="IsPresentCheckBox" runat="server" Checked='<%# Bind("IsPresent") %>' onClick="checkUncheckHeaderCheckBox(this);" OnCheckedChanged="IsPresentCheckBox_OnCheckedChanged" AutoPostBack="true"/>
                                                                        <span></span>
                                                                    </label>

                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Absent Reason" ItemStyle-Width="12%" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                                <ItemTemplate>
                                                                    <asp:DropDownList runat="server" ID="AbsentReasonDropDownList" SkinID="CustomWidthDropDownList"
                                                                        CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()">
                                                                    </asp:DropDownList>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Attendance" ItemStyle-Width="12%" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                                <ItemTemplate>
                                                                    <asp:DropDownList runat="server" ID="AttendanceTagDropDownList" SkinID="CustomWidthDropDownList"
                                                                        CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()">
                                                                    </asp:DropDownList>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Attendance Remark" ItemStyle-Width="15%" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                                <ItemTemplate>
                                                                    <asp:TextBox runat="server" ID="AttendanceRemarkTextBox" SkinID="CustomWidthDropDownList" Text='<%# Bind("AttendanceRemark") %>'
                                                                        CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()">
                                                                    </asp:TextBox>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Sr. No." ItemStyle-Width="3%" ItemStyle-Wrap="true">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="SrNoLabel" runat="server"></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            
                                                            <asp:BoundField DataField="LeaveApply" HeaderText="Leave Status" ItemStyle-Width="5%" HeaderStyle-HorizontalAlign="Left"></asp:BoundField>
                                                            <asp:BoundField DataField="LeaveReason" HeaderText="Leave Reason" ItemStyle-Width="65%" HeaderStyle-HorizontalAlign="Left"></asp:BoundField>
                                                        </Columns>
                                                        <PagerSettings Visible="False" />
                                                    </asp:GridView>
                                                </div>
                                            </div>
                                        </div>
                                    </asp:Panel>
                                </div>
                            </div>
                        </div>
                    </div>
                    <%--HEDP History Ends Here--%>
                </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/student-register")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
    <%--    <script data-main="../../JavaScript/rjs/encrypt/student-register-encrypt" src="../../JavaScript/rjs/require.js"></script>--%>
</asp:Content>
