<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="AccessControl_Checker.aspx.vb" Inherits="FinIQWebApp.AccessControl_Checker" MasterPageFile="~/FiniqAppMasterPage.Master" Title="Access Control" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="Server">
    <asp:ScriptManagerProxy ID="ScriptManagerProxy11" runat="server">
    </asp:ScriptManagerProxy>
    <script src="../FinIQJS/SortFilter_Grid.js"></script>
    <%--    <script src="../FinIQJS/FreezeGrid.js"></script>
    <link href="../FinIQJS/FreezeGrid.css" rel="stylesheet" type="text/css"/>--%>
    <style type="text/css">
        .ui-state-active a, .ui-state-active a:link {
            color: #000000 !important;
            background-color: #efefef !important;
        }

        .ui-widget-content.ui-widget {
            border: solid 1px white;
        }

        .ui-tabs .ui-tabs-nav {
            background: white;
            border: none;
            border-bottom: 1px solid #dddddd;
        }

        .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
            border: 1px solid #fff !important;
        }

        .ui-tabs .ui-tabs-nav .ui-tabs-anchor {
            background-color: #e6e6e600;
            color: #8080808c;
        }

        .divLoading {
            position: absolute;
            left: 600px;
            top: 90px;
        }

        /*.GridItem a {*/
        /**/
        /*color: #005682 !important;
        }*/

        #ctl00_MainContent_dgv_FirstAccessControl tr:not(:first-child) td:nth-child(1) {
            display: inline-flex;
            border: none !important;
            justify-content: space-around;
            text-align: center;
        }

        #ctl00_MainContent_dgvAccessTypeSetup tr:not(:first-child) td:nth-child(1) {
            display: inline-flex;
            border: none !important;
            justify-content: space-around;
            text-align: center;
        }
    </style>

    <script type="text/javascript">

        //Start| 26-JUN-2020 | Added by Rajeshree K for grid filters        
        $(document).ready(function () {
            SetSorting_Filter1();
            highlightTd();
        });
        //End| 26-JUN-2020 | Added by Rajeshree K for grid filters

        function clearErrorLabel1() {
            document.getElementById('<%= lblerror.ClientID%>').textContent = "";
            document.getElementById('<%=btnCallFirstAccessControl.ClientID%>').click();
        }

        function clearErrorLabel() {
            document.getElementById('<%= lblerror.ClientID%>').textContent = "";
            document.getElementById('<%=btnCallSecondAccessControl.ClientID%>').click();
        }

        function callChecker() {
            document.getElementById('<%=btnCallChecker.ClientID%>').click();
        }

        function callViewer() {
            document.getElementById('<%=btnCallViewer.ClientID%>').click();
        }

        function deleteRecord() {
            return confirm('Are you sure to delete this record(s) ?');
        }
    </script>

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <table>
                <tr>
                    <td>
                        <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1"
                            DisplayAfter="0">
                            <ProgressTemplate>
                                <div class="divLoading">
                                    <img alt="Loading" src="../App_Resources/loading.gif" /><span class="lbl">Loading...&nbsp;&nbsp;</span>
                                </div>
                            </ProgressTemplate>
                        </asp:UpdateProgress>
                    </td>
                </tr>
                <tr>
                    <td>
                        <table>
                            <tr>
                                <td>
                                    <asp:Label ID="lblerror" runat="server" CssClass="lblerror"></asp:Label>
                                    <asp:Label ID="lblInfo" CssClass="lblInfo" runat="server" Text=""></asp:Label>
                                    <asp:Label ID="lblSuccess" CssClass="lblSuccess" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>

                <tr>
                    <td>


                        <div id="tabsMain" runat="server">

                            <ul>
                                <li id="LiChecker" runat="server" onclick="callChecker()"><a href="#tabChecker">Pending Requests</a></li>
                                <li id="LiViewer" runat="server" onclick="callViewer()"><a href="#tabViewer">Processed Requests</a></li>

                            </ul>
                            <asp:Button ID="btnCallChecker" runat="server" Text="" Style="display: none"></asp:Button>
                            <asp:Button ID="btnCallViewer" runat="server" Text="" Style="display: none"></asp:Button>
                            <div id="tabChecker">


                                <asp:Button ID="btnCallFirstAccessControl" runat="server" Text="" Style="display: none"></asp:Button>
                                  <asp:Button ID="btnCallSecondAccessControl" runat="server" Text="" Style="display: none"></asp:Button>
                                <div id="tabs" runat="server">
                                    <ul>

                                        <li id="Li1" runat="server" onclick="clearErrorLabel1()"><a href="#tabs_1">Data Fetch</a></li>
                                        <li id="Li2" runat="server" onclick="clearErrorLabel()"><a href="#tabs_2">Access Type Setup</a></li>
                                    </ul>
                                    <div>
                                        <asp:Label ID="lblRowsPerPage" runat="server" Text="Row(s) per page :" Style="margin-left: 10px;" />
                                        <asp:TextBox ID="txtRowsPerPage" runat="server" Text="999" Width="40px" Style="text-align: center;" AutoPostBack="true" MaxLength="3" onkeydown="EnterKeyEvent(event)" onkeypress="return isNumber(event)" /> &nbsp&nbsp
                                         <asp:Label ID="lblTotalRecordDF" runat="server" Text="Total Records : " CssClass="lbl"></asp:Label>
                                          <asp:Label ID="lblTotalRecDF" runat="server" Text="" CssClass="lbl"></asp:Label>
                                         <asp:Label ID="lblTotalRecordAT" runat="server" Text="Total Records : " CssClass="lbl"></asp:Label>
                                          <asp:Label ID="lblTotalRecAT" runat="server" Text="" CssClass="lbl"></asp:Label>
                                    </div>
                                    <div id="tabs_1">

                                        <table>
                                           <%-- <tr>
                                                <td>
                                                    <asp:Label ID="Label2" runat="server" Text="Total Records : " CssClass="lbl"></asp:Label>
                                                    <asp:Label ID="lblTotalRecDF" runat="server" Text="" CssClass="lbl"></asp:Label>
                                                </td>
                                            </tr>--%>
                                            <tr>
                                                <td>
                                                    <asp:GridView ID="dgv_FirstAccessControl" runat="server" AllowSorting="True" AutoGenerateColumns="False" CssClass="Grid" AllowPaging="true" PageSize="999" ShowHeaderWhenEmpty="true"
                                                        EmptyDataText="No data found" ShowFooter="false" HeaderStyle-CssClass="GridHeaderTitle">
                                                        <SelectedRowStyle CssClass="GridItemSelect" />
                                                        <RowStyle CssClass="GridItem" />
                                                        <HeaderStyle CssClass="GridHeader" HorizontalAlign="Center" Wrap="true" />

                                                        <PagerStyle CssClass="GridPager" />
                                                        <PagerSettings Mode="NumericFirstLast" FirstPageText="First" LastPageText="Last" Position="Bottom" />
                                                        <EmptyDataTemplate>
                                                            <asp:Label ID="lblqueueDataFetch" runat="server" Text="No data found."></asp:Label>
                                                        </EmptyDataTemplate>

                                                        <Columns>
                                                            <asp:TemplateField ItemStyle-CssClass="" HeaderStyle-CssClass="" Visible="false">

                                                                <ItemTemplate>
                                                                    <asp:CheckBox ID="CheckboxDF" runat="server" AutoPostBack="true"  Visible="false"></asp:CheckBox>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderStyle-Wrap="True" HeaderText="Actions" Visible="True" ControlStyle-Width="120px">
                                                                <ItemStyle Width="120px" HorizontalAlign="Left" />
                                                                <HeaderStyle Width="120px" />
                                                                <ItemTemplate>
                                                                    <asp:LinkButton ID="btnVerifyDF" runat="server" CommandName="Verify" CommandArgument='<%# Container.DataItemIndex%>' Text='Verify'></asp:LinkButton>
                                                                    <asp:LinkButton ID="btnRejectDF" runat="server" CommandName="Reject" CommandArgument='<%# Container.DataItemIndex%>' Text='Reject'></asp:LinkButton>
                                                                </ItemTemplate>

                                                            </asp:TemplateField>


                                                            <asp:TemplateField HeaderText="ID" Visible="false">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblIDDF" runat="server" CssClass="lbl" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FAC_ID").ToString)%>' />
                                                                </ItemTemplate>
                                                                <%--   <EditItemTemplate>
                                                            <asp:TextBox ID="txtIDDF" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FAC_ID").ToString)%>'></asp:TextBox>
                                                        </EditItemTemplate>--%>
                                                            </asp:TemplateField>


                                                            <asp:TemplateField HeaderStyle-Wrap="false" HeaderText="FAC_Checker_ID" Visible="false">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblCheckerID" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FAC_Checker_id").ToString)%>' />
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:Label ID="lblCheckerID1" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FAC_Checker_id").ToString)%>' />
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Workflow">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblWorkflow" runat="server" CssClass="lbl" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WTM_CODE").ToString)%>' />
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:DropDownList ID="ddlWorkflow" runat="server" CssClass="ddl" AutoPostBack="False" Enabled="false"></asp:DropDownList>
                                                                </EditItemTemplate>
                                                                <%--   <FooterTemplate>
                                                            <asp:RequiredFieldValidator ID="ReqddlNewWorkflow" runat="server" ControlToValidate="ddlNewWorkflow" ValidationGroup="InsertDF" ErrorMessage="*" ForeColor="#ff4e4e" Display="Dynamic" />
                                                            <asp:DropDownList ID="ddlNewWorkflow" runat="server" CssClass="ddl"></asp:DropDownList>
                                                        </FooterTemplate>--%>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Login Group">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblLogin" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FAC_Login_Group").ToString)%>' />
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:DropDownList ID="ddlLogin" runat="server" CssClass="ddl" AutoPostBack="False" Enabled="false"></asp:DropDownList>
                                                                </EditItemTemplate>
                                                                <%--  <FooterTemplate>
                                                            <asp:RequiredFieldValidator ID="ReqddlNewLogin" runat="server" ControlToValidate="ddlNewLogin" ValidationGroup="InsertDF" ErrorMessage="*" ForeColor="#ff4e4e" Display="Dynamic" />
                                                            <asp:DropDownList ID="ddlNewLogin" runat="server" CssClass="ddl"></asp:DropDownList>
                                                        </FooterTemplate>--%>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Access Type">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblAccessType" runat="server" CssClass="lbl" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AT_CODE").ToString)%>' />
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:DropDownList ID="ddlAccessType" runat="server" CssClass="ddl" AutoPostBack="False" Enabled="false"></asp:DropDownList>
                                                                </EditItemTemplate>
                                                                <%-- <FooterTemplate>
                                                            <asp:RequiredFieldValidator ID="ReqddlAccessType" runat="server" ControlToValidate="ddlNewAccessType" ValidationGroup="InsertDF" ErrorMessage="*" ForeColor="#ff4e4e" Display="Dynamic" />
                                                            <asp:DropDownList ID="ddlNewAccessType" runat="server" CssClass="ddl"></asp:DropDownList>
                                                        </FooterTemplate>--%>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Created By">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblCreatedByDF" runat="server" CssClass="lbl" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FAC_Created_By").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Created At">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblCreatedAtDF" runat="server" CssClass="lbl" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FAC_Created_At").ToString)%>' />
                                                                </ItemTemplate>

                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Verified Y/N" Visible="True" ControlStyle-Width="40px">
                                                                <HeaderStyle Width="40px" Wrap="True" />
                                                                <ItemStyle Width="40px" Wrap="True" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblVerifiedYN" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FAC_Verified_YN").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Verified At" Visible="True" ControlStyle-Width="180px">
                                                                <HeaderStyle Width="180px" Wrap="True" />
                                                                <ItemStyle Width="180px" Wrap="True" />
                                                                <ItemTemplate>
                                                                     <asp:Label ID="lblVerifiedAt" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FAC_Verified_At").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Verified By" Visible="True" ControlStyle-Width="100px">
                                                                <HeaderStyle Width="100px" Wrap="True" />
                                                                <ItemStyle Width="100px" Wrap="True" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblVerifiedBy" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FAC_Verified_By").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>


                                                            <asp:TemplateField HeaderText="Rejected Y/N" Visible="True" ControlStyle-Width="100px">
                                                                <HeaderStyle Width="100px" Wrap="True" />
                                                                <ItemStyle Width="100px" Wrap="True" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblRejectedYN" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FAC_Rejected_YN").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>


                                                            <asp:TemplateField HeaderText="Rejected By" Visible="True" ControlStyle-Width="100px">
                                                                <HeaderStyle Width="100px" Wrap="True" />
                                                                <ItemStyle Width="100px" Wrap="True" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblRejectedBy" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FAC_Rejected_By").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Rejected At" Visible="True" ControlStyle-Width="180px">
                                                                <HeaderStyle Width="180px" Wrap="True" />
                                                                <ItemStyle Width="180px" Wrap="True" />
                                                                <ItemTemplate>
                                                                       <asp:Label ID="lblRejectedAt" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FAC_Rejected_At").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Deleted Y/N" Visible="True" ControlStyle-Width="100px">
                                                                <HeaderStyle Width="100px" Wrap="True" />
                                                                <ItemStyle Width="100px" Wrap="True" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblDeletedYN" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FAC_Deleted_YN").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Deleted At" Visible="True" ControlStyle-Width="100px">
                                                                <HeaderStyle Width="100px" Wrap="True" />
                                                                <ItemStyle Width="100px" Wrap="True" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblDeletedAt" runat="server" />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Deleted By" Visible="True" ControlStyle-Width="100px">
                                                                <HeaderStyle Width="100px" Wrap="True" />
                                                                <ItemStyle Width="100px" Wrap="True" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblDeletedBy" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FAC_Deleted_By").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Requested By" Visible="True" ControlStyle-Width="100px">
                                                                <HeaderStyle Width="100px" Wrap="True" />
                                                                <ItemStyle Width="100px" Wrap="True" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblRequestedBy" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FAC_Requested_By").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Action" Visible="True" ControlStyle-Width="100px">
                                                                <HeaderStyle Width="100px" Wrap="True" />
                                                                <ItemStyle Width="100px" Wrap="True" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblAction" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FAC_Action").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>




                                                        </Columns>
                                                    </asp:GridView>
                                                </td>
                                            </tr>

                                        </table>
                                    </div>
                                    <div id="tabs_2">
                                        <table>
                                            <%--<tr>
                                                <td>

                                                    <asp:Label ID="Label1" runat="server" Text="Total Records : " CssClass="lbl"></asp:Label>
                                                    <asp:Label ID="lblTotalRecAT" runat="server" Text="" CssClass="lbl"></asp:Label>
                                                </td>
                                            </tr>--%>
                                            <tr>
                                                <td>
                                                    <asp:GridView ID="dgvAccessTypeSetup" runat="server" AllowSorting="True" AutoGenerateColumns="False" CssClass="Grid" AllowPaging="true" PageSize="15"
                                                        ShowHeaderWhenEmpty="true" EmptyDataText="No data found" ShowFooter="false">
                                                        <SelectedRowStyle CssClass="GridItemSelect" />
                                                        <RowStyle CssClass="GridItem" />

                                                        <HeaderStyle CssClass="GridHeader" HorizontalAlign="Center" Wrap="true" />

                                                        <PagerStyle CssClass="GridPager" />
                                                        <PagerSettings Mode="NumericFirstLast" FirstPageText="First" LastPageText="Last" Position="Bottom" />
                                                        <EmptyDataTemplate>
                                                            <asp:Label ID="Label3" runat="server" Text="No data found."></asp:Label>
                                                        </EmptyDataTemplate>

                                                        <Columns>
                                                            <asp:TemplateField ItemStyle-CssClass="" HeaderStyle-CssClass="" Visible="false">
                                                                <ItemTemplate>
                                                                    <asp:CheckBox ID="CheckboxAT" runat="server" AutoPostBack="true"></asp:CheckBox>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>


                                                            <asp:TemplateField HeaderStyle-Wrap="True" HeaderText="Actions" Visible="True" ControlStyle-Width="120px">
                                                                <ItemStyle Width="120px" HorizontalAlign="Left" />
                                                                <HeaderStyle Width="120px" />
                                                                <ItemTemplate>
                                                                    <asp:LinkButton ID="btnVerifyAC" runat="server" CommandName="Verify" CommandArgument='<%# Container.DataItemIndex%>' Text='Verify'></asp:LinkButton>
                                                                    <asp:LinkButton ID="btnRejectAC" runat="server" CommandName="Reject" CommandArgument='<%# Container.DataItemIndex%>' Text='Reject'></asp:LinkButton>
                                                                </ItemTemplate>

                                                            </asp:TemplateField>


                                                            <asp:TemplateField HeaderText="SR No" Visible="false">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblSRno" runat="server" CssClass="lbl" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AT_id").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="ID" Visible="FALSE">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblID" runat="server" CssClass="lbl" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AT_id").ToString)%>' />
                                                                </ItemTemplate>
                                                                <%-- <EditItemTemplate>
                                                            <asp:TextBox ID="txtID" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AT_id").ToString)%>'></asp:TextBox>
                                                        </EditItemTemplate>--%>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderStyle-Wrap="false" HeaderText="AT_Checker_ID" Visible="false">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblCheckerID" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AT_Checker_id").ToString)%>' />
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:Label ID="lblCheckerID1" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AT_Checker_id").ToString)%>' />
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Code">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblCode" runat="server" CssClass="lbl" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AT_Code").ToString)%>' />
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:TextBox ID="txtCode" runat="server" CssClass="txt"></asp:TextBox>
                                                                </EditItemTemplate>

                                                                <%--<FooterTemplate>
                                                            <asp:RequiredFieldValidator ID="ReqtxtNewCode" runat="server" ControlToValidate="txtNewCode" ValidationGroup="Insert" ErrorMessage="*" ForeColor="#ff4e4e" Display="Dynamic" />
                                                            <asp:TextBox ID="txtNewCode" runat="server" CssClass="txt"></asp:TextBox>
                                                        </FooterTemplate>--%>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Name">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblName" runat="server" CssClass="lbl" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AT_LongName").ToString)%>' />
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:TextBox ID="txtName" runat="server" CssClass="txt"></asp:TextBox>
                                                                </EditItemTemplate>
                                                                <%--<FooterTemplate>
                                                            <asp:RequiredFieldValidator ID="ReqtxtNewName" runat="server" ControlToValidate="txtNewName" ValidationGroup="Insert" ErrorMessage="*" ForeColor="#ff4e4e" Display="Dynamic" />
                                                            <asp:TextBox ID="txtNewName" runat="server" CssClass="txt"></asp:TextBox>
                                                        </FooterTemplate>--%>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Created By">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblCreatedBy" runat="server" CssClass="lbl" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AT_CreatedBy").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Created At">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblCreatedAt" runat="server" CssClass="lbl" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AT_CretedAt").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>


                                                            <asp:TemplateField HeaderText="Verified Y/N" Visible="True" ControlStyle-Width="40px">
                                                                <HeaderStyle Width="40px" Wrap="True" />
                                                                <ItemStyle Width="40px" Wrap="True" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblVerifiedYN" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AT_Verified_YN").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Verified At" Visible="True" ControlStyle-Width="180px">
                                                                <HeaderStyle Width="180px" Wrap="True" />
                                                                <ItemStyle Width="180px" Wrap="True" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblVerifiedAt" runat="server" />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Verified By" Visible="True" ControlStyle-Width="100px">
                                                                <HeaderStyle Width="100px" Wrap="True" />
                                                                <ItemStyle Width="100px" Wrap="True" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblVerifiedBy" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AT_Verified_By").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                             <asp:TemplateField HeaderText="Rejected Y/N" Visible="True" ControlStyle-Width="100px">
                                                                <HeaderStyle Width="100px" Wrap="True" />
                                                                <ItemStyle Width="100px" Wrap="True" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblRejectedYN" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AT_Rejected_YN").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>


                                                            <asp:TemplateField HeaderText="Rejected By" Visible="True" ControlStyle-Width="100px">
                                                                <HeaderStyle Width="100px" Wrap="True" />
                                                                <ItemStyle Width="100px" Wrap="True" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblRejectedBy" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AT_Rejected_By").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Rejected At" Visible="True" ControlStyle-Width="180px">
                                                                <HeaderStyle Width="180px" Wrap="True" />
                                                                <ItemStyle Width="180px" Wrap="True" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblRejectedAt" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AT_Rejected_At").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            

                                                            <asp:TemplateField HeaderText="Requested By" Visible="True" ControlStyle-Width="100px">
                                                                <HeaderStyle Width="100px" Wrap="True" />
                                                                <ItemStyle Width="100px" Wrap="True" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblRequestedBy" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AT_Requested_By").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Action" Visible="True" ControlStyle-Width="100px">
                                                                <HeaderStyle Width="100px" Wrap="True" />
                                                                <ItemStyle Width="100px" Wrap="True" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblAction" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AT_Action").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>



                                                        </Columns>
                                                    </asp:GridView>

                                                </td>
                                            </tr>
                                        </table>
                                    </div>

                                </div>

                            </div>

                            <div id="tabViewer">



                                <div id="tabsViewer" runat="server">
                                    <ul>

                                        <li id="Li3" runat="server" onclick="clearErrorLabel1()"><a href="#tabs_3">Data Fetch</a></li>
                                        <li id="Li4" runat="server" onclick="clearErrorLabel()"><a href="#tabs_4">Access Type Setup</a></li>
                                    </ul>
                                    <div>
                                        <%--Added by Nikhil Mali on 20-11-2019 for vertical editing : START--%>
                                        <%--UBPINT-6 changed by Prateek M--%>
                                        <asp:Label ID="Label4" runat="server" Text="Row(s) per page :" Style="margin-left: 10px;" />
                                        <asp:TextBox ID="TextBox1" runat="server" Text="999" Width="40px" Style="text-align: center;" AutoPostBack="true" MaxLength="3" onkeydown="EnterKeyEvent(event)" onkeypress="return IsNumber(event)" /> &nbsp&nbsp
                                        <asp:Label ID="lblTotalRecordDF_Viewer" runat="server" Text="Total Records : " CssClass="lbl"></asp:Label>
                                          <asp:Label ID="lblTotalRecDF_Viewer" runat="server" Text="" CssClass="lbl"></asp:Label>
                                         <asp:Label ID="lblTotalRecordAT_Viewer" runat="server" Text="Total Records : " CssClass="lbl"></asp:Label>
                                          <asp:Label ID="lblTotalRecAT_Viewer" runat="server" Text="" CssClass="lbl"></asp:Label>
                                        <%--Added by Nikhil Mali on 20-11-2019 for vertical editing : END--%>
                                    </div>
                                    <div id="tabs_3">

                                        <table>
                                            <%--<tr>
                                        <td>
                                            <asp:Label ID="Label5" runat="server" Text="Total Records : " CssClass="lbl"></asp:Label>
                                            <asp:Label ID="Label6" runat="server" Text="" CssClass="lbl"></asp:Label>
                                        </td>
                                    </tr>--%>
                                            <tr>
                                                <td>
                                                    <asp:GridView ID="dgv_FirstAccessControl_Viewer" runat="server" AllowSorting="True" AutoGenerateColumns="False" CssClass="Grid" AllowPaging="true" PageSize="999" ShowHeaderWhenEmpty="true"
                                                        EmptyDataText="No data found" ShowFooter="false" HeaderStyle-CssClass="GridHeaderTitle">
                                                        <SelectedRowStyle CssClass="GridItemSelect" />
                                                        <RowStyle CssClass="GridItem" />
                                                        <HeaderStyle CssClass="GridHeader" HorizontalAlign="Center" Wrap="true" />

                                                        <PagerStyle CssClass="GridPager" />
                                                        <PagerSettings Mode="NumericFirstLast" FirstPageText="First" LastPageText="Last" Position="Bottom" />
                                                        <EmptyDataTemplate>
                                                            <asp:Label ID="lblqueueDataFetch" runat="server" Text="No data found."></asp:Label>
                                                        </EmptyDataTemplate>

                                                        <Columns>
                                                            <asp:TemplateField ItemStyle-CssClass="" HeaderStyle-CssClass="" Visible="false">

                                                                <ItemTemplate>
                                                                    <asp:CheckBox ID="CheckboxDF" runat="server" AutoPostBack="true"></asp:CheckBox>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField Visible="False">

                                                                <ItemStyle HorizontalAlign="Center" />
                                                                <FooterStyle HorizontalAlign="Center" />
                                                                <ItemTemplate>
                                                                    <asp:LinkButton ID="btnVerifyDF" runat="server" CommandName="Verify" Text="Verify" Width="40px" />
                                                                </ItemTemplate>

                                                            </asp:TemplateField>

                                                            <asp:TemplateField Visible="False">

                                                                <ItemStyle HorizontalAlign="Center" />
                                                                <FooterStyle HorizontalAlign="Center" />
                                                                <ItemTemplate>
                                                                    <asp:LinkButton ID="btnRejectDF" runat="server" CommandName="Reject" Text="Reject" Width="40px" />
                                                                </ItemTemplate>

                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="ID" Visible="false">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblIDDF" runat="server" CssClass="lbl" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FAC_ID").ToString)%>' />
                                                                </ItemTemplate>
                                                                <%--   <EditItemTemplate>
                                                            <asp:TextBox ID="txtIDDF" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FAC_ID").ToString)%>'></asp:TextBox>
                                                        </EditItemTemplate>--%>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderStyle-Wrap="false" HeaderText="FAC_Checker_ID" Visible="false">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblCheckerID" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FAC_Checker_id").ToString)%>' />
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:Label ID="lblCheckerID1" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FAC_Checker_id").ToString)%>' />
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Action" Visible="True" ControlStyle-Width="100px">
                                                                <HeaderStyle Width="100px" Wrap="True" />
                                                                <ItemStyle Width="100px" Wrap="True" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblAction" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FAC_Action").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Workflow">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblWorkflow" runat="server" CssClass="lbl" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WTM_CODE").ToString)%>' />
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:DropDownList ID="ddlWorkflow" runat="server" CssClass="ddl" AutoPostBack="False" Enabled="false"></asp:DropDownList>
                                                                </EditItemTemplate>
                                                                <%-- <FooterTemplate>
                                                            <asp:RequiredFieldValidator ID="ReqddlNewWorkflow" runat="server" ControlToValidate="ddlNewWorkflow" ValidationGroup="InsertDF" ErrorMessage="*" ForeColor="#ff4e4e" Display="Dynamic" />
                                                            <asp:DropDownList ID="ddlNewWorkflow" runat="server" CssClass="ddl"></asp:DropDownList>
                                                        </FooterTemplate>--%>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Login Group">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblLogin" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FAC_Login_Group").ToString)%>' />
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:DropDownList ID="ddlLogin" runat="server" CssClass="ddl" AutoPostBack="False" Enabled="false"></asp:DropDownList>
                                                                </EditItemTemplate>
                                                                <%-- <FooterTemplate>
                                                            <asp:RequiredFieldValidator ID="ReqddlNewLogin" runat="server" ControlToValidate="ddlNewLogin" ValidationGroup="InsertDF" ErrorMessage="*" ForeColor="#ff4e4e" Display="Dynamic" />
                                                            <asp:DropDownList ID="ddlNewLogin" runat="server" CssClass="ddl"></asp:DropDownList>
                                                        </FooterTemplate>--%>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Access Type">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblAccessType" runat="server" CssClass="lbl" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AT_CODE").ToString)%>' />
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:DropDownList ID="ddlAccessType" runat="server" CssClass="ddl" AutoPostBack="False" Enabled="false"></asp:DropDownList>
                                                                </EditItemTemplate>
                                                                <%--  <FooterTemplate>
                                                            <asp:RequiredFieldValidator ID="ReqddlAccessType" runat="server" ControlToValidate="ddlNewAccessType" ValidationGroup="InsertDF" ErrorMessage="*" ForeColor="#ff4e4e" Display="Dynamic" />
                                                            <asp:DropDownList ID="ddlNewAccessType" runat="server" CssClass="ddl"></asp:DropDownList>
                                                        </FooterTemplate>--%>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Created By">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblCreatedByDF" runat="server" CssClass="lbl" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FAC_Created_By").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Created At">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblCreatedAtDF" runat="server" CssClass="lbl" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FAC_Created_At").ToString)%>' />
                                                                </ItemTemplate>

                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Verified Y/N" Visible="True" ControlStyle-Width="40px">
                                                                <HeaderStyle Width="40px" Wrap="True" />
                                                                <ItemStyle Width="40px" Wrap="True" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblVerifiedYN" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FAC_Verified_YN").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Verified At" Visible="True" ControlStyle-Width="180px">
                                                                <HeaderStyle Width="180px" Wrap="True" />
                                                                <ItemStyle Width="180px" Wrap="True" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblVerifiedAt" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FAC_Verified_At").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Verified By" Visible="True" ControlStyle-Width="100px">
                                                                <HeaderStyle Width="100px" Wrap="True" />
                                                                <ItemStyle Width="100px" Wrap="True" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblVerifiedBy" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FAC_Verified_By").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>


                                                            <asp:TemplateField HeaderText="Rejected Y/N" Visible="True" ControlStyle-Width="100px">
                                                                <HeaderStyle Width="100px" Wrap="True" />
                                                                <ItemStyle Width="100px" Wrap="True" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblRejectedYN" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FAC_Rejected_YN").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>


                                                            <asp:TemplateField HeaderText="Rejected By" Visible="True" ControlStyle-Width="100px">
                                                                <HeaderStyle Width="100px" Wrap="True" />
                                                                <ItemStyle Width="100px" Wrap="True" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblRejectedBy" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FAC_Rejected_By").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Rejected At" Visible="True" ControlStyle-Width="180px">
                                                                <HeaderStyle Width="180px" Wrap="True" />
                                                                <ItemStyle Width="180px" Wrap="True" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblRejectedAt" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FAC_Rejected_At").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Deleted Y/N" Visible="True" ControlStyle-Width="100px">
                                                                <HeaderStyle Width="100px" Wrap="True" />
                                                                <ItemStyle Width="100px" Wrap="True" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblDeletedYN" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FAC_Deleted_YN").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Deleted At" Visible="True" ControlStyle-Width="100px">
                                                                <HeaderStyle Width="100px" Wrap="True" />
                                                                <ItemStyle Width="100px" Wrap="True" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblDeletedAt" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FAC_Deleted_At").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Deleted By" Visible="True" ControlStyle-Width="100px">
                                                                <HeaderStyle Width="100px" Wrap="True" />
                                                                <ItemStyle Width="100px" Wrap="True" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblDeletedBy" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FAC_Deleted_By").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Requested By" Visible="True" ControlStyle-Width="100px">
                                                                <HeaderStyle Width="100px" Wrap="True" />
                                                                <ItemStyle Width="100px" Wrap="True" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblRequestedBy" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FAC_Requested_By").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>





                                                        </Columns>
                                                    </asp:GridView>
                                                </td>
                                            </tr>

                                        </table>
                                    </div>
                                    <div id="tabs_4">
                                        <table>
                                            <%--<tr>
                                        <td>

                                            <asp:Label ID="Label7" runat="server" Text="Total Records : " CssClass="lbl"></asp:Label>
                                            <asp:Label ID="lblTotalRecAT_Viewer" runat="server" Text="" CssClass="lbl"></asp:Label>
                                        </td>
                                    </tr>--%>
                                            <tr>
                                                <td>
                                                    <asp:GridView ID="dgvAccessTypeSetup_Viewer" runat="server" AllowSorting="True" AutoGenerateColumns="False" CssClass="Grid" AllowPaging="true" PageSize="15"
                                                        ShowHeaderWhenEmpty="true" EmptyDataText="No data found" ShowFooter="false">
                                                        <SelectedRowStyle CssClass="GridItemSelect" />
                                                        <RowStyle CssClass="GridItem" />

                                                        <HeaderStyle CssClass="GridHeader" HorizontalAlign="Center" Wrap="true" />

                                                        <PagerStyle CssClass="GridPager" />
                                                        <PagerSettings Mode="NumericFirstLast" FirstPageText="First" LastPageText="Last" Position="Bottom" />
                                                        <EmptyDataTemplate>
                                                            <asp:Label ID="Label3" runat="server" Text="No data found."></asp:Label>
                                                        </EmptyDataTemplate>

                                                        <Columns>
                                                            <asp:TemplateField ItemStyle-CssClass="" HeaderStyle-CssClass="" Visible="false">
                                                                <ItemTemplate>
                                                                    <asp:CheckBox ID="CheckboxAT" runat="server" AutoPostBack="true"></asp:CheckBox>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField Visible="False">

                                                                <ItemStyle HorizontalAlign="Center" />
                                                                <FooterStyle HorizontalAlign="Center" />

                                                                <ItemTemplate>
                                                                    <asp:LinkButton ID="btnVerifyAC" runat="server" CommandName="Verify" Text="Verify" Width="40px" />
                                                                </ItemTemplate>

                                                            </asp:TemplateField>

                                                            <asp:TemplateField Visible="False">

                                                                <ItemStyle HorizontalAlign="Center" />
                                                                <FooterStyle HorizontalAlign="Center" />

                                                                <ItemTemplate>
                                                                    <asp:LinkButton ID="btnRejectAC" runat="server" CommandName="Reject" Text="Reject" Width="40px" />
                                                                </ItemTemplate>

                                                            </asp:TemplateField>

                                                            <%--  <asp:CommandField ButtonType="Link" ShowEditButton="true" EditText="Edit" UpdateText="Update" ControlStyle-Width="40">
                                            <ItemStyle Wrap="false" Width="40px" HorizontalAlign="center" />
                                            <footertemplate>
                                        <asp:LinkButton ID="btnInsert" runat="server" CommandName="Add" Text="Add" Width="90" ValidationGroup="Insert"/>
                                    </footertemplate>
                                        </asp:CommandField>--%>

                                                            <asp:TemplateField HeaderText="SR No" Visible="false">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblSRno" runat="server" CssClass="lbl" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AT_id").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="ID" Visible="false">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblID" runat="server" CssClass="lbl" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AT_id").ToString)%>' />
                                                                </ItemTemplate>
                                                                <%-- <EditItemTemplate>
                                                            <asp:TextBox ID="txtID" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AT_id").ToString)%>'></asp:TextBox>
                                                        </EditItemTemplate>--%>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderStyle-Wrap="false" HeaderText="AT_Checker_ID" Visible="false">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblCheckerID" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AT_Checker_id").ToString)%>' />
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:Label ID="lblCheckerID1" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AT_Checker_id").ToString)%>' />
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Action" Visible="True" ControlStyle-Width="100px">
                                                                <HeaderStyle Width="100px" Wrap="True" />
                                                                <ItemStyle Width="100px" Wrap="True" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblAction" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AT_Action").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>


                                                            <asp:TemplateField HeaderText="Code">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblCode" runat="server" CssClass="lbl" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AT_Code").ToString)%>' />
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:TextBox ID="txtCode" runat="server" CssClass="txt"></asp:TextBox>
                                                                </EditItemTemplate>

                                                                <%-- <FooterTemplate>
                                                            <asp:RequiredFieldValidator ID="ReqtxtNewCode" runat="server" ControlToValidate="txtNewCode" ValidationGroup="Insert" ErrorMessage="*" ForeColor="#ff4e4e" Display="Dynamic" />
                                                            <asp:TextBox ID="txtNewCode" runat="server" CssClass="txt"></asp:TextBox>
                                                        </FooterTemplate>--%>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Name">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblName" runat="server" CssClass="lbl" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AT_LongName").ToString)%>' />
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:TextBox ID="txtName" runat="server" CssClass="txt"></asp:TextBox>
                                                                </EditItemTemplate>
                                                                <%-- <FooterTemplate>
                                                            <asp:RequiredFieldValidator ID="ReqtxtNewName" runat="server" ControlToValidate="txtNewName" ValidationGroup="Insert" ErrorMessage="*" ForeColor="#ff4e4e" Display="Dynamic" />
                                                            <asp:TextBox ID="txtNewName" runat="server" CssClass="txt"></asp:TextBox>
                                                        </FooterTemplate>--%>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Created By">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblCreatedBy" runat="server" CssClass="lbl" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AT_CreatedBy").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Created At">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblCreatedAt" runat="server" CssClass="lbl" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AT_CretedAt").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>


                                                            <asp:TemplateField HeaderText="Verified Y/N" Visible="True" ControlStyle-Width="40px">
                                                                <HeaderStyle Width="40px" Wrap="True" />
                                                                <ItemStyle Width="40px" Wrap="True" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblVerifiedYN" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AT_Verified_YN").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Verified At" Visible="True" ControlStyle-Width="180px">
                                                                <HeaderStyle Width="180px" Wrap="True" />
                                                                <ItemStyle Width="180px" Wrap="True" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblVerifiedAt" runat="server" />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Verified By" Visible="True" ControlStyle-Width="100px">
                                                                <HeaderStyle Width="100px" Wrap="True" />
                                                                <ItemStyle Width="100px" Wrap="True" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblVerifiedBy" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AT_Verified_By").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>


                                                             <asp:TemplateField HeaderText="Rejected Y/N" Visible="True" ControlStyle-Width="100px">
                                                                <HeaderStyle Width="100px" Wrap="True" />
                                                                <ItemStyle Width="100px" Wrap="True" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblRejectedYN" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AT_Rejected_YN").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>


                                                            <asp:TemplateField HeaderText="Rejected By" Visible="True" ControlStyle-Width="100px">
                                                                <HeaderStyle Width="100px" Wrap="True" />
                                                                <ItemStyle Width="100px" Wrap="True" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblRejectedBy" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AT_Rejected_By").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Rejected At" Visible="True" ControlStyle-Width="180px">
                                                                <HeaderStyle Width="180px" Wrap="True" />
                                                                <ItemStyle Width="180px" Wrap="True" />
                                                                <ItemTemplate>
                                                                   <asp:Label ID="lblRejectedAt" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AT_Rejected_At").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>


                                                            <asp:TemplateField HeaderText="Requested By" Visible="True" ControlStyle-Width="100px">
                                                                <HeaderStyle Width="100px" Wrap="True" />
                                                                <ItemStyle Width="100px" Wrap="True" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblRequestedBy" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AT_Requested_By").ToString)%>' />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>





                                                        </Columns>
                                                    </asp:GridView>
                                                      <asp:HiddenField runat="server" ID="hdnDataFetch" Value="" />
                                                     <asp:HiddenField runat="server" ID="hdnAccessType" Value="" />
                                                </td>
                                            </tr>
                                        </table>
                                    </div>

                                </div>


                            </div>

                        </div>
                    </td>
                </tr>

                <tr>
                    <td></td>
                </tr>




            </table>

        </ContentTemplate>
    </asp:UpdatePanel>

    <script type="text/javascript">
        var saveSelectedTab = 0;
        var saveSelectedTabforChecker = 0;
        var saveSelectedTabforViewer = 0;
        function PageLoad_WFLAccessControl() {
            SetTabsChecker();
            SetTabsViewer();
            SetTabs();
            debugger;
            //SetTabsCheckerViewer();

        }

        function isNumberKey(evt) {
            var charCode = (evt.which) ? evt.which : evt.keyCode;
            if (charCode > 31 && (charCode < 48 || charCode > 57))
                return false;
            return true;
        }


        function IsNumber(evt) {

            evt = (evt) ? evt : window.event;
            var char = (evt.which) ? evt.which : evt.keyCode;
            if (char > 31 && (char < 48 || char > 57)) {
                return false;
            }
            return true;
        }

        function EnterKeyEvent(evt) {
            var code = (evt.which) ? evt.which : evt.keyCode;

            if (code == 13) {
                __doPostBack('<%=txtrowsperpage.ClientID%>', 'TextChanged');

            }
        }
        function SetTabsChecker() {
            try {
                debugger;
                if (saveSelectedTabforChecker == 0) {
                    $("#ctl00_MainContent_tabViewer").css("display", "none");
                }
                else if (saveSelectedTabforChecker == 1) {
                    $("#ctl00_MainContent_tabChecker").css("display", "none");
                }

                $("#ctl00_MainContent_tabsMain").tabs({ active: saveSelectedTabforChecker });


                $('#ctl00_MainContent_tabsMain li').click(function (event, ui) {
                    var selectedTab1 = $("#ctl00_MainContent_tabsMain").tabs('option', 'active');

                    if (selectedTab1 == 0) {

                        $("#ctl00_MainContent_tabChecker").css("display", "block");
                        $("#ctl00_MainContent_tabViewer").css("display", "none");
                        saveSelectedTabforChecker = selectedTab1;



                    }
                    else if (selectedTab1 == 1) {
                        $("#ctl00_MainContent_tabViewer").css("display", "block");
                        $("#ctl00_MainContent_tabChecker").css("display", "none");
                        saveSelectedTabforChecker = selectedTab1;

                    }

                });

            }
            catch (e) {
                console.log("Error in SetTabsCheckerViewer" + e);
            }
        }


        //function SetTabsViewer() {
        //    try {
        //        debugger;
        //        if (saveSelectedTabforViewer == 1) {
        //            $("#ctl00_MainContent_tabs_3").css("display", "none");
        //        }
        //        else if (saveSelectedTabforViewer == 0) {
        //            $("#ctl00_MainContent_tabs_4").css("display", "none");
        //        }


        //        $("#ctl00_MainContent_tabsViewer").tabs({ active: saveSelectedTabforViewer });


        //        $('#ctl00_MainContent_tabsViewer li').click(function (event, ui) {
        //            var selectedTab2 = $("#ctl00_MainContent_tabsViewer").tabs('option', 'active');

        //            if (selectedTab2 == 0) {

        //                $("#ctl00_MainContent_tabs_3").css("display", "block");
        //                $("#ctl00_MainContent_tabs_4").css("display", "none");
        //                saveSelectedTabforViewer = selectedTab2;



        //            }
        //            else if (selectedTab2 == 1) {
        //                $("#ctl00_MainContent_tabs_3").css("display", "block");
        //                $("#ctl00_MainContent_tabs_4").css("display", "none");
        //                saveSelectedTabforViewer = selectedTab2;

        //            }

        //        });


        //    }
        //    catch (e) {
        //        console.log("Error in SetTabsViewer" + e);
        //    }
        //}

        function SetTabsViewer() {
            try {
                debugger;
                if (saveSelectedTab == 1) {
                    $("#ctl00_MainContent_tabs_3").css("display", "none");
                }
                else if (saveSelectedTab == 0) {
                    $("#ctl00_MainContent_tabs_4").css("display", "none");
                }


                $("#ctl00_MainContent_tabsViewer").tabs({ active: saveSelectedTab });


                $('#ctl00_MainContent_tabsViewer li').click(function (event, ui) {
                    var selectedTab2 = $("#ctl00_MainContent_tabsViewer").tabs('option', 'active');

                    if (selectedTab2 == 0) {

                        $("#ctl00_MainContent_tabs_3").css("display", "block");
                        $("#ctl00_MainContent_tabs_4").css("display", "none");
                        saveSelectedTab = selectedTab2;



                    }
                    else if (selectedTab2 == 1) {
                        $("#ctl00_MainContent_tabs_3").css("display", "block");
                        $("#ctl00_MainContent_tabs_4").css("display", "none");
                        saveSelectedTab = selectedTab2;

                    }

                });


            }
            catch (e) {
                console.log("Error in SetTabsViewer" + e);
            }
        }

        function SetTabs() {

            if (saveSelectedTab == 1) {
                $("#ctl00_MainContent_tabs_1").css("display", "none");
            }
            else if (saveSelectedTab == 0) {
                $("#ctl00_MainContent_tabs_2").css("display", "none");
            }


            $("#ctl00_MainContent_tabs").tabs({ active: saveSelectedTab });


            $('#ctl00_MainContent_tabs li').click(function (event, ui) {
                var selectedTab = $("#ctl00_MainContent_tabs").tabs('option', 'active');

                if (selectedTab == 0) {

                    $("#ctl00_MainContent_tabs_1").css("display", "block");
                    $("#ctl00_MainContent_tabs_2").css("display", "none");
                    saveSelectedTab = selectedTab;



                }
                else if (selectedTab == 1) {
                    $("#ctl00_MainContent_tabs_2").css("display", "block");
                    $("#ctl00_MainContent_tabs_1").css("display", "none");
                    saveSelectedTab = selectedTab;

                }

            });


        }


        function highlightTd() {
            try {
                $(".Grid tr td span:contains('->')").each(function () {
                    var strValue = "";
                    var indexVal = "";
                    var oldVal = "";
                    var newVal = "";
                    var strValue = $(this).text();
                    //alert("Inside" + strValue);
                    var indexVal = strValue.indexOf("->");
                    var oldVal = strValue.substring(0, indexVal);
                    var newVal = strValue.substring(indexVal + 2, strValue.length);
                    //alert(oldVal);
                    //alert(newVal);
                    var strHtml = "<span style='color: red'>" + oldVal + "</span>";

                    strHtml += "->" + "<span style='color: green'>" + newVal + "</span>";
                    $(this).html(strHtml);


                })

            }
            catch (err) {
                console.log('Error in highlightTd' + err)
            }
        }

        var prm = Sys.WebForms.PageRequestManager.getInstance();
        prm.add_endRequest(function (s, e) {
            highlightTd();
            return void (0);
        });
        //function SetTabs() {
        //    //SetTabs();
        //    debugger;
        //    if (saveSelectedTab == 1) {
        //        $("#ctl00_MainContent_tabs_3").css("display", "none");
        //    }
        //    else if (saveSelectedTab == 0) {
        //        $("#ctl00_MainContent_tabs_4").css("display", "none");
        //    }


        //    $("#ctl00_MainContent_TabChecker").TabChecker({ active: saveSelectedTab });


        //    $('#ctl00_MainContent_TabChecker li').click(function (event, ui) {
        //        debugger;
        //        var selectedTab = $("#ctl00_MainContent_TabChecker").TabChecker('option', 'active');

        //        if (selectedTab == 0) {

        //            $("#ctl00_MainContent_tabs_3").css("display", "block");
        //            $("#ctl00_MainContent_tabs_4").css("display", "none");
        //            saveSelectedTab = selectedTab;

        //        }
        //        else if (selectedTab == 1) {
        //            $("#ctl00_MainContent_tabs_4").css("display", "block");
        //            $("#ctl00_MainContent_tabs_3").css("display", "none");
        //            saveSelectedTab = selectedTab;

        //        }

        //    });


        //}

    </script>
</asp:Content>
