<%@ page language="C#" autoeventwireup="true" masterpagefile="~/MasterFile/TimeCheck.master" enableviewstatemac="true" inherits="Transactions_TA_UI_Transaction_TemporaryShiftAllocationadd, App_Web_kcclil20" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="conTemporaryShiftAllocation" ContentPlaceHolderID="BodyContentPH"
    runat="Server">
    <!--[if gt IE 5.5]>
	<link rel="stylesheet" type="text/css" href="../css/ProgressforIE.css" />
	<link rel="stylesheet" type="text/css" href="../css/anytimeIE.css" />
<![endif]-->

    <script src="../plugins/datepicker/jquery-1.11.1.min.js"></script>

    <script language="javascript" src="../js/jquery.autocomplete.js" type="text/javascript"></script>

    <script language="javascript" src="../js/DateTimeValidation.js" type="text/javascript"></script>

    <script language="javascript" src="../js/CountNodays.js" type="text/javascript"></script>

    <script language="javascript" src="../js/Emp_Leave.js" type="text/javascript"></script>

    <script language="javascript" src="../js/anytime.js" type="text/javascript"></script>

    <script language="javascript" src="../js/Popup.js" type="text/javascript"></script>

    <script src="../plugins/datepicker/bootstrap-datepicker.js"></script>

    <script src="../js/EmpShiftAllocationSingle.js"></script>

    <script>
        $(function () {
            $('#ctl00_BodyContentPH_txt_StartDate').datetimepicker({ format: document.getElementById('ctl00_BodyContentPH_Hidden1').value }
            );
        });
        $(function () {
            $('#ctl00_BodyContentPH_txt_ToDate').datetimepicker({ format: document.getElementById('ctl00_BodyContentPH_Hidden1').value }
            );
        });
    </script>

    <script language="javascript" src="../js/EmpLeaveApplication.js" type="text/javascript"></script>

    <script language="javascript" src="../js/Popup.js" type="text/javascript"></script>

    <script language="javascript" src="../js/jquery.autocomplete.js" type="text/javascript"></script>

    <%--<script language="javascript" src="../js/fancydropdown.js" type="text/javascript"></script>--%>

    <script language="javascript" src="../js/ShiftExchange.js" type="text/javascript"></script>

    <%--<script language="javascript" src="../js/ShiftExchange.js" type="text/javascript"></script>--%>

    <script language="javascript" src="../js/EmployeeNameAjax.js" type="text/javascript"></script>

    <script type="text/javascript" src="../bootstrap/js/1.4.3/jquery.min.js"></script>

    <script type="text/javascript">
        if (navigator.userAgent.toLowerCase().indexOf('chrome') != -1)
            document.write('<link href="../css/safari.css" rel="stylesheet" type="text/css" />');
    </script>

    <script language="javascript" type="text/javascript">

        //values for check date
        var Monthfourdigit = 'Please enter valid date as month, day, and four digit year : Format MM/dd/yyyy.';
        //Adding this line var Datefourdigit='Please enter valid date with correct format dd/MM/yyyy'; as newly
        var Datefourdigit = 'Please enter valid date with correct format dd/MM/yyyy';
        var Invalidyearentry = 'Invalid year entry';
        var Invalidmonthentry = 'Invalid month entry';
        var Invaliddateentry = 'Invalid date entry';
        var DateformatDDMONYYYY = 'Incorrect date format. Enter as DD-MON-YYYY';
        var Entertime = 'Enter time';
        var Valueforhours = 'Invalid value for hours:';
        var Invalidvalueforminutes = 'Invalid value for minutes:';
        var Invalidtimeformat = 'Invalid time format:';
        var EntervalidDateandTime = 'Please enter valid Date and Time';
        var ValiddatemonthMMDDYYHHMM = 'Please enter valid Date and Time MM/dd/yyyy HH:mm';
        var ValiddatemonthMMDDYYHHMMTT = 'Please enter valid Date and Time MM/dd/yyyy hh:mm tt';
        var EntervalidDateandTime = 'Please enter valid Date and Time';
        var Invalidvalueforhours = 'Invalid value for hours:';
        var Invalidvalueforminites = 'Invalid value for minutes:';
        var SelectShiftPattern = "Select Shift Pattern";
        var SelectStartday = "Select Startday";
        var SelectShift = "Select Shift";
        var SelectSheduleFrom = "Select Shedule From";
        var SelectSheduleTo = "Select Shedule To";
        var Confirm = "Are you sure to, Save?";
        var ClickAddButton = "Please Click Add Button To Select Employee(s)";
        var EntertheEmployeeID = "Enter the Employee ID";


        function SetAlertMessages(selectShiftPattern, selectStartday, selectShift, selectSheduleFrom, selectSheduleTo, confirm, Clickaddbutton, entertheEmployeeID) {
            SelectShiftPattern = selectShiftPattern;
            SelectStartday = selectStartday;
            SelectShift = selectShift;
            SelectSheduleFrom = selectSheduleFrom;
            SelectSheduleTo = selectSheduleTo;
            Confirm = confirm;
            ClickAddButton = Clickaddbutton;
            EntertheEmployeeID = entertheEmployeeID;
        }
        function SetAlertCheckDate(monthfourdigit, datefourdigit, invalidyearentry, invalidmonthentry, invaliddateentry, dateformatDDMONYYYY, entertime, valueforhours, invalidvalueforminutes, invalidtimeformat, entervalidDateandTime, validdatemonthMMDDYYHHMM, validdatemonthMMDDYYHHMMTT, entervalidDateandTime, invalidvalueforhours, invalidvalueforminites) {
            Monthfourdigit = monthfourdigit;
            Datefourdigit = datefourdigit;
            Invalidyearentry = invalidyearentry;
            Invalidmonthentry = invalidmonthentry;
            Invaliddateentry = invaliddateentry;
            DateformatDDMONYYYY = dateformatDDMONYYYY;
            Entertime = Entertime;
            Valueforhours = valueforhours;
            Invalidvalueforminutes = invalidvalueforminutes;
            Invalidtimeformat = invalidtimeformat;
            EntervalidDateandTime = entervalidDateandTime;
            ValiddatemonthMMDDYYHHMM = validdatemonthMMDDYYHHMM;
            ValiddatemonthMMDDYYHHMMTT = validdatemonthMMDDYYHHMMTT;
            EntervalidDateandTime = entervalidDateandTime;
            Invalidvalueforhours = invalidvalueforhours;
            Invalidvalueforminites = invalidvalueforminites;
        }
        function ShiftAllocationType() {
            if (document.getElementById('ctl00_BodyContentPH_rbtnMultiple').checked == true) {
                document.getElementById("ctl00_BodyContentPH_divMultiple").style.display = "block";
                document.getElementById("ctl00_BodyContentPH_divSingle").style.display = "none";
                document.getElementById("ctl00_BodyContentPH_lblcount").textContent = "(3 No.)";
            }
            if (document.getElementById('ctl00_BodyContentPH_rbtnSingle').checked == true) {
                document.getElementById("ctl00_BodyContentPH_divMultiple").style.display = "none";
                document.getElementById("ctl00_BodyContentPH_divSingle").style.display = "block";
                document.getElementById("ctl00_BodyContentPH_lblcount").textContent = "(4 No.)";
            }
            $('#ctl00_BodyContentPH_grv_Employees').remove();
            return true;
        }
        function showPattern() {

            if (document.aspnetForm.ctl00_BodyContentPH_rbtnShiftPattern.checked == true) {
                document.getElementById("divShiftPattern").style.display = "block";
                document.getElementById("divShift").style.display = "none";
                document.getElementById("divShiftMan").style.display = "none";
                document.getElementById("divPatternMan").style.display = "block";
            }

            if (document.aspnetForm.ctl00_BodyContentPH_rbtnShifts.checked == true) {
                document.getElementById("divShift").style.display = "block";
                document.getElementById("divShiftPattern").style.display = "none";
                document.getElementById("divShiftMan").style.display = "block";
                document.getElementById("divPatternMan").style.display = "none";
            }
            return true;
        }
        function showRoaster() {
            if (document.aspnetForm.ctl00_BodyContentPH_rbtnShiftRoaster.checked == true) {
                document.getElementById("divShiftPattern").style.display = "none";
                document.getElementById("divShiftRoaster").style.display = "block";
                document.getElementById("divShiftMan").style.display = "block";
                document.getElementById("divPatternMan").style.display = "none";
            }
        }

        function validateShiftAllocation() {


            var Gv = document.getElementById("<%=grv_Employees.ClientID%>");
            if (Gv == null) {
                if (document.getElementById('ctl00_BodyContentPH_rbtnMultiple').checked == true) {
                    alert(ClickAddButton);
                }
                if (document.getElementById('ctl00_BodyContentPH_rbtnSingle').checked == true) {
                    alert(EntertheEmployeeID);
                    document.getElementById("ctl00_BodyContentPH_txt_EmployeeId").focus();
                }
                
                return false;
            }

            if (document.aspnetForm.ctl00_BodyContentPH_rbtnShiftPattern.checked == true) {

                var Patternindex = document.aspnetForm.ctl00_BodyContentPH_ddl_Pattern.selectedIndex;
                var Patternitem = document.aspnetForm.ctl00_BodyContentPH_ddl_Pattern.options[Patternindex].value;
                var Startdayindex = document.aspnetForm.ctl00_BodyContentPH_ddl_StartDay.selectedIndex;
                var Startdayitem = document.aspnetForm.ctl00_BodyContentPH_ddl_StartDay.options[Startdayindex].value;


                if (Patternitem == "-Select-") {
                    alert(SelectShiftPattern);
                    return false;
                }

                else if (Startdayitem == "-Select-") {
                    alert(SelectStartday);
                    return false;
                }


            }

            if (document.aspnetForm.ctl00_BodyContentPH_rbtnShifts.checked == true) {
                if (document.aspnetForm.ctl00_BodyContentPH_ddlShifts.selectedIndex == 0) {
                    alert(SelectShift);
                    return false;
                }
            }



            if (document.aspnetForm.ctl00_BodyContentPH_txt_StartDate.value == "") {
                alert(SelectSheduleFrom);
                return false;
            }
            else if (document.aspnetForm.ctl00_BodyContentPH_txt_ToDate.value == "") {
                alert(SelectSheduleTo);
                return false;

            }

            else {

                if (document.aspnetForm.ctl00_BodyContentPH_txt_StartDate.value != '') {

                    var weekDay = document.aspnetForm.ctl00_BodyContentPH_txt_StartDate;
                    var DateFormat = document.getElementById('ctl00_BodyContentPH_Hidden1').value;

                    if (checkDate(weekDay, DateFormat, Monthfourdigit, Datefourdigit, Invalidyearentry, Invalidmonthentry, Invaliddateentry, DateformatDDMONYYYY, Entertime, Valueforhours, Invalidvalueforminutes, Invalidtimeformat, EntervalidDateandTime, ValiddatemonthMMDDYYHHMM, ValiddatemonthMMDDYYHHMMTT, EntervalidDateandTime, Invalidvalueforhours, Invalidvalueforminites)

     ) {
                        if (document.aspnetForm.ctl00_BodyContentPH_txt_ToDate.value != '') {
                            var weekDay = document.aspnetForm.ctl00_BodyContentPH_txt_ToDate;
                            var DateFormat = document.getElementById('ctl00_BodyContentPH_Hidden1').value;

                            if (checkDate(weekDay, DateFormat, Monthfourdigit, Datefourdigit, Invalidyearentry, Invalidmonthentry, Invaliddateentry, DateformatDDMONYYYY, Entertime, Valueforhours, Invalidvalueforminutes, Invalidtimeformat, EntervalidDateandTime, ValiddatemonthMMDDYYHHMM, ValiddatemonthMMDDYYHHMMTT, EntervalidDateandTime, Invalidvalueforhours, Invalidvalueforminites)

     ) {
                                return confirm(Confirm);
                            }
                            else {
                                return false;
                            }
                        }
                        else {
                            return false;
                        }
                    }
                    else {
                        return false;
                    }
                }
            }

            //return true;   

        }
    </script>

    <div class="content-header">
        <h1 style="background-image: url('../dist/img/temporary.png'); background-repeat: no-repeat; padding-left: 35px">
            <asp:Label ID="lbl_Header" runat="server"></asp:Label>
        </h1>
        <asp:SiteMapPath ID="site" runat="server" CssClass="breadcrumb">
            <NodeStyle CssClass="active" />
        </asp:SiteMapPath>
    </div>
    <asp:UpdatePanel ID="upLeave" runat="server">
        <ContentTemplate>
            <asp:Panel ID="pnlProgress" runat="server" Style="display: none;">
                <asp:Panel ID="pnlLoading" runat="server" HorizontalAlign="center">
                    <div class="InsideProgressBar">
                        <div class="row" style="margin-top: 10px">
                            <img src="../dist/img/logo-Progress.png" />
                        </div>
                        <div class="row" style="min-width: 280px">
                            <img src="../dist/img/default.gif" style="width: 100px" />
                        </div>
                        <div class="row" style="margin-bottom: 10px">
                            <asp:Label ID="lblLoading" runat="server" ForeColor="black" Style="text-align: center"
                                Text="Please Wait..." Font-Bold="true" Font-Size="12px" Font-Italic="true" Font-Family="Arial"></asp:Label>
                        </div>
                        <div class="clear clearfix">
                        </div>
                    </div>
                </asp:Panel>
            </asp:Panel>
            <asp:HiddenField ID="hdnProgress" runat="server" />
            <cc1:ModalPopupExtender ID="popupProgress" runat="server" TargetControlID="hdnProgress"
                BackgroundCssClass="ModalPopup" PopupControlID="pnlProgress" BehaviorID="popupProgress">
            </cc1:ModalPopupExtender>
        </ContentTemplate>
        <Triggers>
            <asp:PostBackTrigger ControlID="btn_Save" />
        </Triggers>
    </asp:UpdatePanel>
    <div class="content">
        <div id="myModal" class="modal modal-default fade" role="dialog">
            <div class="modal-dialog" style="min-width: 85%;">
                <!-- Modal content-->
                <div class="modal-content" style="margin-top: 100px">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" style="border-radius: 50px;">
                            &times;</button>
                        <h4 class="modal-title" style="padding-bottom: 10px">
                            <asp:Label ID="lblSelectEmployee" runat="server" Text="Select Employee(s)"></asp:Label>
                        </h4>
                    </div>
                    <div class="modal-body" style="padding-top: 0px">
                        <iframe id="iframePopup" runat="server" scrolling="auto" width="100%" height="620px"
                            style="border-style: none"></iframe>
                    </div>
                    <div class="modal-footer" style="display: none">
                        <button type="button" class="btn btn-primary pull-right" data-dismiss="modal">
                            Close</button>
                    </div>
                </div>
            </div>
        </div>
        <div id="ViewAllocated" class="modal modal-default fade" role="dialog">
            <div class="modal-dialog" style="min-width: 85%;">
                <!-- Modal content-->
                <div class="modal-content" style="margin-top: 100px">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" style="border-radius: 50px;">
                            &times;</button>
                        <h4 class="modal-title" style="padding-bottom: 10px">
                            <asp:Label ID="lblDataView" runat="server" Text="Data View"></asp:Label>
                        </h4>
                    </div>
                    <div class="modal-body" style="padding-top: 0px">
                        <iframe id="iframePopup2" runat="server" scrolling="auto" width="100%" height="620px"
                            style="border-style: none"></iframe>
                    </div>
                    <div class="modal-footer" style="display: none">
                        <button type="button" class="btn btn-primary pull-right" data-dismiss="modal">
                            Close</button>
                    </div>
                </div>
            </div>
        </div>
        <asp:HiddenField ID="Hidden1" runat="server" />
        <div class="col-md-12" style="color: Red; display: none">
            <span class="fa fa-asterisk"></span>

            <asp:Label ID="lblError" runat="server"></asp:Label>
        </div>
        <div class="inr-ftr">
            <div class="row">
                <div class="col-sm-2">
                </div>
                <div class="col-sm-2 col-sm-offset-8">
                    <div class="pull-right" id="divShiftMan">
                        <h6>
                            <span style="color: Red">|</span><span style="padding-left: 10px; padding-right: 10px"><asp:Label ID="lbl_IndicatesMandatoryFields" runat="server"></asp:Label>
                                <asp:Label ID="lblcount" runat="server" Text="(3 No.)"></asp:Label></span>
                        </h6>
                    </div>
                    <div class="pull-right" id="divPatternMan">
                        <h6>
                            <span style="color: Red">|</span><span style="padding-left: 10px; padding-right: 10px">
                                Mandatory
                                <asp:Label ID="Label3" runat="server" Text="(4 No.)">
                                </asp:Label>
                            </span>
                        </h6>
                    </div>
                </div>
                <div class="clearfix">
                </div>
            </div>
        </div>
        <div class="emp-filter">
            <div class="form-horizontal">
                <div class="row">
                    <div class="col-md-6">
                        <div class="row form-group">
                            <div class="col-md-6">
                                <asp:Label ID="lblAllocationType" runat="server" Text="Allocation Type"></asp:Label>
                            </div>
                            <div class="col-md-6 Pad-left-7px">
                                <div class="col-md-6">
                                    <asp:RadioButton ID="rbtnSingle" runat="server" GroupName="ShiftAllocate" Text="Single"
                                        CssClass="radioLeave radioLeave-primary" onclick="ShiftAllocationType();" />
                                </div>
                                <div class="col-md-6">
                                    <asp:RadioButton ID="rbtnMultiple" runat="server" GroupName="ShiftAllocate" Text="Multiple"
                                        Checked="true" CssClass="radioLeave radioLeave-primary" onclick="ShiftAllocationType();" />
                                </div>
                            </div>
                        </div>
                        <div id="actualdiv">
                            <div id="divMultiple" runat="server">
                                <div class="form-group">
                                    <div class="col-md-6">
                                        <asp:Label ID="lbl_SelectedEmployees" runat="server"></asp:Label>
                                    </div>
                                    <div class="col-md-6">
                                        <asp:LinkButton ID="btn_Add" CssClass="btn save-btn fa-plus" runat="server" OnClientClick="return OpenWindow();"
                                            Style="margin-left: 0px" data-toggle="modal" data-target="#myModal" />
                                        <asp:LinkButton ID="btn_ShiftAllocationView" runat="server" CssClass="btn save-btn fa-eye"
                                            data-toggle="modal" data-target="#ViewAllocated" OnClientClick="return OpenShiftAllocationViewWindow();" />
                                    </div>

                                </div>
                            </div>
                            <div id="divSingle" style="display: none" runat="server">
                                <div class="row form-group">
                                    <div class="col-md-6">
                                        <asp:Label ID="lblEmployeeCode" runat="server" Text="Employee Code"></asp:Label>
                                    </div>
                                    <div class="col-md-6">
                                        <div class="input-group input-group-sm">
                                            <asp:TextBox onpaste="return true" ID="txt_EmployeeId" runat="server" CssClass="form-control man-dat"
                                                MaxLength="15" onblur="ajaxShiftAllocationSingle();" onkeypress="return acceptCharsNum_MaxLength(event,this,15,MaxLength);"></asp:TextBox>
                                            <span class="input-group-btn">
                                                <asp:LinkButton ID="btn_Search" data-toggle="modal" data-target="#myModal" CssClass="btn save-btn btn-flat fa fa-search"
                                                    runat="server" OnClientClick="return OpenWindowShiftExchangeGrid('txt_EmployeeId');" />
                                            </span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-6">
                            </div>
                            <div class="col-md-6">
                                <div class="col-md-12 Pad-left-7px">
                                    <asp:RadioButton ID="rbtnShifts" runat="server" GroupName="ShiftAllocationType" Text="Shift"
                                        Checked="true" onclick="showPattern();" CssClass="radioLeave radioLeave-primary" /></br>
                                    <asp:RadioButton ID="rbtnShiftPattern" runat="server" GroupName="ShiftAllocationType"
                                        onclick="showPattern();" CssClass="radioLeave radioLeave-primary" /></br>
                                    <asp:RadioButton ID="rbtnShiftRoaster" runat="server" GroupName="ShiftAllocationType"
                                        onclick="showRoaster();" Visible="false" CssClass="radioLeave radioLeave-primary" />
                                </div>
                            </div>
                        </div>
                        <div id="divShift" style="display: none;">
                            <div class="row form-group">
                                <div class="col-md-6">
                                    <asp:Label ID="lblShifts" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-6">
                                    <asp:DropDownList ID="ddlShifts" runat="server" CssClass="form-control select2 Man-dat" AppendDataBoundItems="True">
                                        <asp:ListItem Text="-Select-" Value="-Select-"></asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                            </div>
                            <div class="row form-group">
                                <div class="col-md-6">
                                    <asp:Label ID="lblWeeklyOffDays" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-6">
                                    <asp:CheckBoxList ID="lstWeeklyOffDays" runat="server" RepeatLayout="Flow" RepeatDirection="vertical"
                                        CssClass="checkbox checkbox-primary">
                                        <asp:ListItem Value="0" Text="Monday"></asp:ListItem>
                                        <asp:ListItem Value="1" Text="Tuesday"></asp:ListItem>
                                        <asp:ListItem Value="2" Text="Wednesday"></asp:ListItem>
                                        <asp:ListItem Value="3" Text="Thursday"></asp:ListItem>
                                        <asp:ListItem Value="4" Text="Friday"></asp:ListItem>
                                        <asp:ListItem Value="5" Text="Saturday"></asp:ListItem>
                                        <asp:ListItem Value="6" Text="Sunday"></asp:ListItem>
                                    </asp:CheckBoxList>
                                </div>
                            </div>
                        </div>
                        <div id="divShiftPattern">
                            <div class="row form-group">
                                <div class="col-md-6">
                                    <asp:Label ID="lbl_ShiftPattern" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-6">
                                    <asp:DropDownList ID="ddl_Pattern" runat="server" CssClass="form-control select2 Man-dat"
                                        AppendDataBoundItems="True" AutoPostBack="true" OnSelectedIndexChanged="ddl_Pattern_SelectedIndexChanged">
                                        <asp:ListItem Text="-Select-" Value="-Select-"></asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                            </div>
                            <div class="row form-group">
                                <div class="col-md-6">
                                    <asp:Label ID="lbl_StartDay" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-6">
                                    <asp:DropDownList ID="ddl_StartDay" runat="server" CssClass="form-control select2 Man-dat">
                                        <asp:ListItem Text="-Select-" Value="-Select-"></asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                            </div>
                            <div class="row form-group">
                                <div class="col-md-6">
                                    <asp:Label ID="lbl_ActualPattern" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-6">
                                    <asp:Label ID="lbl_Pattern" runat="server" CssClass="form-control" Style="min-height: 28px"></asp:Label>
                                </div>
                            </div>
                        </div>
                        <div id="divShiftRoaster" style="display: none;">
                            <div class="row form-group">
                                <div class="col-md-6">
                                    <asp:Label ID="lblShiftRoaster" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-6">
                                    <asp:DropDownList ID="ddlShiftRoaster" runat="server" CssClass="form-control man-dat"
                                        AppendDataBoundItems="True">
                                        <asp:ListItem Text="-Select-" Value="-Select-"></asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-md-6">
                                <asp:Label ID="lbl_ScheduleFrom" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-6">
                                <asp:TextBox onpaste="return true" ID="txt_StartDate" runat="server" CssClass="form-control man-dat"
                                    onCut="return false" onDrop="return false;"></asp:TextBox>
                                <asp:CustomValidator ID="CustomValidator1" runat="server" ControlToValidate="txt_StartDate"
                                    Display="None" EnableClientScript="False" OnServerValidate="CheckStartDate" SetFocusOnError="True"
                                    Font-Bold="False"></asp:CustomValidator>
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-md-6">
                                <asp:Label ID="lbl_ScheduleTo" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-6">
                                <asp:TextBox onpaste="return true" ID="txt_ToDate" runat="server" CssClass="form-control man-dat"
                                    onCut="return false" onDrop="return false;"></asp:TextBox>
                                <asp:CustomValidator ID="CustomValidator3" runat="server" ControlToValidate="txt_ToDate"
                                    Display="None" EnableClientScript="False" OnServerValidate="CheckToDate" SetFocusOnError="True"
                                    Font-Bold="False"></asp:CustomValidator>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-12">
                                <asp:Label ID="lbl_Info" runat="server"></asp:Label>
                            </div>
                        </div>
                        <div class="pull-right-button">
                            <asp:LinkButton ID="btn_Save" CssClass="btn save-btn fa-floppy-o" runat="server"
                                OnClick="btn_Save_Click" OnClientClick="if(validateShiftAllocation(SelectShiftPattern)) $find('popupProgress').show();else return false;" />
                            <asp:LinkButton ID="btn_Cancel" CssClass="btn save-btn fa-angle-left" runat="server"
                                CausesValidation="False" OnClick="btn_Cancel_Click" Visible="false" />
                            <asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True"
                                ShowSummary="False" />
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="col-md-12">
                            <div class="table-responsive">
                                <asp:GridView ID="grv_Employees" runat="server" AutoGenerateColumns="False" AllowPaging="true"
                                    PageSize="5" OnPageIndexChanging="grv_Employees_PageIndexChanging" CellPadding="4"
                                    OnRowDeleting="grv_Employees_RowDeleting" OnRowDataBound="grv_Employees_RowDataBound"
                                    AutoGenerateDeleteButton="True" CssClass="table table-responsive table-bordered">
                                    <Columns>
                                        <asp:TemplateField HeaderText="EmpId" Visible="false" HeaderStyle-CssClass="empheader"
                                            ItemStyle-CssClass="table-icons">
                                            <ItemTemplate>
                                                <itemstyle horizontalalign="Center" />
                                                <headerstyle horizontalalign="Center" />
                                                <asp:Label ID="lbl_EmpAutoId" Text='<%# Eval("EmpId")%>' runat="server"></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="LoginEmployeeId" Visible="false" HeaderStyle-CssClass="empheader"
                                            ItemStyle-CssClass="table-icons">
                                            <ItemTemplate>
                                                <itemstyle horizontalalign="Center" />
                                                <headerstyle horizontalalign="Center" />
                                                <asp:Label ID="lbl_LoginEmployeeId" Text='<%# Eval("LoginEmployeeId")%>' runat="server"></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Employee Id" HeaderStyle-CssClass="empheader">
                                            <ItemTemplate>
                                                <headerstyle horizontalalign="Center" />
                                                <asp:Label ID="lbl_EmpId" Text='<%# Eval("EmployeeId")%>' runat="server"></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Employee Name" HeaderStyle-CssClass="empheader">
                                            <ItemTemplate>
                                                <asp:Label ID="lbl_EmpName" Text='<%# Eval("EmployeeName")%>' runat="server"></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                    <RowStyle Height="30px" CssClass="table-bg" BorderColor="#C5DFFC" />
                                    <PagerStyle Font-Overline="False" HorizontalAlign="Right" CssClass="GridPager" />
                                    <PagerSettings FirstPageText="<<" LastPageText=">>" Mode="NumericFirstLast" NextPageText=">"
                                        PreviousPageText="<" />
                                    <AlternatingRowStyle BackColor="white" />
                                </asp:GridView>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
