<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/MasterFile/TimeCheck.master"
    CodeFile="TA_UI_Master_SyncEmployee_Device.aspx.cs"
    Inherits="Masters_TA_UI_Master_SyncEmployee_Device" %>

<%@ Register TagPrefix="dxGridview" Assembly="DevExpress.Web.v14.2" Namespace="DevExpress.Web" %>
<%@ Register Assembly="DevExpress.Web.v14.2" Namespace="DevExpress.Web"
    TagPrefix="devEditors" %>
<asp:Content ContentPlaceHolderID="BodyContentPH" ID="conTerminal" runat="server">
     <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 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">
        function checkAll(objRef) {
            var GridView = objRef.parentNode.parentNode.parentNode;
            var inputList = GridView.getElementsByTagName("input");
            for (var i = 0; i < inputList.length; i++) {
                var row = inputList[i].parentNode.parentNode;
                if (inputList[i].type == "checkbox" && objRef != inputList[i]) {
                    if (objRef.checked) {
                        inputList[i].checked = true;
                    }
                    else {
                        inputList[i].checked = false;
                    }
                }
            }
        }
    </script>
     <script>      
        function DynamicDatePicker(Format, txtBoxId) {
            $("#" + txtBoxId).datetimepicker({ format: Format });
        }      
    </script>
    <div class="content-header">
        <h1 style="background-image: url('../dist/img/Terminal.png'); background-repeat: no-repeat; padding-left: 35px">
            <asp:Label ID="lbl_TerminalMaster" runat="server"></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-12">
                    <div class="pull-right">
                        <h6>
                            <span style="color: Red">|</span><span style="padding-left: 10px; padding-right: 10px"><asp:Label
                                ID="lbl_man" runat="server"></asp:Label>
                                (1 No.)</span>
                        </h6>
                    </div>
                </div>
                <div class="clearfix">
                </div>
            </div>
        </div>
        <div class="emp-filter">
            <div class="form-horizontal">
                <div class="row">
                    <div class="col-md-12">
                        <div class="row form-group">
                            <div class="col-md-2">
                                <asp:Label ID="lbl_TerminalId" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3">
                                <asp:DropDownList ID="ddl_TerminalId" runat="server" CssClass="form-control select2 Man-dat"
                                    AppendDataBoundItems="True">
                                    <asp:ListItem Value="-Select-" Text="-Select-"></asp:ListItem>
                                </asp:DropDownList>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="ddl_TerminalId"
                                    InitialValue="-Select-" SetFocusOnError="True" Display="None">*
                                </asp:RequiredFieldValidator>
                            </div>
                            <div class="col-md-2">
                                <div class="pull-right-button">
                                    <asp:LinkButton ID="btnsync" Text="&nbsp;&nbsp;Sync device data" CssClass="btn del-btn fa-refresh"
                                        runat="server" OnClick="btnsync_Click" />
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-horizontal">
            <div id="MyShowGrid1" class="modal modal-default fade" role="dialog">
                <div class="modal-dialog" style="min-width: 50%; max-width: 60%">
                    <!-- Modal content-->
                    <div class="modal-content" style="margin-top: 100px">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" style="border-radius: 50px;">
                                &times;</button>
                            <h4 class="modal-title">
                                <asp:Label ID="lblEmployeeList" runat="server" Text="New Employee List"></asp:Label>
                            </h4>
                        </div>
                        <div class="modal-body">

                            <asp:GridView ID="gv_CMITecholdEmployee" runat="server" AutoGenerateColumns="False" Width="100%"
                                PageSize="10" AllowPaging="True" CssClass="table das-table1" OnPageIndexChanging="gv_CMITecholdEmployee_PageIndexChanging">
                                <Columns>
                                    <asp:TemplateField>
                                        <HeaderTemplate>
                                            <asp:CheckBox ID="checkall" runat="server" onclick="checkAll(this);" />
                                            <asp:Label ID="lblall" runat="server"></asp:Label>
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <asp:CheckBox ID="chkSelected" runat="server"></asp:CheckBox>
                                        </ItemTemplate>
                                        <ItemStyle HorizontalAlign="Center" Width="6%" />
                                        <HeaderStyle HorizontalAlign="center" />
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Employee Name">
                                        <ItemTemplate>
                                            <asp:Label ID="lblEmployeeName" runat="server" Text='<% # Bind("EmployeeName") %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Date Of Joining">
                                        <ItemTemplate>
                                            <asp:Label ID="lblDOJ" runat="server" Text='<% # Bind("DOJ") %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Designation" Visible="true">
                                        <ItemTemplate>
                                            <asp:DropDownList ID="ddlDesignation" runat="server" CssClass="form-control" Style="width: 100px">
                                                <%--         <asp:ListItem Text="Select" Value="0"></asp:ListItem>--%>
                                            </asp:DropDownList>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Company Name" Visible="true">
                                        <ItemTemplate>
                                            <asp:Label ID="lblCompanyName" runat="server" Text='<% # Bind("CompanyName") %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                                <RowStyle Height="30px" CssClass="table-bg" BorderColor="#C5DFFC" />
                                <PagerStyle Font-Overline="False" HorizontalAlign="Right" CssClass="GridPager" />
                                <PagerSettings FirstPageText="<<" LastPageText=">>" Mode="NumericFirstLast" NextPageText=">"
                                    PreviousPageText="<" />
                                <HeaderStyle CssClass="empheader" />
                                <AlternatingRowStyle BackColor="white" />
                            </asp:GridView>
                        </div>

                    </div>
                </div>
            </div>
            <div class="border-table new-space" style="margin-top: 0px">
                <div class="row form-group">
                    <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" />
                        <asp:HiddenField ID="Hidden1" runat="server" />
                        <asp:HiddenField ID="Hidden2" runat="server" />
                        <dxGridview:ASPxGridView ID="gv_CMITechEmployee" runat="server" AutoGenerateColumns="false"
                            EnableCallBacks="false" KeyFieldName="Terminal_Id" ClientInstanceName="gv_CMITechEmployee"
                            OnHtmlRowCreated="gv_CMITechEmployee_HtmlRowCreated">
                            <Columns>
                                <dxGridview:GridViewDataTextColumn Caption="Employee ID" FieldName="Employee_Id"
                                    VisibleIndex="0" Visible="false">
                                </dxGridview:GridViewDataTextColumn>
                                <dxGridview:GridViewDataColumn VisibleIndex="1" Width="30px" HeaderStyle-VerticalAlign="Middle"
                                    HeaderStyle-HorizontalAlign="Center" CellStyle-VerticalAlign="Middle" CellStyle-HorizontalAlign="Center">
                                    <HeaderTemplate>
                                        <input id="chkSelectAll" runat="server" type="checkbox" onclick="SelectAllOnThisPage(this)" />
                                    </HeaderTemplate>
                                    <DataItemTemplate>
                                        <input id="chkSelect" runat="server" type="checkbox" onclick="SelectOnRow(this)"
                                            accesskey='<%# Eval("EmployeeId") %>' />
                                    </DataItemTemplate>
                                    <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                </dxGridview:GridViewDataColumn>
                                <dxGridview:GridViewDataTextColumn Caption="Employee Id" FieldName="Employee Id"
                                    Width="100px" VisibleIndex="2">
                                    <DataItemTemplate>
                                        <asp:Label ID="lblEmployeeId" Text='<%# Eval("EmployeeId") %>' runat="server"
                                            CssClass="dxlabel"></asp:Label>
                                    </DataItemTemplate>
                                    <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                </dxGridview:GridViewDataTextColumn>
                                <dxGridview:GridViewDataTextColumn Caption="Employee Name" FieldName="Employee_Name"
                                    Width="150px" VisibleIndex="3">
                                    <DataItemTemplate>
                                        <asp:Label ID="lblEmployeeName" Text='<%# Eval("EmployeeName") %>' runat="server"
                                            CssClass="dxlabel"></asp:Label>
                                    </DataItemTemplate>
                                    <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                </dxGridview:GridViewDataTextColumn>
                                <dxGridview:GridViewDataTextColumn Caption="Date Of Joining" FieldName="Date Of Joining"
                                    Width="250px" VisibleIndex="4">
                                    <DataItemTemplate>
                                        <asp:TextBox ID="TxtDOJ" Text='<%# Eval("DOJ") %>'
                                            runat="server" CssClass="form-control"></asp:TextBox>
                                    </DataItemTemplate>
                                    <Settings AllowAutoFilter="false" />
                                    <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                </dxGridview:GridViewDataTextColumn>
                                <dxGridview:GridViewDataTextColumn FieldName="Designation" VisibleIndex="3" Width="190px">
                                    <DataItemTemplate>
                                        <asp:DropDownList ID="ddlDesignation" runat="server" CssClass="form-control" Style="width: 100px">
                                            <%--         <asp:ListItem Text="Select" Value="0"></asp:ListItem>--%>
                                        </asp:DropDownList>
                                    </DataItemTemplate>
                                    <Settings AllowAutoFilter="False" />
                                    <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                </dxGridview:GridViewDataTextColumn>
                                <dxGridview:GridViewDataTextColumn FieldName="Company Name" VisibleIndex="3" Width="190px">
                                    <DataItemTemplate>
                                        <asp:DropDownList ID="ddlCompany" runat="server" CssClass="form-control" Style="width: 100px">
                                            <%--         <asp:ListItem Text="Select" Value="0"></asp:ListItem>--%>
                                        </asp:DropDownList>
                                    </DataItemTemplate>
                                    <Settings AllowAutoFilter="False" />
                                    <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                </dxGridview:GridViewDataTextColumn>
                            </Columns>
                            <SettingsText EmptyDataRow="No Records Found" />
                            <Settings ShowFilterRow="true" />
                            <SettingsBehavior AllowSort="true" />
                            <SettingsPager PageSize="10">
                            </SettingsPager>
                            <Styles AlternatingRow-CssClass="table-bg">
                            </Styles>
                        </dxGridview:ASPxGridView>
                        <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="ShowCMITechEmployeeInGrid"
                            TypeName="TerminalEventData">
                            <SelectParameters>
                                <asp:SessionParameter Name="strUserGroupName" SessionField="UserGroupName" Type="String" />
                            </SelectParameters>
                        </asp:ObjectDataSource>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-12">
                        <div class="pull-right-button">
                            <asp:LinkButton ID="btn_add" CssClass="btn add-btn fa-plus" runat="server"
                                OnClick="btn_add_Click" />
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-horizontal">
            <div id="MyShowGrid2" class="modal modal-default fade" role="dialog">
                <div class="modal-dialog" style="min-width: 50%; max-width: 60%">
                    <!-- Modal content-->
                    <div class="modal-content" style="margin-top: 100px">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" style="border-radius: 50px;">
                                &times;</button>
                            <h4 class="modal-title">
                                <asp:Label ID="lblExistingEmployee" runat="server" Text="Existing Employee List"></asp:Label>
                            </h4>
                        </div>
                        <div class="modal-body">
                            <asp:GridView ID="gv_CMITechNewEmployee" runat="server" AutoGenerateColumns="False" Width="100%"
                                PageSize="10" AllowPaging="True" CssClass="table das-table1" OnPageIndexChanging="gv_CMITechNewEmployee_PageIndexChanging">
                                <Columns>
                                    <asp:TemplateField>
                                        <HeaderTemplate>
                                            <asp:CheckBox ID="checkall" runat="server" onclick="checkAll(this);" />
                                            <asp:Label ID="lblall" runat="server"></asp:Label>
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <asp:CheckBox ID="chkSelected" runat="server"></asp:CheckBox>
                                        </ItemTemplate>
                                        <ItemStyle HorizontalAlign="Center" Width="6%" />
                                        <HeaderStyle HorizontalAlign="center" />
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Employee Name">
                                        <ItemTemplate>
                                            <asp:Label ID="lblEmployeeName" runat="server" Text='<% # Bind("EmployeeName") %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Date Of Joining">
                                        <ItemTemplate>
                                            <asp:Label ID="lblDOJ" runat="server" Text='<% # Bind("DOJ") %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Designation" Visible="true">
                                        <ItemTemplate>
                                            <asp:Label ID="lblDesignation" runat="server" Text='<% # Bind("Designation") %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Company Name" Visible="true">
                                        <ItemTemplate>
                                            <asp:Label ID="lblCompanyName" runat="server" Text='<% # Bind("CompanyName") %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                                <RowStyle Height="30px" CssClass="table-bg" BorderColor="#C5DFFC" />
                                <PagerStyle Font-Overline="False" HorizontalAlign="Right" CssClass="GridPager" />
                                <PagerSettings FirstPageText="<<" LastPageText=">>" Mode="NumericFirstLast" NextPageText=">"
                                    PreviousPageText="<" />
                                <HeaderStyle CssClass="empheader" />
                                <AlternatingRowStyle BackColor="white" />
                            </asp:GridView>
                        </div>

                    </div>
                </div>
            </div>
            <div class="border-table new-space" style="margin-top: 0px">
                <div class="row form-group">
                    <div class="col-md-12" style="overflow: auto; overflow-y: hidden; padding-bottom: 10px">
                        <asp:HiddenField ID="HiddenField1" runat="server" />
                        <asp:HiddenField ID="HiddenField2" runat="server" />
                        <dxGridview:ASPxGridView ID="gv_CMITechExistEmployee" runat="server" AutoGenerateColumns="false"
                            EnableCallBacks="false" KeyFieldName="Terminal_Id" ClientInstanceName="gv_CMITechEmployee"
                            OnHtmlRowCreated="gv_CMITechExistEmployee_HtmlRowCreated">
                            <Columns>
                                <dxGridview:GridViewDataTextColumn Caption="Employee ID" FieldName="Employee_Id"
                                    VisibleIndex="0" Visible="false">
                                </dxGridview:GridViewDataTextColumn>
                                <dxGridview:GridViewDataColumn VisibleIndex="1" Width="30px" HeaderStyle-VerticalAlign="Middle"
                                    HeaderStyle-HorizontalAlign="Center" CellStyle-VerticalAlign="Middle" CellStyle-HorizontalAlign="Center">
                                    <HeaderTemplate>
                                        <input id="chkSelectAll" runat="server" type="checkbox" onclick="SelectAllOnThisPage(this)" />
                                    </HeaderTemplate>
                                    <DataItemTemplate>
                                        <input id="chkSelect" runat="server" type="checkbox" onclick="SelectOnRow(this)"
                                            accesskey='<%# Eval("EmployeeId") %>' />
                                    </DataItemTemplate>
                                    <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                </dxGridview:GridViewDataColumn>
                                <dxGridview:GridViewDataTextColumn Caption="Employee Id" FieldName="Employee Id"
                                    Width="100px" VisibleIndex="2">
                                    <DataItemTemplate>
                                        <asp:Label ID="lblEmployeeId" Text='<%# Eval("EmployeeId") %>' runat="server"
                                            CssClass="dxlabel"></asp:Label>
                                    </DataItemTemplate>
                                    <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                </dxGridview:GridViewDataTextColumn>
                                <dxGridview:GridViewDataTextColumn Caption="Employee Name" FieldName="Employee_Name"
                                    Width="150px" VisibleIndex="3">
                                    <DataItemTemplate>
                                        <asp:Label ID="lblEmployeeName" Text='<%# Eval("EmployeeName") %>' runat="server"
                                            CssClass="dxlabel"></asp:Label>
                                    </DataItemTemplate>
                                    <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                </dxGridview:GridViewDataTextColumn>
                                <dxGridview:GridViewDataTextColumn Caption="Date Of Joining" FieldName="Date Of Joining"
                                    Width="250px" VisibleIndex="4">
                                    <DataItemTemplate>
                                        <asp:Label ID="lblDOJ" Text='<%# Eval("DOJ") %>'
                                            runat="server" CssClass="dxlabel"></asp:Label>
                                    </DataItemTemplate>
                                    <Settings AllowAutoFilter="false" />
                                    <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                </dxGridview:GridViewDataTextColumn>
                                <dxGridview:GridViewDataTextColumn FieldName="Designation" VisibleIndex="3" Width="190px">
                                    <DataItemTemplate>
                                        <asp:DropDownList ID="ddlDesignation" runat="server" CssClass="form-control" Style="width: 100px">
                                            <%--         <asp:ListItem Text="Select" Value="0"></asp:ListItem>--%>
                                        </asp:DropDownList>
                                    </DataItemTemplate>
                                    <Settings AllowAutoFilter="False" />
                                    <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                </dxGridview:GridViewDataTextColumn>
                                <dxGridview:GridViewDataTextColumn FieldName="Company Name" VisibleIndex="3" Width="190px">
                                    <DataItemTemplate>
                                        <asp:DropDownList ID="ddlCompany" runat="server" CssClass="form-control" Style="width: 100px">
                                            <%--         <asp:ListItem Text="Select" Value="0"></asp:ListItem>--%>
                                        </asp:DropDownList>
                                    </DataItemTemplate>
                                    <Settings AllowAutoFilter="False" />
                                    <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                </dxGridview:GridViewDataTextColumn>
                            </Columns>
                            <SettingsText EmptyDataRow="No Records Found" />
                            <Settings ShowFilterRow="true" />
                            <SettingsBehavior AllowSort="true" />
                            <SettingsPager PageSize="10">
                            </SettingsPager>
                            <Styles AlternatingRow-CssClass="table-bg">
                            </Styles>
                        </dxGridview:ASPxGridView>
                        <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" SelectMethod="ShowCMITechEmployeeInGrid"
                            TypeName="TerminalEventData">
                            <SelectParameters>
                                <asp:SessionParameter Name="strUserGroupName" SessionField="UserGroupName" Type="String" />
                            </SelectParameters>
                        </asp:ObjectDataSource>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-12">
                        <div class="pull-right-button">
                            <asp:LinkButton ID="btn_Update" CssClass="btn add-btn fa-plus" runat="server"
                                OnClick="btn_Update_Click" />
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript" language="javascript">
        function SelectAllOnThisPage(chkSelectAll) {
            var hdnSelectRow = document.getElementById('<%= hdnSelectRow.ClientID %>');
            var hdnSelectAll = document.getElementById('<%= hdnGetAllid.ClientID %>');
            if (chkSelectAll.checked == true) {
                for (var i = 0; i < gv_CMITechEmployee.pageRowCount; i++) {
                    if (document.getElementById('ctl00_BodyContentPH_gv_CMITechEmployee_cell' + (i + gv_CMITechEmployee.visibleStartIndex) + '_1_chkSelect').disabled == false) {
                        document.getElementById('ctl00_BodyContentPH_gv_CMITechEmployee_cell' + (i + gv_CMITechEmployee.visibleStartIndex) + '_1_chkSelect').checked = true;
                        var hdnUserId = document.getElementById('ctl00_BodyContentPH_gv_CMITechEmployee_cell' + (i + gv_CMITechEmployee.visibleStartIndex) + '_1_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 < gv_CMITechEmployee.pageRowCount; i++) {
                    document.getElementById('ctl00_BodyContentPH_gv_CMITechEmployee_cell' + (i + gv_CMITechEmployee.visibleStartIndex) + '_1_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 varTotalEnabled = 0;
                for (var i = 0; i < gv_CMITechEmployee.pageRowCount; i++) {
                    if (document.getElementById('ctl00_BodyContentPH_gv_CMITechEmployee_cell' + (i + gv_CMITechEmployee.visibleStartIndex) + '_1_chkSelect').disabled == false) {
                        varTotalEnabled = varTotalEnabled + 1;
                    }
                    if (document.getElementById('ctl00_BodyContentPH_gv_CMITechEmployee_cell' + (i + gv_CMITechEmployee.visibleStartIndex) + '_1_chkSelect').checked)
                        varTotalCheckedCount = varTotalCheckedCount + 1;
                }
                if (varTotalCheckedCount == varTotalEnabled)
                    document.getElementById('ctl00_BodyContentPH_gv_CMITechEmployee_header1_chkSelectAll').checked = true;
                else
                    document.getElementById('ctl00_BodyContentPH_gv_CMITechEmployee_header1_chkSelectAll').checked = false;
            }
            else {
                if (Array.contains(removeId, hdnUserId)) {
                    Array.remove(removeId, hdnUserId);
                }
                hdnSelectRow.value = removeId;
                document.getElementById('ctl00_BodyContentPH_gv_CMITechEmployee_header1_chkSelectAll').checked = false;
            }
        }
    </script>
</asp:Content>
