<%@ page language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_Hrm_Employee_TimeSheetList, App_Web_eiesolok" uiculture="auto" 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" %>
<%@ Register Assembly="TimePicker" Namespace="MKB.TimePicker" TagPrefix="timePicker" %>
<%@ Register Src="~/UserControls/Common/CommonSearch/CommonSearch.ascx" TagName="CommonSearchUserControl"
    TagPrefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <asp:UpdatePanel ID="ResonMasterUpdatePanel" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <uc2:CommonSearchUserControl ID="CommonSearchControl" 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="166"
                                                Visible="true" runat="server" />
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="whiteboxpaddingleft row">
                    <div class="himssuHeader5WireBox card card-box" id="SearchDiv" runat="server">
                        <div class="himsBoxHeader card-head">
                            <asp:Panel ID="TopPanel" runat="server">

                                <div class="himsBoxTitle">
                                    <div class="headerText">
                                        <header>
                                            <i class="fas fa-search"></i>
                                            <asp:Label ID="headerTextLabel" runat="server" Text="Search"></asp:Label>
                                        </header>
                                    </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>
                            </asp:Panel>
                        </div>
                        <asp:Panel ID="DetailPanel" runat="Server">
                            <div class="himsBoxContent card-body">
                                <div class="contentHolder">
                                    <asp:Panel ID="PanelSearch" runat="server">


                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="OrganizationGrpSearchLabel" runat="server" Text="Org Group Department"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:DropDownList runat="server" ID="OrgGrpDepDropDownList" SkinID="CustomWidthDropDownList"
                                                    CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()">
                                                </asp:DropDownList>
                                            </div>
                                        </div>

                                        <div class="outerBox11 col-md-3 pTop5">
                                            <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"
                                                    CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()">
                                                </asp:DropDownList>
                                            </div>
                                        </div>

                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="SearchEmployeeCodeLabel" runat="server" Text="Employee Code"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5 display-flex">
                                                <asp:TextBox ID="SearchEmployeeCodeTextBox" SkinID="CustomWidthTextBox"
                                                    runat="server" MaxLength="100" AutoPostBack="true" OnTextChanged="SearchEmployeeCodeTextBox_TextChanged"> </asp:TextBox>
                                                <asp:ImageButton SkinID="FindImage" ToolTip="Search" ID="SearchEmployeeCodeImageButton"
                                                    runat="server" OnClick="SearchEmployeeCodeImageButton_Click" ImageUrl="../../../../Images/icons/icon_find.gif" />
                                                <asp:HiddenField ID="SearchEmployeeIdHiddenField" runat="server" />
                                            </div>
                                        </div>
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="SearchEmployeeNameLabel" runat="server" Text="Employee Name"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:TextBox ID="SearchEmployeeNameTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                    SkinID="CustomWidthTextBox" runat="server" MaxLength="100"> </asp:TextBox>
                                            </div>
                                        </div>


                                        <div class="cBoth"></div>
                                        <br />



                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="EmployeeStatusLabel" runat="server" Text="Employee Status"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:DropDownList runat="server" ID="EmployeeStatusDropDownList" SkinID="CustomWidthDropDownList"
                                                    CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()">
                                                </asp:DropDownList>
                                            </div>
                                        </div>

                                        <div class="outerBox pTop5 col-md-3" style="padding-top: 0px">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="SearchFromDateLabel2" runat="server" Text="From Date" SkinID="MandatoryLabel"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <Date:DatePickerControl DisplayDatePicker="true" ID="SearchFromDatePickerControl2"
                                                    runat="server" />
                                            </div>
                                        </div>
                                        <div class="outerBox pTop5 col-md-3" style="padding-top: 0px">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="SearchToDateLabel3" runat="server" Text="To Date" SkinID="MandatoryLabel"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <Date:DatePickerControl DisplayDatePicker="true" ID="SearchToDatePickerControl3"
                                                    runat="server" />
                                            </div>
                                        </div>

                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="StatusLabel" runat="server" Text="TimeSheet Status" SkinID="0"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:DropDownList ID="StatusDropDownList" runat="server" CssClass="form-control" AutoPostBack="false">
                                                    <asp:ListItem Text="- ALL -" Value="0"></asp:ListItem>
                                                    <asp:ListItem Text="Present" Value="P"></asp:ListItem>
                                                    <asp:ListItem Text="Absent" Value="A"></asp:ListItem>
                                                    <asp:ListItem Text="Half Day" Value="HD"></asp:ListItem>
                                                    <asp:ListItem Text="Error Case" Value="E"></asp:ListItem>
                                                    <asp:ListItem Text="Holiday" Value="H"></asp:ListItem>
                                                    <asp:ListItem Text="Not Applicable" Value="XX"></asp:ListItem>
                                                    <asp:ListItem Text="Less Hours" Value="LH"></asp:ListItem>
                                                    <asp:ListItem Text="Present On WeekOff Holiday" Value="PH"></asp:ListItem>
                                                    <asp:ListItem Text="Week Offs" Value="W"></asp:ListItem>
                                                </asp:DropDownList>
                                            </div>
                                        </div>

                                        <div class="outerBox pTop5 col-md-3" id="AllowanceCalculateCheckBoxDiv" runat="server">
                                            <div class="fLeft pRight5">
                                                <asp:CheckBox ID="AllowanceCalculateCheckBox" runat="server" Text="Allowance Calculate"
                                                    AutoPostBack="true" OnCheckedChanged="AllowanceCalculateCheckBox_CheckedChanged"
                                                    Visible="false" />
                                            </div>
                                        </div>

                                        <div id="AllowanceCalculateDiv" runat="server" visible="false">
                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="BaseAmountLabel" runat="server" Text="Base Amount"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:TextBox ID="BaseAmountTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                        SkinID="CustomWidthTextBox" runat="server" MaxLength="9" onkeypress="return isNumberKey(event)"> </asp:TextBox>
                                                </div>
                                            </div>
                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="ResultLabel" runat="server" Text="" Font-Bold="true" ForeColor="Red"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:Button ID="CalculateButton" runat="server" Text="Calculate" OnClick="CalculateButton_Click" />
                                                </div>
                                            </div>
                                        </div>

                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="fLeft pRight5">
                                                <asp:CheckBox ID="IsLeaveEntryCheckBox" runat="server" Text="Leave Status" />
                                            </div>
                                        </div>
                                        <%--Mantis Start - 0031989 --%>
                                        <div class="outerBox col-md-12">
                                            <div class="alert alert-info">
                                                <span class="pTop15">
                                                    <i class="material-icons pos-rel">info</i> |&nbsp;
                                                <b>Note: </b>Employee date of joining must be added for timesheet list data.
                                                </span>
                                            </div>
                                        </div>
                                        <%--Mantis End - 0031989 --%>

                                        <br />
                                        <div class="alignCenter col-md-12 center">
                                            <asp:Button ID="SearchButton" Text="&#xf002; Search" TabIndex="3" runat="Server" SkinID="0"
                                                class="btn-search btn fas" OnClick="SearchButton_Click" />
                                            <asp:Button ID="ExportButton" runat="server" Text="&#xf093; Export" OnClick="ExportButton_Click" SkinID="0" CssClass="btn-examcommon btn fas" />
                                            <asp:Button ID="ResetButton" runat="server" TabIndex="4" Text="&#xf0e2; Reset" OnClick="ResetButton_Click"
                                                SkinID="0" class="btn-reset btn fas" />
                                            <asp:Button ID="SyncESSLCloudDataButton" runat="server" Text="&#xf093; Sync ESSL Cloud Data" OnClick="SyncESSLCloudDataButton_Click" SkinID="0" CssClass="btn-examcommon btn fas" />

                                        </div>
                                        <br />
                                    </asp:Panel>
                                    <div id="CsrBenefiteMasterGridDiv" runat="server" visible="false">
                                        <div class="himssuHeader7WireBox col-md-12" id="PatientRelationDiv"
                                            runat="server">
                                            <div class="himsBoxContent card-body">
                                                <div class="StatusCountDiv" runat="server" visible="true">
                                                    <asp:Label ID="HtmlStringLabel" runat="server"></asp:Label>
                                                </div>
                                                <div id="EmployeeDetaildiv" runat="server" visible="false">
                                                    <div class="outerBox pTop5 col-md-3">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="EmployeeNameLabel" runat="server" Text="EmployeeName" Font-Bold="true"
                                                                Visible="true"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <asp:Label runat="server" ID="EmployeeNameTLabel" Visible="true"></asp:Label>
                                                        </div>
                                                    </div>
                                                    <div class="outerBox pTop5 col-md-3">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="PresentLabel" runat="server" Text="Present" Font-Bold="true" Visible="true"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <asp:Label runat="server" ID="PresentTLabel" Visible="true"></asp:Label>
                                                        </div>
                                                    </div>
                                                    <div class="outerBox pTop5 col-md-3">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="AbsentLabel" runat="server" Text="Absent" Font-Bold="true" Visible="true"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <asp:Label runat="server" ID="AbsentTLabel" Visible="true"></asp:Label>
                                                        </div>
                                                    </div>
                                                    <div class="outerBox pTop5 col-md-3">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="WeekOffLabel" runat="server" Text="Week Off" Font-Bold="true" Visible="true"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <asp:Label runat="server" ID="WeekOffTLabel" Visible="true"></asp:Label>
                                                        </div>
                                                    </div>
                                                    <div class="outerBox pTop5 col-md-3">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="HolidayLabel" runat="server" Text="Holiday" Font-Bold="true" Visible="true"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <asp:Label runat="server" ID="HolidayTLabel" Visible="true"></asp:Label>
                                                        </div>
                                                    </div>
                                                    <div class="outerBox pTop5 col-md-3">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="LeaveLabel" runat="server" Text="Leave" Font-Bold="true" Visible="true"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <asp:Label runat="server" ID="LeaveTLabel" Visible="true"></asp:Label>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <asp:UpdatePanel ID="MenuPlanDetailUpdatePanel" runat="server" UpdateMode="Always">
                                                <ContentTemplate>
                                                    <div class="table-responsive">
                                                        <asp:GridView ID="LeaveMasterGridView" OnRowDataBound="LeaveMasterGridView_RowDataBound"
                                                            OnPageIndexChanging="LeaveMasterGridView_PageIndexChanging" runat="server" AutoGenerateColumns="False"
                                                            Width="100%" AllowPaging="false" DataKeyNames="Id,EmployeeId,LeaveStatus,EmployeeTravel,EmployeeLateStatusId,Status,LeavePendingStatus"
                                                            PagerSettings-Visible="false" EmptyDataText="No records available for the search criteria"
                                                            ShowHeader="True" CssClass="table table-striped table-bordered table-hover">
                                                            <Columns>
                                                                <asp:BoundField HeaderText="Date" DataField="Attn_Date" DataFormatString="{0:d}"
                                                                    HeaderStyle-HorizontalAlign="Left">
                                                                    <ItemStyle Width="10%" />
                                                                </asp:BoundField>
                                                                <asp:BoundField HeaderText="Org Group Department" DataField="Organization Group Department" HeaderStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
                                                                <asp:BoundField HeaderText="Code" DataField="EmpCode" HeaderStyle-HorizontalAlign="Left">
                                                                    <ItemStyle Width="8%" />
                                                                </asp:BoundField>
                                                                <asp:BoundField HeaderText="EmpName" DataField="ShortName" HeaderStyle-HorizontalAlign="Left">
                                                                    <ItemStyle Width="20%" />
                                                                </asp:BoundField>
                                                                <asp:BoundField HeaderText="Shift" DataField="ShiftName" HeaderStyle-HorizontalAlign="Left">
                                                                    <ItemStyle Width="8%" />
                                                                </asp:BoundField>
                                                                <asp:BoundField HeaderText="FirstIn" DataField="FirstIn" HeaderStyle-HorizontalAlign="Left">
                                                                    <ItemStyle Width="6%" />
                                                                </asp:BoundField>
                                                                <asp:BoundField HeaderText="LastOut" DataField="LastOut" HeaderStyle-HorizontalAlign="Left">
                                                                    <ItemStyle Width="6%" />
                                                                </asp:BoundField>
                                                                <asp:BoundField HeaderText="LateBy" DataField="LateBy" HeaderStyle-HorizontalAlign="Left">
                                                                    <ItemStyle Width="6%" />
                                                                </asp:BoundField>
                                                                <asp:BoundField HeaderText="Earlyby" DataField="EarlyBy" HeaderStyle-HorizontalAlign="Left">
                                                                    <ItemStyle Width="6%" />
                                                                </asp:BoundField>
                                                                <asp:BoundField HeaderText="OverTime" DataField="OverTime" HeaderStyle-HorizontalAlign="Left">
                                                                    <ItemStyle Width="6%" />
                                                                </asp:BoundField>
                                                                <asp:BoundField HeaderText="Duration" DataField="Duration" HeaderStyle-HorizontalAlign="Left">
                                                                    <ItemStyle Width="6%" />
                                                                </asp:BoundField>
                                                                <asp:BoundField HeaderText="TimeSheet Status" DataField="PresentStatus" HeaderStyle-HorizontalAlign="Left">
                                                                    <ItemStyle Width="6%" />
                                                                </asp:BoundField>
                                                                <asp:TemplateField HeaderText=" Leave Status" ItemStyle-Width="10%" ItemStyle-Wrap="true"
                                                                    HeaderStyle-HorizontalAlign="Left">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="LeaveStatusLabel" runat="server" Text='<%# Bind("LeaveStatus") %>'>' </asp:Label>
                                                                        <asp:LinkButton ID="LeaveEntryLinkButton" SkinID="CustomWidthLabel" runat="server"
                                                                            OnClick="LeaveEntryLinkButton_Click" Visible="false"></asp:LinkButton>
                                                                        <asp:LinkButton ID="AllowanceLinkButton" SkinID="CustomWidthLabel" runat="server"
                                                                            Text="Allowance" OnClick="AllowanceLinkButton_Click" Visible="false"></asp:LinkButton>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                            </Columns>
                                                        </asp:GridView>
                                                    </div>
                                                </ContentTemplate>
                                            </asp:UpdatePanel>
                                            <asp:Label Font-Bold="true" ID="WeekOffsTitleLabel" Text="W : Week Offs :" runat="server"
                                                Visible="true"></asp:Label>
                                            <asp:Label runat="server" ID="WeekOffsColorLabel" Height="6px" Width="26px" BorderColor="Black"
                                                BackColor="Cyan" Visible="true" BorderWidth="1px"></asp:Label>
                                            <asp:Label Font-Bold="true" ID="AbsentTitleLabel" Text="A : Absent :" runat="server"
                                                Visible="true"></asp:Label>
                                            <asp:Label runat="server" ID="AbsentcolorLabel" Height="6px" Width="26px" BorderColor="Black"
                                                BackColor="red" Visible="true" BorderWidth="1px"></asp:Label>
                                            <asp:Label Font-Bold="true" ID="ErrorTitleLabel" runat="server" Text="E : ErrorCase"
                                                runat="server"></asp:Label>
                                            <asp:Label runat="server" ID="ErrorColorLabel" Height="6px" Width="26px" BorderColor="Black"
                                                BackColor="LightCoral" Visible="true" BorderWidth="1px"></asp:Label>
                                            <asp:Label ID="HolidayTitleLabel" runat="server" Text="H : Holiday" Font-Bold="true"></asp:Label>
                                            <asp:Label runat="server" ID="HolidayColorLabel" Height="6px" Width="26px" BorderColor="Black"
                                                BackColor="LightSalmon" Visible="true" BorderWidth="1px"></asp:Label>
                                            <asp:Label ID="LessHoursTitleLabel" runat="server" Text="LH : LessHours" Font-Bold="true"></asp:Label>
                                            <asp:Label runat="server" ID="LessHoursColorLabel" Height="6px" Width="26px" BorderColor="Black"
                                                BackColor="LightPink" Visible="true" BorderWidth="1px"></asp:Label>
                                            <asp:Label ID="HalfDayTitleLabel" runat="server" Text="HD : Half Day" Font-Bold="true"></asp:Label>&nbsp;&nbsp;
                                                        <asp:Label runat="server" ID="HalfDayColorLabel" Height="6px" Width="26px" BorderColor="Black"
                                                            BackColor="LightSeaGreen" Visible="true" BorderWidth="1px"></asp:Label>
                                            <asp:Label ID="NotApplicableTitleLabel" runat="server" Text="XX : NotApplicable"
                                                Font-Bold="true"></asp:Label>&nbsp;&nbsp;
                                                        <asp:Label runat="server" ID="NotApplicableColorLabel" Height="6px" Width="26px"
                                                            BorderColor="Black" BackColor="LightGray" Visible="true" BorderWidth="1px"></asp:Label>
                                            <asp:Label ID="PresentOnWeekOffHolidayTitleLabel" runat="server" Text="PH/PW : PresentOnWeekOffHoliday"
                                                Font-Bold="true"></asp:Label>
                                            <asp:Label runat="server" ID="PresentOnWeekOffHolidayColorLabel" Height="6px" Width="26px"
                                                BorderColor="Black" BackColor="GreenYellow" Visible="true" BorderWidth="1px"></asp:Label>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </asp:Panel>
                    </div>
                </div>

            </div>
            </div>
         
        </ContentTemplate>
    </asp:UpdatePanel>
    <script type="text/javascript">
        function isNumberKey(evt) {
            var charCode = (evt.which) ? evt.which : event.keyCode;
            if (charCode > 31 && (charCode < 48 || charCode > 57))
                return false;
            return true;
        }
    </script>
    <%--  <script data-main="../../../JavaScript/rjs/encrypt/leave-encrypt" src="../../../JavaScript/rjs/require.js"></script>--%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/leave")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
</asp:Content>
