<%@ page autoeventwireup="true" enableeventvalidation="false" inherits="Transactions_TA_UI_Transactions_ManualTimeEntryAdd, App_Web_0crjncsr" language="C#" masterpagefile="~/MasterFile/TimeCheck.master" %>

<%@ Register Src="~/UserControls/TA_uc_OrganizationLevels.ascx" TagName="OrganizationLevel"
    TagPrefix="uc" %>
<%@ Register TagPrefix="dxGridview" Namespace="DevExpress.Web" Assembly="DevExpress.Web.v14.2" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<%@ Register Assembly="DevExpress.Web.v14.2" Namespace="DevExpress.Web" TagPrefix="dxw" %>

<asp:Content ID="Content1" 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 type="text/javascript" src="../bootstrap/js/1.4.3/jquery.min.js"></script>
    <script src="../bootstrap/js/1.8.5/jquery-ui.min.js" type="text/javascript"></script>

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

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

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

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

    <script src="../bootstrap/js/1.8.5/jquery-ui.min.js" type="text/javascript"></script>

    <script language="javascript" src="../js/DateTimeValidation.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>

    <link id="stylebootstrap" rel="stylesheet" runat="server" type="text/css" />

     <script type="text/javascript">
         function ShowOffical(msg) {
             debugger;
             //document.getElementById('ctl00_BodyContentPH_PH_Personal').style.display = "block";
             document.getElementById("divSingleManualEntry").style.display = "none";
             alert(msg);
            return false;
        }
    </script>

    <script>
        $(function () {
            $('#ctl00_BodyContentPH_txt_InDate').datetimepicker({ format: document.getElementById('ctl00_BodyContentPH_Hidden1').value }
            );
        });
        $(function () {
            $('#ctl00_BodyContentPH_txt_OutDate').datetimepicker({ format: document.getElementById('ctl00_BodyContentPH_Hidden1').value }
            );
        });
        $(function () {
            $('#ctl00_BodyContentPH_txt_ShiftIn').datetimepicker({ format: document.getElementById('ctl00_BodyContentPH_Hidden2').value }
            );
        });
        $(function () {
            $('#ctl00_BodyContentPH_txt_ShiftOut').datetimepicker({ format: document.getElementById('ctl00_BodyContentPH_Hidden2').value }
            );
        });


        $(function () {
            var today = new Date();
            var yesterday = new Date();
            yesterday.setDate(yesterday.getDate() - 1);

            // Format dates to YYYY-MM-DD for comparison
            var formattedYesterday = yesterday.toISOString().split('T')[0];
            var formattedToday = new Date().toISOString().split('T')[0];

            $('#ctl00_BodyContentPH_txt_Dates').datetimepicker({
                format: document.getElementById('ctl00_BodyContentPH_Hidden1').value,
                minDate: formattedYesterday, // Set minimum date to yesterday
                maxDate: formattedToday // Set maximum date to today
            });

            
        });



        $(function () {  
            $('#ctl00_BodyContentPH_txt_Times').datetimepicker({ format: document.getElementById('ctl00_BodyContentPH_Hidden2').value}
            );
        });

    </script>

    <script type="text/javascript">
        function LoadDate(ID) {
            $(document).ready(function () {
                $(ID).datepicker({
                    // your options...
                }).datepicker("show");
            });
        }
        
        function GetSelectedRowsData() {
            debugger;
        var selectedRowsData = [];
            <%-- var gridView = document.getElementById("<%= grv_EmpDetailss.ClientID %>");
        var checkboxes = gridView.getElementsByTagName("input");--%>
            var gridView = ASPxClientGridControl.GetControlCollection().GetByName("grv_EmpDetailss");
            var checkboxes = gridView.GetMainElement().getElementsByTagName("input");

        for (var i = 0; i < checkboxes.length; i++) {
            if (checkboxes[i].type === "checkbox" && checkboxes[i].checked) {
                var rowIndex = checkboxes[i].parentNode.parentNode.rowIndex - 1;
                var row = gridView.rows[rowIndex];
                var employeeId = row.cells[1].innerText; // Adjust cell index based on your grid structure
                var employeeCodeId = row.cells[2].innerText; // Adjust cell index based on your grid structure

                selectedRowsData.push({ EmployeeId: employeeId, EmployeeCodeId: employeeCodeId });
            }
        }

        // Call server-side function with selectedRowsData
        PageMethods.GetSelectedRowsData(selectedRowsData, onSuccess, onFailure); UpdateCustomizationWindowValue
    }

    function onSuccess(result) {
        // Handle success
    }

    function onFailure(error) {
        // Handle failure
    }

    function UpdateCustomizationWindowValue() {
        var element = document.getElementById("btnCustWindow");
        if (element == null) return;
        element.value = (grv_EmpDetails.IsCustomizationWindowVisible() ? "Hide" : "Show") + " Customization Window";
    }
    function ShowHideCustomizationWindow() {
        if (grv_EmpDetails.IsCustomizationWindowVisible())
            grv_EmpDetails.HideCustomizationWindow();
        else grv_EmpDetails.ShowCustomizationWindow();
        UpdateCustomizationWindowValue();
    }


        function SelectAllOnThisPage(chkSelectAll) {
            debugger;
                var hdnSelectRow = document.getElementById('<%= hdnSelectRow.ClientID %>');
                var hdnSelectAll = document.getElementById('<%= hdnGetAllid.ClientID %>');
                if (chkSelectAll.checked == true) {
                   for (var i = 0; i < grv_EmpDetailss.pageRowCount; i++) {
                        if (document.getElementById('ctl00_BodyContentPH_grv_EmpDetailss_cell' + (i + grv_EmpDetailss.visibleStartIndex) + '_0_chkSelect').disabled == false) {
                            document.getElementById('ctl00_BodyContentPH_grv_EmpDetailss_cell' + (i + grv_EmpDetailss.visibleStartIndex) + '_0_chkSelect').checked = true;
                            var hdnUserId = document.getElementById('ctl00_BodyContentPH_grv_EmpDetailss_cell' + (i + grv_EmpDetailss.visibleStartIndex) + '_0_chkSelect').accessKey;
                          var hdnSelectRow = document.getElementById('<%= hdnSelectRow.ClientID %>');
                            var removeId = hdnSelectRow.value.split(",");
                            if (hdnUserId != "" && !Array.contains(removeId, hdnUserId)) {
                                if (hdnSelectRow.value != "")
                                    hdnSelectRow.value += ",";
                                hdnSelectRow.value += hdnUserId;
                            }
                        }
                    }
                }
                else {
                    for (var i = 0; i < grv_EmpDetailss.pageRowCount; i++) {
                        document.getElementById('ctl00_BodyContentPH_grv_EmpDetailss_cell' + (i + grv_EmpDetailss.visibleStartIndex) + '_0_chkSelect').checked = false;
                    }
                    hdnSelectRow.value = '';
                }
            }
        function SelectOnRow(chkOnSelect) {
            debugger;
                var hdnUserId = chkOnSelect.accessKey;
                var hdnSelectRow = document.getElementById('<%= hdnSelectRow.ClientID %>');
                var removeId = hdnSelectRow.value.split(",");
                if (chkOnSelect.checked) {
                    if (hdnUserId != "" && !Array.contains(removeId, hdnUserId)) {
                        if (hdnSelectRow.value != "")
                            hdnSelectRow.value += ",";
                        hdnSelectRow.value += hdnUserId;
                    }
                    var varTotalCheckedCount = 0;
                    var varTotalEnabled = 0;
                    for (var i = 0; i < grv_EmpDetailss.pageRowCount; i++) {
                        if (document.getElementById('ctl00_BodyContentPH_grv_EmpDetailss_cell' + (i + grv_EmpDetailss.visibleStartIndex) + '_0_chkSelect').disabled == false) {
                            varTotalEnabled = varTotalEnabled + 1;
                        }
                        if (document.getElementById('ctl00_BodyContentPH_grv_EmpDetailss_cell' + (i + grv_EmpDetailss.visibleStartIndex) + '_0_chkSelect').checked)
                            varTotalCheckedCount = varTotalCheckedCount + 1;
                    }
                    if (varTotalCheckedCount == varTotalEnabled)
                        document.getElementById('ctl00_BodyContentPH_grv_EmpDetailss_header0_chkSelectAll').checked = true;
                    else
                        document.getElementById('ctl00_BodyContentPH_grv_EmpDetailss_header0_chkSelectAll').checked = false;
                }
                else {
                    if (Array.contains(removeId, hdnUserId)) {
                        Array.remove(removeId, hdnUserId);
                    }
                    hdnSelectRow.value = removeId;
                    document.getElementById('ctl00_BodyContentPH_grv_EmpDetailss_header0_chkSelectAll').checked = false;
                }
            }
            var Norecordsavailable = "No records available ";
            var AreyousuretoRestore = "Are you sure to Restore? ";
            var Selecteddataisnotindeletedstatus = "Selected data is not in deleted status ";
            var Selectdatatorestore = "Select data to restore ";
            var Nodeletedrecordsavailable = "No deleted records available ";
            //function RestoreAlert(norecordsavailable, areyousuretoRestore, selecteddataisnotindeletedstatus, selectdatatorestore, nodeletedrecordsavailable) {
            //    Norecordsavailable = norecordsavailable;
            //    AreyousuretoRestore = areyousuretoRestore;
            //    Selecteddataisnotindeletedstatus = selecteddataisnotindeletedstatus;
            //    Selectdatatorestore = selectdatatorestore;
            //    Nodeletedrecordsavailable = nodeletedrecordsavailable;
            //}
            //function RestoreData() {
            //    var rowscount = grv_EmpDetails.pageRowCount;
            //    if (rowscount == 0) {
            //        alert(Norecordsavailable);
            //        return false;
            //    }
               <%-- var hdnSelectRow = document.getElementById('<%= hdnSelectRow.ClientID %>');
                var DeleteDataRow = document.getElementById('<%= hdnDeletedData.ClientID %>');--%>
                //if (DeleteDataRow.value != '') {
                //    if (hdnSelectRow.value != '') {
                //        var selectedRow = new Array();
                //        selectedRow = hdnSelectRow.value.split(",");
                //        var deletedRow = new Array();
                //        deletedRow = DeleteDataRow.value.split(",");
                //        var Status = false;
                //        for (var i = 0; i < selectedRow.length; i++) {
                //            if (Array.contains(deletedRow, selectedRow[i])) {
                //                Status = true;
                //            }
                //        }
                //        if (Status == true) {
                //            return confirm(AreyousuretoRestore);
                //        }
                //        else {
                //            alert(Selecteddataisnotindeletedstatus);
                //            return false;
                //        }
                //    }
                //    else {
                //        alert(Selectdatatorestore);
                //        return false;
                //    }
                //}
                //else {
                //    if (hdnSelectRow.value == '') {
                //        alert(Nodeletedrecordsavailable);
                //        return false;
                //    }
                //    else {
                //        alert(Selecteddataisnotindeletedstatus);
                //        return false;
                //    }
                //}
            //}




    </script>






    <script type="text/javascript" language="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 InvalidTime = "Invalid time.";
        var InvalidTimeFormat = "Invalid Time Format";
        var InValidHour = "Invalid time. Hours can not be more than 24.";
        var Invalidtime = "Invalid time. Minute can not be more than 59.";
        var SelTerminal = "Select In Terminal";
        var SelPunchTypes = "Select In PunchTypes";
        var FillIndate = "Fill In Date";
        var FillInTime = "Fill In Time";
        var SelOutTerminal = "Select Out Terminal";
        var RouteName = "Select Route Name";
        var InTimeCorrectFormat = "Enter InTime in correct Format";
        var OutTimeFormat = "Enter valid time format";
        var ConfirmSave = "Are you sure to, Save?";
        var FillOutDate = "Fill Out Date";
        var FillOutTime = "Fill Out Time";
        var SelectInDate = "Select InDate";
        var SelecttheRouteName = "Select the Route Name";
        var NoRecords = "No Records";
        var Errorinretrivingdetails = "Error in retriving details";
        var SelectEntranceID = "Select Entrance ID";
        var SelectOutPunchType = "Select Out Punch Type";
        var MaxLength = "Maximum length is ";
        var Select = "-Select-";
        var ValidateInOutDate = "Enter Either InDate and InTime (or) OutDate and OutTime (or) Both";
        var EntertheEmployeeID = "Enter the Employee ID";
        var SelectEntranceName = "Select Entrance Name";
        var EnterReason = "Enter Reason";
        function MaxLengthh(maxLength, select) {
            MaxLength = maxLength;
            Select = select;
        }
        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 SetAlertMessages(invalidTime, TimeFormat, HourInvalid, timeInvalid, Terminal, PunchTypes, InDate, InTime, OutTerminal, Route, CorrectFormat, TimeFormat, SaveConfirm, OutDate, OutTime, selectInDate, selecttheRouteName, noRecords, errorinretrivingdetails, selectEntranceID, selectOutPunchType, entertheEmployeeID, selectEntranceName, enterReason) {
            InvalidTime = invalidTime;
            InvalidTimeFormat = TimeFormat;
            InValidHour = HourInvalid;
            Invalidtime = timeInvalid;
            SelTerminal = Terminal;
            SelPunchTypes = PunchTypes;
            FillIndate = InDate;
            FillInTime = InTime;
            SelOutTerminal = OutTerminal;
            RouteName = Route;
            InTimeCorrectFormat = CorrectFormat;
            FormatTime = TimeFormat;
            ConfirmSave = SaveConfirm;
            FillOutDate = OutDate;
            FillOutTime = OutTime;
            SelectInDate = selectInDate;
            SelecttheRouteName = selecttheRouteName;
            NoRecords = noRecords;
            Errorinretrivingdetails = errorinretrivingdetails;
            SelectEntranceID = selectEntranceID;
            SelectOutPunchType = selectOutPunchType;
            EntertheEmployeeID = entertheEmployeeID;
            SelectEntranceName = selectEntranceName;
            EnterReason = enterReason;
        }
        function ValidateTime(inIntime) {
            var keyValue;
            if (window.event) {
                keyValue = window.event.keyCode;
            }
            else if (inIntime) {
                keyValue = inIntime.which
            }
            else {
                return true;
            }
            if ((keyValue > 47 && keyValue < 58) || (keyValue >= 96 && keyValue <= 105) || (keyValue >= 32 && keyValue <= 40) || (keyValue >= 16 && keyValue <= 20) || (keyValue == 8) || (keyValue == 0) || (keyValue == 46)) {
                var InTime;
                var val = inIntime.value;
                if ((keyValue > 47 && keyValue < 58) || (keyValue >= 96 && keyValue <= 105)) {
                    if (val.length >= 2 && val.length < 5) {
                        if (val.search(":") == -1) {
                            InTime = val.substring(0, 2) + ":" + val.substring(2, 5);
                            inIntime.value = InTime;
                            return (inIntime.value);
                        }
                    }
                    if (val.length > 5) {
                        alert(InvalidTime);
                        insertAtCursor(inIntime, "0", "min");
                        return false;
                    }
                }
                if (keyValue == 0) {
                    if (val.length < 5) {
                        if (val.length == 4) {
                            if (val.search(":") == -1) {
                                InTime = val.substring(0, 2) + ":" + val.substring(2, 5);
                                inIntime.value = InTime;
                                return (inIntime.value);
                            }
                            else {
                                insertAtCursor(inIntime, "0", "first");
                                alert(InvalidTimeFormat);
                                return false;
                            }
                        }
                        else {
                            insertAtCursor(inIntime, "0", "first");
                            alert(InvalidTimeFormat);
                            return false;
                        }
                    }
                    if (val.length >= 2) {
                        var Hourval = val.substring(0, 2);
                        if (Hourval > 24) {
                            alert(InValidHour);
                            insertAtCursor(inIntime, "0", "hrs");
                            return false;
                        }
                        if (val.substring(0, 2) == "24") {
                            inIntime.value = "00" + val.substring(2, 5);
                        }
                        if (val.search(":") == -1) {
                            InTime = val.substring(0, 2) + ":" + val.substring(2, 5);
                            inIntime.value = InTime;
                            return (inIntime.value);
                        }
                    }
                    if (val.length == 5) {
                        var Minuteval = val.substring(3, 5);
                        if (parseFloat(Minuteval) > 59) {
                            alert(Invalidtime);
                            insertAtCursor(inIntime, "0", "min");
                            return false;
                        }
                    }
                }
                if (val.length == 2) {
                    if (val.substring(0, 1) == ":") {
                        InTime = val.substring(1, 2) + ":";
                        inIntime.value = InTime;
                        return (inIntime.value);
                    }
                    else if (val.substring(1, 2) == ":") {
                        InTime = val.substring(0, 1) + ":";
                        inIntime.value = InTime;
                        return (inIntime.value);
                    }
                }
                else {
                    return (inIntime.value);
                }
            }
            else {
                inIntime.value = "";
                return (inIntime.value);
            }
        }
        function insertAtCursor(myField, myValue, myType) {
            //IE support
            if (document.selection) {
                myField.focus();
                sel = document.selection.createRange();
            }
                //MOZILLA/NETSCAPE support
            else if (myField.selectionStart || myField.selectionStart == '0') {
                var startPos = myField.selectionStart;
                var endPos = myField.selectionEnd;
                myField.value = myField.value.substring(0, startPos)
                + myField.value.substring(endPos, myField.value.length);
            }
            else {
                myField.value += myValue;
            }
            if (myType == "hrs") {
                setCaretPosition(myField, 2);
            }
            if (myType == "min") {
                setCaretPosition(myField, 3);
            }
            if (myType == "first") {
                setCaretPosition(myField, 0);
            }
        }

        function getVerify() {
            debugger;
            var txt_EmployeeId = document.getElementById('ctl00_BodyContentPH_txt_EmployeeId');

            if (txt_EmployeeId.value.length == 0) {
                alert(EntertheEmployeeID);
                document.getElementById('ctl00_BodyContentPH_txt_EmployeeId').focus();
                return false;
            }

        }

        function setCaretPosition(ctrl, pos) {
            if (ctrl.setSelectionRange) {
                ctrl.focus();
                ctrl.setSelectionRange(pos, pos);
            }
            else if (ctrl.createTextRange) {
                var range = ctrl.createTextRange();
                range.collapse(true);
                range.moveEnd('character', pos);
                range.moveStart('character', pos);
                range.select();
            }
        }


        //function show() {
        //    if (document.aspnetForm.ctl00_BodyContentPH_rbtSingle.checked == true) {
        //        document.getElementById("div_Employee").style.display = "block";
        //        document.getElementById("div_Route").style.display = "none";
        //        document.getElementById("divGroupEntryType").style.display = "none";
        //        document.getElementById("divEmployees").style.display = "none";
        //        document.getElementById("divGroupEmployees").style.display = "none";
        //        document.aspnetForm.ctl00_BodyContentPH_txt_EmployeeId.focus();
        //    }
        //    else if (document.aspnetForm.ctl00_BodyContentPH_rbtGroup.checked == true) {
        //        document.getElementById("divGroupEntryType").style.display = "block";
        //        document.getElementById("div_Employee").style.display = "none";
        //        if (document.aspnetForm.ctl00_BodyContentPH_rbtBusLate.checked == true) {
        //            document.getElementById("div_Route").style.display = "block";
        //            document.getElementById("divEmployees").style.display = "none";
        //        }
        //    }
        //}
        //function show1() {
        //    if (document.aspnetForm.ctl00_BodyContentPH_rbtGroup.checked == true) {
        //        document.getElementById("divGroupEntryType").style.display = "block";
        //        document.aspnetForm.ctl00_BodyContentPH_rbtBusLate.checked = true;
        //        document.getElementById("div_Route").style.display = "block";
        //        document.getElementById("divEmployees").style.display = "none";
        //        document.getElementById("div_Employee").style.display = "none";
        //    }
        //}


        function rbtBox1() {
            debugger;
            if (document.aspnetForm.ctl00_BodyContentPH_rbnOut.checked == true) {

                //document.getElementById("DivMultipleManualDiv").style.display = "block";
                document.getElementById("DivMultipleInout").style.display = "block";
                document.getElementById("DivMultipleOutPunch").style.display = "block";
                document.getElementById("DivMultipleINPunch").style.display = "none";
                document.aspnetForm.ctl00_BodyContentPH_rbnIn.checked = false;
                document.aspnetForm.ctl00_BodyContentPH_rbnOut.checked = true;

            }
            else {
                //document.getElementById("DivMultipleManualDiv").style.display = "none";
                document.getElementById("DivMultipleOutPunch").style.display = "none";
                document.getElementById("DivMultipleInout").style.display = "block";
                document.getElementById("DivMultipleINPunch").style.display = "block";

                document.aspnetForm.ctl00_BodyContentPH_rbnOut.checked = false;
                document.aspnetForm.ctl00_BodyContentPH_rbnIn.checked = true;

            }
        }

        function rbtBox() {
            debugger;
            if (document.aspnetForm.ctl00_BodyContentPH_rbtMultipleEntry.checked == true) {

                //document.getElementById("DivMultipleManualDiv").style.display = "block";
                document.getElementById("divMultipleManualEntry").style.display = "block";
                document.getElementById("divSingleManualEntry").style.display = "none";
                document.aspnetForm.ctl00_BodyContentPH_rbtSingleEntry.checked = false;
                document.aspnetForm.ctl00_BodyContentPH_rbtMultipleEntry.checked = true;

            }
            else {
                //document.getElementById("DivMultipleManualDiv").style.display = "none";
                document.getElementById("divMultipleManualEntry").style.display = "none";
                document.getElementById("divSingleManualEntry").style.display = "block";
                document.aspnetForm.ctl00_BodyContentPH_rbtMultipleEntry.checked = false;
                document.aspnetForm.ctl00_BodyContentPH_rbtSingleEntry.checked = true;

            }
        }

        //function showGroupEntry() {
        //    if (document.aspnetForm.ctl00_BodyContentPH_rbtGroup.checked == true) {
        //        document.getElementById("divGroupEmployees").style.display = "block";
        //        document.getElementById("divEmployees").style.display = "none";
        //        document.getElementById("div_Employee").style.display = "none";
        //        document.getElementById("divGroupEntryType").style.display = "none";
        //        document.getElementById("ctl00_BodyContentPH_GroupEmployeeGrid").style.display = "block";
        //    }
        //    else {
        //        document.getElementById("divGroupEmployees").style.display = "none";
        //        document.getElementById("divEmployees").style.display = "none";
        //        document.getElementById("div_Employee").style.display = "block";
        //        if (document.getElementById("ctl00_BodyContentPH_grv_EmployeesGroup") != null) {
        //            document.getElementById("ctl00_BodyContentPH_grv_EmployeesGroup").outerHTML = "";
        //        }
        //        document.getElementById("divGroupEntryType").style.display = "none";
        //        document.getElementById("ctl00_BodyContentPH_GroupEmployeeGrid").style.display = "none";
        //    }
        //}
        function FillMultipleInPunchTypeHidden() {
            var InPunchType;
            var InPunchTypeSelectedIndex = document.aspnetForm.ctl00_BodyContentPH_ddlINpunch.selectedIndex;
            InPunchType = document.aspnetForm.ctl00_BodyContentPH_ddlINpunch.options[InPunchTypeSelectedIndex].value;
            document.aspnetForm.ctl00_BodyContentPH_hdn_InPunchType.value = InPunchType;
        }
        function FillMultipleOutPunchTypeHidden() {
            var OutPunchType;
            var OutPunchTypeSelectedIndex = document.aspnetForm.ctl00_BodyContentPH_ddlOutpunch.selectedIndex;
            OutPunchType = document.aspnetForm.ctl00_BodyContentPH_ddlOutpunch.options[OutPunchTypeSelectedIndex].value;
            document.aspnetForm.ctl00_BodyContentPH_hdn_OutPunchType.value = OutPunchType;
        }

        function FillInPunchTypeHidden() {
            var InPunchType;
            var InPunchTypeSelectedIndex = document.aspnetForm.ctl00_BodyContentPH_ddlInPunchTypes.selectedIndex;
            InPunchType = document.aspnetForm.ctl00_BodyContentPH_ddlInPunchTypes.options[InPunchTypeSelectedIndex].value;
            document.aspnetForm.ctl00_BodyContentPH_hdn_InPunchType.value = InPunchType;
        }
        function FillOutPunchTypeHidden() {
            var OutPunchType;
            var OutPunchTypeSelectedIndex = document.aspnetForm.ctl00_BodyContentPH_ddlOutPunchTypes.selectedIndex;
            OutPunchType = document.aspnetForm.ctl00_BodyContentPH_ddlOutPunchTypes.options[OutPunchTypeSelectedIndex].value;
            document.aspnetForm.ctl00_BodyContentPH_hdn_OutPunchType.value = OutPunchType;
        }
        function ClearInDate() {
            document.aspnetForm.ctl00_BodyContentPH_txt_InDate.value = "";
            return false;
        }
        function ClearInTime() {
            document.aspnetForm.ctl00_BodyContentPH_txt_ShiftIn.value = "";
            return false;
        }
        function ClearOutDate() {
            document.aspnetForm.ctl00_BodyContentPH_txt_OutDate.value = "";
            return false;
        }
        function ClearOutTime() {
            document.aspnetForm.ctl00_BodyContentPH_txt_ShiftOut.value = "";
            return false;
        }
        function ManualEntryValidation() {
            var ShiftIn = document.aspnetForm.ctl00_BodyContentPH_txt_ShiftIn.value;
            var InDate = document.aspnetForm.ctl00_BodyContentPH_txt_InDate.value;
            var InTerminals = document.aspnetForm.ctl00_BodyContentPH_ddlInTerminals.selectedIndex;
            var InPunchTypes = document.aspnetForm.ctl00_BodyContentPH_ddlInPunchTypes.selectedIndex;
            var weekDay = document.aspnetForm.ctl00_BodyContentPH_txt_InDate;
            var weekDay2 = document.aspnetForm.ctl00_BodyContentPH_txt_OutDate;
            var DateFormat = document.getElementById('ctl00_BodyContentPH_Hidden1').value;
            var txt_EmployeeId = document.getElementById('ctl00_BodyContentPH_txt_EmployeeId');
            var ddlEntranceName = document.getElementById('ctl00_BodyContentPH_ddlEntranceName');
            var txt_Reason = document.getElementById('ctl00_BodyContentPH_txt_Reason');
            var rangeDemoFormat = document.getElementById('ctl00_BodyContentPH_Hidden1').value;
            if (rangeDemoFormat == 'DD-MMM-YYYY') {
                var Earlier = "01-Jan-1900"; var Final = "31-Dec-9999";
            }
            else {
                var Earlier = "01/01/1900"; var Final = "12/31/9999";
            }
            var rangeDemoFormats = document.getElementById('ctl00_BodyContentPH_hiddenTime').value;
            if (document.getElementById('ctl00_BodyContentPH_rbtSingle').checked == true) {
                if (txt_EmployeeId.value.length == 0) {
                    alert(EntertheEmployeeID);
                    document.getElementById('ctl00_BodyContentPH_txt_EmployeeId').focus();
                    return false;
                }
            }
            if (document.getElementById('ctl00_BodyContentPH_txt_InDate').value == "" && document.getElementById('ctl00_BodyContentPH_txt_ShiftIn').value == "" && document.getElementById('ctl00_BodyContentPH_txt_OutDate').value == "" && document.getElementById('ctl00_BodyContentPH_txt_ShiftOut').value == "") {
                alert(ValidateInOutDate);
                document.getElementById('ctl00_BodyContentPH_txt_InDate').focus();
                return false;
            }
            if (ddlEntranceName.options[ddlEntranceName.selectedIndex].value == "-Select-") {
                alert(SelectEntranceName);
                return false;
            }
            if (ShiftIn != "" || InDate != "") {
                if (InPunchTypes == 0) {
                    alert(SelPunchTypes);
                    document.aspnetForm.ctl00_BodyContentPH_ddlInPunchTypes.focus();
                    return false;
                }
                if (ShiftIn != "") {
                    if (InDate == "") {
                        alert(FillIndate);
                        document.aspnetForm.ctl00_BodyContentPH_txt_InDate.focus();
                        return false;
                    }
                    else {
                        if (checkDate(weekDay, DateFormat, Monthfourdigit, Datefourdigit, Invalidyearentry, Invalidmonthentry, Invaliddateentry, DateformatDDMONYYYY, Entertime, Valueforhours, Invalidvalueforminutes, Invalidtimeformat, EntervalidDateandTime, ValiddatemonthMMDDYYHHMM, ValiddatemonthMMDDYYHHMMTT, EntervalidDateandTime, Invalidvalueforhours, Invalidvalueforminites)) {
                        }
                        else {
                            return false;
                        }
                    }
                }
                if (InDate != "") {
                    if (ShiftIn == "") {
                        alert(FillInTime);
                        document.aspnetForm.ctl00_BodyContentPH_txt_ShiftIn.focus();
                        return false;
                    }
                }
                if (weekDay2.value != '') {
                    if (checkDate(weekDay2, DateFormat, Monthfourdigit, Datefourdigit, Invalidyearentry, Invalidmonthentry, Invaliddateentry, DateformatDDMONYYYY, Entertime, Valueforhours, Invalidvalueforminutes, Invalidtimeformat, EntervalidDateandTime, ValiddatemonthMMDDYYHHMM, ValiddatemonthMMDDYYHHMMTT, EntervalidDateandTime, Invalidvalueforhours, Invalidvalueforminites)) {
                    }
                    else {
                        return false;
                    }
                }
            }
            var ShiftOut = document.aspnetForm.ctl00_BodyContentPH_txt_ShiftOut.value;
            var OutDate = document.aspnetForm.ctl00_BodyContentPH_txt_OutDate.value;
            var OutTerminals = document.aspnetForm.ctl00_BodyContentPH_ddlOutTerminals.selectedIndex;
            var OutPunchTypes = document.aspnetForm.ctl00_BodyContentPH_ddlOutPunchTypes.selectedIndex;
            if (ShiftOut != "" || OutDate != "") {
                if (OutPunchTypes == 0) {
                    alert(SelectOutPunchType);
                    document.aspnetForm.ctl00_BodyContentPH_ddlOutPunchTypes.focus();
                    return false;
                }
                if (ShiftOut != "") {
                    if (OutDate == "") {
                        alert(FillOutDate);
                        document.aspnetForm.ctl00_BodyContentPH_txt_OutDate.focus();
                        return false;
                    }
                }
                if (OutDate != "") {
                    if (ShiftOut == "") {
                        alert(FillOutTime);
                        document.aspnetForm.ctl00_BodyContentPH_txt_ShiftOut.focus();
                        return false;
                    }
                }
            }
            if (txt_Reason.value.length == 0) {
                alert(EnterReason);
                document.getElementById('ctl00_BodyContentPH_txt_Reason').focus();
                return false;
            }
            if (txt_Reason.value.trim() == 0) {
                alert(EnterReason);
                document.getElementById('ctl00_BodyContentPH_txt_Reason').focus();
                return false;
            }
            if (document.aspnetForm.ctl00_BodyContentPH_rbtGroup.checked == true && document.aspnetForm.ctl00_BodyContentPH_rbtBusLate.checked == true) {
                var RouteName = document.aspnetForm.ctl00_BodyContentPH_ddlRouteName.selectedIndex;
                if (RouteName == 0) {
                    alert(SelecttheRouteName);
                    return false;
                }
            }
            var regExp = "^((([0]?[1-9]|1[0-2])(:|\.)[0-5][0-9]((:|\.)[0-5][0-9])?( )?(AM|am|aM|Am|PM|pm|pM|Pm))|(([0]?[0-9]|1[0-9]|2[0-3])(:|\.)[0-5][0-9]((:|\.)[0-5][0-9])?))$";
            var TimeFormat = document.getElementById('ctl00_BodyContentPH_Hidden2').value;
            var length = 0;
            if (TimeFormat != "LT") {
                length = 8;
                regExp = /^(0[1-9]|1[0-9]|2[0-3]):([0-5]\d):([0-5]\d)$/;
            }
            else {
                length = 8;
                regExp = /^(0[1-9]|1[012]):([0-5]\d)\s?(?:AM|PM)?$/i;
            }
            //            if (document.getElementById("<%=txt_ShiftIn.ClientID%>").value != "") {
            //                if (parseInt(document.getElementById("<%=txt_ShiftIn.ClientID%>").value.length) != length) {
            //                    document.getElementById("<%=txt_ShiftIn.ClientID%>").focus();
            //                    alert(InTimeCorrectFormat);
            //                    return false;
            //                }
            //                if (document.getElementById("<%=txt_ShiftIn.ClientID%>").value.search(regExp) == -1) {
            //                    document.getElementById("<%=txt_ShiftIn.ClientID%>").focus();
            //                    alert(InTimeCorrectFormat);
            //                    return false;
            //                }
            //            }
            //            if (document.getElementById("<%=txt_ShiftOut.ClientID%>").value != "") {
            //                if (parseInt(document.getElementById("<%=txt_ShiftOut.ClientID%>").value.length) != length) {
            //                document.getElementById("<%=txt_ShiftOut.ClientID%>").focus();
            //                    alert(OutTimeFormat);
            //                    return false;
            //                }
            //                if (document.getElementById("<%=txt_ShiftOut.ClientID%>").value.search(regExp) == -1) {
            //                document.getElementById("<%=txt_ShiftOut.ClientID%>").focus();
            //                    alert(OutTimeFormat);
            //                    return false;
            //                }
            //            }
            if (confirm(ConfirmSave) == true) {
                return true;
            }
            else {
                return false;
            }
        }
        function FillReason() {
            if (document.aspnetForm.ctl00_BodyContentPH_ddl_Reason.selectedIndex == 9) {
                document.aspnetForm.ctl00_BodyContentPH_txt_Reason.style.display = 'block';
                document.aspnetForm.ctl00_BodyContentPH_txt_Reason.style.visibility = 'visible';

            }
            else {
                document.aspnetForm.ctl00_BodyContentPH_txt_Reason.style.display = 'none';
                document.aspnetForm.ctl00_BodyContentPH_txt_Reason.style.visibility = 'hidden';
            }
            var txt_Reason = document.aspnetForm.ctl00_BodyContentPH_txt_Reason;
            txt_Reason.value = '';
            txt_Reason.value = (document.aspnetForm.ctl00_BodyContentPH_ddl_Reason.selectedIndex != 0) ?
                (document.aspnetForm.ctl00_BodyContentPH_ddl_Reason.selectedIndex == 9 ? document.aspnetForm.ctl00_BodyContentPH_ddl_Reason.value + ' - ' : document.aspnetForm.ctl00_BodyContentPH_ddl_Reason.value) : '';
            document.aspnetForm.ctl00_BodyContentPH_txt_Reason.focus();
        }
    </script>


    <div class="content-header">
        <h1 style="background-image: url('../dist/img/Att-code.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>

    <div class="content">

        <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"
                                    Font-Bold="true" Font-Size="12px" Font-Italic="true" Font-Family="Arial" Text="Please Wait..."></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>
        </asp:UpdatePanel>

        <div id="myModal" class="modal modal-default fade" role="dialog">
            <div class="modal-dialog" style="min-width: 50%;">
                <!-- Modal content-->
                <div class="modal-content" style="margin-top: 50px;width:450px;height:400px">
                    <div class="modal-header">
                        <button type="button" id="closemodal" class="close" data-dismiss="modal" style="border-radius: 50px;">
                            &times;</button>
                        <h4 class="modal-title">
                            <asp:Label ID="lblSelectEmployee" runat="server" Text="Select Employee"></asp:Label></h4>
                    </div>
                    <div class="modal-body" style="padding-top: 0px;width:460px;">
                        <iframe id="iframePopup" runat="server" scrolling="auto" width="100%" height="300px"
                            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 class="inr-ftr">
            <div class="row">
                <div class="col-sm-12">
                    <div class="inr-fil-text pull-left">
                        <asp:Label ID="lblFilter" runat="server" Text="Filter"></asp:Label>
                    </div>
                    <div class="pull-right">
                        <h6>
                            <span style="color: Red">|</span><span style="padding-left: 10px; padding-right: 10px"><asp:Label
                                ID="lbl_IndicatesMandatoryFields" runat="server"></asp:Label>
                                (2 No.)</span>
                        </h6>
                    </div>
                    <div class="clearfix">
                    </div>
                </div>
            </div>
        </div>

        <div class="emp-filter">

            <div class="col-md-12" style="color: Red; display: none">
                <asp:Label ID="lbl_Error" runat="server" ForeColor="Red"></asp:Label>
            </div>

            <div class="form-horizontal">

                <div class="row col-md-12">
                    <div class="row form-group">
                        <div class="col-md-2">
                            <asp:Label ID="lblType" runat="server" Text="Manual Entry for"></asp:Label>
                        </div>
                        <div class="col-md-5">

                            <div class="col-md-3">
                                <asp:RadioButton ID="rbtSingleEntry" CssClass="radioLeave radioLeave-primary" Checked="true" runat="server"
                                    Text=" Single" GroupName="A" onclick="rbtBox();" />
                            </div>
                            <div class="col-md-3">
                                <asp:RadioButton ID="rbtMultipleEntry" CssClass="radioLeave radioLeave-primary" runat="server"
                                    Text=" Multiple" GroupName="A" onclick="rbtBox();" />

                            </div>
                        </div>
                        <%--<div id="DivMultipleManualDiv" style="display: none">
                            <div class="col-md-2">
                                <asp:Button ID="btnEmployeeAdd" CssClass="btn btn-primary" runat="server" Text="Add" OnClientClick="return OpenWindowGroupEntry();" />
                            </div>
                        </div>--%>
                    </div>
                </div>

                <div class="clearfix">
                </div>
                <div class="row">
                    <div class="row">
                        <div class="line18">
                        </div>
                    </div>
                </div>

                <div class="row">
                    <div id="divMultipleManualEntry" style="display: none">

                        <div class="row">
                            <div class="col-md-12">
                                <asp:UpdatePanel ID="upOrgLevel" runat="server" UpdateMode="Conditional">
                                    <ContentTemplate>
                                        <%--<asp:PlaceHolder ID="PlaceHolderMonthlyAttendance" runat="server">--%>
                                        <uc:OrganizationLevel ID="uc_orglevel" runat="server" />
                                        <%-- </asp:PlaceHolder>--%>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </div>
                        </div>


                        <div class="clearfix">
                        </div>
                        <div class="row">
                            <div class="row">
                                <div class="form-group" style="padding-top:20px">
                                </div>
                            </div>
                        </div>

                        <div id="divEmployeeDetails" runat="server" style="display: none">
                            <div class="row form-group">
                                <div class="col-md-2">
                                    <asp:Label ID="lblEmployeeName" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:TextBox onpaste="return true" ID="txtEmployeeName" runat="server" CssClass="form-control"
                                        Style="resize: none;" TextMode="multiLine"></asp:TextBox>
                                </div>
                                <div class="col-md-1">
                                </div>
                                <div class="col-md-2">
                                    <asp:Label ID="lblEmployeeId" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:TextBox onpaste="return true" ID="txtEmpId" runat="server" CssClass="form-control"
                                        Style="resize: none;" TextMode="multiLine"></asp:TextBox>
                                </div>
                            </div>
                            <div class="row form-group">
                                <div class="col-md-2">
                                    <asp:Label ID="lblEmpCategory" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:DropDownList ID="ddlEmpCatagory" runat="server" CssClass="form-control select2"
                                        AppendDataBoundItems="true">
                                        <asp:ListItem Value="0" Selected="True" Text="-Select-"></asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                                <div class="col-md-1">
                                </div>
                                <div class="col-md-2">
                                    <asp:Label ID="lblEmpType" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:DropDownList ID="ddlEmpType" runat="server" CssClass="form-control select2"
                                        AppendDataBoundItems="true">
                                        <asp:ListItem Value="0" Selected="True" Text="-Select-"></asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                            </div>
                            <div class="row form-group">
                                <div class="col-md-2">
                                    <asp:Label ID="lblDesignation" runat="server" Text="Designation"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:DropDownList ID="ddlDesignation" runat="server" CssClass="form-control select2"
                                        AppendDataBoundItems="true">
                                        <asp:ListItem Value="0" Selected="True" Text="All"></asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                                <div class="col-md-1">
                                </div>
                                <div class="col-md-2">
                                    <asp:Label ID="lblGender" runat="server" Text="Gender"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:DropDownList ID="ddlGender" runat="server" CssClass="form-control select2">
                                        <asp:ListItem Value="Both" Text="Both"></asp:ListItem>
                                        <asp:ListItem Value="Male" Text="Male"></asp:ListItem>
                                        <asp:ListItem Value="Female" Text="Female"></asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                            </div>
                        </div>


                        <div class="row" id="trView" runat="server">
                            <div class="col-md-5">
                            </div>
                            <div class="col-md-6">
                                <div class="pull-right-button">
                                    <asp:LinkButton ID="lnkbtnGrid" Text="&nbsp;&nbsp;Go" CssClass="btn save-btn" runat="server" OnClick="lnkbtnGrid_Click"
                                        OnClientClick="return DateEntryValidation()" />
                                </div>
                            </div>
                        </div>

                        <div class="clearfix">
                        </div>
                        <div class="row">
                            <div class="row">
                                <%--<div class="line18">--%>
                            </div>
                        </div>
                          <asp:HiddenField ID="hdnAdvancedplus" runat="server" Value="0" />
                                <asp:HiddenField ID="hdnSelectRow" runat="server" />
                                <asp:HiddenField ID="hdnGetAllid" runat="server" />
                        <div class="border-table new-space" id="divShift" runat="server" visible="false">
                            <div class="table-responsive" id="ABCD" style="display: none">
                                <%--Grid Add Here--%>
                                <asp:GridView CssClass="table das-table1" ID="grv_Shift" Width="100%" runat="server"
                                    AllowPaging="True" AutoGenerateColumns="False" PageSize="10" OnPageIndexChanging="grv_Shift_PageIndexChanging"
                                    OnRowDataBound="grv_Shift_RowDataBound" Font-Size="13px">
                                    <Columns>
                                        <asp:TemplateField HeaderStyle-CssClass="empheader">
                                            <HeaderTemplate>
                                                <%--<asp:Label ID="lblCheckAll" runat="server"></asp:Label>--%>
                                                <asp:CheckBox ID="checkall" runat="server" Text="" AutoPostBack="true" OnCheckedChanged="grv_CheckAll_CheckedChanged"
                                                    TextAlign="Right" />
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <asp:CheckBox ID="deletethis" runat="server" AutoPostBack="true" OnCheckedChanged="grv_Check_CheckedChanged"></asp:CheckBox>
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="center" />
                                            <HeaderStyle HorizontalAlign="center" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderStyle-CssClass="empheader GridColumn50">
                                            <ItemTemplate>
                                                <asp:Label ID="lbl_EmpId" Text='<%# Eval("Employee_Code_Id")%>' runat="server"></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Employee Name" HeaderStyle-CssClass="empheader GridColumn50 pull-left-button">
                                            <ItemTemplate>
                                                <asp:Label ID="lbl_EmpName" Text='<%# Eval("Employee Name")%>' runat="server" Style="word-wrap: break-word; display: inline-block; width: 320px;" CssClass="pull-left-button"></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>

                                    </Columns>
                                    <FooterStyle CssClass="grid-footer" />
                                    
                                    <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>

                            <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                            <ContentTemplate>
                              
                                <dxGridview:ASPxGridView ID="grv_EmpDetailss" EnableCallBacks="false" runat="server"
                                    OnHtmlRowCreated="grv_EmpDetailss_HtmlRowCreated" ClientInstanceName="grv_EmpDetailss"
                                    AutoGenerateColumns="false" Width="100%" KeyFieldName="Employee_Id">

                                    <Columns>
                                        <dxGridview:GridViewDataColumn VisibleIndex="0" HeaderStyle-VerticalAlign="Middle"
                                            Width="80px" HeaderStyle-HorizontalAlign="Center" CellStyle-VerticalAlign="Middle"
                                            CellStyle-HorizontalAlign="Center">
                                            <Settings AllowAutoFilter="false" />
                                            <HeaderTemplate>
                                                <input id="chkSelectAll" runat="server" type="checkbox" onclick="SelectAllOnThisPage(this)"/>
                                            </HeaderTemplate>
                                            <DataItemTemplate>
                                                <input id="chkSelect" runat="server" type="checkbox" onclick="SelectOnRow(this)" accesskey='<%# Eval("Employee_Id") %>'/>
                                            </DataItemTemplate>
                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                        </dxGridview:GridViewDataColumn>
                                        <dxGridview:GridViewDataTextColumn FieldName="Employee_Id" VisibleIndex="4" Visible="false">
                                            <DataItemTemplate>
                                                <asp:Label ID="lblEID" Text='<%# Eval("Employee_Id") %>' runat="server" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; word-wrap: break-word; display: inline-block;"></asp:Label>
                                            </DataItemTemplate>
                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                            <Settings ShowInFilterControl="False" />
                                        </dxGridview:GridViewDataTextColumn>
                                        
                                        <dxGridview:GridViewDataTextColumn FieldName="Employee Id" VisibleIndex="1"
                                            Width="50%">
                                            <DataItemTemplate>
                                                <asp:Label ID="lblEmpCode" Text='<%# Eval("Employee_Code_Id") %>' runat="server"
                                                    Style="overflow-y: auto; overflow-x: auto; word-break: break-all; word-wrap: break-word; display: inline-block;"></asp:Label>
                                            </DataItemTemplate>
                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                        </dxGridview:GridViewDataTextColumn>
                                        
                                        <dxGridview:GridViewDataTextColumn FieldName="Employee Name"
                                            VisibleIndex="2" Width="50%">
                                            <DataItemTemplate>
                                                <asp:Label ID="lblEname" Text='<%# Eval("Employee Name") %>' runat="server"
                                                    Style="overflow-y: auto; overflow-x: auto; word-break: break-all; word-wrap: break-word; display: inline-block;"></asp:Label>
                                            </DataItemTemplate>
                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                        </dxGridview:GridViewDataTextColumn>
                                       
                                    </Columns>
                                    <ClientSideEvents CustomizationWindowCloseUp="function(s, e) { UpdateCustomizationWindowValue(); }" />
                                    <SettingsPager PageSize="10">
                                        <PageSizeItemSettings Visible="true" ShowAllItem="true" Items="10,20,50,100,200,500" />
                                    </SettingsPager>
                                    <Settings ShowFilterRow="true" ShowFilterRowMenu="true" HorizontalScrollBarMode="Hidden" ShowGroupPanel="true" VerticalScrollBarMode="Hidden" VerticalScrollableHeight="400" />
                                    <SettingsText EmptyDataRow="No Records Found" />
                                    <SettingsSearchPanel Visible="true" HighlightResults="true" ShowApplyButton="true" ShowClearButton="true" />
                                    <SettingsCustomizationWindow Enabled="True" />
                                    <SettingsBehavior AutoExpandAllGroups="True" ColumnResizeMode="Control" />
                                    <GroupSummary>
                                        <dxGridview:ASPxSummaryItem FieldName="DepartmentName" SummaryType="Count" />
                                    </GroupSummary>
                                    <SettingsBehavior AllowDragDrop="true" />
                                </dxGridview:ASPxGridView>
                                <dxGridview:ASPxGridViewExporter ID="ASPxGridViewExporter1" runat="server" GridViewID="grv_EmpDetailss">
                                    <PageFooter Right="[Page # of Pages #]">
                                    </PageFooter>
                                </dxGridview:ASPxGridViewExporter>
                            </ContentTemplate>
                        </asp:UpdatePanel>


                            <div class="clearfix">
                            </div>
                            <div class="clearfix">
                            </div>
                            <div class="row">
                                <div class="row">
                                    <%--<div class="line18">--%>
                                </div>
                            </div>

                            <div class="row col-md-12" style="padding-top: 40px;">
                                <div class="row form-group" id="Old" style="display: none">
                                    <div class="col-md-3">
                                        <asp:Label ID="lblPunch" runat="server" Text="Punch Type"></asp:Label>
                                    </div>
                                    <div class="col-md-5">

                                        <div class="col-md-2">
                                            <asp:RadioButton ID="rbnIn" CssClass="radioLeave radioLeave-primary" runat="server"
                                                Text=" IN" GroupName="B" onclick="rbtBox1();" />
                                        </div>
                                        <div class="col-md-3">
                                            <asp:RadioButton ID="rbnOut" CssClass="radioLeave radioLeave-primary" runat="server"
                                                Text=" OUT" GroupName="B" onclick="rbtBox1();" />

                                        </div>
                                    </div>

                                </div>
                            </div>



                            <div id="DivMultipleInout" style="display: block">

                                <div id="DivMultipleINPunch" style="display: block">
                                    <div class="col-md-12">
                                        <div class="row form-group">
                                            <div class="col-md-2">
                                                <asp:Label ID="lbl_Dates" style="font-size:12px" runat="server"></asp:Label>
                                            </div>
                                            <div class="col-md-2">
                                                <asp:TextBox onpaste="return true" ID="txt_Dates" runat="server" Style="width: 180px;"
                                                     CssClass="form-control man-dat"
                                                    onCut="return false" onDrop="return false"></asp:TextBox>
                                                
                                            </div>

                                            <div class="col-md-2">
                                                <asp:Label ID="lbl_Times" style="font-size:12px" runat="server"></asp:Label>
                                            </div>
                                            <div class="col-md-2" style="width: 150px;">
                                                <asp:TextBox onpaste="return true" ID="txt_Times" runat="server" CssClass="form-control man-dat"
                                                    MaxLength="12" onCut="return false" onDrop="return false"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="col-md-12">
                                        <div class="row form-group col-md-offset-6">

                                            <div class="col-md-1 col-md-offset-7">
                                                <asp:LinkButton ID="btn_ShiftIN" style="Width:80px;" CssClass="btn save-btn" runat="server"
                                                    Text="Shift  IN" CausesValidation="False" OnClientClick="GetSelectedRowsData(); return false;" OnClick="btn_ShiftIN_Click" />
                                            </div>
                                            
                                            <div class="col-md-1 ">
                                                <asp:LinkButton ID="btn_BreakOut" style="Width:80px;" CssClass="btn save-btn" runat="server"
                                                    Text="Break Out" CausesValidation="False" OnClientClick="GetSelectedRowsData(); return false;" OnClick="btn_BreakOut_Click" />
                                            </div>
                                            <div class="col-md-1">
                                                <asp:LinkButton ID="btn_BreakIN" style="Width:80px;" CssClass="btn save-btn" runat="server"
                                                    Text="Break IN" CausesValidation="False" OnClientClick="GetSelectedRowsData(); return false;" OnClick="btn_BreakIN_Click" />
                                            </div>
                                            <div class="col-md-2">
                                                <asp:LinkButton ID="btn_ShiftOut" style="Width:80px;" CssClass="btn save-btn" runat="server"
                                                    Text="Shift Out" CausesValidation="False" OnClientClick="GetSelectedRowsData(); return false;" OnClick="btn_ShiftOut_Click" />
                                            </div>


                                        </div>


                                    </div>



                                </div>


                                <div id="DivMultipleOutPunch" style="display: none">

                                     <div id="DivMultipleINPunchOld" style="display: none">
                                            <div class="col-md-2">
                                                <asp:Label ID="lblPunchTypes" runat="server" Text="In Punch Type"></asp:Label>
                                            </div>
                                            <div class="col-md-3">
                                                <asp:DropDownList ID="ddlINpunch" runat="server" CssClass="form-control select2 man-dat" onchange="javascript:FillMultipleInPunchTypeHidden();"
                                                    AppendDataBoundItems="true">
                                                    <asp:ListItem Text="-Select-" Value="0"></asp:ListItem>
                                                </asp:DropDownList>

                                            </div>
                                            </div>
                                    <div class="col-md-12">
                                        <div class="row form-group">
                                            <div class="col-md-2">
                                                <asp:Label ID="lblPunchOuts" runat="server" Text="Out Punch Type"></asp:Label>
                                            </div>
                                            <div class="col-md-3">
                                                <asp:DropDownList ID="ddlOutpunch" runat="server" CssClass="form-control select2 man-dat" onchange="javascript:FillMultipleOutPunchTypeHidden();"
                                                    AppendDataBoundItems="true">
                                                    <asp:ListItem Text="-Select-" Value="0"></asp:ListItem>
                                                </asp:DropDownList>

                                            </div>


                                           <%-- <div class="col-md-1">
                                                <asp:LinkButton ID="btn_BreakOut" CssClass="btn save-btn" runat="server"
                                                    Text="Break Out" CausesValidation="False" OnClick="btn_BreakOut_Click" />
                                            </div>
                                            <div class="col-md-2">
                                                <asp:LinkButton ID="btn_ShiftOut" CssClass="btn save-btn" runat="server"
                                                    Text="Shift Out" CausesValidation="False" OnClick="btn_ShiftOut_Click" />
                                            </div>--%>

                                        </div>
                                    </div>


                                </div>


                            </div>


                        </div>



                    </div>

                    <div id="divSingleManualEntry" style="display: block">

                        <div class="col-md-12">

                            <div class="row" style="display: none">
                                <div class="col-md-12">
                                    <asp:Label ID="lbl_TypeOfManualEntry" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-12">
                                    <asp:RadioButton ID="rbtSingle" runat="server" GroupName="EntryType" onclick="showGroupEntry();"
                                        TabIndex="1" />
                                    <asp:RadioButton ID="rbtGroup" runat="server" GroupName="EntryType" onclick="showGroupEntry();"
                                        Style="display: none" />
                                </div>
                            </div>

                            <div class="row" id="GroupEmployeeGrid" runat="server">
                                <div class="col-md-12">
                                    <asp:GridView ID="grv_EmployeesGroup" CssClass="table table-responsive table-bordered"
                                        runat="server" AutoGenerateColumns="False" Width="100%" AllowPaging="true" PageSize="10"
                                        CellPadding="4" AutoGenerateDeleteButton="True" OnPageIndexChanging="grv_Employees_PageIndexChanging"
                                        OnRowDeleting="grv_Employees_RowDeleting">
                                        <Columns>
                                            <asp:TemplateField HeaderText="EmpId" Visible="false">
                                                <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="Employee Id">
                                                <ItemTemplate>
                                                    <itemstyle horizontalalign="Center" />
                                                    <headerstyle horizontalalign="Center" />
                                                    <asp:Label ID="lbl_EmpId" Text='<%# Eval("EmployeeId")%>' runat="server"></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Employee Name">
                                                <ItemTemplate>
                                                    <asp:Label ID="lbl_EmpName" Text='<%# Eval("EmployeeName")%>' runat="server"></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="LoginEmployeeId" Visible="false">
                                                <ItemTemplate>
                                                    <itemstyle horizontalalign="Center" />
                                                    <headerstyle horizontalalign="Center" />
                                                    <asp:Label ID="lbl_LoginEmployeeId" Text='<%# Eval("LoginEmployeeId")%>' runat="server"></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>
                                    </asp:GridView>
                                </div>
                            </div>

                            <div id="divGroupEntryType" style="display: none">
                                <div class="row">
                                    <div class="col-md-12">
                                        <asp:Label ID="lbl_GroupEntryType" runat="server"></asp:Label>
                                    </div>
                                    <div class="col-md-12">
                                        <asp:RadioButton ID="rbtBusLate" runat="server" GroupName="GroupEntryType"
                                            Checked="True" />
                                        <asp:RadioButton ID="rbtOnDuty" Visible="false" runat="server" GroupName="GroupEntryType" />
                                    </div>
                                    <%-- onclick="show(); onclick="show();"--%>
                                </div>
                            </div>

                            <div id="divGroupEmployees" style="display: none">
                                <div class="row">
                                    <div class="col-md-12">
                                        <asp:Label ID="lblGroupEntryEmployees" runat="server"></asp:Label>
                                    </div>
                                    <div class="col-md-12">
                                        <asp:Button ID="btnGroupEmployees" CssClass="btn btn-primary" runat="server" OnClientClick="return OpenWindowGroupEntry();" />
                                    </div>
                                </div>
                            </div>

                            <div class="row form-group">
                                <div id="div_Employee">
                                    <div class="col-md-2">
                                        <asp:Label ID="lbl_EmployeeId" runat="server"></asp:Label>
                                    </div>
                                    <div class="col-md-3">
                                        <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="EmpName('ManualTimeEntry');" OnTextChanged="txt_EmployeeId_TextChanged" AutoPostBack="true"
                                                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 OpenWindowShiftExchange('txt_EmployeeId','ManualTimeEntry');" />
                                            </span>
                                        </div>
                                    </div>
                                </div>
                                <div id="div_Employeenew" style="display: none">
                                    <div class="col-md-2">
                                        <asp:Label ID="Label1" runat="server"></asp:Label>
                                    </div>
                                    <div class="col-md-3">
                                        <div class="input-group input-group-sm">
                                            <asp:TextBox onpaste="return true" ID="TextBox1" runat="server" CssClass="form-control man-dat"
                                                MaxLength="15" onblur="EmpName('ManualTimeEntry');" onkeypress="return acceptCharsNum_MaxLength(event,this,15,MaxLength);"></asp:TextBox>
                                            <span class="input-group-btn">
                                                <asp:LinkButton ID="LinkButton1" data-toggle="modal" data-target="#myModal" CssClass="btn save-btn btn-flat fa fa-search"
                                                    runat="server" OnClientClick="return OpenWindowShiftExchange('txt_EmployeeId','ManualTimeEntry');" />
                                            </span>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-1">
                                </div>
                                <div class="col-md-2">
                                    <asp:Label ID="lbl_EmployeeName" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:TextBox onpaste="return true" CssClass="form-control" ID="txt_Name" runat="server"
                                        ReadOnly="True"></asp:TextBox>
                                </div>
                            </div>

                            <div id="divEmployees" style="display: none">
                                <div class="row">
                                    <div class="col-md-12">
                                        <asp:Label ID="lbl_Employees" runat="server"></asp:Label>
                                    </div>
                                    <div class="col-md-12">
                                        <asp:Button ID="btn_ViewEmployees" CssClass="btn btn-primary" runat="server" OnClientClick="return OpenWindow();" />
                                        <br />
                                        <br />
                                        <asp:GridView ID="grvEmployees" CssClass="table table-responsive table-bordered"
                                            runat="server" AutoGenerateColumns="False" Width="100%" AllowPaging="true" PageSize="10"
                                            OnPageIndexChanging="grvEmployees_PageIndexChanging" CellPadding="4" AutoGenerateDeleteButton="True"
                                            OnRowDeleting="grvEmployees_RowDeleting" OnRowDataBound="grvEmployees_RowDataBound">
                                            <Columns>
                                                <asp:TemplateField HeaderText="EmpId" Visible="false">
                                                    <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">
                                                    <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">
                                                    <ItemTemplate>
                                                        <itemstyle horizontalalign="Center" />
                                                        <headerstyle horizontalalign="Center" />
                                                        <asp:Label ID="lbl_EmpId" Text='<%# Eval("EmployeeId")%>' runat="server"></asp:Label>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="Employee Name">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lbl_EmpName" Text='<%# Eval("EmployeeName")%>' runat="server"></asp:Label>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                            </Columns>
                                        </asp:GridView>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-md-12">
                                        <asp:RadioButton ID="rbExcludingWeeklyOff" Checked="true" runat="server" GroupName="Weekly Off" />
                                        <asp:RadioButton ID="rbIncludingWeeklyOff" runat="server" GroupName="Weekly Off"
                                            Visible="false" />
                                    </div>
                                </div>
                            </div>

                            <div class="row form-group">
                                <div class="col-md-2">
                                    <asp:Label ID="lbl_ManualTimeEntryDate" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:Label ID="lbl_EntryDate" runat="server" CssClass="form-control"></asp:Label>
                                </div>
                            </div>

                            <div class="row" style="display: none">
                                <div class="col-md-2">
                                    <asp:Label ID="lbl_EntranceName" runat="server"></asp:Label>
                                    <font color="#ff0000">*</font>
                                </div>
                                <div class="col-md-3">
                                    <asp:DropDownList ID="ddlEntranceName" runat="server" AppendDataBoundItems="True"
                                        CssClass="form-control select2" onchange="return ManualTimeEntryTerminals(SelectEntranceID,NoRecords,Errorinretrivingdetails,Select);">
                                        <asp:ListItem Text="-Select-" Value="-Select-"></asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                            </div>

                            <div class="row form-group">
                                <div class="col-md-2">
                                    <asp:Label ID="lbl_InDate" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:TextBox onpaste="return true" ID="txt_InDate" runat="server" onCut="return false"
                                        CssClass="form-control" onDrop="return false"></asp:TextBox>
                                    <asp:CustomValidator ID="CustomValidator1" runat="server" EnableClientScript="False"
                                        OnServerValidate="CheckInDate" SetFocusOnError="True" ControlToValidate="txt_InDate"
                                        Display="None"></asp:CustomValidator>
                                </div>
                                <div class="col-md-1">
                                </div>
                                <div class="col-md-2">
                                    <asp:Label ID="lbl_InTime" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:TextBox onpaste="return true" ID="txt_ShiftIn" runat="server" MaxLength="12"
                                        CssClass="form-control" onCut="return false" onDrop="return false"></asp:TextBox>
                                </div>
                            </div>

                            <div class="row" style="display: none">
                                <div class="col-md-2">
                                    <asp:Label ID="lbl_InTerminal" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:DropDownList ID="ddlInTerminals" runat="server" CssClass="form-control select2">
                                    </asp:DropDownList><input id="hdn_InTerminal" type="hidden" runat="server" />
                                </div>
                            </div>

                            <div class="row form-group">
                                <div class="col-md-2">
                                    <asp:Label ID="lbl_InPunchType" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:DropDownList ID="ddlInPunchTypes" runat="server" CssClass="form-control select2" onchange="javascript:FillInPunchTypeHidden();"
                                        AppendDataBoundItems="true">
                                        <asp:ListItem Text="-Select-" Value="0"></asp:ListItem>
                                    </asp:DropDownList>
                                    <input id="hdn_InPunchType" type="hidden" runat="server" />
                                </div>
                            </div>

                            <div class="row form-group">
                                <div class="col-md-2">
                                    <asp:Label ID="lbl_OutDate" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:TextBox onpaste="return true" ID="txt_OutDate" runat="server" CssClass="form-control"
                                        onCut="return false" onDrop="return false"></asp:TextBox>
                                    <asp:CustomValidator ID="CustomValidator3" runat="server" Display="None" EnableClientScript="False"
                                        OnServerValidate="CheckOutDate" SetFocusOnError="True" ControlToValidate="txt_OutDate"></asp:CustomValidator>
                                </div>
                                <div class="col-md-1">
                                </div>
                                <div class="col-md-2">
                                    <asp:Label ID="lbl_OutTime" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:TextBox onpaste="return true" ID="txt_ShiftOut" runat="server" CssClass="form-control"
                                        MaxLength="12" onCut="return false" onDrop="return false"></asp:TextBox>
                                </div>
                            </div>

                            <div class="row" style="display: none">
                                <div class="col-md-2">
                                    <asp:Label ID="lbl_OutTerminal" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:DropDownList ID="ddlOutTerminals" runat="server" CssClass="form-control select2" onchange="return ManualTimeEntry_OutPunchTypes(SelOutTerminal,NoRecords,Errorinretrivingdetails,Select);">
                                    </asp:DropDownList><input id="hdn_OutTerminal" type="hidden" runat="server" />
                                </div>
                            </div>

                            <div class="row form-group">
                                <div class="col-md-2">
                                    <asp:Label ID="lbl_OutPunchType" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:HiddenField ID="Hidden1" runat="server" />
                                    <asp:HiddenField ID="Hidden2" runat="server" />
                                    <asp:HiddenField ID="hiddenTime" runat="server" />
                                    <asp:DropDownList ID="ddlOutPunchTypes" runat="server" CssClass="form-control select2" AppendDataBoundItems="true"
                                        onchange="javascript:FillOutPunchTypeHidden();">
                                        <asp:ListItem Text="-Select-" Value="0"></asp:ListItem>
                                    </asp:DropDownList>
                                    <input id="hdn_OutPunchType" type="hidden" runat="server" />
                                </div>
                                <div class="col-md-1">
                                </div>
                                <div class="col-md-2">
                                    <asp:Label ID="lbl_Reason" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <div>
                                        <asp:DropDownList ID="ddl_Reason" runat="server" CssClass="form-control select2" AppendDataBoundItems="true" onchange="javascript:FillReason();">
                                            <asp:ListItem Text="Select" Value="0">
                                            <%--"Select", "MT_Reason_Missed_Swipe_In", "MT_Reason_Missed_Swipe_Out", 
                                                "MT_Reason_Missed_In_Out", "MT_Reason_Damaged_Card",
                                                 "MT_Reason_Left_Early", "MT_Reason_Others"--%>
                                            </asp:ListItem>
                                            <asp:ListItem Text="Damaged Card" Value="Damaged Card"></asp:ListItem>
                                            <asp:ListItem Text="Device Not Working" Value="Device Not Working"></asp:ListItem>
                                            <asp:ListItem Text="Department Training" Value="Department Training"></asp:ListItem>
                                            <asp:ListItem Text="Finger Print Problem" Value="Finger Print Problem"></asp:ListItem>
                                            <asp:ListItem Text="Forgot Swipe In" Value="Forgot Swipe In"></asp:ListItem>
                                            <asp:ListItem Text="Forgot Swipe Out" Value="Forgot Swipe Out"></asp:ListItem>
                                            <asp:ListItem Text="Forgot In and Out" Value="Forgot Swipe In and Out"></asp:ListItem>
                                            <asp:ListItem Text="Left Early" Value="Left Early"></asp:ListItem>
                                            <asp:ListItem Text="Others" Value="Others"></asp:ListItem>
                                            <asp:ListItem Text="Que at Device" Value="Que at Device"></asp:ListItem>
                                        </asp:DropDownList>
                                    </div>
                                </div>
                            </div>

                            <div class="row form-group">
                                <div class="col-md-8">
                                </div>
                                <div class="col-md-3 offset-8">
                                    <asp:TextBox onpaste="return true" ID="txt_Reason" runat="server" CssClass="form-control man-dat"
                                        Style="resize: none; margin-left: 3px; display: none; visibility: hidden;"
                                        MaxLength="250" onCut="return false" onDrop="return false" onkeypress="return chkMaxLen(event,this,250,MaxLength);"
                                        TextMode="MultiLine"></asp:TextBox>
                                </div>
                            </div>

                            <div id="div_Route" style="display: none;">
                                <div class="row">
                                    <div class="col-md-3">
                                        <asp:Label ID="lbl_RouteName" runat="server"></asp:Label>
                                        <span style="color: #ff0000">*</span>
                                    </div>
                                    <div class="col-md-3">
                                        <asp:DropDownList ID="ddlRouteName" runat="server" AppendDataBoundItems="True" CssClass="form-control select2">
                                            <asp:ListItem Text="-Select-" Value="-Select-"></asp:ListItem>
                                        </asp:DropDownList>
                                        <asp:Button ID="btn_View" runat="server" CausesValidation="False" OnClientClick="return Manual_OpenWindow(SelectInDate,SelecttheRouteName);"
                                            CssClass="btn btn-primary" />
                                    </div>
                                </div>
                            </div>

                        </div>
                        <div class="clearfix">
                        </div>
                        <div class="col-md-12">
                        </div>
                        <div class="col-md-5">
                        </div>

                        <div class="col-md-7">
                            <div class="pull-right-button" style="display: none">
                                <asp:LinkButton ID="lnkbtnClockIn" runat="server" Autopostback="false" CssClass="btn save-btn fa-floppy-o0"
                                    Text="&nbsp; Clock In" OnClientClick="return getVerify();" CommandName="Clock In" OnClick="btn_Save_Click">
                                </asp:LinkButton>

                                <asp:LinkButton ID="lnkbtnBreakOut" CommandName="Break Out" Class="btn save-btn" runat="server" CausesValidation="true"
                                    OnClientClick="return getVerify();" OnClick="btn_Save_Click" />

                                <asp:LinkButton ID="lnkbtnBreakIn" CommandName="Break In" Class="btn save-btn" runat="server" CausesValidation="true"
                                    OnClientClick="return getVerify();" OnClick="btn_Save_Click" />

                                <asp:LinkButton ID="lnkbtnClockOut" CommandName="Check Out" Class="btn save-btn fa-floppy-o0" runat="server" CausesValidation="true"
                                    Text="&nbsp; Clock Out" OnClientClick="return getVerify();" OnClick="btn_Save_Click" />
                            </div>
                            <div class="pull-right-button">



                                <asp:LinkButton ID="btn_Add" CssClass="btn save-btn fa-floppy-o" runat="server" CausesValidation="true"
                                    OnClick="btn_Add_Click" OnClientClick="if(ManualEntryValidation()) $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" />
                                <asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True"
                                    ShowSummary="False" />
                                <asp:Label ID="lblname" runat="server">
                                </asp:Label>
                            </div>
                        </div>


                    </div>

                   

                </div>



            </div>
        </div>

    </div>




</asp:Content>
