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

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<%@ Register Src="~/UserControls/GridViewPager/GridViewPager.ascx" TagName="GridViewPager" TagPrefix="uc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/UserControls/Common/ScreenGroup/ScreenGroup.ascx" TagName="ScreenGroupControl" TagPrefix="ScreenGroup" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <style type="text/css">
        input:disabled + input[type=image], input:read-only + a {
            pointer-events: visible;
            cursor: pointer !important;
        }
    </style>
    <%--<link href="../../../App_Themes/responsiv-popup.css" rel="stylesheet" />
    <div id="dvTestLoadingmsg" class="hls-wrap">
        <div class="hls-container">
            <div class="hls-content">
                <div class="dsh-syndicate white-popup" style="display: inline-block; width: 119%; height: 150px">
                    <div class="shippingcard" style="text-align: center; vertical-align: middle; width: 100%;">
                        <span id="spn1msg">Loading Details</span><br>
                        <span style="line-height: 2;" id="spn2msg"><b>Please Wait ...</b></span><br>
                        <span id="spnloadingimgOPD">
                            <img src="../../../Images/Loading1.gif" /></span>
                    </div>
                </div>
            </div>
        </div>
    </div>--%>
    <asp:UpdatePanel ID="MonthlyRegisterUpdatePanel" runat="server">
        <ContentTemplate>
            <style>
                .apply {
                    height: 2.0rem !important;
                }
            </style>
            <div id="divContentPage" class="divcontentpagemargin">

                <div class="dashBoardLeftCont" valign="top">
                    <div class="himssuHeader3WireBox">
                        <table width="0px" cellpadding="0" cellspacing="0">
                            <tr>
                                <td>
                                    <div class="himsBoxContent">
                                        <div class="leftUlMenu">
                                            <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="163"
                                                Visible="true" runat="server" />
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="row whiteboxpaddingleft">
                    <div class="himssuHeader2WireBox">
                        <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-edit"></i>
                                            <asp:Label ID="Label1" runat="server" Text="Monthly Attendance"></asp:Label>
                                        </header>
                                    </div>
                                </div>
                                <div class="fRight mt-27 pagination display-flex">
                                    <asp:Button ID="BackButton" runat="Server" SkinID="0" CssClass="btn btn-back fas" Text="&#xf30a;  back" OnClick="BackButton_Click" Visible="false" />
                                </div>
                            </div>
                            <div class="himsBoxContent card-body">

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

                                <div class="outerBox pTop5 col-md-3" style="padding-bottom: 10px">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="ForYearLabel" runat="server" Text="For Year" SkinID="MandatoryLabel"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:DropDownList runat="server" ID="ForYearDropDownList" SkinID="CustomWidthDropDownList"
                                            CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                            AutoPostBack="true" OnSelectedIndexChanged="ForYearDropDownList_OnSelectedIndexChanged">
                                        </asp:DropDownList>
                                    </div>
                                </div>
                                <div class="outerBox pTop5 col-md-3" style="padding-bottom: 10px">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="ForMonthLabel" runat="server" Text="For Month" SkinID="MandatoryLabel"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:DropDownList runat="server" ID="ForMonthDropDownList" SkinID="CustomWidthDropDownList"
                                            CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                            AutoPostBack="true" OnSelectedIndexChanged="ForMonthDropDownList_OnSelectedIndexChanged">
                                        </asp:DropDownList>
                                    </div>
                                </div>
                                <div class="outerBox pTop5 col-md-3" style="padding-bottom: 10px">
                                    <div class="controlLabelWidth">
                                        <br />
                                        <asp:CheckBox ID="IsDetailCheckBox" runat="server" Enabled="false" Text="With Details" AutoPostBack="true" OnCheckedChanged="IsDetailCheckBox_CheckedChanged"></asp:CheckBox>
                                    </div>
                                </div>

                                <div class="cBoth"></div>
                                <div class="alignCenter col-md-12 pTop5">
                                    <%--Add for 29619 mantis--%>
                                    <asp:Button ID="SearchFromWorkingDaysButton" runat="server" Text="&#xf002; Search From Working Days" OnClick="SearchFromWorkingDaysButton_Click" SkinID="0" CssClass="btn btn-search fas" />
                                    <asp:Button ID="SearchFromEmpWorkingDaysButton" runat="server" Text="&#xf002; Search From Emp Working Days" OnClick="SearchFromEmpWorkingDaysButton_Click" SkinID="0" CssClass="btn btn-search fas" />
                                    <asp:Button ID="ExportButton" runat="server" Text="&#xf093; Export" OnClick="ExportButton_Click" SkinID="0" CssClass="btn btn-examcommon fas" />
                                    <a href="javascript:;" onclick="OpenFileUpload();" class="btn btn-browser">
                                        <i class="fa fa-arrow-down"></i>Browse</a>
                                    <asp:FileUpload ID="flUpload" runat="server" onChange="readURL(this);" ClientIDMode="Static" Style="display: none;" />
                                    <asp:Button ID="ImportFromExcelButton" runat="server" Text="&#xf019; Import From Excel"
                                        meta:resourcekey="ImportButtonResource1" SkinID="0" CssClass="btn btn-examcommon fas" OnClick="ImportFromExcelButton_Click" />
                                    <asp:Button ID="ImportButton" runat="server" Text="&#xf019; Import From Leaves" OnClick="ImportButton_Click"
                                        meta:resourcekey="ImportButtonResource1" SkinID="0" CssClass="btn btn-examcommon fas" />
                                    <asp:Button ID="ExportAllButton" runat="server" Text="&#xf093; Export All" OnClick="ExportAllButton_Click" SkinID="0" CssClass="btn btn-examcommon fas" />
                                    <asp:Button ID="ApplyRuleButton" runat="server" Text="&#xf093; Apply Rule" OnClick="ApplyRuleButton_Click" SkinID="0" CssClass="btn btn-examcommon fas" />
                                </div>
                                <div class="outerBox pTop5 col-md-12">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="Label2" runat="server" Text="" Style="padding-left: 10px; font-size: medium;"></asp:Label>
                                    </div>
                                </div>
                                <div id="Div1" class="himssuHeader7WireBox col-md-12 " runat="server" visible="false">
                                    <div class="headerText fRight display-flex pTop10" runat="server" id="DivApply" visible="false" style="margin-bottom: 10px;">
                                        <asp:DropDownList ID="ApplyDropDownList" runat="server" SkinID="CustomWidthDropDownList" CssClass="form-control" AutoPostBack="true" OnSelectedIndexChanged="ApplyDropDownList_SelectedIndexChanged"></asp:DropDownList>
                                        &nbsp;&nbsp;&nbsp;
                                        <asp:TextBox ID="ApplyTextBox" CssClass="apply" runat="server" SkinID="CustomWidthTextBox"></asp:TextBox>
                                        &nbsp;&nbsp;&nbsp;
                                        <asp:Button ID="ApplyButton" runat="server" SkinID="0" Text="Apply All" OnClick="ApplyButton_Click" CssClass="btn btn-apply fas" />
                                    </div>
                                    <div class="himsBoxHeader" id="GridViewPagerDiv" runat="server" visible="false">
                                    </div>
                                    <div class="himsBoxContent pTop15">
                                        <div id="Div4" runat="server" class="table-responsive">
                                            <asp:GridView ID="MonthlyAttendanceGridView" runat="server" Width="100%" AutoGenerateColumns="False"
                                                EmptyDataText="No Records Found !!" AllowPaging="false" ShowHeader="true" DataKeyNames="EmployeeId,TotalDays"
                                                CssClass="table table-striped table-bordered table-hover">
                                                <Columns>
                                                    <asp:TemplateField HeaderStyle-HorizontalAlign="Center">
                                                        <HeaderTemplate>
                                                            <label class="rt-chkbox rt-chkbox-outline">
                                                                <asp:CheckBox ID="HeaderSelectCheckBox" OnCheckedChanged="HeaderSelectCheckBox_OnCheckedChanged" runat="server" AutoPostBack="True" />
                                                                <span></span>
                                                            </label>
                                                        </HeaderTemplate>
                                                        <ItemStyle HorizontalAlign="Center" />
                                                        <ItemTemplate>
                                                            <label class="rt-chkbox rt-chkbox-outline">
                                                                <asp:CheckBox ID="SelectCheckBox" runat="server" AutoPostBack="true" OnCheckedChanged="SelectCheckBox_Checked" />
                                                                <span></span>
                                                            </label>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderStyle-HorizontalAlign="Center" HeaderText="Code">
                                                        <ItemTemplate>
                                                            <asp:Label ID="EmployeeCodeLabel" runat="server" Text='<%#Eval("Employeecode") %>'></asp:Label>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderStyle-HorizontalAlign="Center" HeaderText="Name">
                                                        <ItemTemplate>
                                                            <asp:Label ID="EmployeeNameLabel" runat="server" Text='<%#Eval("EmployeeName") %>'></asp:Label>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderStyle-HorizontalAlign="Center" HeaderText="Grade">
                                                        <ItemTemplate>
                                                            <asp:Label ID="EmployeeGradeLabel" runat="server" Text='<%#Eval("EmployeeGrade") %>'></asp:Label>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderStyle-HorizontalAlign="Center" HeaderText="Date Of Joining">
                                                        <ItemTemplate>
                                                            <asp:Label ID="DateOfJoiningLabel" runat="server" Text='<%#Eval("DateOfJoining") %>'></asp:Label>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderStyle-HorizontalAlign="Center" HeaderText="Date Of Leaving">
                                                        <ItemTemplate>
                                                            <asp:Label ID="DateOfLeavingLabel" runat="server" Text='<%#Eval("DateOfLeaving") %>'></asp:Label>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderStyle-HorizontalAlign="Center" HeaderText="Total Days">
                                                        <ItemTemplate>
                                                            <asp:Label ID="TotalDaysLabel" runat="server" Text='<%#Eval("TotalDays") %>'></asp:Label>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Working Days" ItemStyle-Wrap="true"
                                                        HeaderStyle-HorizontalAlign="Left">
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="WorkingDaysTextBox" runat="server" ClientIDMode="Static" Text='<%# Bind("WorkingDays") %>'
                                                                onkeypress="javascript:return isNumberKey(this)" SkinID="CustomWidthTextBox" Enabled="false">
                                                            </asp:TextBox>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Payroll Days" ItemStyle-Wrap="true"
                                                        HeaderStyle-HorizontalAlign="Left">
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="PayrollDaysTextBox" runat="server" ClientIDMode="Static" Text='<%# Bind("PayrollDays") %>'
                                                                onkeypress="javascript:return isNumberKey(this)"
                                                                SkinID="CustomWidthTextBox" ReadOnly="true">
                                                            </asp:TextBox>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Present Days" ItemStyle-Wrap="true"
                                                        HeaderStyle-HorizontalAlign="Left">
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="PresentCountTextBox" runat="server" ClientIDMode="Static" Text='<%# Bind("PresentDays") %>'
                                                                onkeypress="javascript:return isNumberKey(this)"
                                                                SkinID="CustomWidthTextBox" ReadOnly="true">
                                                            </asp:TextBox>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Absent Days" ItemStyle-Wrap="true"
                                                        HeaderStyle-HorizontalAlign="Left">
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="AbsentCountTextBox" runat="server" ClientIDMode="Static" Text='<%# Bind("LWP") %>'
                                                                ReadOnly="true" onkeypress="javascript:return isNumberKey(this)" SkinID="CustomWidthTextBox">
                                                            </asp:TextBox>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Paid Leave" ItemStyle-Wrap="true"
                                                        HeaderStyle-HorizontalAlign="Left">
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="PaidLeaveTextBox" runat="server" ClientIDMode="Static" Text='<%# Bind("PaidLeave") %>'
                                                                onkeypress="javascript:return isNumberKey(this)" SkinID="CustomWidthTextBox" Enabled="false">
                                                            </asp:TextBox>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="UnPaid Days + UnPaid Leave (LWP)" ItemStyle-Wrap="true"
                                                        HeaderStyle-HorizontalAlign="Left"> <%-- Mentis-0031337 --%>
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="UnPaidLeaveTextBox" runat="server" ClientIDMode="Static" Text='<%# Bind("UnPaidLeave") %>'
                                                                onkeypress="javascript:return isNumberKey(this)" SkinID="CustomWidthTextBox" Enabled="false">
                                                            </asp:TextBox>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderStyle-HorizontalAlign="Center" HeaderText="Late Count">
                                                        <ItemTemplate>
                                                            <asp:Label ID="LateCountLabel" runat="server" Text='<%#Eval("LateCount") %>'></asp:Label>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderStyle-HorizontalAlign="Center" HeaderText="Late Deduction Days">
                                                        <ItemTemplate>
                                                            <asp:Label ID="LateDeductionDaysLabel" runat="server" Text='<%#Eval("LateDeductionDays") %>'></asp:Label>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderStyle-HorizontalAlign="Center" HeaderText="Sandwich Deduction Days">
                                                        <ItemTemplate>
                                                            <asp:Label ID="SandwichDeductionDaysLabel" runat="server" Text='<%#Eval("SandwichDeductionDays") %>'></asp:Label>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                </Columns>
                                                <PagerSettings Visible="False" />
                                            </asp:GridView>
                                        </div>
                                    </div>
                                </div>

                            </div>
                        </div>
                    </div>
                    <div class="spacer">
                        <asp:Image ID="Image4" runat="server" ImageUrl="~/Images/spacer.gif" />
                    </div>
                </div>
            </div>

            <div class="spacer">
                <img src="../../../Images/spacer.gif" />
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <%--<script data-main="../../../JavaScript/rjs/monthly-attendence" src="../../../JavaScript/rjs/require.js"></script>--%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/monthly-attendence")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
</asp:Content>
