<%@ page title="" language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_Hrm_Employee_WorkingDays, App_Web_ag3r0auy" 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">

    <asp:UpdatePanel ID="OTQueueListingUpdatePanel" runat="server">
        <ContentTemplate>
            <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="whiteboxpaddingleft row">
                    <div class="himssuHeader1WireBox card card-box">
                        <div class="himsBoxHeader card-head">
                            <div class="leftdiv">
                            </div>
                            <div class="himsBoxTitle">
                                <div class="headerText">
                                    <header>
                                        <i class="fas fa-search"></i>
                                        <asp:Label ID="Label1" runat="server" Text="Search"></asp:Label>
                                    </header>
                                    </header>
                                </div>
                            </div>
                        </div>
                        <div class="himsBoxContent card-body padd-0">
                            <asp:Panel ID="Panel3" runat="Server">
                                <div class="contentHolder">
                                    <div class="tableContainer">
                                        <cc1:TabContainer ID="WaokingDayTabContainer" runat="server"
                                            CssClass="ajax__myTab nav nav-tabs tabs-style-iconbox ajax__tab_container ajax__tab_default" AutoPostBack="true" meta:resourcekey="AssignOptionalFeeTabContainerResource1"
                                            ActiveTabIndex="0">
                                            <cc1:TabPanel ID="SetWorkingDays" runat="server" HeaderText="Set Working Days">
                                                <HeaderTemplate>
                                                    <ul class="nav nav-tabs tabs-style-iconboxinner ajaxnavtabs">
                                                        <li class="fancyTab"><a><i class="fas fa-money-bill-alt"></i>&nbsp;Set Working Days </a></li>
                                                    </ul>
                                                </HeaderTemplate>
                                                <ContentTemplate>
                                                    <div class="contentHolder">
                                                        <div class="himssuHeader1WireBox">
                                                            <asp:Panel ID="DetailPanel" runat="server">
                                                                <div class="contentHolder">

                                                                    <div class="himsBoxContent card-body">
                                                                        <asp:Panel ID="Panel1" runat="Server">
                                                                            <div class="contentHolder">
                                                                                <div class="cBoth">
                                                                                </div>
                                                                                <div class="outerBox pTop5 col-md-3">
                                                                                    <div class="controlLabelWidth">
                                                                                        <asp:Label ID="EmployeeLabel" runat="server" Text="Employee Grade" SkinID="MandatoryLabel">
                                                                                        </asp:Label>
                                                                                    </div>
                                                                                    <div class="fLeft pRight5">
                                                                                        <asp:DropDownList runat="server" ID="EmployeeGradeDropDownList" SkinID="CustomWidthDropDownList"
                                                                                            onmouseleave="showHideTooltip()" CssClass="form-control" onmouseenter="showHideTooltip()"
                                                                                            AutoPostBack="true" OnSelectedIndexChanged="EmployeeGradeDropDownList_SelectedIndexChanged">
                                                                                        </asp:DropDownList>
                                                                                    </div>
                                                                                </div>
                                                                                <div class="cBoth">
                                                                                </div>
                                                                                <br />
                                                                                <div id="Div1" class="himssuHeader7WireBox col-md-12" runat="server" visible="false" style="width: 100%; height: 100%">
                                                                                    <div class="himsBoxContent">
                                                                                        <div id="Div4" runat="server" class="table-responsive">
                                                                                            <asp:GridView ID="WorkingDaysGridView" runat="server" Width="100%" AutoGenerateColumns="False"
                                                                                                EmptyDataText="No Records Found !!" AllowPaging="false" OnRowDataBound="WorkingDaysGridView_RowDataBound"
                                                                                                ShowHeader="true" DataKeyNames="ForMonth,ForYear,ForMonthInWord"
                                                                                                CssClass="table table-striped table-bordered table-hover">
                                                                                                <Columns>
                                                                                                    <asp:BoundField DataField="ForMonthInWord" HeaderText="For Month" ItemStyle-Width="10%"
                                                                                                        HeaderStyle-HorizontalAlign="Left"></asp:BoundField>
                                                                                                    <asp:BoundField DataField="ForYear" HeaderText="For Year" ItemStyle-Width="10%"
                                                                                                        HeaderStyle-HorizontalAlign="Left"></asp:BoundField>
                                                                                                    <asp:TemplateField HeaderText="Month Total Days" HeaderStyle-HorizontalAlign="Left">
                                                                                                        <ItemStyle HorizontalAlign="Left" />
                                                                                                        <ItemTemplate>
                                                                                                            <asp:Label ID="TotalDaysLable" runat="server" Text='<%# Bind("TotalDays")%>'></asp:Label>
                                                                                                        </ItemTemplate>
                                                                                                    </asp:TemplateField>
                                                                                                    <asp:TemplateField HeaderText="Vacation Days" HeaderStyle-HorizontalAlign="Left">
                                                                                                        <ItemStyle HorizontalAlign="Left" />
                                                                                                        <ItemTemplate>
                                                                                                            <asp:TextBox ID="VacationDaysTextBox" runat="server" onkeypress="return isNumberKey(event);"
                                                                                                                OnTextChanged="CalculateWorkingDays" AutoPostBack="true"
                                                                                                                Width="150px" SkinID="CustomwidthTextBox" Text='<%# Bind("VacationDays")%>'></asp:TextBox>
                                                                                                        </ItemTemplate>
                                                                                                    </asp:TemplateField>
                                                                                                    <asp:TemplateField HeaderText="WeekOffs" HeaderStyle-HorizontalAlign="Left">
                                                                                                        <ItemStyle HorizontalAlign="Left" />
                                                                                                        <ItemTemplate>
                                                                                                            <asp:TextBox ID="SundaysTextBox" runat="server" onkeypress="return isNumberKey(event);" OnTextChanged="CalculateWorkingDays" AutoPostBack="true"
                                                                                                                Width="150px" SkinID="CustomwidthTextBox" Text='<%# Bind("Sundays")%>'></asp:TextBox>
                                                                                                        </ItemTemplate>
                                                                                                    </asp:TemplateField>
                                                                                                    <asp:TemplateField HeaderText="Holidays" HeaderStyle-HorizontalAlign="Left">
                                                                                                        <ItemStyle HorizontalAlign="Left" />
                                                                                                        <ItemTemplate>
                                                                                                            <asp:TextBox ID="HoliDaysTextBox" runat="server" onkeypress="return isNumberKey(event);" OnTextChanged="CalculateWorkingDays" AutoPostBack="true"
                                                                                                                Width="150px" SkinID="CustomwidthTextBox" Text='<%# Bind("HoliDays")%>'></asp:TextBox>
                                                                                                        </ItemTemplate>
                                                                                                    </asp:TemplateField>
                                                                                                    <asp:TemplateField HeaderText="Month Working Days" HeaderStyle-HorizontalAlign="Left">
                                                                                                        <ItemStyle HorizontalAlign="Left" />
                                                                                                        <ItemTemplate>
                                                                                                            <asp:TextBox ID="WorkingDaysTextBox" runat="server" onkeypress="return isNumberKey(event);" Enabled="false"
                                                                                                                Width="150px" SkinID="CustomwidthTextBox" Text='<%# Bind("WorkingDay")%>'></asp:TextBox>
                                                                                                        </ItemTemplate>
                                                                                                    </asp:TemplateField>
                                                                                                </Columns>
                                                                                                <PagerSettings Visible="False" />
                                                                                            </asp:GridView>
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                        </asp:Panel>
                                                                    </div>
                                                                </div>
                                                            </asp:Panel>
                                                        </div>
                                                    </div>
                                                </ContentTemplate>
                                            </cc1:TabPanel>

                                            <cc1:TabPanel ID="SetEmployeeWorkingDays" runat="server" HeaderText="Set Employee Working Days">
                                                <HeaderTemplate>
                                                    <ul class="nav nav-tabs tabs-style-iconboxinner ajaxnavtabs">
                                                        <li class="fancyTab"><a><i class="fas fa-money-bill-alt"></i>&nbsp;Set Employee Working Days </a></li>
                                                    </ul>
                                                </HeaderTemplate>
                                                <ContentTemplate>
                                                    <div class="contentHolder">
                                                        <div class="himssuHeader1WireBox">
                                                            <asp:Panel ID="Panel2" runat="server">
                                                                <div class="contentHolder">
                                                                    <div class="himsBoxContent card-body">
                                                                        <asp:Panel ID="Panel4" runat="Server">
                                                                            <div class="contentHolder">
                                                                                <div class="cBoth">
                                                                                </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()" OnSelectedIndexChanged="ForMonthDropDownList_OnSelectedIndexChanged"
                                                                                            AutoPostBack="true">
                                                                                        </asp:DropDownList>
                                                                                    </div>
                                                                                </div>
                                                                                <div class="outerBox pTop5 col-md-3">
                                                                                    <div class="controlLabelWidth">
                                                                                        <asp:Label ID="Label2" runat="server" Text="Employee Grade">
                                                                                        </asp:Label>
                                                                                    </div>
                                                                                    <div class="fLeft pRight5">
                                                                                        <asp:DropDownList runat="server" ID="EmployeeGradeDropDownList1" SkinID="CustomWidthDropDownList"
                                                                                            onmouseleave="showHideTooltip()" CssClass="form-control" onmouseenter="showHideTooltip()"
                                                                                            AutoPostBack="true" OnSelectedIndexChanged="EmployeeGradeDropDownList1_OnSelectedIndexChanged">
                                                                                        </asp:DropDownList>
                                                                                    </div>
                                                                                </div>
                                                                                <div class="outerBox pTop5 col-md-3" style="padding-bottom: 10px">
                                                                                    <div class="controlLabelWidth">
                                                                                        <asp:Label ID="Label3" runat="server" Text="Employee"></asp:Label>
                                                                                    </div>
                                                                                    <div class="fLeft pRight5">
                                                                                        <asp:DropDownList runat="server" ID="EmployeeDropDownList" SkinID="CustomWidthDropDownList"
                                                                                            CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                                                            AutoPostBack="true">
                                                                                        </asp:DropDownList>
                                                                                    </div>
                                                                                </div>
                                                                                <div class="cBoth">
                                                                                </div>
                                                                                <br />
                                                                                <div class="alignCenter col-md-12 pTop15 pb5">

                                                                                    <asp:Button ID="SearchButton" runat="Server" OnClick="SearchButton1_Click" Text="&#xf002; Search" SkinID="0" CssClass="btn-search btn fas" />
                                                                                    <asp:Button ID="ClearButton" runat="server" Text="&#xf0e2; Reset" OnClick="ClearSearchControls_Click"
                                                                                        meta:resourcekey="ClearButtonResource1" SkinID="0" CssClass="btn-reset btn fas" />
                                                                                    <asp:Button ID="HolidayFromEventButton" Enabled="false" OnClick="HolidayFromEventButton_Click" runat="Server" Text="&#xf073; Holiday From Event" SkinID="0" CssClass="btn btn-assign fas" />

                                                                                </div>
                                                                                <div class="himsBoxHeader card-head inner" id="GridViewPagerDiv" runat="server">
                                                                                    <div class="leftdiv">
                                                                                    </div>
                                                                                    <div class="himsBoxTitle">

                                                                                        <div class="headerText fRight display-flex">
                                                                                            <asp:DropDownList ID="ApplyDropDownList" runat="server" AutoPostBack="True" CssClass="form-control" SkinID="CustomWidthDropDownList" Visible="false">
                                                                                            </asp:DropDownList>&nbsp;&nbsp;&nbsp;&nbsp;
                                                                                <asp:TextBox ID="ApplyTextBox" runat="server" SkinID="CustomWidthTextBox" Width="60px" CssClass="pTop10" Visible="false"></asp:TextBox>
                                                                                            &nbsp;&nbsp;&nbsp;     
                                                                    <asp:Button ID="ApplyButton" runat="server" SkinID="0"
                                                                        Text="Apply All"
                                                                        CssClass="btn btn-apply" OnClick="ApplyButton_Click" Visible="false" />
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                                <div id="Div2" class="himssuHeader7WireBox col-md-12" runat="server" visible="false" style="width: 100%; height: 100%">
                                                                                    <div class="himsBoxContent col-md-12">
                                                                                        <div id="Div3" runat="server" class="table-responsive">

                                                                                            <asp:GridView ID="SetEmployeeWorkingDayGridView" runat="server" Width="100%" AutoGenerateColumns="False"
                                                                                                EmptyDataText="No Records Found !!" AllowPaging="false" OnRowDataBound="SetEmployeeWorkingDayGridView_RowDataBound"
                                                                                                ShowHeader="true" DataKeyNames="EmployeeId,WeekOffs,Holidays"
                                                                                                CssClass="table table-striped table-bordered table-hover">
                                                                                                <Columns>
                                                                                                    <asp:TemplateField HeaderText="Select">
                                                                                                        <HeaderTemplate>
                                                                                                            <label class="rt-chkbox rt-chkbox-outline">
                                                                                                                <asp:CheckBox ID="HeaderSelectCheckBox2" runat="server" AutoPostBack="true" OnCheckedChanged="HeaderSelectCheckBox_checked" />
                                                                                                                <span></span>
                                                                                                            </label>
                                                                                                        </HeaderTemplate>
                                                                                                        <HeaderStyle HorizontalAlign="Center" />
                                                                                                        <ItemStyle HorizontalAlign="Center" Width="10%" Wrap="True" />
                                                                                                        <ItemTemplate>
                                                                                                            <label class="rt-chkbox rt-chkbox-outline">
                                                                                                                <asp:CheckBox ID="SelectCheckBox2" runat="server" />
                                                                                                                <span></span>
                                                                                                            </label>
                                                                                                        </ItemTemplate>
                                                                                                    </asp:TemplateField>
                                                                                                    <asp:BoundField DataField="EmployeeId" HeaderText="EmployeeId" Visible="false">
                                                                                                        <ItemStyle Width="15%" />
                                                                                                    </asp:BoundField>
                                                                                                    <asp:BoundField DataField="Code" HeaderText="Employee Code" ItemStyle-Width="10%"
                                                                                                        HeaderStyle-HorizontalAlign="Left"></asp:BoundField>
                                                                                                    <asp:BoundField DataField="Name" HeaderText="Employee Name" ItemStyle-Width="10%"
                                                                                                        HeaderStyle-HorizontalAlign="Left"></asp:BoundField>
                                                                                                    <asp:BoundField DataField="EmployeeGradeTitle" HeaderText="Employee Grade" ItemStyle-Width="10%"
                                                                                                        HeaderStyle-HorizontalAlign="Left"></asp:BoundField>

                                                                                                    <asp:TemplateField HeaderText="Total Days" HeaderStyle-HorizontalAlign="Left">
                                                                                                        <ItemStyle HorizontalAlign="Left" />
                                                                                                        <ItemTemplate>
                                                                                                            <asp:Label ID="TotalDaysLable" runat="server" Text='<%# Bind("TotalDays")%>'></asp:Label>
                                                                                                        </ItemTemplate>
                                                                                                    </asp:TemplateField>
                                                                                                    <asp:TemplateField HeaderText="Vacation Days" HeaderStyle-HorizontalAlign="Left">
                                                                                                        <ItemStyle HorizontalAlign="Left" />
                                                                                                        <ItemTemplate>
                                                                                                            <asp:TextBox ID="VacationDaysTextBox" runat="server" onkeypress="return isNumberKey(event);"
                                                                                                                AutoPostBack="true"
                                                                                                                Width="150px" SkinID="CustomwidthTextBox" Text='<%# Bind("VacationDays")%>' OnTextChanged="CalculateWorkingDays"></asp:TextBox>
                                                                                                        </ItemTemplate>
                                                                                                    </asp:TemplateField>
                                                                                                    <asp:TemplateField HeaderText="WeekOffs" HeaderStyle-HorizontalAlign="Left">
                                                                                                        <ItemStyle HorizontalAlign="Left" />
                                                                                                        <ItemTemplate>
                                                                                                            <asp:TextBox ID="SundaysTextBox" runat="server" onkeypress="return isNumberKey(event);" OnTextChanged="CalculateWorkingDays" AutoPostBack="true"
                                                                                                                Width="150px" SkinID="CustomwidthTextBox" Text='<%# Bind("WeekOffs")%>'></asp:TextBox>
                                                                                                        </ItemTemplate>
                                                                                                    </asp:TemplateField>
                                                                                                    <asp:TemplateField HeaderText="Holidays" HeaderStyle-HorizontalAlign="Left">
                                                                                                        <ItemStyle HorizontalAlign="Left" />
                                                                                                        <ItemTemplate>
                                                                                                            <asp:TextBox ID="HoliDaysTextBox" runat="server" onkeypress="return isNumberKey(event);" OnTextChanged="CalculateWorkingDays" AutoPostBack="true"
                                                                                                                Width="150px" SkinID="CustomwidthTextBox" Text='<%# Bind("HoliDays")%>'></asp:TextBox>
                                                                                                        </ItemTemplate>
                                                                                                    </asp:TemplateField>
                                                                                                    <asp:TemplateField HeaderText="Month Working Days" HeaderStyle-HorizontalAlign="Left">
                                                                                                        <ItemStyle HorizontalAlign="Left" />
                                                                                                        <ItemTemplate>
                                                                                                            <asp:TextBox ID="WorkingDaysTextBox" runat="server" Enabled="false"
                                                                                                                Width="150px" SkinID="CustomwidthTextBox" Text='<%# Bind("WorkingDay")%>'></asp:TextBox>
                                                                                                        </ItemTemplate>
                                                                                                    </asp:TemplateField>
                                                                                                </Columns>
                                                                                                <PagerSettings Visible="False" />
                                                                                            </asp:GridView>
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                        </asp:Panel>
                                                                    </div>

                                                                </div>
                                                            </asp:Panel>
                                                        </div>
                                                    </div>
                                                </ContentTemplate>

                                            </cc1:TabPanel>

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