<%@ page language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_Components_Biometric_BiometricShiftAllocation, App_Web_eiesolok" title="Shift Allocation" 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">
    <script type="text/javascript">
        function Confirm() {

            var confirm_value = document.getElementById("Abc");
            confirm_value.value = "";
            if (confirm("Do you want to Delete data?")) {
                confirm_value.value = "Yes";
            } else {
                confirm_value.value = "No";
            }
        }
    </script>
    <asp:UpdatePanel ID="ResonMasterUpdatePanel" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <hims:EmployeeSearchControl ID="EmployeeSearch" Visible="false" runat="server" />
            <div id="divContentPage">
                <div>
                    <input id="Abc" name="Abc" type="hidden" value="" />
                    <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>
                <div class="whiteboxpaddingleft row">
                    <div class="himssuHeader2WireBox card card-box">
                        <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="Shift Allocation"></asp:Label>
                                        </header>

                                    </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="Allocation for " runat="server"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:DropDownList ID="ddlAllocationfor" runat="server" onmouseleave="showHideTooltip()"
                                                    SkinID="CustomWidthDropDownList" CssClass="form-control"
                                                    onmouseenter="showHideTooltip()">
                                                </asp:DropDownList>
                                            </div>
                                        </div>

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

                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="Label1" Text="New Shift" runat="server"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:DropDownList ID="ddlShiftMaster" runat="server" onmouseleave="showHideTooltip()"
                                                    SkinID="CustomWidthDropDownList" CssClass="form-control"
                                                    onmouseenter="showHideTooltip()">
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                        <div class="cBoth">
                                        </div>
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:RadioButton ID="chkByDay" Text="By Day" AutoPostBack="true" OnCheckedChanged="chkByDay_CheckedChanged" GroupName="Type" runat="server" />
                                            </div>
                                        </div>
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:RadioButton ID="chkByDate" Text="By Date" AutoPostBack="true" OnCheckedChanged="chkByDate_CheckedChanged" GroupName="Type" runat="server" />
                                            </div>
                                        </div>
                                        <div class="outerBox pTop5 col-md-6">
                                            <div class="controlLabelWidth" id="Byday" runat="server">
                                                <asp:ListBox ID="DayListBox" SelectionMode="Multiple" CssClass="form-control" runat="server"></asp:ListBox>
                                            </div>
                                            <div class="controlLabelWidth" id="ByDate" runat="server">
                                                <div class="outerBox pTop5 col-md-3">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="SearchFromDateLabel" runat="server" Text="From Date" SkinID="MandatoryLabel"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <Date:DatePickerControl DisplayDatePicker="true" ID="FromDate" 
                                                            runat="server" />
                                                    </div>
                                                </div>
                                                <div class="outerBox pTop5 col-md-3">
                                                    <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="ToDate"
                                                            runat="server" />
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </asp:Panel>
                                    <div class="cBoth">
                                    </div>
                                    <br />
                                    <br />
                                    <div class="alignCenter pTop5 col-md-12 pb5">
                                        <asp:Button ID="btnDelete" runat="Server" CssClass="btn btn-info fas" OnClick="btnDelete_Click" OnClientClick="Confirm()" SkinID="0" Text="Delete" />
                                        <asp:Button ID="SearchButton" runat="Server" CssClass="btn btn-search" OnClick="SearchButton_Click" SkinID="0" Text="Search" />
                                    </div>
                                    <div id="Div1" class="himssuHeader6WireBox col-md-12 pTop15" runat="server">
                                        <div class="col-md-12 pTop15">
                                            <div class="himsBoxContent table-responsive ">
                                                <asp:GridView runat="server" ID="gdvEmployee" AutoGenerateColumns="False"
                                                    EmptyDataText="No records Found!!!" OnRowDataBound="gdvEmployee_RowDataBound" DataKeyNames="" AllowPaging="False"
                                                    ShowHeader="True" CssClass="table table-striped table-bordered">
                                                    <PagerSettings Visible="False" />
                                                    <Columns>
                                                        <asp:TemplateField HeaderText="Select" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="4%"
                                                            ItemStyle-Wrap="true">
                                                            <HeaderTemplate>
                                                                <label class="rt-chkbox rt-chkbox-outline">
                                                                    <asp:CheckBox ID="chkCheck" runat="server" OnCheckedChanged="HeaderSelectCheckBox_checked" AutoPostBack="true"  />
                                                                    <span></span>
                                                                </label>
                                                            </HeaderTemplate>
                                                            <ItemStyle HorizontalAlign="Center" />
                                                            <ItemTemplate>
                                                                <label class="rt-chkbox rt-chkbox-outline">
                                                                    <asp:CheckBox ID="SelectCheckBox" runat="server" />
                                                                    <span></span>
                                                                </label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="ID No" meta:resourcekey="TemplateFieldResource1">
                                                            <ItemTemplate>
                                                                <asp:Label ID="lblCode" runat="server" Text='<%# bind("Empid") %>' CssClass="boxEllips"></asp:Label>
                                                            </ItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Left" />
                                                            <ItemStyle HorizontalAlign="Left" Width="10%" />
                                                        </asp:TemplateField>

                                                        <asp:TemplateField HeaderText="Name" meta:resourcekey="TemplateFieldResource2">
                                                            <ItemTemplate>
                                                                <asp:Label ID="lblEmpName" runat="server" Text='<%# bind("EmpName") %>' CssClass="boxEllips"></asp:Label>
                                                            </ItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Left" />
                                                            <ItemStyle HorizontalAlign="Left" Width="30%" />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Current Shift" meta:resourcekey="TemplateFieldResource2">
                                                            <ItemTemplate>
                                                                <asp:Label ID="lblCurrentShift" runat="server" Text='<%# bind("Shift") %>' CssClass="boxEllips"></asp:Label>
                                                            </ItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Left" />
                                                            <ItemStyle HorizontalAlign="Left" Width="10%" />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="New Shift" meta:resourcekey="TemplateFieldResource2">
                                                            <ItemTemplate>
                                                                <asp:Label ID="lblNewShift" runat="server" Text='<%# bind("NewShift") %>' CssClass="boxEllips"></asp:Label>
                                                            </ItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Left" />
                                                            <ItemStyle HorizontalAlign="Left" Width="10%" />
                                                        </asp:TemplateField>
                                                       
                                                        <asp:TemplateField HeaderText="From Date" meta:resourcekey="TemplateFieldResource2">
                                                            <ItemTemplate>
                                                                <asp:Label ID="lblFromDate" runat="server" Text='<%# Convert.ToString(Eval("FromShiftDate")).Equals("01/01/1900 00:00:00")?"":Eval("FromShiftDate") %>' CssClass="boxEllips"></asp:Label>
                                                            </ItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Left" />
                                                            <ItemStyle HorizontalAlign="Left" Width="15%" />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="To Date" meta:resourcekey="TemplateFieldResource2">
                                                            <ItemTemplate>
                                                                <asp:Label ID="lbltoDate" runat="server" Text='<%# Convert.ToString(Eval("ToShiftDate")).Equals("01/01/1900 00:00:00")?"":Eval("ToShiftDate") %>' CssClass="boxEllips"></asp:Label>
                                                            </ItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Left" />
                                                            <ItemStyle HorizontalAlign="Left" Width="15%" />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Day" meta:resourcekey="TemplateFieldResource2">
                                                            <ItemTemplate>
                                                                <%--<asp:Label ID="lblDay" runat="server" Text='<%# bind("Day") %>' CssClass="boxEllips"></asp:Label>--%>
                                                                <asp:Label ID="lblDay" runat="server" Text='<%# bind("AllocateFor") %>' CssClass="boxEllips"></asp:Label>
                                                            </ItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Left" />
                                                            <ItemStyle HorizontalAlign="Left" Width="30%" />
                                                        </asp:TemplateField>
                                                         <asp:TemplateField HeaderText="ShiftCode" meta:resourcekey="TemplateFieldResource2" Visible="false">
                                                            <ItemTemplate>
                                                                <asp:Label ID="lblShiftCode" runat="server" Text='<%# bind("ShiftCode") %>' CssClass="boxEllips"></asp:Label>
                                                            </ItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Left" />
                                                            <ItemStyle HorizontalAlign="Left" Width="10%" />
                                                        </asp:TemplateField>
                                                    </Columns>
                                                    <PagerSettings Visible="False" />
                                                </asp:GridView>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </asp:Panel>
                        </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>
