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

<%@ Register Assembly="DevExpress.Web.v14.2" Namespace="DevExpress.Web"
    TagPrefix="dxe" %>
<%@ Register TagPrefix="dxGridview" Namespace="DevExpress.Web" Assembly="DevExpress.Web.v14.2" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ContentPlaceHolderID="BodyContentPH" ID="conEmployee" runat="server" onload="Pageload();">
    <!--[if gt IE 5.5]>
	<link rel="stylesheet" type="text/css" href="../css/anytimeIE.css" />
	<link rel="stylesheet" type="text/css" href="../css/ProgressforIE.css" />
 <![endif]-->
    <script src="../plugins/datepicker/jquery-1.11.1.min.js"></script>
    <script language="javascript" src="../js/jquery.autocomplete.js" type="text/javascript"></script>
    <script 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/EmployeeNameAjax.js" type="text/javascript"></script>
    <script language="javascript" src="../js/ShiftExchange.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $("#<%= txtEmployeeId.ClientID %>").autocomplete({
                source: function (request, response) {
                    $.getJSON("../AutoCompleteByEmployeeId.ashx?EmpAutoid=" + '<%= Convert.ToString(Session["EmpAutoID"]) %>', {
                        term: extractLast(request.term)
                    }, response);
                },
                search: function () {
                    var term = extractLast(this.value);
                    if (term.length < 1) {
                        return false;
                    }
                },
                focus: function () {
                    return false;
                },
                select: function (event, ui) {
                    var terms = split(this.value);
                    terms.pop();
                    terms.push(ui.item.value);
                    terms.push("");
                    this.value = terms.join(",");
                    return false;
                }
            });
            function split(val) {
                return val.split(/,\s*/);
            }
            function extractLast(term) {
                return split(term).pop();
            }
        });
            $(function () {
                $("#<%= txtEmployeeIDs.ClientID %>").autocomplete({
                    source: function (request, response) {
                        $.getJSON("../AutoCompleteByEmployeeId.ashx?EmpAutoid=" + '<%= Convert.ToString(Session["EmpAutoID"]) %>', {
                            term: extractLast(request.term)
                        }, response);
                    },
                    search: function () {
                        var term = extractLast(this.value);
                        if (term.length < 1) {
                            return false;
                        }
                    },
                    focus: function () {
                        return false;
                    },
                    select: function (event, ui) {
                        var terms = split(this.value);
                        terms.pop();
                        terms.push(ui.item.value);
                        terms.push("");
                        this.value = terms.join(",");
                        return false;
                    }
                });
                function split(val) {
                    return val.split(/,\s*/);
                }
                function extractLast(term) {
                    return split(term).pop();
                }
            });
                $(function () {
                    $("#<%= txtEmployeeName.ClientID %>").autocomplete({
                        source: function (request, response) {
                            $.getJSON("../AutoCompleteByName.ashx?EmpAutoid=" + '<%= Convert.ToString(Session["EmpAutoID"]) %>', {
                                term: extractLast(request.term)
                            }, response);
                        },
                        search: function () {
                            var term = extractLast(this.value);
                            if (term.length < 1) {
                                return false;
                            }
                        },
                        focus: function () {
                            return false;
                        },
                        select: function (event, ui) {
                            var terms = split(this.value);
                            terms.pop();
                            terms.push(ui.item.value);
                            terms.push("");
                            this.value = terms.join(",");
                            return false;
                        }
                    });
                    function split(val) {
                        return val.split(/,\s*/);
                    }
                    function extractLast(term) {
                        return split(term).pop();
                    }
                    // Loaddropdown();
                });
    </script>

    <script type="text/javascript">

        function Delete_Conf() {
            //Alert_AreyousuretoDelete
            return confirm('Are you sure to Delete ?');
        }

        <%--function SelectAllOnThisPage(chkSelectAll) {

            var hdnSelectRow = document.getElementById('<%= hdnSelectRow.ClientID %>');
            var hdnSelectAll = document.getElementById('<%= hdnGetAllid.ClientID %>');
            if (chkSelectAll.checked == true) {
                for (var i = 0; i < GridView1.pageRowCount; i++) {
                    if (document.getElementById('ctl00_BodyContentPH_GridView1_cell' + (i + GridView1.visibleStartIndex) + '_0_chkSelect').disabled == false) {
                        document.getElementById('ctl00_BodyContentPH_GridView1_cell' + (i + GridView1.visibleStartIndex) + '_0_chkSelect').checked = true;
                        var hdnUserId = document.getElementById('ctl00_BodyContentPH_GridView1_cell' + (i + GridView1.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 < GridView1.pageRowCount; i++) {
                document.getElementById('ctl00_BodyContentPH_GridView1_cell' + (i + GridView1.visibleStartIndex) + '_0_chkSelect').checked = false;
            }
            hdnSelectRow.value = '';
        }
    }--%>


        <%-- function SelectOnRow(chkOnSelect) {

        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 hdnEnableds = 0;
            for (var i = 0; i < GridView1.pageRowCount; i++) {
                if (document.getElementById('ctl00_BodyContentPH_GridView1_cell' + (i + GridView1.visibleStartIndex) + '_0_chkSelect').disabled == false) {
                    hdnEnableds = hdnEnableds + 1;
                }
                if (document.getElementById('ctl00_BodyContentPH_GridView1_cell' + (i + GridView1.visibleStartIndex) + '_0_chkSelect').checked)
                    varTotalCheckedCount = varTotalCheckedCount + 1;
            }
            if (varTotalCheckedCount == hdnEnableds)
                document.getElementById('ctl00_BodyContentPH_GridView1_header0_chkSelectAll').checked = true;
            else
                document.getElementById('ctl00_BodyContentPH_GridView1_header0_chkSelectAll').checked = false;
        }
        else {
            if (Array.contains(removeId, hdnUserId)) {
                Array.remove(removeId, hdnUserId);
            }
            hdnSelectRow.value = removeId;

            document.getElementById('ctl00_BodyContentPH_GridView1_header0_chkSelectAll').checked = false;
        }
    }--%>


    </script>

    <script>
        $(function () {
            debugger;
            $('#ctl00_BodyContentPH_txtShiftDate').datetimepicker({
                format: document.getElementById('ctl00_BodyContentPH_hdnShiftDateFormat').value

            });
            $('#ctl00_BodyContentPH_txtShiftDates').datetimepicker({
                format: document.getElementById('ctl00_BodyContentPH_hdnShiftDateFormat').value

            }
               );
            $('#ctl00_BodyContentPH_txtShiftToDate').datetimepicker({
                format: document.getElementById('ctl00_BodyContentPH_hdnShiftDateFormat').value

            }
          );
            $('#ctl00_BodyContentPH_txtaddSpentHours').datetimepicker({
                format: 'HH:mm'

            }
         );
            $('#ctl00_BodyContentPH_txtSpentHours').datetimepicker({
                format: 'HH:mm'

            }
        );

        });

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

        function DynamicDatePickerForTime(Format, txtBoxId) {
            $("#" + txtBoxId).datetimepicker({ format: "HH:mm" });
        }
        var xPos, yPos;
        var prm = Sys.WebForms.PageRequestManager.getInstance();

        //function BeginRequestHandler(sender, args) {
        //    if ($get('dvScroll') != null) {
        //        xPos = $get('dvScroll').scrollLeft;
        //        yPos = $get('dvScroll').scrollTop;
        //    }
        //}

        //function EndRequestHandler(sender, args) {
        //    if ($get('dvScroll') != null) {
        //        $get('dvScroll').scrollLeft = xPos;
        //        $get('dvScroll').scrollTop = yPos;
        //    }
        //}
        //prm.add_beginRequest(BeginRequestHandler);
        //prm.add_endRequest(EndRequestHandler);
    </script>

    <div class="content-header">
        <h1 style="background-image: url('../dist/img/emp-master.png'); background-repeat: no-repeat; padding-left: 35px">
            <asp:Label ID="lbl_HeaderEmployeeMaster" runat="server" Text="Time Sheet Entry"></asp:Label>
        </h1>
        <asp:SiteMapPath ID="site" runat="server" CssClass="breadcrumb">
            <NodeStyle CssClass="active" />
        </asp:SiteMapPath>
    </div>
    <div class="content">

        <div class="inr-ftr">
            <div class="row">
                <div class="col-sm-2">
                    <div class="inr-fil-text" style="width: 150px">
                        <asp:Label ID="lblFilter" runat="server" Text="Work Allocation"></asp:Label>

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

        <div class="border-table new-space" style="margin-top: 0px">

            <%-- No use --%>

            <div id="divEmployeeDetails" runat="server" style="display: none;">
                <div class="row" style="display: none">
                    <div class="col-md-3">
                        <asp:Label ID="lblEmpSwipe" Text="Employee Name" runat="server"></asp:Label>
                    </div>
                    <div class="col-md-3">
                        <asp:TextBox onpaste="return true" ID="txtSwipeCard" MaxLength="20" runat="server"
                            CssClass="form-control" onkeypress="return acceptCharsNum_MaxLength(event,this,20,MaxLength);"></asp:TextBox>
                        <cc1:AutoCompleteExtender ID="acSwipeCardNo" runat="server" CompletionSetCount="10"
                            CompletionListItemCssClass="item" CompletionListHighlightedItemCssClass="AutocompleteCSS"
                            CompletionInterval="10" Enabled="true" MinimumPrefixLength="1" TargetControlID="txtSwipeCard"
                            ServicePath="../WebServices/AutoCompleteExtender.asmx" ServiceMethod="GetCardNoForReports"
                            CompletionListCssClass="autocomplete_completionListElement" FirstRowSelected="true">
                        </cc1:AutoCompleteExtender>
                    </div>
                </div>
                <div class="row form-group" style="display: none;">
                    <div class="col-md-2">
                        <asp:Label ID="lblEmployeeName" Text="Employee Name" runat="server"></asp:Label>
                    </div>
                    <div class="col-md-3" style="display: none;">
                        <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" style="display: none;">
                    </div>
                    <div class="col-md-2" style="display: none;">
                        <asp:Label ID="lblEmployeeId" Text="Employee Id" runat="server"></asp:Label>
                    </div>
                    <div class="col-md-3" style="display: none;">
                        <asp:TextBox onpaste="return true" ID="txtEmployeeId" runat="server" CssClass="form-control"
                            Style="resize: none" TextMode="multiLine"></asp:TextBox>
                    </div>
                </div>
                <div class="row form-group" style="display: none;">
                    <div class="col-md-2">
                        <asp:Label ID="lblEmpCategory" Text="Employee category" runat="server"></asp:Label>
                    </div>
                    <div class="col-md-3" style="display: none;">
                        <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" style="display: none;">
                    </div>
                    <div class="col-md-2" style="display: none;">
                        <asp:Label ID="lblEmpType" Text="Employee Type" runat="server"></asp:Label>
                    </div>
                    <div class="col-md-3" style="display: none;">
                        <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" style="display: none;">
                    <div class="col-md-2">
                        <asp:Label ID="lblDesignation" Text="Designation" runat="server"></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" Text="Gender" runat="server"></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 form-group" style="display: none;">
                <div class="col-md-2">
                    <asp:HiddenField ID="hdnShiftDateFormat" runat="server" />
                    <asp:Label ID="lblShiftDates" runat="server" Text="Timesheet Date:"></asp:Label>
                </div>
                <div class="col-md-3">

                    <asp:TextBox onpaste="return true" ID="txtShiftDates" runat="server" CssClass="form-control"
                        onCut="return false" onDrop="return false" MaxLength="11"></asp:TextBox>

                </div>
                <div class="pull-right-button" style="padding-right: 110px; display: none">
                    <asp:LinkButton ID="btn_SearchView" CssClass="btn save-btn fa-eye" runat="server" Text=" View" OnClick="btn_SearchView_Click"
                        OnClientClick="return DateEntryValidation()" />
                </div>
            </div>

            <div class="row" style="display: none;">
                <div class="row">
                    <div class="line16">
                    </div>
                </div>
            </div>

            <div class="row form-group" style="display: none;">
                <div class="col-md-12">
                    <div class="table-responsive">

                        <%--<asp:GridView ID="grv_EmployeesLeaveDetail" runat="server" AutoGenerateColumns="False" AllowPaging="true"
                            PageSize="10" OnPageIndexChanging="grv_EmployeesLeaveDetail_PageIndexChanging" CellPadding="4"
                           CssClass="table das-table1">--%>


                        <%--<asp:GridView ID="grv_TimeSheetViewGrid" runat="server" AutoGenerateColumns="false" AllowPaging="true"
                            PageSize="10" CellPadding="4" OnSelectedIndexChanged="grv_TimeSheetViewGrid_SelectedIndexChanged"
                            OnRowDataBound="grv_TimeSheetViewGrid_RowDataBound"
                            AutoGenerateSelectButton="true" AutoGenerateDeleteButton="true" CssClass="table das-table1">
                            <Columns>

                                <asp:TemplateField HeaderText="Employee_Code_Id" HeaderStyle-CssClass="empheader"
                                    ItemStyle-CssClass="table-icons">
                                    <ItemTemplate>
                                        <itemstyle horizontalalign="Center" />
                                        <headerstyle horizontalalign="Center" />
                                        <asp:Label ID="lbl_EmpAutoId" Text='<%# Eval("Employee_Code_Id")%>' runat="server"></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Time Sheet Date" HeaderStyle-CssClass="empheader"
                                    ItemStyle-CssClass="table-icons">
                                    <ItemTemplate>
                                        <itemstyle horizontalalign="Center" />
                                        <headerstyle horizontalalign="Center" />
                                        <asp:Label ID="lbl_EmpAutoId" Text='<%# Eval("Employee_Code_Id")%>' runat="server"></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Project Name" HeaderStyle-CssClass="empheader"
                                    ItemStyle-CssClass="table-icons">
                                    <ItemTemplate>
                                        <itemstyle horizontalalign="Center" />
                                        <headerstyle horizontalalign="Center" />
                                        <asp:Label ID="lbl_EmpAutoId" Text='<%# Eval("Employee_Code_Id")%>' runat="server"></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Task Name" HeaderStyle-CssClass="empheader"
                                    ItemStyle-CssClass="table-icons">
                                    <ItemTemplate>
                                        <itemstyle horizontalalign="Center" />
                                        <headerstyle horizontalalign="Center" />
                                        <asp:Label ID="lbl_EmpAutoId" Text='<%# Eval("Employee_Code_Id")%>' runat="server"></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Defined Hours" HeaderStyle-CssClass="empheader"
                                    ItemStyle-CssClass="table-icons">
                                    <ItemTemplate>
                                        <itemstyle horizontalalign="Center" />
                                        <headerstyle horizontalalign="Center" />
                                        <asp:Label ID="lbl_EmpAutoId" Text='<%# Eval("Employee_Code_Id")%>' runat="server"></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Allocated Hours" HeaderStyle-CssClass="empheader"
                                    ItemStyle-CssClass="table-icons">
                                    <ItemTemplate>
                                        <itemstyle horizontalalign="Center" />
                                        <headerstyle horizontalalign="Center" />
                                        <asp:Label ID="lbl_EmpAutoId" Text='<%# Eval("Employee_Code_Id")%>' runat="server"></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Balance Hours" HeaderStyle-CssClass="empheader"
                                    ItemStyle-CssClass="table-icons">
                                    <ItemTemplate>
                                        <itemstyle horizontalalign="Center" />
                                        <headerstyle horizontalalign="Center" />
                                        <asp:Label ID="lbl_EmpAutoId" Text='<%# Eval("Employee_Code_Id")%>' runat="server"></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                 <asp:TemplateField HeaderText="Spend Hours" HeaderStyle-CssClass="empheader"
                                    ItemStyle-CssClass="table-icons">
                                    <ItemTemplate>
                                        <itemstyle horizontalalign="Center" />
                                        <headerstyle horizontalalign="Center" />
                                        <asp:Label ID="lbl_EmpAutoId" Text='<%# Eval("Employee_Code_Id")%>' runat="server"></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Task Discription" HeaderStyle-CssClass="empheader"
                                    ItemStyle-CssClass="table-icons">
                                    <ItemTemplate>
                                        <itemstyle horizontalalign="Center" />
                                        <headerstyle horizontalalign="Center" />
                                        <asp:Label ID="lbl_EmpAutoId" Text='<%# Eval("Employee_Code_Id")%>' runat="server"></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                

                               

                            </Columns>

                            <RowStyle Height="30px" CssClass="table-bg" BorderColor="#C5DFFC" />
                            <PagerStyle Font-Overline="False" HorizontalAlign="Right" CssClass="GridPager" />
                            <SelectedRowStyle BackColor="Yellow" />
                            <AlternatingRowStyle BackColor="white" />
                        </asp:GridView>--%>
                    </div>

                </div>
            </div>

            <div class="row" style="display: none;">
                <div class="row">
                    <div class="line16">
                    </div>
                </div>
            </div>

            <div id="myModal" class="modal modal-default fade" role="dialog" style="display: none;">
                <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="row form-group" style="display: none">

                <div class="col-md-1">
                </div>
                <div class="col-md-2" style="display: none">

                    <asp:Label ID="lblShiftToDate" runat="server" Text="Timesheet To Date:"></asp:Label>
                </div>
                <div class="col-md-3" style="display: none">
                    <asp:TextBox onpaste="return true" ID="txtShiftToDate" runat="server" CssClass="form-control"
                        EnableViewState="False" onCut="return false" onDrop="return false">
                    </asp:TextBox>
                </div>
            </div>

            <div class="row col-md-12">
                <div class="row form-group">
                    <div class="col-md-2" style="display: none">
                        <asp:Label ID="lblType" runat="server" Text="Select Days Type"></asp:Label>
                    </div>
                    <div class="col-md-5" style="display: none">

                        <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>
            </div>

            <div class="row" style="display: none">
                <div class="col-md-12">
                    <div class="pull-right-button" style="padding-right: 110px">
                        <asp:HiddenField ID="hdnDeletedData" runat="server" />
                        <asp:LinkButton ID="btn_AllocateAdd" Text=" Add" CssClass="btn add-btn fa-plus" runat="server" OnClick="btn_AllocateAdd_Click" />
                        <%-- <asp:LinkButton ID="btn_Search" runat="server" OnClick="btn_Search_Click" Text=" Search" CssClass="btn src-btn fa-search">
                        </asp:LinkButton>--%>
                    </div>
                </div>
            </div>

            <asp:GridView ID="grv_TimeSheetViewGridAllocate" runat="server" AutoGenerateColumns="false" AllowPaging="true" Visible="false"
                PageSize="10" CellPadding="4" OnSelectedIndexChanged="grv_TimeSheetViewGrid_SelectedIndexChanged"
                OnRowDataBound="grv_TimeSheetViewGrid_RowDataBound" OnRowDeleting="grv_TimeSheetViewGrid_RowDeleting"
                DataKeyNames="EmployeeCodeID,ProjectID,TaskID" AutoGenerateDeleteButton="true" CssClass="table das-table1">
                <Columns>

                    <asp:BoundField DataField="EmployeeCodeID" HeaderText="Employee Id" HeaderStyle-CssClass="empheader"
                        ItemStyle-CssClass="table-icons"></asp:BoundField>

                    <asp:BoundField DataField="TimesheetDate" HeaderText="Time Sheet Date" HeaderStyle-CssClass="empheader"
                        ItemStyle-CssClass="table-icons"></asp:BoundField>

                    <asp:BoundField DataField="ProjectID" HeaderText="Project ID" HeaderStyle-CssClass="empheader"
                        ItemStyle-CssClass="table-icons"></asp:BoundField>

                    <asp:BoundField DataField="ProjectName" HeaderText="Project Name" HeaderStyle-CssClass="empheader"
                        ItemStyle-CssClass="table-icons"></asp:BoundField>

                    <asp:BoundField DataField="TaskID" HeaderText="Task ID" HeaderStyle-CssClass="empheader"
                        ItemStyle-CssClass="table-icons"></asp:BoundField>

                    <asp:BoundField DataField="TaskName" HeaderText="Task Name" HeaderStyle-CssClass="empheader"
                        ItemStyle-CssClass="table-icons"></asp:BoundField>

                    <asp:BoundField DataField="Description" HeaderText="Descriptiom" HeaderStyle-CssClass="empheader"
                        ItemStyle-CssClass="table-icons"></asp:BoundField>

                    <asp:BoundField DataField="AllocatedHours" HeaderText="Allocated Hours" HeaderStyle-CssClass="empheader"
                        ItemStyle-CssClass="table-icons"></asp:BoundField>

                    <asp:BoundField DataField="spentHours" HeaderText="Spent Hours" HeaderStyle-CssClass="empheader"
                        ItemStyle-CssClass="table-icons"></asp:BoundField>

                </Columns>

                <RowStyle Height="30px" CssClass="table-bg" BorderColor="#C5DFFC" />
                <PagerStyle Font-Overline="False" HorizontalAlign="Right" CssClass="GridPager" />
                <SelectedRowStyle BackColor="Yellow" />
                <AlternatingRowStyle BackColor="white" />
            </asp:GridView>

            <%--------------------------------------------------%>
            <div class="row form-group">
                <div id="div_Employee">

                    <div class="col-md-2">
                        <asp:Label ID="Label2" Text="Employee Id" runat="server"></asp:Label>
                    </div>
                    <div class="col-md-3">
                        <asp:TextBox onpaste="return true" ID="txtEmployeeIDs" runat="server" CssClass="form-control"
                            Style="resize: none" TextMode="multiLine"></asp:TextBox>
                    </div>
                </div>

                <div class="col-md-1">
                </div>

                <div class="col-md-2">
                    <asp:Label ID="lblShiftDate" runat="server" Text="Timesheet Date:"></asp:Label>
                </div>
                <div class="col-md-3">

                    <asp:TextBox onpaste="return true" ID="txtShiftDate" runat="server" CssClass="form-control"
                        onCut="return false" onDrop="return false" MaxLength="11"></asp:TextBox>

                </div>

                <div class="col-md-2" style="display: none">
                    <asp:Label ID="lbl_EmployeeName" Text="Employee Name" runat="server"></asp:Label>
                </div>
                <div class="col-md-3" style="display: none">
                    <asp:TextBox onpaste="return true" CssClass="form-control" ID="txt_Name" runat="server"
                        ReadOnly="True"></asp:TextBox>
                </div>
            </div>

            <div class="row form-group">
                <%--<asp:UpdatePanel ID="UpdatePanel2" runat="server">
                    <ContentTemplate>--%>
                <div class="col-md-2">

                    <asp:Label ID="lblProjectName" Text="Project Name" runat="server"></asp:Label>
                </div>
                <div class="col-md-3">
                    <asp:DropDownList ID="ddlProjectName" runat="server" CssClass="form-control select2"
                        AppendDataBoundItems="true" OnSelectedIndexChanged="ddlProjectName_SelectedIndexChanged" AutoPostBack="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="lblTaskName" Text="Task Name" runat="server"></asp:Label>
                </div>
                <div class="col-md-3">
                    <asp:DropDownList ID="ddlTaskName" runat="server" CssClass="form-control select2"
                        AppendDataBoundItems="true">
                        <asp:ListItem Value="0" Selected="True" Text="-Select-"></asp:ListItem>
                    </asp:DropDownList>
                </div>
                <%-- </ContentTemplate>
                </asp:UpdatePanel>--%>
            </div>

            <div class="row form-group">
                <div class="col-md-2">
                    <asp:Label ID="Label1" Text="Allocated Hours" runat="server"></asp:Label>
                </div>
                <div class="col-md-1">
                    <asp:TextBox onCut="return false" onDrop="return false" ID="txtaddSpentHours" runat="server" Style="height: 30px; width: 80px"></asp:TextBox>
                </div>
                <div class="col-md-2">
                    <asp:Label ID="lblSpent" Text="Spent Hours" runat="server"></asp:Label>
                </div>
                <div class="col-md-1">
                    <asp:TextBox onCut="return false" onDrop="return false" ID="txtSpentHours" runat="server" Style="height: 30px; width: 80px"></asp:TextBox>
                </div>

                <div class="col-md-2">
                    <asp:Label ID="lbl_ProjectDescription" Text="Descriptiom" runat="server"></asp:Label>
                </div>
                <div class="col-md-3">
                    <asp:TextBox ID="txtProjectDescription" CssClass="form-control"
                        TextMode="MultiLine" Style="resize: none;" runat="server" onkeypress="return chkMaxLen(event,this,500,MaxLength);"
                        MaxLength="500"></asp:TextBox>
                </div>
            </div>

            <div class="row form-group">
                <%--<div class="col-md-2">
                    <asp:Label ID="lbl_ProjectDescription" Text="Descriptiom" runat="server"></asp:Label>
                </div>
                <div class="col-md-3">
                    <asp:TextBox ID="txtProjectDescription" CssClass="form-control"
                        TextMode="MultiLine" Style="resize: none;" runat="server" onkeypress="return chkMaxLen(event,this,500,MaxLength);"
                        MaxLength="500"></asp:TextBox>
                </div>--%>
            </div>

            <div class="row">
                <div class="col-md-12">
                    <div class="pull-right-button">
                        <asp:LinkButton ID="lblSumbmit" CssClass="btn add-btn fa-plus" runat="server" Text="&nbsp;&nbsp;Submit" OnClick="lblSumbmit_Click" />

                    </div>

                </div>
            </div>
            <div class="row">
                <div class="row">
                    <div class="line16">
                    </div>
                </div>
            </div>

            <div class="row form-group" style="display: none">
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                        <asp:HiddenField ID="hiddenTime" runat="server" Value="%I:%M:%S %p" />
                        <div class="col-md-12" id="dvScroll">
                            <asp:GridView ID="gvTaskEntry" runat="server" Width="100%" AutoGenerateColumns="false" HeaderStyle-Font-Size="14px" RowStyle-Font-Size="14px"
                                HeaderStyle-Height="50" FooterStyle-Height="50" CssClass="table das-table1"
                                ShowFooter="true" OnRowCommand="gvTaskEntry_RowCommand" OnRowDeleting="gvTaskEntry_RowDeleting"
                                OnRowDataBound="gvTaskEntry_RowDataBound" OnRowUpdating="gvTaskEntry_RowUpdating"
                                OnRowCancelingEdit="gvTaskEntry_RowCancelingEdit" OnRowEditing="gvTaskEntry_RowEditing">
                                <Columns>
                                    <asp:TemplateField HeaderText="Project Name" HeaderStyle-BackColor="#d9f0fb" HeaderStyle-ForeColor="black" FooterStyle-Width="500px">
                                        <ItemTemplate>
                                            <asp:Label ID="lblProjectName" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "Project_Name") %>' Style="padding: 0px 5px;"></asp:Label>
                                            <asp:Label Style="display: none" ID="lblProjectID" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "ProjectID") %>'></asp:Label>
                                            <asp:Label Style="display: none" ID="lblProjectTaskID" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "TaskDetailID") %>'></asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:DropDownList runat="server" ID="ddlProjectNameEdit" AutoPostBack="true" Width="500px"
                                                CssClass="form-control select2">
                                                <asp:ListItem Text="-Select-" Value="0"></asp:ListItem>
                                            </asp:DropDownList>
                                        </EditItemTemplate>
                                        <FooterTemplate>
                                            <asp:DropDownList runat="server" ID="ddlProjectNameAdd" AutoPostBack="true" Width="300px"
                                                CssClass="form-control select2" OnSelectedIndexChanged="ddlProjectNameAdd_SelectedIndexChanged" Style="width: 500px">
                                                <asp:ListItem Text="-Select-" Value="0"></asp:ListItem>
                                            </asp:DropDownList>
                                        </FooterTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Task List" HeaderStyle-BackColor="#d9f0fb" HeaderStyle-ForeColor="black" FooterStyle-Width="500px">
                                        <ItemTemplate>
                                            <asp:Label ID="lblTaskList" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "TaskName") %>'></asp:Label>

                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:DropDownList runat="server" ID="ddlTaskListEdit" AutoPostBack="true" Width="300px"
                                                CssClass="form-control select2" Style="width: 300px">
                                                <asp:ListItem Text="-Select-" Value="0"></asp:ListItem>
                                            </asp:DropDownList>
                                            <asp:Label Style="display: none" ID="lblTaskID" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "TaskID") %>'></asp:Label>
                                        </EditItemTemplate>
                                        <FooterTemplate>
                                            <asp:DropDownList runat="server" ID="ddlTaskListAdd" AutoPostBack="true" Width="300px"
                                                CssClass="form-control select2" OnSelectedIndexChanged="ddlTaskListAdd_SelectedIndexChanged" Style="width: 300px">
                                                <asp:ListItem Text="-Select-" Value="0"></asp:ListItem>
                                            </asp:DropDownList>
                                        </FooterTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Defined Hours" HeaderStyle-BackColor="#d9f0fb" HeaderStyle-ForeColor="black">
                                        <ItemTemplate>
                                            <asp:Label ID="lbldefinedHoursView" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "TaskHours") %>' Style="text-align: center"></asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:Label ID="lbldefinedHoursEdit" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "TaskHours") %>'></asp:Label>
                                        </EditItemTemplate>
                                        <FooterTemplate>
                                            <asp:Label ID="lbldefinedHoursAdd" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "TaskHours") %>'></asp:Label>
                                        </FooterTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Task Description" HeaderStyle-BackColor="#d9f0fb" HeaderStyle-ForeColor="black">
                                        <ItemTemplate>
                                            <asp:Label ID="lblTaskDescription" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "TaskDescription") %>' Style="padding: 0px 5px;" TextMode="MultiLine"></asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox onCut="return false" onDrop="return false" ID="txtedit_TaskDesc" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "TaskDescription") %>' TextMode="MultiLine" Style="height: 30px; width: 300px; resize: none"></asp:TextBox>
                                        </EditItemTemplate>
                                        <FooterTemplate>
                                            <asp:TextBox onCut="return false" onDrop="return false" ID="txtadd_TaskDesc" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "TaskDescription") %>' TextMode="MultiLine" Style="height: 30px; width: 300px; resize: none"></asp:TextBox>
                                        </FooterTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Spent Hours" HeaderStyle-BackColor="#d9f0fb" HeaderStyle-ForeColor="black" HeaderStyle-Width="100">
                                        <ItemTemplate>
                                            <asp:Label ID="lblSpentHours" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "SpentHours") %>' Style="padding: 0px 5px;"></asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox onCut="return false" onDrop="return false" ID="txtEditSpentHours" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "SpentHours") %>' Style="height: 30px; width: 80px"></asp:TextBox>
                                        </EditItemTemplate>
                                        <FooterTemplate>
                                            <asp:TextBox onCut="return false" onDrop="return false" ID="txtaddSpentHours" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "SpentHours") %>' Style="height: 30px; width: 80px"></asp:TextBox>
                                        </FooterTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Spent Hours" Visible="false" HeaderStyle-BackColor="#d9f0fb" HeaderStyle-ForeColor="black" HeaderStyle-Width="100">
                                        <ItemTemplate>
                                            <asp:Label ID="lblSpentMinuts" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "SpentMinuts") %>' Style="padding: 0px 5px;"></asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:Label ID="lblSpentMinuts1" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "SpentMinuts") %>' Style="padding: 0px 5px;"></asp:Label>
                                        </EditItemTemplate>
                                        <FooterTemplate>
                                            <asp:Label ID="lblSpentMinuts2" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "SpentMinuts") %>' Style="padding: 0px 5px;"></asp:Label>
                                        </FooterTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Action" HeaderStyle-BackColor="#d9f0fb" HeaderStyle-ForeColor="black" ItemStyle-Width="100px">
                                        <ItemTemplate>
                                            &nbsp;&nbsp;<asp:LinkButton ID="imgbtnEdit" runat="server" Font-Size="16px" CommandName="Edit" Text="Edit"></asp:LinkButton>
                                            &nbsp;&nbsp;<asp:Label ID="lblbackslash" runat="server" Text="/"></asp:Label>
                                            &nbsp;&nbsp;<asp:LinkButton ID="imgbtnDelete" runat="server" Font-Size="16px" CommandName="Delete" Text="Delete"></asp:LinkButton>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            &nbsp;&nbsp;<asp:LinkButton ID="imgbtnUpdate" runat="server" Font-Size="16px" CommandName="Update" Text="&nbsp;&nbsp;Update"></asp:LinkButton>
                                            <asp:Label ID="lblbackslash1" runat="server" Text="/"></asp:Label>
                                            <asp:LinkButton ID="imgbtnCancel" runat="server" Font-Size="16px" CommandName="Cancel" Text="&nbsp;&nbsp;Cancel"></asp:LinkButton>
                                        </EditItemTemplate>
                                        <FooterTemplate>
                                            <asp:LinkButton ID="lbtnAdd" runat="server" Font-Size="16px" Style="vertical-align: central; display: table-row; text-align: center" CommandName="ADD" Text="&nbsp;&nbsp;Add" Width="100px"></asp:LinkButton>
                                        </FooterTemplate>
                                    </asp:TemplateField>
                                </Columns>
                            </asp:GridView>
                        </div>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </div>


            <div class="table-responsive" style="padding-bottom: 15px">
                <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>
                        <dxGridview:ASPxGridView ID="grv_LateIn" EnableCallBacks="False" runat="server" ClientInstanceName="grv_LateIn"
                            AutoGenerateColumns="False" Width="100%" KeyFieldName="ProjectTaskDetailID"
                            DataSourceID="ObjectDataSource1"
                            OnHtmlRowCreated="grv_LateIn_HtmlRowCreated">
                            <Columns>
                                <dxGridview:GridViewDataTextColumn FieldName="EmployeeID" Caption="EmployeeID" VisibleIndex="0"
                                    Width="120px">
                                    <DataItemTemplate>
                                        <asp:Label ID="lblCardNo" Text='<%# Eval("EmployeeID") %>' runat="server" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; width: 80px; word-wrap: break-word; display: inline-block;"></asp:Label>
                                        <asp:HiddenField ID="lblProcess_Rec_ID" Value='<%# Eval("ProjectTaskDetailID") %>' runat="server" />
                                    </DataItemTemplate>
                                    <EditItemTemplate>
                                        <asp:Label ID="lblCardNo" Text='<%# Eval("EmployeeID") %>' runat="server"></asp:Label>
                                        <asp:HiddenField ID="lblProcess_Rec_ID" Value='<%# Eval("ProjectTaskDetailID") %>' runat="server" />
                                    </EditItemTemplate>
                                    <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                </dxGridview:GridViewDataTextColumn>

                                <dxGridview:GridViewDataTextColumn Caption="ShiftDate" FieldName="ShiftDate" VisibleIndex="1"
                                    Width="136px">
                                    <DataItemTemplate>
                                        <asp:Label ID="lblDate" Text='<%# Eval("ShiftDate") %>' runat="server"></asp:Label>
                                    </DataItemTemplate>
                                    <EditItemTemplate>
                                        <asp:Label ID="lblDate" Text='<%# Eval("ShiftDate") %>' runat="server"></asp:Label>
                                    </EditItemTemplate>
                                    <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                </dxGridview:GridViewDataTextColumn>

                                <dxGridview:GridViewDataTextColumn Caption="Project Name" FieldName="Project_Name" VisibleIndex="2"
                                    Width="250px">
                                    <DataItemTemplate>
                                        <asp:Label ID="lblLevelName" Text='<%# Eval("Project_Name") %>' runat="server" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; cursor: pointer; word-wrap: break-word; display: inline-block;"></asp:Label>
                                    </DataItemTemplate>
                                    <EditItemTemplate>
                                        <asp:Label ID="lblLevelName" Text='<%# Eval("Project_Name") %>' runat="server" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; cursor: pointer; word-wrap: break-word; display: inline-block;"></asp:Label>
                                    </EditItemTemplate>
                                    <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                </dxGridview:GridViewDataTextColumn>

                                <dxGridview:GridViewDataTextColumn Caption="Task Name" FieldName="Task Name"
                                    VisibleIndex="3" Width="150px">
                                    <DataItemTemplate>
                                        <asp:Label ID="lblDesignation" Text='<%# Eval("TaskName") %>' runat="server" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; cursor: pointer; word-wrap: break-word; display: inline-block;"></asp:Label>
                                    </DataItemTemplate>
                                    <EditItemTemplate>
                                        <asp:Label ID="lblDesignation" Text='<%# Eval("TaskName") %>' runat="server" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; cursor: pointer; word-wrap: break-word; display: inline-block;"></asp:Label>
                                    </EditItemTemplate>
                                    <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                </dxGridview:GridViewDataTextColumn>

                                <dxGridview:GridViewDataTextColumn Caption="Task Hours" FieldName="Task Hours" VisibleIndex="4"
                                    Width="80px" Visible="False">
                                    <DataItemTemplate>
                                        <asp:Label ID="lblGender" Text='<%# Eval("TaskHours") %>' runat="server"></asp:Label>
                                    </DataItemTemplate>
                                    <EditItemTemplate>
                                        <asp:Label ID="lblGender" Text='<%# Eval("TaskHours") %>' runat="server"></asp:Label>
                                    </EditItemTemplate>
                                    <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                </dxGridview:GridViewDataTextColumn>

                                <dxGridview:GridViewDataTextColumn Caption="Allocated Hours" FieldName="Allocated Hours" VisibleIndex="5"
                                    Width="136px">
                                    <DataItemTemplate>
                                        <asp:Label ID="lblDate" Text='<%# Eval("AllocateHours") %>' runat="server"></asp:Label>
                                    </DataItemTemplate>
                                    <EditItemTemplate>
                                        <asp:Label ID="lblDate" Text='<%# Eval("AllocateHours") %>' runat="server"></asp:Label>
                                    </EditItemTemplate>
                                    <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                </dxGridview:GridViewDataTextColumn>

                                <%--<dxGridview:GridViewDataTextColumn Caption="Spent Hours" FieldName="Spent Hours(HH:MM)" VisibleIndex="6"
                                    Width="150px">
                                    <EditItemTemplate>
                                        <asp:TextBox onpaste="return true" TextMode="MultiLine" ID="TextBox1" runat="server"  data-project-id='<%# Eval("ProjectTaskDetailID") %>' 
                                            onkeyPress="return acceptChars_MaxLength(event,this,5,MaxLength,MaxLength)" OnTextChanged="TextBox1_TextChanged"
                                            Text='<%# Bind("SpentHours") %>' CssClass="form-control" MaxLength="5" 
                                            Style="overflow-y: auto; overflow-x: auto; word-break: break-all; cursor: pointer; word-wrap: break-word; display: inline-block; width: 70px; height: 22px; resize: none"></asp:TextBox>

                                    </EditItemTemplate>
                                    <DataItemTemplate>
                                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("SpentHours") %>' 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 Caption="Spent Hours" FieldName="Spent Hours(HH:MM)" VisibleIndex="6" Width="150px">
                                    <DataItemTemplate>
                                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("SpentHours") %>'
                                            Style="overflow-y: auto; overflow-x: auto; word-break: break-all; word-wrap: break-word; display: inline-block;">
                                         </asp:Label>
                                    </DataItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox onpaste="return true" TextMode="MultiLine" ID="TextBox1" runat="server"
                                            data-project-id='<%# Eval("ProjectTaskDetailID") %>'
                                            onkeyPress="return acceptChars_MaxLength(event,this,5,MaxLength,MaxLength)"
                                            OnTextChanged="TextBox1_TextChanged" Text='<%# Bind("SpentHours") %>' CssClass="form-control" MaxLength="5"
                                            Style="overflow-y: auto; overflow-x: auto; word-break: break-all; cursor: pointer; word-wrap: break-word; display: inline-block; width: 70px; height: 22px; resize: none">
                                         </asp:TextBox>
                                    </EditItemTemplate>
                                </dxGridview:GridViewDataTextColumn>


                                <dxGridview:GridViewDataColumn HeaderStyle-VerticalAlign="Middle" HeaderStyle-HorizontalAlign="Center" VisibleIndex="7"
                                    CellStyle-VerticalAlign="Middle" CellStyle-HorizontalAlign="Center" Width="40px">
                                    <Settings AllowAutoFilter="false" />
                                    <DataItemTemplate>
                                        <asp:LinkButton ID="btnDelete" runat="server" ToolTip="delete" data-toggle="tooltip"
                                            OnClick="btnDelete_Click" CommandName='<%# Eval("ProjectTaskDetailID") %>' data-placement="top"
                                            CssClass="btn btn-defalut del-icons" Style="color: Red" OnClientClick="return Delete_Conf();"></asp:LinkButton>
                                    </DataItemTemplate>
                                    <EditItemTemplate>
                                        <asp:Label ID="lblDate" Visible="false" Text='<%# Eval("AllocateHours") %>' runat="server"></asp:Label>
                                    </EditItemTemplate>
                                    <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                </dxGridview:GridViewDataColumn>

                                <dxGridview:GridViewCommandColumn VisibleIndex="8" Caption=" " Width="40px">
                                    <EditButton Visible="True">
                                    </EditButton>
                                    <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                </dxGridview:GridViewCommandColumn>
                            </Columns>
                            <ClientSideEvents CustomizationWindowCloseUp="function(s, e) { UpdateCustomizationWindowValue(); }" />
                            <SettingsPager PageSize="10">
                                <PageSizeItemSettings Visible="true" ShowAllItem="true" Items="10,20,50,100,200" />
                            </SettingsPager>
                            <Settings ShowFilterRow="true" ShowFilterRowMenu="true" HorizontalScrollBarMode="Auto" ShowGroupPanel="true" VerticalScrollBarMode="Hidden" VerticalScrollableHeight="400" />
                            <SettingsText EmptyDataRow="No Records Found" />
                            <SettingsBehavior AutoExpandAllGroups="false" ColumnResizeMode="Control" />
                            <SettingsBehavior AllowDragDrop="true" />
                            <Styles AlternatingRow-CssClass="table-bg">
                            </Styles>
                            <SettingsCustomizationWindow Enabled="True" />
                            <SettingsBehavior AllowDragDrop="true" />
                        </dxGridview:ASPxGridView>
                        <dxe:ASPxGridViewExporter ID="ASPxGridViewExporter1" runat="server" GridViewID="gvData">
                                        <PageFooter Right="[Page # of Pages #]">
                                        </PageFooter>
                                    </dxe:ASPxGridViewExporter>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </div>
            <div class="row form-group">
                <div class="col-md-12">
                    <div class="pull-right-button">
                        <asp:HiddenField ID="hdnLink" runat="server" />
                        <asp:LinkButton ID="lnktbnexcel" ToolTip="Excel" Visible="false" CommandName="excel" runat="server" CssClass="btn del-btn fa-file-excel-o" OnClick="btnExport_Click">
                            </asp:LinkButton>
                       <asp:LinkButton ID="lnkbtnpdf" ToolTip="Pdf" Visible="false" CommandName="pdf" runat="server" CssClass="btn del-btn fa-file-pdf-o" OnClick="btnExport_Click">
                            </asp:LinkButton>
                        <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GridSelectTaskSheetEntry"
                            TypeName="TimeSheetEntry" UpdateMethod="InsertUpdateTaskSheetEntry">
                            <UpdateParameters>

                                <asp:Parameter Name="ProjectTaskDetailID" Type="Int32" />
                                <asp:Parameter Name="TaskID" Type="Int32" />
                                <asp:Parameter Name="ProjectID" Type="Int32" />
                                <asp:Parameter Name="ShiftID" Type="Int32" />
                                <asp:Parameter Name="ShiftDate" Type="String" />
                                <asp:Parameter Name="EmployeeID" Type="String" />
                                <asp:Parameter Name="TaskHours" Type="String" />
                                <asp:Parameter Name="TaskDiscription" Type="String" />
                                <asp:Parameter Name="SpentHours" Type="String" />
                                <asp:Parameter Name="BalanceHours" Type="String" />
                                <asp:Parameter Name="TaskSubmittedDate" Type="String" />
                                <asp:Parameter Name="TasksubmittedBY" Type="Int32" />
                                <asp:Parameter Name="TaskModifyDate" Type="String" />
                                <asp:Parameter Name="TaskModifyBy" Type="Int32" />
                                <asp:Parameter Name="ModificationReason" Type="String" />
                                <asp:Parameter Name="ApprovedHours" Type="String" />
                                <asp:Parameter Name="ApprovedBy1" Type="Int32" />
                                <asp:Parameter Name="ApprovedDate1" Type="String" />
                                <asp:Parameter Name="Comments1" Type="String" />
                                <asp:Parameter Name="ApprovedBy2" Type="Int32" />
                                <asp:Parameter Name="ApprovedDate2" Type="String" />
                                <asp:Parameter Name="Comments2" Type="String" />
                                <asp:Parameter Name="Status" Type="String" />
                                <asp:Parameter Name="IsDeleted" Type="Int32" />
                                <asp:Parameter Name="Type" Type="String" DefaultValue="U" />

                            </UpdateParameters>
                            <SelectParameters>


                                <asp:SessionParameter Name="EmployeeID" Type="String" SessionField="EmployeeID" />
                                <asp:SessionParameter Name="ShiftDate" Type="Datetime" SessionField="ShiftDate" />
                                <asp:SessionParameter Name="gintTimeSheet" Type="Int32" SessionField="gintTimeSheet" />


                            </SelectParameters>
                        </asp:ObjectDataSource>
                        <asp:HiddenField ID="hidLevels" runat="server" />
                    </div>
                </div>
            </div>




            <%--<asp:UpdatePanel ID="UpdatePanel2" UpdateMode="Conditional" runat="server">
                <ContentTemplate>--%>
            <%--<div class="form-horizontal" style="padding-top:20px">
                        <div class="border-table new-space" style="margin-top: 0px">
                            <div class="row">
                                <div class="col-md-12" style="overflow: auto; overflow-y: hidden; padding-bottom: 10px">
                                    <asp:HiddenField ID="hdnSelectRow" runat="server" />
                                    <asp:HiddenField ID="hdnGetAllid" runat="server" />
                                    <dxGridview:ASPxGridView ID="GridView1" EnableCallBacks="false" runat="server" ClientInstanceName="GridView1"
                                        AutoGenerateColumns="false" KeyFieldName="ProjectTaskDetailID" DataSourceID="ObjectDataSource1"
                                        OnHtmlRowCreated="GridView1_HtmlRowCreated">
                                        <Columns>
                                            <dxGridview:GridViewDataColumn VisibleIndex="0" Width="30px" HeaderStyle-VerticalAlign="Middle"
                                                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)"
                                                        style="vertical-align: middle"
                                                        accesskey='<%# Eval("ProjectTaskDetailID") %>' />
                                                </DataItemTemplate>
                                                <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                            </dxGridview:GridViewDataColumn>
                                            <dxGridview:GridViewDataTextColumn FieldName="ProjectTaskDetailID" VisibleIndex="4" Visible="false">
                                                <DataItemTemplate>
                                                    <asp:Label ID="lblProjectTaskDetailID" runat="server" Text=' <%# Eval("ProjectTaskDetailID")%>'
                                                        CssClass="dxlabel"></asp:Label>
                                                </DataItemTemplate>
                                                <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                            </dxGridview:GridViewDataTextColumn>
                                            <dxGridview:GridViewDataTextColumn Caption="Employee ID" FieldName="EmployeeID" VisibleIndex="1"
                                                Width="100px">
                                                <DataItemTemplate>
                                                    <asp:Label ID="lblleveltype" runat="server" Text='<%# Eval("EmployeeID")%>' CssClass="dxlabel"></asp:Label>
                                                </DataItemTemplate>
                                                <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                            </dxGridview:GridViewDataTextColumn>
                                            <dxGridview:GridViewDataTextColumn FieldName="Shift Date" VisibleIndex="2" 
                                                Width="500px">
                                                <DataItemTemplate>
                                                    <asp:Label ID="lblShiftDate" runat="server" Text=' <%# Eval("ShiftDate")%>'
                                                        CssClass="dxlabel"></asp:Label>
                                                </DataItemTemplate>
                                                <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                            </dxGridview:GridViewDataTextColumn>

                                            <dxGridview:GridViewDataTextColumn FieldName="Project Name" VisibleIndex="3"
                                                Width="500px">
                                                <DataItemTemplate>
                                                    <asp:Label ID="lblProjectName" runat="server" Text=' <%# Eval("Project_Name")%>'
                                                        CssClass="dxlabel"></asp:Label>
                                                </DataItemTemplate>
                                                <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                            </dxGridview:GridViewDataTextColumn>

                                            <dxGridview:GridViewDataTextColumn FieldName="TaskName" VisibleIndex="4"
                                                Width="500px">
                                                <DataItemTemplate>
                                                    <asp:Label ID="lblTaskName" runat="server" Text=' <%# Eval("TaskName")%>'
                                                        CssClass="dxlabel"></asp:Label>
                                                </DataItemTemplate>
                                                <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                            </dxGridview:GridViewDataTextColumn>

                                            <dxGridview:GridViewDataTextColumn FieldName="Task Hours" VisibleIndex="5"
                                                Width="500px">
                                                <DataItemTemplate>
                                                    <asp:Label ID="lblTaskHours" runat="server" Text=' <%# Eval("TaskHours")%>'
                                                        CssClass="dxlabel"></asp:Label>
                                                </DataItemTemplate>
                                                <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                            </dxGridview:GridViewDataTextColumn>

                                            <dxGridview:GridViewDataTextColumn FieldName="Allocated Hours" VisibleIndex="6"
                                                Width="500px">
                                                <DataItemTemplate>
                                                    <asp:Label ID="lblAllocateHours" runat="server" Text=' <%# Eval("AllocateHours")%>'
                                                        CssClass="dxlabel"></asp:Label>
                                                </DataItemTemplate>
                                                <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                            </dxGridview:GridViewDataTextColumn>


                                            <dxGridview:GridViewDataTextColumn FieldName="Spent Hours" VisibleIndex="7"
                                                Width="500px">
                                                <DataItemTemplate>
                                                    <asp:Label ID="lblSpentHours" runat="server" Text=' <%# Eval("SpentHours")%>'
                                                        CssClass="dxlabel"></asp:Label>
                                                </DataItemTemplate>
                                                <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                            </dxGridview:GridViewDataTextColumn>

                                            <dxGridview:GridViewDataColumn HeaderStyle-VerticalAlign="Middle" HeaderStyle-HorizontalAlign="Center"
                                                CellStyle-VerticalAlign="Middle" CellStyle-HorizontalAlign="Center" Width="30px">
                                                <Settings AllowAutoFilter="false" />
                                                <DataItemTemplate>
                                                    <asp:LinkButton ID="btnEdit" runat="server" ToolTip='<%# Session["Edit"] %>' data-toggle="tooltip"
                                                        OnClick="EditLinkButton_Click" CommandName='<%# Eval("ProjectTaskDetailID") %>' data-placement="top"
                                                        CssClass="btn btn-defalut edit-icons" Style="color: #3C8DBC"></asp:LinkButton>
                                                </DataItemTemplate>
                                                <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                            </dxGridview:GridViewDataColumn>
                                            <dxGridview:GridViewDataColumn HeaderStyle-VerticalAlign="Middle" HeaderStyle-HorizontalAlign="Center"
                                                CellStyle-VerticalAlign="Middle" CellStyle-HorizontalAlign="Center" Width="30px">
                                                <Settings AllowAutoFilter="false" />
                                                <DataItemTemplate>
                                                    <asp:LinkButton ID="btnDelete" runat="server" ToolTip="delete" data-toggle="tooltip"
                                                        OnClick="btnDelete_Click" CommandName='<%# Eval("ProjectTaskDetailID") %>' data-placement="top"
                                                        CssClass="btn btn-defalut del-icons" Style="color: Red" OnClientClick="return Delete_Conf();"></asp:LinkButton>
                                                </DataItemTemplate>
                                                <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                            </dxGridview:GridViewDataColumn>
                                        </Columns>
                                        <SettingsPager PageSize="10">
                                        </SettingsPager>
                                        <SettingsText EmptyDataRow="No Records Found" />
                                        <Settings ShowFilterRow="true" />
                                        <SettingsBehavior SortMode="Value" AllowSort="true" AllowDragDrop="true" />
                                        <Styles AlternatingRow-CssClass="table-bg">
                                        </Styles>
                                    </dxGridview:ASPxGridView>
                                    <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" SelectMethod="GridSelectTaskSheetEntry" 
                                        TypeName="TimeSheetEntry">
                                        <SelectParameters>
                                            <asp:SessionParameter Name="EmployeeID" Type="String" SessionField="EmployeeID" />
                                            <asp:SessionParameter Name="ShiftDate" Type="Datetime" SessionField="ShiftDate" />
                                            <asp:SessionParameter Name="gintTimeSheet" Type="Int32" SessionField="gintTimeSheet" />
                                        </SelectParameters>
                                    </asp:ObjectDataSource>
                                </div>
                            </div>

                        </div>
                    </div>--%>

            <%-- </ContentTemplate>
            </asp:UpdatePanel>--%>


            <div class="row">
                <div class="col-md-12">
                    <div class="pull-right-button">
                        <asp:LinkButton ID="btn_add" Style="display: none;" CssClass="btn add-btn fa-plus" runat="server" Text="&nbsp;&nbsp;Submit" OnClick="btn_add_Click" />
                        <asp:LinkButton ID="btnReset" CssClass="btn add-btn fa-undo" runat="server" Text="&nbsp;&nbsp;Reset" Style="display: none" OnClick="btnReset_Click" />
                    </div>
                </div>
            </div>

        </div>




    </div>
</asp:Content>
