<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="FinIQ_Workflow_EntityMapping_Checker.aspx.vb" Inherits="FinIQWebApp.FinIQ_Workflow_EntityMapping_Checker" MasterPageFile="~/FiniqAppMasterPage.Master" Title="Workflow Entity Mapping (Checker)" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="Server">
    <asp:ScriptManagerProxy ID="ScriptManagerProxy11" runat="server">
    </asp:ScriptManagerProxy>
    <script src="../FinIQJS/SortFilter_Grid.js"></script>
    <style type="text/css">
      
        .divLoading {
            position: absolute;
            left: 600px;
            top: 90px;
        }

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

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

            .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;
           
        }
       .ui-tabs .ui-tabs-panel {  
    padding: 1em 0 !important;   
}
       .ui-tabs .ui-tabs-nav {
margin: 0;
padding: .0em .0em 0 !important;
}
    </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('<%=btnCallCheckerTab.ClientID%>').click();
        }

        function clearErrorLabel() {
            document.getElementById('<%= lblerror.ClientID%>').textContent = "";
            document.getElementById('<%=btnCallViewerTab.ClientID%>').click();
        }
        function deleteRecord() {
            return confirm('Are you sure to delete this record(s) ?');
        }
    </script>



    <asp:UpdatePanel ID="UpdatePanel2" runat="server">
        <ContentTemplate>
            <table>
                <tr>
                    <td>
                        <asp:UpdateProgress ID="UpdateProgress3" 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>
                        <asp:Button ID="btnCallCheckerTab" runat="server" Text="" Style="display: none"></asp:Button>
                        <asp:Button ID="btnCallViewerTab" runat="server" Text="" Style="display: none"></asp:Button>
                        <br />
                        <br />
                        <div id="tabs" runat="server">
                            <ul>

                                <li id="Li1" runat="server" onclick="clearErrorLabel1()"><a href="#tabs_1">Pending Requests</a></li>
                                <li id="Li2" runat="server" onclick="clearErrorLabel()"><a href="#tabs_2">Processed Requests</a></li>
                            </ul>
                            <br />

                            <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 isNumberKey(event)" />

                                <%--Added by Nikhil Mali on 20-11-2019 for vertical editing : END--%>
                            </div>
                            <div id="tabs_1">
                                <table>
                                    <tr>
                                        <td>
                                            <asp:GridView ID="dgvEntityMapping" runat="server" AllowSorting="True" AutoGenerateColumns="False"
                                                BorderStyle="Solid" BorderWidth="1px" CellPadding="3" CssClass="Grid Gridview" AllowPaging="True" PageSize="999" ShowHeaderWhenEmpty="true" HeaderStyle-CssClass="GridHeaderTitle">
                                                <SelectedRowStyle CssClass="GridItemSelect" />
                                                <RowStyle CssClass="GridItem" />
                                                <HeaderStyle CssClass="GridHeader" />
                                                <FooterStyle CssClass="GridFooter" />
                                                <EmptyDataTemplate>
                                                    <asp:Label ID="lblEntityMappingGrid" runat="server" Text="No data found..."></asp:Label>
                                                </EmptyDataTemplate>

                                                <Columns>
                                                    <asp:TemplateField Visible="false">
                                                        <ItemStyle Width="30px" />
                                                        <HeaderStyle Width="30px" />
                                                        <ItemTemplate>
                                                            <asp:CheckBox ID="CheckboxRow" runat="server" AutoPostBack="false" Visible="false"></asp:CheckBox>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

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

                                                    </asp:TemplateField>

                                                   <%-- <asp:TemplateField>
                                                        <ItemStyle />
                                                        <HeaderStyle />
                                                        <ItemTemplate>
                                                            <asp:LinkButton ID="btnVerify" CommandName="Verify" runat="server" Text="Verify" Width="40px" CommandArgument='<%# Container.DataItemIndex%>' />
                                                        </ItemTemplate>

                                                    </asp:TemplateField>

                                                    <asp:TemplateField>
                                                        <ItemStyle />
                                                        <HeaderStyle />
                                                        <ItemTemplate>
                                                            <asp:LinkButton ID="btnReject" CommandName="Reject" runat="server" Text="Reject" Width="40px" CommandArgument='<%# Container.DataItemIndex%>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>--%>

                                                    <asp:TemplateField HeaderStyle-Wrap="false" HeaderText="WEM_Checker_ID" Visible="false">
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblCheckerID" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WEM_Checker_ID").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.WEM_Action").ToString)%>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderStyle-Wrap="True" HeaderText="Serial No" Visible="false">
                                                        <ItemStyle Width="30px" HorizontalAlign="right" />
                                                        <HeaderStyle Width="30px" />
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblSer" runat="server" Text='<%#Container.DataItemIndex + 1%>' />
                                                        </ItemTemplate>

                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderStyle-Wrap="True" HeaderText=" WEM Id" Visible="false">
                                                        <ItemStyle Width="50px" HorizontalAlign="Right" />
                                                        <HeaderStyle Width="50px" />
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblID" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WEM_ID").ToString)%>' />
                                                        </ItemTemplate>

                                                    </asp:TemplateField>



                                                    <%--------------------------------------------------------------------------------%>
                                                    <asp:TemplateField HeaderStyle-Wrap="True" HeaderText="Workflow">
                                                        <HeaderStyle Width="289px" />
                                                        <ItemStyle Wrap="false" Width="279px" HorizontalAlign="left" />

                                                        <ItemTemplate>
                                                            <asp:Label ID="lblWorkflow" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WTM_Title").ToString)%>'>
                                                            </asp:Label>
                                                        </ItemTemplate>


                                                    </asp:TemplateField>

                                                   

                                                      <asp:TemplateField HeaderStyle-Wrap="True" HeaderText="WorkflowID" Visible="false">
                                                        <HeaderStyle Width="289px" />
                                                        <ItemStyle Wrap="false" Width="279px" HorizontalAlign="left" />


                                                              <ItemTemplate>
                                                            <asp:Label ID="lblWorkflowID" runat="server" Visible="false" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WEM_WTM_ID").ToString)%>'>
                                                            </asp:Label>
                                                        </ItemTemplate>
                                                            

                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderStyle-Wrap="False" HeaderText="Entity">
                                                        <HeaderStyle Width="115px" />
                                                        <ItemStyle Width="115px" HorizontalAlign="left" />
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblEntity" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.entity_name").ToString)%>'>
                                                            </asp:Label>
                                                        </ItemTemplate>

                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderStyle-Wrap="True" HeaderText="Priority" Visible="true">
                                                        <ItemStyle Width="66px" HorizontalAlign="Right" />
                                                        <HeaderStyle Width="66px" />
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblPriority" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WEM_Display_Priority").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.WEM_VerifiedYN").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.WEM_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.WEM_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.WEM_RejectedYN").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.WEM_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.WEM_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.WEM_DeletedYN").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.WEM_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.WEM_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.WEM_Requested_By").ToString)%>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                  

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

                                </table>
                            </div>
                            <div id="tabs_2">
                                <table>

                                    <tr>
                                        <td>
                                            <asp:GridView ID="dgvEntityMapping_Viewer" runat="server" AllowSorting="True" AutoGenerateColumns="False"
                                                BorderStyle="Solid" BorderWidth="1px" CellPadding="3" CssClass="Grid Gridview" AllowPaging="True" PageSize="999" ShowHeaderWhenEmpty="true" HeaderStyle-CssClass="GridHeaderTitle">
                                                <SelectedRowStyle CssClass="GridItemSelect" />
                                                <RowStyle CssClass="GridItem" />
                                                <HeaderStyle CssClass="GridHeader" />
                                                <FooterStyle CssClass="GridFooter" />
                                                <EmptyDataTemplate>
                                                    <asp:Label ID="lblEntityMappingGrid" runat="server" Text="No data found..."></asp:Label>
                                                </EmptyDataTemplate>
                                                <Columns>
                                                   
                                                   


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

                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderStyle-Wrap="True" HeaderText="Serial No" Visible="true">
                                                        <ItemStyle Width="30px" HorizontalAlign="right" />
                                                        <HeaderStyle Width="30px" />
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblSer" runat="server" Text='<%#Container.DataItemIndex + 1%>' />
                                                        </ItemTemplate>

                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderStyle-Wrap="True" HeaderText=" WEM Id" Visible="false">
                                                        <ItemStyle Width="50px" HorizontalAlign="Right" />
                                                        <HeaderStyle Width="50px" />
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblID" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WEM_ID").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.WEM_Action").ToString)%>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <%--------------------------------------------------------------------------------%>
                                                    <asp:TemplateField HeaderStyle-Wrap="True" HeaderText="Workflow">
                                                        <HeaderStyle Width="289px" />
                                                        <ItemStyle Wrap="false" Width="279px" HorizontalAlign="left" />

                                                        <ItemTemplate>
                                                            <asp:Label ID="lblWorkflow" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WTM_Title").ToString)%>'>
                                                            </asp:Label>
                                                        </ItemTemplate>

                                                            
                                                            

                                                    </asp:TemplateField>

                                                      <asp:TemplateField HeaderStyle-Wrap="True" HeaderText="WorkflowID" Visible="false">
                                                        <HeaderStyle Width="289px" />
                                                        <ItemStyle Wrap="false" Width="279px" HorizontalAlign="left" />


                                                              <ItemTemplate>
                                                            <asp:Label ID="lblWorkflowID" runat="server"  Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WEM_WTM_ID").ToString)%>'>
                                                            </asp:Label>
                                                        </ItemTemplate>
                                                            

                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderStyle-Wrap="False" HeaderText="Entity">
                                                        <HeaderStyle Width="115px" />
                                                        <ItemStyle Width="115px" HorizontalAlign="left" />
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblEntity" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.entity_name").ToString)%>'>
                                                            </asp:Label>
                                                        </ItemTemplate>

                                                    </asp:TemplateField>

                                                    <asp:TemplateField HeaderStyle-Wrap="True" HeaderText="Priority" Visible="true">
                                                        <ItemStyle Width="66px" HorizontalAlign="Right" />
                                                        <HeaderStyle Width="66px" />
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblPriority" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.WEM_Display_Priority").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.WEM_VerifiedYN").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.WEM_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.WEM_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.WEM_RejectedYN").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.WEM_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.WEM_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.WEM_DeletedYN").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.WEM_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.WEM_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.WEM_Requested_By").ToString)%>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                   


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

                                </table>
                            </div>

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


            </table>

        </ContentTemplate>
    </asp:UpdatePanel>



    <script type="text/javascript">
        var saveSelectedTab = 0;

        function PageLoad_WFLAccessControl() {
            debugger;
            SetTabs();

        }

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

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

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

            }
        }
        function SetTabs() {
            debugger;
            if (saveSelectedTab == 1) {
                $("#ctl00_MainContent_tabs_1").css("display", "none");
                //$("#ctl00_btnVerifySecond").css("display", "none");
            }
            else if (saveSelectedTab == 0) {
                $("#ctl00_MainContent_tabs_2").css("display", "none");
                //$("#ctl00_btnVerifyFirst").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');
                debugger;
                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);
        });
    </script>




</asp:Content>
