<%@ page language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_HumanResourceManagement_Payroll_PayElement, App_Web_nobwdkhq" title="Untitled Page" uiculture="auto" meta:resourcekey="PageResource1" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<%@ Register Src="~/UserControls/GridViewPager/GridViewPager.ascx" TagName="GridViewPager" TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/AutoComplete/AutoCompleteControl.ascx" TagName="AutoCompleteControl" TagPrefix="acc" %>
<%@ Register Src="~/UserControls/Common/ScreenGroup/ScreenGroup.ascx" TagName="ScreenGroupControl" TagPrefix="ScreenGroup" %>
<%@ Register Src="~/UserControls/Common/Payroll/PayrollDetailBoxControl.ascx" TagName="PayrollControl" TagPrefix="Pay" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <asp:UpdatePanel ID="FixedAssetCategoryMasterUpdatePanel" runat="server">
        <ContentTemplate>
            <div>
                <div id="divContentPage" class="divcontentpagemargin">
                    <div class="dashBoardLeftCont">
                        <div class="himssuHeader3WireBox">
                            <table>
                                <tr>
                                    <td>
                                        <div class="himsBoxContent">
                                            <div class="leftUlMenu">
                                                <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="162"
                                                    Visible="true" runat="server" />
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>
                    <div class="whiteboxpaddingleft row">
                        <Pay:PayrollControl ID="PayrollUserControl" runat="server" Visible="true" />
                        <div class="himssuHeader5WireBox card card-box" id="SearchDiv" runat="server">
                            <div class="himsBoxHeader card-head">
                                <asp:Panel ID="Panel1" runat="server" meta:resourcekey="Panel1Resource1">
                                    <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" meta:resourcekey="Label3Resource1"></asp:Label>
                                            </header>
                                        </div>
                                        <div class="fRight mt-27 pagination display-flex">
                                            <asp:Button ID="AddNewButtonID" runat="server" OnClick="AddNewButton_Click" SkinID="0"
                                                CssClass="AddButton" Text="Add" />
                                        </div>
                                    </div>
                                </asp:Panel>
                            </div>
                            <div class="himsBoxContent card-body">
                                <asp:Panel ID="DetailPanel" runat="server" meta:resourcekey="DetailPanelResource1">
                                    <div class="contentHolder">
                                        <asp:Panel ID="SearchCriteriaPanel" runat="server" meta:resourcekey="SearchCriteriaPanelResource1">
                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="Label1" Text="Code" runat="server" meta:resourcekey="Label1Resource1"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:TextBox ID="SearchCodeTextbox" SkinID="CustomWidthTextBox" runat="server"
                                                        meta:resourcekey="SearchCodeTextboxResource1"></asp:TextBox>
                                                </div>
                                            </div>
                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="Label2" Text="Name" runat="server" meta:resourcekey="Label2Resource1"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:TextBox ID="SearchNameTextBox" SkinID="CustomWidthTextBox" runat="server"
                                                        meta:resourcekey="SearchNameTextBoxResource1"></asp:TextBox>
                                                </div>
                                            </div>
                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="SearchPayElementTypeLabel" runat="server" Text="PayElement Type" meta:resourcekey="SearchPayElementTypeLabelResource1"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:DropDownList ID="SearchPayElementTypeDropDownList" DataTextField="Title" DataValueField="ID"
                                                        runat="server" onmouseleave="showHideTooltip()" SkinID="CustomWidthDropDownList"
                                                        onmouseenter="showHideTooltip()" meta:resourcekey="SearchPayElementTypeDropDownListResource1" CssClass="form-control">
                                                    </asp:DropDownList>
                                                </div>
                                            </div>

                                            <div class="alignCenter col-md-12 pTop15 pb5">
                                                <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" onblur="fnClearTabIndexChange()"
                                                    OnClick="ResetButton_Click" meta:resourcekey="ResetButtonResource1" SkinID="0" CssClass="btn-reset btn fas" />
                                            </div>
                                            <div class="cBoth">
                                            </div>
                                            <br />
                                        </asp:Panel>
                                        <div id="FixedAssetCategoryMasterDetailDiv" visible="False" runat="server">
                                            <div id="Div1" class="himssuHeader7WireBox box-body box-solid gridviewfont" runat="server"
                                                style="width: 100%; margin-right: 5px;">
                                                <div class="himsBoxHeader" id="FixedAssetCategoryMasterDiv" runat="server">
                                                    <div class="leftdiv">
                                                    </div>
                                                    <div class="himsBoxTitle" style="width: 99%">
                                                        <div class="headerText">
                                                            <div class="fLeft">
                                                                <asp:Label ID="GridViewLabel" Text="" runat="server" Font-Bold="True" meta:resourcekey="GridViewLabelResource1" />
                                                            </div>
                                                        </div>
                                                        <div align="right" class="fRight" style="margin-top: 0px;">
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="himsBoxContent ">
                                                    <asp:GridView ID="PayElementGridview" runat="server" Width="100%" AutoGenerateColumns="False"
                                                        OnRowDataBound="PayElementGridview_RowDataBound" OnPageIndexChanging="PayElementGridview_PageIndexChanging"
                                                        AllowPaging="false" meta:resourcekey="PayElementGridviewResource1" DataKeyNames="PayElementDefaultId"
                                                        CssClass="table table-striped table-bordered">
                                                        <Columns>
                                                            <asp:TemplateField meta:resourcekey="TemplateFieldResource1" ItemStyle-Width="5%">
                                                                <ItemTemplate>
                                                                    <asp:LinkButton ID="EditLinkButton" runat="server" OnClick="LinkButton_Click" Text="Select"
                                                                        CausesValidation="False" meta:resourcekey="EditLinkButtonResource1"></asp:LinkButton>
                                                                </ItemTemplate>
                                                                <ItemStyle HorizontalAlign="Center" />
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Id" SortExpression="Id" Visible="False" meta:resourcekey="TemplateFieldResource2">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="IdLabel" runat="server" Text='<%# Bind("Id") %>' meta:resourcekey="IdLabelResource1"></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Default Code" meta:resourcekey="TemplateFieldResource3"
                                                                ItemStyle-Width="5%">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="PayElementDefaultCodeLabel" runat="server" Text='<%# Bind("PayElementDefaultCode") %>'
                                                                        meta:resourcekey="PayElementDefaultCodeLabelResource1"></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Code" SortExpression="Code" meta:resourcekey="TemplateFieldResource3"
                                                                ItemStyle-Width="5%">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="CodeLabel" runat="server" Text='<%# Bind("Code") %>' meta:resourcekey="CodeLabelResource1"></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Name" SortExpression="Name" meta:resourcekey="TemplateFieldResource4"
                                                                ItemStyle-Width="15%">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="NameLabel" runat="server" Text='<%# Bind("Title") %>' meta:resourcekey="NameLabelResource1"></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Pay Element Type" SortExpression="PayElementTypeId"
                                                                meta:resourcekey="TemplateFieldResource5" ItemStyle-Width="10%">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="PayElementTypeIdLabel" runat="server" Text='<%# Bind("PayElementType") %>'
                                                                        meta:resourcekey="PayElementTypeIdLabelResource1"></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Paid Category" SortExpression="PaidCategoryId" meta:resourcekey="TemplateFieldResource6"
                                                                ItemStyle-Width="10%">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="GrossBlockAccountCodeLabel" runat="server" Text='<%# Bind("PaidCategory") %>'
                                                                        meta:resourcekey="GrossBlockAccountCodeLabelResource1"></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Lwp" ItemStyle-Width="10%" ItemStyle-Wrap="true">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="IsLwpLabel" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"IsLwp").ToString().ToUpper()=="TRUE"?"Y":"N" %>'
                                                                        meta:resourcekey="IsLwpLabelResource1"></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Employee Specific" ItemStyle-Width="10%" ItemStyle-Wrap="true">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="IsEmployeeSpecificLabel" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"IsEmployeeSpecific").ToString().ToUpper()=="TRUE"?"Y":"N" %>'
                                                                        meta:resourcekey="IsEmployeeSpecificLabelResource1"></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Depend" ItemStyle-Width="10%" ItemStyle-Wrap="true">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="IsDependLabel" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"IsDepend").ToString().ToUpper()=="TRUE"?"Y":"N" %>'
                                                                        meta:resourcekey="IsDependLabelResource1"></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Avail During Probation" ItemStyle-Width="10%" ItemStyle-Wrap="true"
                                                                Visible="false">
                                                                <ItemTemplate>
                                                                    <asp:CheckBox ID="IsAvailDuringProbationkBox" runat="server" Checked='<%# Eval("IsAvailDuringProbation") %>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Include In Pay Slip" ItemStyle-Width="10%" ItemStyle-Wrap="true">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="IsIncludeInPaySlipLabel" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"IsIncludeInPaySlip").ToString().ToUpper()=="TRUE"?"Y":"N" %>'
                                                                        meta:resourcekey="IsIncludeInPaySlipLabelResource1"></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Include In Total" ItemStyle-Width="10%" ItemStyle-Wrap="true">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="IsIncludeInTotalLabel" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"IsIncludeInTotal").ToString().ToUpper()=="TRUE"?"Y":"N" %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="InActive" SortExpression="IsObsolete" meta:resourcekey="TemplateFieldResource7"
                                                                ItemStyle-Width="10%">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="ObsoleteLabel" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"IsObsolete").ToString().ToUpper()=="TRUE"?"Y":"N" %>'
                                                                        meta:resourcekey="ObsoleteLabelResource1"></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                        </Columns>
                                                        <PagerSettings Visible="False" />
                                                    </asp:GridView>
                                                </div>
                                            </div>
                                        </div>
                                    </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-money-bill-alt"></i>
                                            <asp:Label ID="FixedAssetCategoryMasterDetailLabel" runat="server" Text="PayElement"
                                                meta:resourcekey="FixedAssetCategoryMasterDetailLabelResource1"></asp:Label>
                                        </header>
                                    </div>
                                </div>
                                <div class="fRight mt-27 pagination display-flex">
                                    <table>
                                        <tr>
                                            <td class="formLabel">
                                                <div id="NumberOfRecordDiv" class="display-flex" runat="server" visible="true">
                                                    <asp:LinkButton AlternateText="First page" ToolTip="First page" ID="FirstRecordImageButton"
                                                        runat="server" CommandName="Page" CommandArgument="First"
                                                        OnClick="FirstRecordImageButton_Click" CssClass="btn btn-default gridviewpagerbuttonpadding">
                                                    <i class="fa fa-fast-backward"></i>
                                                    </asp:LinkButton>
                                                    <asp:LinkButton AlternateText="Previous page" ToolTip="Previous page" ID="PreviousImageButton"
                                                        runat="server" CommandName="Page" CommandArgument="Prev"
                                                        OnClick="PreviousImageButton_Click" CssClass="btn btn-default gridviewpagerbuttonpadding">
                                                    <i class="fa fa-play fa-rotate-180"></i>
                                                    </asp:LinkButton>
                                                    &nbsp;
                                                <asp:Label ID="LabelPage" runat="server" Text="Record " AssociatedControlID="ReCordNumber" />
                                                    <asp:Label ID="ReCordNumber" Font-Bold="true" SkinID="Dummy" runat="server"></asp:Label>
                                                    <asp:Label ID="ofLabel" Text="of" runat="server" />
                                                    <asp:Label ID="TotalRecord" runat="server" />
                                                    &nbsp;
                                                <asp:LinkButton AlternateText="Next page" ToolTip="Next page" ID="NextImageButtom"
                                                    runat="server" CssClass="btn btn-default gridviewpagerbuttonpadding" CommandName="Page" CommandArgument="Next"
                                                    OnClick="NextImageButton_Click">
                                                     <i class="fa fa-play"></i>
                                                </asp:LinkButton>

                                                    <asp:LinkButton AlternateText="Last page" ToolTip="Last page" ID="LastRecordImageButton"
                                                        runat="server" CssClass="btn btn-default gridviewpagerbuttonpadding" CommandName="Page" CommandArgument="Last"
                                                        OnClick="LastRecordImageButton_Click">
                                                      <i class="fa fa-fast-forward"></i>
                                                    </asp:LinkButton>
                                                    &nbsp;  &nbsp; &nbsp;
                                                </div>
                                            </td>
                                            <td>
                                                <asp:Button ID="BackButton" runat="Server" OnClick="BackButton_Click" SkinID="0" CssClass="btn btn-back fas" Text="&#xf30a;  back" />
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                            <div class="himsBoxContent card-body">
                                <div class="contentHolder">
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="CodeLabel" runat="server" Text="Code" SkinID="MandatoryLabel" meta:resourcekey="CodeLabelResource2"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="CodeTextBox" SkinID="CustomWidthTextBox" runat="server"
                                                MaxLength="20" AutoPostBack="True" OnTextChanged="CodeTextBox_TextChanged" meta:resourcekey="CodeTextBoxResource1"></asp:TextBox>
                                            <asp:HiddenField ID="IdHiddenField" runat="server" />
                                            <asp:HiddenField ID="PayElementDefaultIdHiddenField" runat="server" />
                                        </div>
                                    </div>

                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="NameLabel" runat="server" Text="Name" SkinID="MandatoryLabel" meta:resourcekey="NameLabelResource2"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="NameTextBox" SkinID="CustomWidthTextBox" runat="server"
                                                MaxLength="100" onkeypress="return fnKeyPressForNameField(event)" onblur="return fnonTextChangeNameField(this)"
                                                meta:resourcekey="NameTextBoxResource2"></asp:TextBox>
                                        </div>
                                    </div>

                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="PayElementTypeLabel" runat="server" Text="PayElement Type" SkinID="MandatoryLabel"
                                                meta:resourcekey="PayElementTypeLabelResource1"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:DropDownList ID="PayElementTypeDropDownList" DataTextField="Title" DataValueField="ID"
                                                runat="server" onmouseleave="showHideTooltip()" SkinID="CustomWidthDropDownList"
                                                onmouseenter="showHideTooltip()" meta:resourcekey="PayElementTypeDropDownListResource1" CssClass="form-control">
                                            </asp:DropDownList>
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="PaidCategoryLabel" runat="server" Text="Paid Category" SkinID="MandatoryLabel"
                                                meta:resourcekey="PaidCategoryLabelResource1"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:DropDownList ID="PaidCategoryDropDownList" runat="server" SkinID="CustomWidthDropDownList"
                                                CssClass="form-control">
                                            </asp:DropDownList>
                                        </div>
                                    </div>

                                    <div id="IsLwpDiv" runat="server">
                                        <div class="outerBox pTop5 col-md-3">
                                            <asp:CheckBox ID="IsLwpCheckBox" runat="server" Text="Lwp" />
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <asp:CheckBox ID="IsEmployeeSpecificCheckBox" runat="server" Text=" Employee Specific" />
                                    </div>

                                    <div class="outerBox pTop5 col-md-3">
                                        <asp:CheckBox ID="IsDependCheckBox" runat="server" Text="Depend" />
                                    </div>
                                    <div class="outerBox pTop5 col-md-3" runat="server" visible="false">
                                        <asp:CheckBox ID="IsAvailDuringProbationCheckBox" runat="server" Text="Avail During Probation" />
                                    </div>

                                    <div class="outerBox pTop5 col-md-3">
                                        <asp:CheckBox ID="IsIncludeInPaySlipCheckBox" runat="server" Text=" Include In PaySlip" />
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <asp:CheckBox ID="IsIncludeInTotalCheckBox" runat="server" Text="Include In Total" />
                                    </div>

                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="SortOrderLabel" runat="server" Text="Sort Order" meta:resourcekey="CodeLabelResource2"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="SortOrderTextBox" SkinID="CustomWidthTextBox" runat="server"
                                                meta:resourcekey="CodeTextBoxResource1"></asp:TextBox>
                                            <asp:HiddenField ID="HiddenField1" runat="server" />
                                        </div>
                                    </div>

                                    <div id="ToHideInActive" runat="server" class="outerBox pTop5 col-md-3">
                                        <asp:Label CssClass="rt-chkbox rt-chkbox-outline" runat="server" AssociatedControlID="ObsoleteCheckBox" ID="ObsoleteLabel">
                                            <asp:CheckBox ID="ObsoleteCheckBox" runat="server" />
                                            <span></span>
                                            InActive
                                        </asp:Label>
                                    </div>

                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <%--<script data-main="../../../JavaScript/rjs/encrypt/pay-element-encrypt" src="../../../JavaScript/rjs/require.js"></script>--%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/pay-element")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
</asp:Content>
