<%@ page language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_Components_Biometric_ShiftMaster, App_Web_fo2mhtxy" title="Shift Master" 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/Common/EmployeeSearch/EmployeeSearch.ascx" TagName="EmployeeSearchControl" TagPrefix="hims" %>
<%@ Register Src="~/UserControls/DatePicker/DatePickerControl.ascx" TagName="DatePickerControl" TagPrefix="Date" %>
<%@ Register Assembly="TimePicker" Namespace="MKB.TimePicker" TagPrefix="timePicker" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <asp:UpdatePanel ID="ResonMasterUpdatePanel" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <hims:EmployeeSearchControl ID="EmployeeSearch" Visible="false" runat="server" />
            <div id="divContentPage">
                <div>
                    <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="166"
                                                Visible="true" runat="server" />
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>

                    <div class="whiteboxpaddingleft row">
                        <div class="himssuHeader2WireBox card card-box" id="SearchDiv" runat="server">
                            <div class="himsBoxHeader card-head">
                                <asp:Panel ID="Panel1" runat="server">
                                    <div class="leftdiv">
                                    </div>
                                    <div class="himsBoxTitle">

                                        <div class="headerText">
                                            <header>
                                                <i class="fas fa-search"></i>
                                                <asp:Label ID="Label3" runat="server" Text="Search"></asp:Label>
                                            </header>

                                        </div>
                                        <div class="fRight mt-27">
                                            <asp:Button ID="AddNewButtonID" runat="server" SkinID="0"
                                                CssClass="btn btn-add fas" Text="&#xf067; Add" OnClick="AddNewButtonID_Click" />
                                        </div>
                                    </div>
                                </asp:Panel>
                            </div>
                            <div class="himsBoxContent card-body padd-0">
                                <asp:Panel ID="DetailPanel" runat="Server">
                                    <div class="contentHolder">
                                        <asp:Panel ID="SearchCriteriaPanel" runat="Server">
                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="ShiftCodeSearchLabel" Text="Shift Code" runat="server"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:TextBox ID="ShiftCodeSearchTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                        SkinID="CustomWidthTextBox" onkeypress="NumberOnly()" runat="Server"></asp:TextBox>
                                                </div>
                                            </div>
                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="ShiftNameSearchLabel" Text="Shift Name" runat="server"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:TextBox ID="ShiftNameSearchTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                        SkinID="CustomWidthTextBox" runat="Server" MaxLength="50"></asp:TextBox>
                                                </div>
                                            </div>

                                            <div class="alignCenter pTop5 col-md-12 pb5">
                                                <asp:Button ID="SearchButton" Text="&#xf002; Search" runat="Server" OnClick="SearchButton_Click" SkinID="0" CssClass="btn btn-search fas" />
                                                <asp:Button ID="ResetButton" runat="server" Text="&#xf021; Reset" OnClick="ResetButton_Click" SkinID="0" CssClass="btn btn-reset fas" />
                                            </div>
                                            <div class="cBoth">
                                            </div>
                                        </asp:Panel>

                                        <div id="Div1" class="himssuHeader1WireBox col-md-12 padd-0" runat="server">
                                            <div id="ReasonMasterDetailDiv" visible="false" runat="server">

                                                <div id="PatientRelationDiv" visible="false" runat="server">
                                                    <div class="leftdiv">
                                                    </div>
                                                    <div class="himsBoxTitle">
                                                        <div class="fRight mt-27">
                                                            <uc1:GridViewPager ID="ShiftMasterGridView_GridViewPager" runat="server" OnFirstRecordClick="ShiftMasterGridView_GridViewPager_FirstRecordClick"
                                                                OnLastRecordClick="ShiftMasterGridView_GridViewPager_LastRecordClick" OnNextRecordClick="ShiftMasterGridView_GridViewPager_NextRecordClick"
                                                                OnPrevRecordClick="ShiftMasterGridView_GridViewPager_PrevRecordClick"
                                                                ParentGridView="ShiftMasterGridView" />
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="himsBoxContent table-responsive">
                                                    <asp:UpdatePanel ID="MenuPlanDetailUpdatePanel" runat="server" UpdateMode="Always">
                                                        <ContentTemplate>
                                                            <div id="Div5" runat="server" visible="false">
                                                                <asp:GridView ID="ShiftMasterGridView" runat="server" Width="100%" AutoGenerateColumns="False"
                                                                    OnRowDataBound="ShiftMasterGridView_RowDataBound" OnPageIndexChanging="ShiftMasterGridView_PageIndexChanging"
                                                                    AllowPaging="true" PageSize="5" SkinID="" ShowHeader="True" PagerSettings-Visible="false"
                                                                    CssClass="table table-striped table-bordered" DataKeyNames="ShiftCode" EmptyDataText="No Records Found!!!">
                                                                    <Columns>
                                                                        <asp:TemplateField ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true">
                                                                            <ItemTemplate>
                                                                                <asp:LinkButton ID="EditLinkButton" runat="server" CommandName="Select" OnClick="LinkButton_Click"
                                                                                    Text="Select" CausesValidation="false"></asp:LinkButton>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>

                                                                        <asp:TemplateField HeaderText="Shift Code" ItemStyle-Width="15%" SortExpression="Title" HeaderStyle-HorizontalAlign="Left"
                                                                            ItemStyle-Wrap="true">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="ShiftCodeLabel" runat="server" Text='<%# Bind("ShiftCode") %>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Shift Name" ItemStyle-Width="15%" SortExpression="Title" HeaderStyle-HorizontalAlign="Left"
                                                                            ItemStyle-Wrap="true">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="ShiftNameLabel" runat="server" Text='<%# Bind("ShiftName") %>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Start Time" ItemStyle-Width="10%" SortExpression="Title" HeaderStyle-HorizontalAlign="Left"
                                                                            ItemStyle-Wrap="true">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="StartTimeLabel" runat="server" Text='<%# Bind("StartTime","{0:hh:mm tt}") %>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="End Time" ItemStyle-Width="10%" SortExpression="Title" HeaderStyle-HorizontalAlign="Left"
                                                                            ItemStyle-Wrap="true">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="EndTimeLabel" runat="server" Text='<%# Bind("EndTime","{0:hh:mm tt}") %>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Grace Before" ItemStyle-Width="15%" SortExpression="Title" HeaderStyle-HorizontalAlign="Left"
                                                                            ItemStyle-Wrap="true">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="GraceBeforeLabel" runat="server" Text='<%# Bind("GraceBefore") %>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Grace After" ItemStyle-Width="15%" SortExpression="Title" HeaderStyle-HorizontalAlign="Left"
                                                                            ItemStyle-Wrap="true">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="GraceAfterLabel" runat="server" Text='<%# Bind("GraceAfter") %>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                    </Columns>
                                                                </asp:GridView>
                                                            </div>
                                                        </ContentTemplate>
                                                    </asp:UpdatePanel>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </asp:Panel>
                            </div>
                        </div>

                        <div class="himssuHeader1WireBox  card card-box" id="DetailDiv" runat="server">
                            <div class="himsBoxHeader card-head">
                                <div class="leftdiv">
                                </div>
                                <div class="himsBoxTitle">
                                    <div class="headerText">
                                        <header>
                                            <i class="fas fa-cog"></i>
                                            <asp:Label ID="ShiftMasterDetailLabel" runat="server" Text="Shift Master"></asp:Label>
                                        </header>
                                    </div>
                                    <div class="fRight pagination mt-27">
                                <table>
                                    <tr>
                                        <td class="formLabel">
                                            <div id="NumberOfRecordDiv" class="display-flex" runat="server" visible="true">
                                                <asp:LinkButton AlternateText="First page" ToolTip="First page" ID="FirstRecordImageButton"
                                                    runat="server" ImageUrl="~/Images/arrowLlast.gif" CommandName="Page" CommandArgument="First"
                                                    OnClick="FirstRecordImageButton_Click" CssClass="btn btn-default gridviewpagerbuttonpadding">
                                                                <i class="fa fa-fast-backward"></i>
                                                </asp:LinkButton>
                                                <asp:LinkButton AlternateText="Previous page" ToolTip="Previous page" ID="PreviousImageButton"
                                                    runat="server" ImageUrl="~/Images/arrowLeft.gif" CommandName="Page" CommandArgument="Prev"
                                                    OnClick="PreviousImageButton_Click" CssClass="btn btn-default gridviewpagerbuttonpadding">
                                                                <i class="fa fa-play fa-rotate-180"></i>
                                                </asp:LinkButton>
                                                &nbsp;&nbsp;
                                                            <asp:Label ID="LabelPage" runat="server" Text="Record " AssociatedControlID="ReCordNumber" />
                                                <asp:Label ID="ReCordNumber" Font-Bold="true" SkinID="Dummy" runat="server"></asp:Label>
                                                <asp:Label ID="ofLabel" Text="of" runat="server" />
                                                <asp:Label ID="TotalRecord" runat="server" />
                                                &nbsp;&nbsp;
                                                            <asp:LinkButton AlternateText="Next page" ToolTip="Next page" ID="NextImageButtom"
                                                                runat="server" ImageUrl="~/Images/arrowRight.gif" CommandName="Page" CommandArgument="Next"
                                                                OnClick="NextImageButtom_Click" CssClass="btn btn-default gridviewpagerbuttonpadding">
                                                                <i class="fa fa-play"></i>
                                                            </asp:LinkButton>
                                                <asp:LinkButton AlternateText="Last page" ToolTip="Last page" ID="LastRecordImageButton"
                                                    runat="server" ImageUrl="~/Images/arrowRLast.gif" CommandName="Page" CommandArgument="Last"
                                                    OnClick="LastRecordImageButton_Click" CssClass="btn btn-default gridviewpagerbuttonpadding">
                                                                <i class="fa fa-fast-forward"></i>
                                                </asp:LinkButton>
                                            </div>
                                        </td>
                                        <td>&nbsp;&nbsp;<asp:Button ID="BackButton" runat="Server" OnClick="BackButton_Click" SkinID="0"
                                            class="btn btn-back fas" Text="&#xf30a; Back" />
                                        </td>
                                    </tr>
                                </table>
                            </div>
                                </div>
                            </div>
                            <div class="himsBoxContent card-body">
                                <div class="contentHolder">
                                    <div class="outerBox pTop5 col-md-3" runat="server" visible="false">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="ShiftCodeLabel" runat="server" Text="Shift Code" SkinID="MandatoryLabel"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="ShiftCodeTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                runat="server" onkeypress="NumberOnly()" MaxLength="10" AutoPostBack="false" SkinID="CustomWidthTextbox"></asp:TextBox>
                                        </div>
                                    </div>

                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="ShiftNameLabel" runat="server" Text="Shift Name" SkinID="MandatoryLabel"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="ShiftNameTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                runat="server" MaxLength="100" AutoPostBack="false" SkinID="CustomWidthTextbox"></asp:TextBox>
                                            <asp:HiddenField ID="IdHiddenField" runat="server" />
                                        </div>
                                    </div>

                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="StartTimeLabel" runat="server" Text="Start Time" SkinID="MandatoryLabel"></asp:Label>
                                        </div>
                                        <div>
                                            <timePicker:TimeSelector ID="StartTimeSelector" runat="server" DisplaySeconds="False"
                                                SelectedTimeFormat="Twelve" AmPm="AM" Date="" Hour="0" Minute="0"
                                                Second="0" meta:resourcekey="ActivityStartTimeSelectorResource1" CssClass="timepicker" />
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="EndTimeLabel" runat="server" Text="End Time" SkinID="MandatoryLabel"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <timePicker:TimeSelector ID="EndTimeSelector" runat="server" DisplaySeconds="False"
                                                SelectedTimeFormat="Twelve" AmPm="AM" Date="" Hour="0" Minute="0"
                                                Second="0" meta:resourcekey="ActivityStartTimeSelectorResource1" CssClass="timepicker" />
                                        </div>
                                    </div>

                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="GraceBeforeLabel" runat="server" Text="Grace Before"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="GraceBeforeTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                runat="server" AutoPostBack="false" SkinID="CustomWidthTextbox"
                                                onkeypress="NumberOnly()"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="GraceAfterLabel" runat="server" Text="Grace After"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="GraceAfterTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                runat="server" AutoPostBack="false" SkinID="CustomWidthTextbox"
                                                onkeypress="NumberOnly()"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="ShiftDurationLabel" runat="server" Text="Shift Duration"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="ShiftDurationTextBox" runat="server" MaxLength="100" AutoPostBack="false" SkinID="CustomWidthTextbox" Enabled="false"></asp:TextBox>
                                            <cc1:MaskedEditExtender ID="MaskedEditExtender2" TargetControlID="ShiftDurationTextBox"
                                                Mask="99:99"
                                                MaskType="Time"
                                                UserTimeFormat="TwentyFourHour"
                                                CultureName="en-us"
                                                MessageValidatorTip="true"
                                                ErrorTooltipEnabled="true"
                                                runat="server">
                                            </cc1:MaskedEditExtender>
                                        </div>
                                    </div>

                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="MinHrsHalfDayLabel" runat="server" Text="Min Hrs Half Day"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="MinHrsHalfDayTextBox" runat="server" AutoPostBack="false" SkinID="CustomWidthTextbox"></asp:TextBox>

                                            <cc1:MaskedEditExtender ID="MaskedEditExtender1" TargetControlID="MinHrsHalfDayTextBox"
                                                Mask="99:99"
                                                MaskType="Time"
                                                UserTimeFormat="TwentyFourHour"
                                                CultureName="en-us"
                                                MessageValidatorTip="true"
                                                ErrorTooltipEnabled="true"
                                                runat="server">
                                            </cc1:MaskedEditExtender>
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="MinHrsFullDayLabel" runat="server" Text="Min Hrs Full Day"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="MinHrsFullDayTextBox" runat="server" MaxLength="100" AutoPostBack="false" SkinID="CustomWidthTextbox"></asp:TextBox>
                                            <cc1:MaskedEditExtender ID="MaskedEditExtender3" TargetControlID="MinHrsFullDayTextBox"
                                                Mask="99:99"
                                                MaskType="Time"
                                                UserTimeFormat="TwentyFourHour"
                                                CultureName="en-us"
                                                MessageValidatorTip="true"
                                                ErrorTooltipEnabled="true"
                                                runat="server">
                                            </cc1:MaskedEditExtender>
                                        </div>
                                    </div>

                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="lblAlertGraceTime" runat="server" Text="Alert Grace Time"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="txtAlertGraceTime" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                runat="server" onkeypress="NumberOnly()" AutoPostBack="false" SkinID="CustomWidthTextbox"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="outerBox pTop15 col-md-6">
                                        <div class="controlLabelWidth col-md-6">
                                            <asp:CheckBox ID="chkoutTime" Text="Out Time Alert Time" runat="server" />
                                        </div>
                                        <div class="col-md-6">
                                            <timePicker:TimeSelector ID="txtoutTime" runat="server" DisplaySeconds="False"
                                                SelectedTimeFormat="Twelve" AmPm="AM" Date="" Hour="0" Minute="0"
                                                Second="0" meta:resourcekey="ActivityStartTimeSelectorResource1" CssClass="timepicker" />
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>

    <%--  <script data-main="../../../JavaScript/rjs/encrypt/shift-master-encrypt" src="../../../JavaScript/rjs/require.js"></script>--%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/shift-master")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
</asp:Content>
