<%@ page title="" language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_Hrm_Appraisal_SetKPAForTeam, App_Web_r0dpfovh" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Src="~/UserControls/DatePicker/DatePickerControl.ascx" TagName="DatePickerControl" TagPrefix="Date" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/UserControls/GridViewPager/GridViewPager.ascx" TagName="GridViewPager" TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/Common/ScreenGroup/ScreenGroup.ascx" TagName="ScreenGroupControl" TagPrefix="ScreenGroup" %>
<%@ Register Src="~/UserControls/Common/EmployeeSearch/EmployeeSearch.ascx" TagName="EmployeeSearchControl" TagPrefix="hims" %>
<%@ Register Src="~/UserControls/Common/IncomeTax/IncomeTaxLabelControl.ascx" TagName="ITaxControl" TagPrefix="ITax" %>
<%@ Register Src="~/UserControls/MessageBox/MessageBoxControl.ascx" TagName="MessageControl" TagPrefix="uc1" %>


<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <asp:UpdatePanel ID="ResonMasterUpdatePanel" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <hims:EmployeeSearchControl ID="EmployeeSearch" Visible="false" runat="server" />
            <div id="divContentPage">

                <div class="dashBoardLeftCont" valign="top">
                    <div class="himssuHeader3WireBox">
                        <table width="0px" cellpadding="0" cellspacing="0">
                            <tr>
                                <td>
                                    <div class="himsBoxContent">
                                        <div class="leftUlMenu">
                                            <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="235"
                                                Visible="true" runat="server" />
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="whiteboxpaddingleft row">
                    <div class="himssuHeader5WireBox card card-box" id="SearchDiv" runat="server">
                        <div class="himsBoxHeader card-head">
                            <asp:Panel ID="Panel1" runat="server">
                                <div class="leftdiv">
                                </div>
                                <div class="himsBoxTitle">
                                    <div class="headerText">
                                        <header>
                                            <i class="fas fa-search"></i>
                                            <asp:Label ID="Label3" runat="server" Text="Search"></asp:Label>
                                        </header>
                                    </div>
                                    <div class="fRight mt-27">
                                        <asp:Button ID="AddNewButtonID" runat="server" OnClick="AddNewButton_Click"
                                            SkinID="0" CssClass="btn btn-add" Text="&#xf067; Add" Visible="false" />
                                    </div>
                                </div>
                            </asp:Panel>
                        </div>
                        <div class="himsBoxContent card-body">
                            <asp:Panel ID="DetailPanel" runat="Server">
                                <div class="contentHolder">


                                    <asp:Panel ID="SearchCriteriaPanel" runat="Server" Visible="true">
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="Label10" Text="Department" runat="server"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:DropDownList ID="SearchDepartmentDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                    onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList" CssClass="form-control">
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="SearchEmployeeCodeLabel" runat="server" Text="Employee Code"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5 display-flex">
                                                <asp:TextBox ID="SearchEmployeeCodeTextBox" SkinID="CustomWidthTextBox"
                                                    runat="server" MaxLength="100" AutoPostBack="true" OnTextChanged="SearchEmployeeCodeTextBox_TextChanged"> </asp:TextBox>
                                                <asp:ImageButton SkinID="FindImage" ToolTip="Search" ID="SearchEmployeeCodeImageButton"
                                                    runat="server" OnClick="SearchEmployeeCodeImageButton_Click" ImageUrl="../../../../Images/icons/icon_find.gif" />
                                                <asp:HiddenField ID="SearchEmployeeIdHiddenField" runat="server" />
                                            </div>
                                        </div>
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="EmployeeNameLabel" runat="server" Text="Name"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:TextBox ID="EmployeeNameTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" Enabled="false"
                                                    SkinID="CustomWidthTextBox" runat="server" MaxLength="200"> </asp:TextBox>
                                            </div>
                                        </div>
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="DesignationLabel" Text="Designation" runat="server"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:DropDownList ID="DesignationDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                    onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList" CssClass="form-control">
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="KPAStatusLabel" Text="KPA Status" runat="server"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:DropDownList ID="KPAStatusDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                    onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList" CssClass="form-control">
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                        <div class="alignCenter col-md-12 pb5 pTop5">
                                            <asp:Button ID="SearchButton" Text="&#xf002;  Search" runat="Server" OnClick="SearchButton_Click"
                                                SkinID="0" CssClass="btn-search btn fas" />
                                            <asp:Button ID="ResetButton" runat="server" Text="&#xf0e2; Reset" CssClass="btn-reset btn fas" SkinID="0" OnClick="ResetButton_Click" />
                                        </div>
                                        <div class="pTop5" style="float: right; padding-left: 2px; width: 17%">
                                            <asp:Button ID="ApplyButton" runat="server" SkinID="0" Text="Apply" OnClick="ApplyButton_Click" CssClass="btn btn-assign fas" />
                                            <asp:DropDownList ID="KPATemplateDropDownList" runat="server" onmouseleave="showHideTooltip()" Style="width: 120px; display: inline"
                                                onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList" CssClass="form-control">
                                            </asp:DropDownList>
                                        </div>
                                        <div class="cBoth">
                                        </div>
                                    </asp:Panel>
                            <div id="Div1" class="himssuHeader7WireBox col-md-12 " runat="server">
                                <div id="ReasonMasterDetailDiv" visible="false" runat="server">

                                    <div class="himsBoxHeader" id="PatientRelationDiv" visible="True" runat="server">
                                        <div class="leftdiv">
                                        </div>
                                        <div class="himsBoxTitle">
                                        </div>
                                    </div>
                                    <div class="himsBoxContent">
                                        <div id="GridViewMessageDiv" class="himsBoxContentMsg" runat="server" visible="true">
                                        </div>
                                        <asp:UpdatePanel ID="MenuPlanDetailUpdatePanel" runat="server" UpdateMode="Always">
                                            <ContentTemplate>
                                                <div id="Div5" runat="server" visible="false" class="table-responsive">
                                                    <asp:GridView ID="GridViewDetails" runat="server" Width="100%" AutoGenerateColumns="False"
                                                        OnRowDataBound="GridViewDetails_RowDataBound" OnPageIndexChanging="GridViewDetails_PageIndexChanging"
                                                        SkinID="" ShowHeader="True" PagerSettings-Visible="false"
                                                        DataKeyNames="Id" EmptyDataText="No Records Found !!!"
                                                        CssClass="table table-striped table-bordered table-hover">
                                                        <Columns>
                                                            <asp:TemplateField>
                                                                <HeaderTemplate>
                                                                    <label class="rt-chkbox rt-chkbox-outline">
                                                                        <asp:CheckBox ID="HeaderIsSelectCheckBox" onclick="checkAllRows(this);" runat="server" />
                                                                        <span></span>
                                                                    </label>
                                                                </HeaderTemplate>
                                                                <HeaderStyle HorizontalAlign="Center" />
                                                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Top" />
                                                                <ItemTemplate>
                                                                    <label class="rt-chkbox rt-chkbox-outline">
                                                                        <asp:CheckBox ID="IsSelectCheckBox" runat="server" onClick="checkUncheckHeaderCheckBox(this);" />
                                                                        <span style="top: -10px"></span>
                                                                    </label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField ItemStyle-Width="7%" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true" HeaderText="Sr No">
                                                                <ItemTemplate>
                                                                    <%--  <asp:LinkButton ID="EditLinkButton" runat="server" CommandName="Select" OnClick="LinkButton_Click"
                                                                                            Text="Select" CausesValidation="false"></asp:LinkButton>--%>
                                                                    <asp:Label ID="TitleLabel" runat="server" Text='<%# Container.DataItemIndex + 1 %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Code" ItemStyle-Width="13%" SortExpression="Code" HeaderStyle-HorizontalAlign="Left"
                                                                ItemStyle-Wrap="true">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="CodeLabel" runat="server" Text='<%# Bind("Code") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Employee" ItemStyle-Width="20%" SortExpression="Employee" HeaderStyle-HorizontalAlign="Left"
                                                                ItemStyle-Wrap="true">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="EmployeeLabel" runat="server" Text='<%# Bind("Employee") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Designation" ItemStyle-Width="20%" SortExpression="DesignationName" HeaderStyle-HorizontalAlign="Left"
                                                                ItemStyle-Wrap="true">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="DesignationNameLabel" runat="server" Text='<%# Bind("DesignationName") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Department" ItemStyle-Width="20%" SortExpression="DepartmentName" HeaderStyle-HorizontalAlign="Left"
                                                                ItemStyle-Wrap="true">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="DepartmentNameLabel" runat="server" Text='<%# Bind("DepartmentName") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="KPA Status" ItemStyle-Width="20%" SortExpression="KPAStatus" HeaderStyle-HorizontalAlign="Left"
                                                                ItemStyle-Wrap="true" ItemStyle-HorizontalAlign="Left" ItemStyle-VerticalAlign="Middle">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="KPAStatusLabel" runat="server" Text='<%# Bind("KPAStatus") %>'></asp:Label>
                                                                    <asp:HiddenField ID="HiddenFieldKPAStatusId" runat="server" Value='<%# Bind("KPAStatusId") %>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Set/Update" HeaderStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                                <ItemTemplate>
                                                                    <asp:Button ID="SetKPAButton" OnClick="SetKPAButton_Click" Text="Set KPA" runat="Server" SkinID="0" CssClass="btn btn-edit fas small" />
                                                                    <asp:HiddenField ID="HiddenFieldKPASaveStatus" runat="server" Value='<%# Bind("Enabled") %>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>


                                                        </Columns>
                                                    </asp:GridView>
                                                </div>



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


                                </div>
                            </div>
                        </div>

                        <div class="cBoth pTop15"></div>
                        <asp:Label Font-Bold="true" Style="padding-left: 15px" ID="Label1" Text="KPA Not Set :" runat="server"></asp:Label>
                        <asp:Label runat="server" ID="Label2" Height="10px" Width="26px" BorderColor="Black" BackColor="#fdc0d2" BorderWidth="1px"></asp:Label>
                        &nbsp;&nbsp;&nbsp;&nbsp;
                                    <asp:Label Font-Bold="true" ID="Label4" Text="KPA Not Accepted Yet :" runat="server"></asp:Label>
                        <asp:Label runat="server" ID="Label5" Height="10px" Width="26px" BorderColor="Black" BackColor="#a2a2a2" BorderWidth="1px"></asp:Label>
                        &nbsp;&nbsp;&nbsp;&nbsp;
                                    <asp:Label Font-Bold="true" ID="Label6" Text="KPA Set & Accepted :" runat="server"></asp:Label>
                        <asp:Label runat="server" ID="Label7" Height="10px" Width="26px" BorderColor="Black" BackColor="#d9f9db" BorderWidth="1px"></asp:Label>
                        &nbsp;&nbsp;&nbsp;&nbsp;
                                    <asp:Label Font-Bold="true" ID="Label8" Text="KPA Change Requested :" runat="server"></asp:Label>
                        <asp:Label runat="server" ID="Label9" Height="10px" Width="26px" BorderColor="Black" BackColor="#ff9292" BorderWidth="1px"></asp:Label>
                        <div class="cBoth"></div>

                        </asp:Panel>
                    </div>
                </div>
                <div class="himssuHeader1WireBox card card-box" id="DetailDiv" runat="server" visible="false">
                    <div class="himsBoxHeader card-head">
                        <div class="leftdiv">
                        </div>
                        <div class="himsBoxTitle">
                            <div class="headerText">
                                <header>
                                    <i class="fas fa-cog"></i>
                                    <asp:Label ID="AccountingYearMasterDetailLabel" runat="server" Text="Maintenance"></asp:Label>
                                </header>
                            </div>
                        </div>
                        <div class="fRight mt-27">
                        </div>
                    </div>
                    <div class="himsBoxContent car-body">
                        <div class="contentHolder">
                            <div class="outerBox pTop5 col-md-3">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="TitleLabel" runat="server" Text="Template Name" SkinID="MandatoryLabel"></asp:Label>
                                </div>
                                <div class="fLeft pRight5">
                                    <asp:TextBox ID="TitleTextBox" runat="server" Width="150px" SkinID="CustomWidthTextBox"
                                        MaxLength="100"></asp:TextBox>
                                    <asp:HiddenField ID="IdHiddenField" runat="server" />
                                    <asp:HiddenField ID="HiddenFieldEmployeeID" runat="server" />
                                    <asp:HiddenField ID="MaxRowHiddenField" runat="server" />
                                </div>
                            </div>
                            <div class="cBoth"></div>
                            <div class="outerBox pTop5 col-md-6">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="RemarkLabel" runat="server" Text="Remark"></asp:Label>
                                </div>
                                <div class="fLeft pRight5">
                                    <asp:TextBox ID="RemarkTextBox" onmouseleave="showHideTooltip()" SkinID="MultiLineTextbox"
                                        runat="server" MaxLength="300"></asp:TextBox>
                                </div>
                            </div>


                            <div class="cBoth">
                            </div>
                            <div class="outerBox pTop5 col-md-3">
                                <div class="controlLabelWidth">
                                    <asp:CheckBox ID="IsObsolateCheckBox" runat="server" Visible="false" />
                                    <asp:Label ID="IsObsolateLable" runat="server" AssociatedControlID="IsObsolateCheckBox" Text="InActive" Visible="false"></asp:Label>
                                </div>
                            </div>
                            <div class="cBoth">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            </tr>
                    </table>
            </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <cc1:ModalPopupExtender ID="EmployeeSearchExtender" runat="server" TargetControlID="HidenButton" PopupControlID="ModalPopUpPanel" BackgroundCssClass="modalBackground"
        Drag="True" PopupDragHandleControlID="dragPanel" DynamicServicePath="" Enabled="True" />
    <asp:LinkButton runat="server" ID="HidenButton" meta:resourcekey="HidenButtonResource1" />


    <asp:Panel ID="ModalPopUpPanel" runat="server" CssClass="dragControl" Width="700px" DefaultButton="SearchButton" meta:resourcekey="ModalPopUpPanelResource1">
        <div class="card card-box">
            <asp:Panel ID="dragPanel" runat="server" CssClass="dragMePanel" Width="100%" meta:resourcekey="dragPanelResource1">
                <div id="dragMe1" class="dragMe" style="cursor: move">
                    <div class="himsPopupWireBox">
                        <div class="himsBoxHeadermain">
                            <div>
                            </div>
                        </div>
                        <div class="himsBoxTopper text-center headerFont card-head">
                            <div class="fLeft headerText">
                                <asp:UpdatePanel ID="UpdatePanel3" runat="server" RenderMode="Inline">
                                    <ContentTemplate>
                                        <header>
                                            <asp:Label ID="DialogHeaderLabel" runat="server" meta:resourcekey="DialogHeaderLabelResource1"></asp:Label>
                                        </header>
                                        <asp:ImageButton ID="CloseImageButton" runat="server" Height="20PX" Width="20PX" ImageUrl="~/Images/closebox.png" Style="margin-left: 525PX" OnClick="CloseImageButton_Click" />
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </div>
                        </div>
                    </div>
                </div>
            </asp:Panel>

            <asp:UpdatePanel ID="EmployeeSearchUpdatePanel" runat="server"
                RenderMode="Inline">
                <ContentTemplate>

                    <div id="bodyContainer">
                        <div class="himsPopupWireBox">
                            <div class="himsBoxHeadermain">
                                <div>
                                </div>
                            </div>
                            <uc1:MessageControl ID="SearchMessageBox" runat="server" />
                            <div class="himsBoxContentmain" style="overflow: hidden">
                                <div id="divContentPage1">

                                    <div class="himsBoxHeader">
                                        <asp:Panel ID="TopPanel" runat="server" meta:resourcekey="TopPanelResource1">
                                            <div class="leftdiv">
                                            </div>
                                            <div class="himsBoxTitle">
                                                <div class="headerText">
                                                    <asp:Label ID="EmployeeSearchHeaderLabel" runat="server" Text="Search"
                                                        meta:resourcekey="EmployeeSearchHeaderLabelResource1" Visible="false"></asp:Label>
                                                </div>
                                                <div>
                                                </div>
                                            </div>
                                        </asp:Panel>
                                    </div>
                                    <div class="himsBoxContent card-body">
                                        <asp:Panel ID="Panel2" runat="server" meta:resourcekey="DetailPanelResource1">
                                            <div class="contentHolder">
                                                <asp:Panel ID="Panel3" runat="server" meta:resourcekey="SearchCriteriaPanelResource1">

                                                    <div class="pTop5 col-md-6 col-sm-6 col-xs-12">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="EmployeeCodeLabel" runat="server" Text="Employee"
                                                                meta:resourcekey="EmployeeCodeLabelResource1"></asp:Label>
                                                        </div>
                                                    </div>
                                                    <div class="pTop5 col-md-6 col-sm-6 col-xs-12">
                                                        <asp:Label ID="LabelEmployeeName" runat="server"
                                                            meta:resourcekey="EmployeeCodeLabelResource1"></asp:Label>
                                                    </div>
                                                    <div class="pTop5 col-md-6 col-sm-6 col-xs-12">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="MobileNumberLabel" runat="server" Text="Template"
                                                                meta:resourcekey="MobileNumberLabelResource1"></asp:Label>
                                                        </div>
                                                    </div>
                                                    <div class="pTop5 col-md-6 col-sm-6 col-xs-12">
                                                        <asp:DropDownList runat="server" ID="TemplateDropDownList"
                                                            SkinID="CustomWidthDropDownList" CssClass="form-control" onmouseleave="showHideTooltip()" AutoPostBack="true" OnSelectedIndexChanged="TemplateDropDownList_SelectedIndexChanged"
                                                            onmouseenter="showHideTooltip()">
                                                        </asp:DropDownList>
                                                    </div>

                                                </asp:Panel>

                                                <div id="MainDiv" runat="server">
                                                    <div id="EmployeeSearchGridDiv" runat="server">

                                                        <div class="himssuHeader7WireBox col-md-12" id="Div4" runat="server">
                                                            <div class="himsBoxHeader" id="GridHeaderDiv" runat="server" visible="False">
                                                                <div class="leftdiv">
                                                                </div>
                                                            </div>
                                                            <div class="himsBoxContent">
                                                                <div class="himsBoxContent">
                                                                    <div class="contentHolder">
                                                                        <div class="himssuHeader7WireBox" runat="server">
                                                                            <div class="himsBoxHeader">



                                                                                <div class="card-head inner">
                                                                                    <div class="headerText">
                                                                                        <header>
                                                                                            <asp:Label ID="KPALabel2" runat="server" Text="KPA"
                                                                                                meta:resourcekey="EmployeeCodeLabelResource1"></asp:Label>
                                                                                        </header>
                                                                                    </div>
                                                                                </div>


                                                                                <div class="himsBoxContent width-100">
                                                                                    <div id="Div3" class="himsBoxContentMsg table-responsive" runat="server">
                                                                                        <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always">
                                                                                            <ContentTemplate>
                                                                                                <asp:GridView ID="GridViewKPA" runat="server" Width="100%" AutoGenerateColumns="False"
                                                                                                    SkinID="" ShowHeader="True" PagerSettings-Visible="false"
                                                                                                    EmptyDataText="No Records Found !!!"
                                                                                                    CssClass="table table-striped table-bordered table-hover" OnRowDataBound="GridViewKPA_RowDataBound" OnRowCommand="GridViewKPA_RowCommand">
                                                                                                    <Columns>
                                                                                                        <asp:TemplateField HeaderText="Sr No" ItemStyle-Width="8%" HeaderStyle-HorizontalAlign="Left"
                                                                                                            ItemStyle-Wrap="true">
                                                                                                            <ItemTemplate>
                                                                                                                <asp:Label ID="TitleLabel" runat="server" Text='<%# Container.DataItemIndex + 1 %>'></asp:Label>
                                                                                                                <asp:HiddenField ID="HiddenFieldID" runat="server" Value='<%# Bind("Id") %>' />
                                                                                                            </ItemTemplate>
                                                                                                        </asp:TemplateField>
                                                                                                        <asp:TemplateField HeaderText="KPA" ItemStyle-Width="25%" HeaderStyle-HorizontalAlign="Left"
                                                                                                            ItemStyle-Wrap="true">
                                                                                                            <ItemTemplate>
                                                                                                                <asp:TextBox ID="TextBoxKPA" runat="server" Height="20px" Width="95%" Text='<%# Bind("Name") %>'></asp:TextBox>
                                                                                                            </ItemTemplate>
                                                                                                        </asp:TemplateField>
                                                                                                        <asp:TemplateField HeaderText="Type" ItemStyle-Width="15%" HeaderStyle-HorizontalAlign="Left"
                                                                                                            ItemStyle-Wrap="true">
                                                                                                            <ItemTemplate>
                                                                                                                <asp:DropDownList ID="DropDownListType" Height="20px" CssClass="form-control" runat="server"></asp:DropDownList>
                                                                                                                <asp:HiddenField ID="HiddenFieldType" runat="server" Value='<%# Bind("Type") %>' />
                                                                                                            </ItemTemplate>
                                                                                                        </asp:TemplateField>
                                                                                                        <asp:TemplateField HeaderText="Remarks" ItemStyle-Width="35%" HeaderStyle-HorizontalAlign="Left"
                                                                                                            ItemStyle-Wrap="true">
                                                                                                            <ItemTemplate>
                                                                                                                <asp:TextBox ID="TextBoxRemarks" runat="server" Width="95%" Height="20px" Text='<%# Bind("Remarks") %>'></asp:TextBox>
                                                                                                            </ItemTemplate>
                                                                                                        </asp:TemplateField>
                                                                                                        <asp:TemplateField HeaderText="Weightage (%)" ItemStyle-Width="17%" HeaderStyle-HorizontalAlign="Left"
                                                                                                            ItemStyle-Wrap="true">
                                                                                                            <ItemTemplate>
                                                                                                                <asp:DropDownList ID="DropDownListWeightage" CssClass="form-control" Height="20px" runat="server"></asp:DropDownList>
                                                                                                                %
                                                                                        <asp:HiddenField ID="HiddenFieldWeightage" runat="server" Value='<%# Bind("Weightage") %>' />
                                                                                                            </ItemTemplate>
                                                                                                        </asp:TemplateField>
                                                                                                        <asp:TemplateField HeaderStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                                                                            <ItemTemplate>
                                                                                                                <asp:ImageButton ID="ImageButtonAdd" runat="server" CommandArgument='<%# Container.DataItemIndex + 1 %>' />
                                                                                                            </ItemTemplate>
                                                                                                        </asp:TemplateField>
                                                                                                    </Columns>
                                                                                                </asp:GridView>
                                                                                            </ContentTemplate>
                                                                                        </asp:UpdatePanel>
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                    <div class="himsBoxContent">
                                                                        <div class="contentHolder">
                                                                            <div class="himssuHeader7WireBox" runat="server">
                                                                                <div class="himsBoxHeader">
                                                                                    <div class="card-head inner">
                                                                                        <div class="headerText">
                                                                                            <header>
                                                                                                <asp:Label ID="CompetenciesLabel2" runat="server" Text="Competencies"
                                                                                                    meta:resourcekey="EmployeeCodeLabelResource1"></asp:Label>
                                                                                            </header>
                                                                                        </div>
                                                                                    </div>

                                                                                    <div class="himsBoxContent width-100">
                                                                                        <div id="Div2" class="himsBoxContentMsg table-responsive" runat="server">
                                                                                            <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Always">
                                                                                                <ContentTemplate>
                                                                                                    <asp:GridView ID="GridViewCompetencies" runat="server" Width="100%" AutoGenerateColumns="False"
                                                                                                        SkinID="" ShowHeader="True" PagerSettings-Visible="false"
                                                                                                        EmptyDataText="No Records Found !!!"
                                                                                                        CssClass="table table-striped table-bordered table-hover" OnRowCommand="GridViewCompetencies_RowCommand" OnRowDataBound="GridViewCompetencies_RowDataBound">
                                                                                                        <Columns>
                                                                                                            <asp:TemplateField HeaderText="Sr No" ItemStyle-Width="8%" HeaderStyle-HorizontalAlign="Left"
                                                                                                                ItemStyle-Wrap="true">
                                                                                                                <ItemTemplate>
                                                                                                                    <asp:Label ID="TitleLabel" runat="server" Text='<%# Container.DataItemIndex + 1 %>'></asp:Label>
                                                                                                                    <asp:HiddenField ID="HiddenFieldID" runat="server" Value='<%# Bind("Id") %>' />
                                                                                                                </ItemTemplate>
                                                                                                            </asp:TemplateField>
                                                                                                            <asp:TemplateField HeaderText="Competencies" ItemStyle-Width="25%" HeaderStyle-HorizontalAlign="Left"
                                                                                                                ItemStyle-Wrap="true">
                                                                                                                <ItemTemplate>
                                                                                                                    <asp:TextBox ID="TextBoxKPA" Height="20px" runat="server" Width="95%" Text='<%# Bind("Name") %>'></asp:TextBox>
                                                                                                                </ItemTemplate>
                                                                                                            </asp:TemplateField>
                                                                                                            <asp:TemplateField HeaderText="Type" ItemStyle-Width="15%" HeaderStyle-HorizontalAlign="Left"
                                                                                                                ItemStyle-Wrap="true">
                                                                                                                <ItemTemplate>
                                                                                                                    <asp:DropDownList ID="DropDownListType" Height="20px" CssClass="form-control" runat="server"></asp:DropDownList>
                                                                                                                    <asp:HiddenField ID="HiddenFieldType" runat="server" Value='<%# Bind("Type") %>' />
                                                                                                                </ItemTemplate>
                                                                                                            </asp:TemplateField>
                                                                                                            <asp:TemplateField HeaderText="Remarks" ItemStyle-Width="35%" HeaderStyle-HorizontalAlign="Left"
                                                                                                                ItemStyle-Wrap="true">
                                                                                                                <ItemTemplate>
                                                                                                                    <asp:TextBox ID="TextBoxRemarks" runat="server" Height="20px" Width="95%" Text='<%# Bind("Remarks") %>'></asp:TextBox>
                                                                                                                </ItemTemplate>
                                                                                                            </asp:TemplateField>
                                                                                                            <asp:TemplateField HeaderText="Weightage (%)" ItemStyle-Width="17%" HeaderStyle-HorizontalAlign="Left"
                                                                                                                ItemStyle-Wrap="true">
                                                                                                                <ItemTemplate>
                                                                                                                    <asp:DropDownList ID="DropDownListWeightage" CssClass="form-control" Height="20px" runat="server"></asp:DropDownList>
                                                                                                                    %
                                                                                        <asp:HiddenField ID="HiddenFieldWeightage" runat="server" Value='<%# Bind("Weightage") %>' />
                                                                                                                </ItemTemplate>
                                                                                                            </asp:TemplateField>
                                                                                                            <asp:TemplateField HeaderStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                                                                                <ItemTemplate>
                                                                                                                    <asp:ImageButton ID="ImageButtonAdd" runat="server" CommandArgument='<%# Container.DataItemIndex + 1 %>' />
                                                                                                                </ItemTemplate>
                                                                                                            </asp:TemplateField>
                                                                                                        </Columns>
                                                                                                    </asp:GridView>
                                                                                                </ContentTemplate>
                                                                                            </asp:UpdatePanel>
                                                                                        </div>

                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </asp:Panel>





                                    </div>
                                </div>
                                <div class="tableContainer alignCenter col-md-12 p-b-13">

                                    <asp:Button runat="server" ID="OkButton" Text="&#xf164; Save"
                                        OnClick="SaveButton_Click" SkinID="0" CssClass="fas btn btn-ok " meta:resourcekey="OkButtonResource1" />

                                    <asp:Button ID="CancelButton" runat="server"
                                        CssClass="btn-cancel btn fas" meta:resourcekey="CancelButtonResource1" OnClick="CancelButton_Click" SkinID="0" Text="&#xf00d; Cancel" />

                                </div>
                            </div>
                        </div>
                    </div>
                    <%--<asp:UpdateProgress ID="MainUpdateProgress" runat="server" DisplayAfter="200">
                        <ProgressTemplate>
                            <div style="position: absolute; top: 50%; left: 45%; font-size: 20px">
                                <asp:Image ID="LoadingImage4" runat="server" ImageUrl="~/Images/Loading.gif"
                                    meta:resourcekey="Image3Resource1" />
                            </div>
                        </ProgressTemplate>
                    </asp:UpdateProgress>--%>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
    </asp:Panel>


    <%--<script data-main="../../../JavaScript/rjs/encrypt/payrollyear-master-encrypt" src="../../../JavaScript/rjs/require.js"></script>--%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/payrollyear-master")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
    <script>
        function checkAllRows(obj) {
            var objGridview = obj.closest('table');
            var list = objGridview.getElementsByTagName("input");
            for (var i = 0; i < list.length; i++) {
                var objRow = list[i].parentNode.parentNode;
                if (list[i].type == "checkbox" && obj != list[i]) {
                    if (!list[i].disabled) {
                        if (obj.checked) {
                            list[i].checked = true;
                        }
                        else {
                            list[i].checked = false;
                        }
                    }
                }
            }
        }
        function checkUncheckHeaderCheckBox(obj) {
            var objGridView = obj.closest('table');
            var list = objGridView.getElementsByTagName("input");
            for (var i = 0; i < list.length; i++) {
                var objHeaderChkBox = list[0];
                var checked = true;
                if (list[i].type == "checkbox" && list[i] != objHeaderChkBox) {
                    if (!list[i].disabled) {
                        if (!list[i].checked) {
                            checked = false;
                            break;
                        }
                    }
                }
            }
            objHeaderChkBox.checked = checked;
        }
    </script>
</asp:Content>


