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

<%@ Register Src="~/UserControls/DatePicker/DatePickerControl.ascx" TagName="DatePickerControl" TagPrefix="Date" %>
<%@ 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/EmployeeSearch/EmployeeSearch.ascx" TagName="EmployeeSearchControl" TagPrefix="hims" %>
<%@ Register Src="~/UserControls/Common/StudentSearch/StudentSearch.ascx" TagName="StudentSearch" TagPrefix="Std" %>
<%@ Register Assembly="TimePicker" Namespace="MKB.TimePicker" TagPrefix="timePicker" %>
<%@ Register Src="~/UserControls/Common/Library/LibraryDetailBoxControl.ascx" TagName="LibraryControl" TagPrefix="Library" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <asp:UpdatePanel ID="ResonMasterUpdatePanel" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <Std:StudentSearch ID="StudentSearch" Visible="false" runat="server" />
            <hims:EmployeeSearchControl ID="EmployeeSearch" Visible="false" runat="server" />
            <div id="divContentPage" class="divcontentpagemargin">

                <div class="dashBoardLeftCont">
                    <div class="himssuHeader3WireBox">
                        <table>
                            <tr>
                                <td>
                                    <div class="himsBoxContent">
                                        <div class="leftUlMenu">
                                            <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="174"
                                                Visible="true" runat="server" />
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="whiteboxpaddingleft">
                    <Library:LibraryControl ID="LibraryUserControl" runat="server" Visible="true" />

                    <div class="himssuHeader1WireBox card card-box" id="DetailDiv" runat="server">
                        <div class="himsBoxHeader card-head">
                            <div class="leftdiv">
                            </div>
                            <div class="himsBoxTitle">
                                <div class="headerText">
                                    <header>
                                        <i class="fas fa-book"></i>
                                        <asp:Label ID="LibraryAttendanceLabel" runat="server" Text="Library Attendance"></asp:Label>
                                    </header>
                                </div>
                            </div>

                        </div>
                        <div class="himsBoxContent card-body">

                            <div class="outerBox pTop5 col-md-3">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="OrganizationLabel" Text="Organization" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                </div>
                                <div class="fLeft pRight5">
                                    <asp:DropDownList ID="OrganizationDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                        onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList" CssClass="form-control" OnSelectedIndexChanged="OrganizationDropDownList_SelectedIndexChanged" AutoPostBack="true">
                                    </asp:DropDownList>
                                </div>
                            </div>

                            <div class="outerBox pTop5 col-md-3">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="ClsLabel" Text="Class" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                </div>
                                <div class="fLeft pRight5">
                                    <asp:DropDownList ID="ClsDropDownList" runat="server" onmouseleave="showHideTooltip()" OnSelectedIndexChanged="ClsDropDownList_SelectedIndexChanged" AutoPostBack="true"
                                        onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList" CssClass="form-control">
                                    </asp:DropDownList>
                                </div>
                            </div>


                            <div class="outerBox pTop5 col-md-3">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="DivisionLabel" Text="Division" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                </div>
                                <div class="fLeft pRight5">
                                    <asp:DropDownList ID="DivisionDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                        onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList" CssClass="form-control" OnSelectedIndexChanged="DivisionDropDownList_SelectedIndexChanged">
                                    </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="InTimeLabel" runat="server" Text="In Time" SkinID="MandatoryLabel"></asp:Label>
                                </div>
                                <div class="fLeft pRight5">
                                    <timePicker:TimeSelector ID="InTimeSelector" runat="server" DisplaySeconds="False"
                                        SelectedTimeFormat="Twelve" AmPm="AM" Date="" Hour="0" Minute="0" Visible="true"
                                        Second="0" meta:resourcekey="ActivityStartTimeSelectorResource1" CssClass="timepicker" />
                                </div>
                            </div>
                            <div class="outerBox pTop5 col-md-3">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="OutTimeLabel" runat="server" Text="Out Time"></asp:Label>
                                </div>
                                <div class="fLeft pRight5">
                                    <timePicker:TimeSelector ID="OutTimeSelector" runat="server" DisplaySeconds="False"
                                        SelectedTimeFormat="Twelve" AmPm="AM" Date="" Hour="0" Minute="0" Visible="true"
                                        Second="0" meta:resourcekey="ActivityStartTimeSelectorResource1" CssClass="timepicker" />
                                </div>
                            </div>

                            <input type="hidden" id="dtp_input1" value="" />


                            <div class="outerBox pTop5 col-md-3" visible="false" style="display: none">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="RemarkLabel" Text="Remark" runat="server" Visible="false"></asp:Label>
                                </div>
                                <div class="fLeft pRight5">
                                    <asp:TextBox ID="RemarkTextBox" runat="server" onmouseleave="showHideTooltip()" SkinID="MultiLineTextBox"
                                        onmouseenter="showHideTooltip()" MaxLength="200" TextMode="MultiLine" Visible="false"></asp:TextBox>
                                </div>
                            </div>

                            <div class="outerBox pTop5 col-md-3" visible="false" style="display: none">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="SUIdLabel" runat="server" Text="SU Id" Visible="false"></asp:Label>
                                </div>
                                <div class="fLeft pRight5">
                                    <asp:TextBox ID="SUIdTextBox" runat="server" SkinID="CustomWidthTextBox" Visible="false"
                                        AutoPostBack="true" MaxLength="50" OnTextChanged="SUIdTextBox_TextChanged" Enabled="false"></asp:TextBox>
                                </div>
                            </div>

                            <div class="outerBox pTop5 col-md-3" visible="false" style="display: none">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="SourceTypeLabel" runat="server" Text="Type" SkinID="MandatoryLabel" Visible="false"></asp:Label>
                                </div>
                                <div class="fLeft pRight5">
                                    <asp:DropDownList runat="server" ID="SourceTypeDropDownList" SkinID="CustomWidthDropDownList"
                                        CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" Visible="false"
                                        AutoPostBack="true" OnSelectedIndexChanged="SourceTypeDropDownList_SelectedIndexChanged">
                                        <asp:ListItem Text="- Select -" Value="0"></asp:ListItem>
                                        <asp:ListItem Text="Student" Value="2003" Selected="True"></asp:ListItem>
                                        <asp:ListItem Text="Employee" Value="95"></asp:ListItem>
                                        <asp:ListItem Text="Other" Value="1"></asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                            </div>

                            <asp:Panel ID="StudentSearchPanel" runat="server" Visible="false" Style="display: none">
                                <div class="outerBox pTop5 col-md-3">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="StudentIdNoLabel" runat="server" Text="ID No" SkinID="MandatoryLabel" Visible="false"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:TextBox ID="StudentIdNoTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                            SkinID="CustomWidthTextBox" runat="server" MaxLength="200" AutoPostBack="true" Visible="false"
                                            OnTextChanged="StudentIdNoTextBox_TextChanged">
                                        </asp:TextBox>
                                        <asp:ImageButton SkinID="FindImage" ToolTip="Student Search" ID="StudentIdNoImageButton" Visible="false"
                                            runat="server" />
                                        <asp:HiddenField ID="IdHiddenField" runat="server" />
                                        <asp:HiddenField ID="StudentIdHiddenField" runat="server" />
                                        <asp:HiddenField ID="MaxRowHiddenField" runat="server" />
                                    </div>
                                </div>
                                <div class="outerBox pTop5 col-md-3">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="StudentNameLabel" runat="server" Text="Name" Visible="false"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:TextBox ID="StudentNameTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" Visible="false"
                                            SkinID="CustomWidthTextBox" runat="server" MaxLength="200"> </asp:TextBox>
                                    </div>
                                </div>
                                <div class="outerBox pTop5 col-md-3">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="ClassLabel" runat="server" Text="Class" Visible="false"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:TextBox ID="ClassTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" Visible="false"
                                            SkinID="CustomWidthTextBox" runat="server" MaxLength="200"> </asp:TextBox>
                                    </div>
                                </div>
                            </asp:Panel>

                            <asp:Panel ID="EmployeeSearchPanel" runat="server" Visible="false" Style="display: none">
                                <div class="outerBox pTop5 col-md-3">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="EmployeeIdNoLabel" runat="server" Text="Code" SkinID="MandatoryLabel" Visible="false"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:TextBox ID="EmployeeIdNoTextBox" SkinID="CustomWidthTextBox" runat="server" Visible="false"
                                            MaxLength="200" AutoPostBack="true" OnTextChanged="EmployeeIdNoTextBox_TextChanged">
                                        </asp:TextBox>
                                        <asp:ImageButton SkinID="FindImage" ToolTip="Employee Search" ID="EmployeeIdNoImageButton"
                                            runat="server" />
                                    </div>
                                </div>
                                <div class="outerBox pTop5 col-md-3">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="EmployeeNameLabel" runat="server" Text="Name" Visible="false"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:TextBox ID="EmployeeNameTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" Visible="false"
                                            SkinID="CustomWidthTextBox" runat="server" MaxLength="200"> </asp:TextBox>
                                    </div>
                                </div>
                                <div class="outerBox pTop5 col-md-3" visible="false">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="DepartmentLabel" runat="server" Text="Department"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:TextBox ID="DepartmentTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                            SkinID="CustomWidthTextBox" runat="server" MaxLength="200"> </asp:TextBox>
                                    </div>
                                </div>
                            </asp:Panel>

                            <div id="GuestDiv" runat="server" class="outerBox pTop5 col-md-3" visible="false">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="GuestNameLabel" runat="server" Text="Guest Name" SkinID="MandatoryLabel"></asp:Label>
                                </div>
                                <div class="fLeft pRight5">
                                    <asp:TextBox ID="GuestNameTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                        SkinID="CustomWidthTextBox" runat="server" MaxLength="200"> </asp:TextBox>
                                </div>
                            </div>


                            <div class="alignCenter pTop15 col-md-12">
                                <asp:Button ID="SearchButton" runat="server" Text="&#xf002; Search" SkinID="0" CssClass="btn btn-search fas" OnClick=" SearchButton_Click" />
                                <asp:Button ID="InTimeButton" runat="server" Text="&#xf2f6; In" SkinID="0" CssClass="btn btn-in fas" OnClick="InTimeButton_Click" />

                                <asp:Button ID="OutTimeButton" runat="server" Text="&#xf2f5; Out" SkinID="0" CssClass="btn btn-out fas" OnClick="OutTimeButton_Click" />
                                <asp:Button ID="Clear_Button" runat="server" Text="&#xf12d; Clear" SkinID="0" CssClass="btn btn-clear fas" OnClick="ClearButton_Click" />
                                <asp:Button ID="AddOutTimeButton" runat="server" Text="&#xf2f5; Out" OnClick="AddOutTimeButton_Click"
                                    SkinID="0" CssClass="fas btn btn-out" Visible="false" />
                                <asp:Button ID="ExportButton" runat="server" Text="&#xf093; Export" OnClick="ExportButton_Click"
                                    SkinID="0" class="btn-examcommon btn fas" />
                            </div>

                            <div class="himsBoxContent col-md-12 pTop15 table-responsive">
                                <asp:GridView ID="GridView1" runat="server" CssClass="table table-striped table-bordered table-hover " DataKeyNames="Id" AutoGenerateColumns="false"
                                    OnRowDataBound="GridView1_RowDataBound">
                                    <Columns>
                                        <asp:TemplateField ItemStyle-Width="2%"
                                            HeaderStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                            <HeaderTemplate>
                                                <label class="rt-chkbox rt-chkbox-single rt-chkbox-outline">
                                                    <asp:CheckBox ID="HeaderSelectCheckBox" runat="server" OnCheckedChanged="HeaderSelectCheckBox_Click" AutoPostBack="true" />
                                                    <span></span>
                                                </label>
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <label class="rt-chkbox rt-chkbox-single rt-chkbox-outline">
                                                    <asp:CheckBox ID="SelectCheckBox" runat="server" Checked='<%#Convert.ToBoolean(Eval("Checked")) %>' />
                                                    <span></span>
                                                </label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="SUId" ItemStyle-Width="15%" HeaderStyle-HorizontalAlign="Left">
                                            <ItemTemplate>
                                                <asp:Label runat="server" Text='<%#((System.Data.DataRowView)Container.DataItem)["SUId"] %>' ID="SUIDLable"></asp:Label>
                                            </ItemTemplate>

                                        </asp:TemplateField>

                                        <asp:BoundField DataField="Code" ItemStyle-Width="15%" HeaderStyle-HorizontalAlign="Left" />
                                        <asp:BoundField HeaderText="Name" DataField="Name" ItemStyle-Width="15%" HeaderStyle-HorizontalAlign="Left" />
                                        <asp:BoundField HeaderText="Attendance Date" DataField="AttendanceDate" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="5%" HeaderStyle-HorizontalAlign="Left" />
                                        <asp:BoundField HeaderText="InTime" DataField="InTime" ItemStyle-Width="5%" HeaderStyle-HorizontalAlign="Left" />
                                        <asp:TemplateField ItemStyle-Width="5%"
                                            HeaderStyle-HorizontalAlign="Left" ItemStyle-Wrap="true" HeaderText="OutTime">
                                            <ItemTemplate>
                                                <asp:Label ID="TimeLabel" runat="server" Text='<%#((System.Data.DataRowView)Container.DataItem)["OutTime"] %>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField ItemStyle-Width="5%"
                                            HeaderStyle-HorizontalAlign="Left" ItemStyle-Wrap="true" HeaderText="Remark">
                                            <ItemTemplate>
                                                <asp:TextBox ID="RemarkForTextBox" runat="server" onmouseleave="showHideTooltip()" SkinID="MultiLineTextBox"
                                                    onmouseenter="showHideTooltip()" MaxLength="200" class="form-control" TextMode="MultiLine" Text='<%#((System.Data.DataRowView)Container.DataItem)["Remark"] %>'
                                                    Height="40PX"></asp:TextBox>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                </asp:GridView>
                            </div>

                        </div>
                    </div>
                </div>

            </div>

        </ContentTemplate>
    </asp:UpdatePanel>

    <%--<script data-main="../../JavaScript/rjs/encrypt/library-attendance-encrypt" src="../../JavaScript/rjs/require.js"></script>--%>

    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/library-attendance")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>



</asp:Content>
