<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/FiniqAppMasterPage.Master"
    CodeBehind="Authoriser.aspx.vb" Inherits="FinIQWebApp.Authoriser" Title="LSS-Authoriser" %>

<asp:Content ID="cont" ContentPlaceHolderID="MainContent" runat="server">
    <asp:ScriptManagerProxy ID="ScriptManagerProxy11" runat="server">
    </asp:ScriptManagerProxy>
    <style type="text/css">
.Header
                {
                    font: normal 13px/26px verdana !important;
                }
                .FilterPad
                {
                    margin:0px 10px;
                }
               
    </style>
    <asp:UpdatePanel ID="UpdatePanelCP" runat="server">
        <ContentTemplate>

            <script language="javascript" type="text/javascript">
                window.history.forward(1);
                function ChangeStatus() {
                    if (document.getElementById('ctl00_MainContent_ddlSearch').value == 'All') {
                        document.getElementById('ctl00_MainContent_txtSearch').value = "";
                        document.getElementById('ctl00_MainContent_txtSearch').disabled = true;
                    }
                    else {
                        document.getElementById('ctl00_MainContent_txtSearch').disabled = false;
                    }
                }
            </script>

            <script language="JavaScript" type="text/javascript">
                var flag = true;
                //set this variable to 1 if you wish the URLs of the highlighted menu to be displayed in the status bar
                var display_url = 0

                var ie5 = document.all && document.getElementById
                var ns6 = document.getElementById && !document.all
                if (ie5 || ns6)
                    var menuobj = document.getElementById("ie5menu")

                function showmenuie5(e) {

                    //Find out how close the mouse is to the corner of the window
                    var rightedge = ie5 ? document.body.clientWidth - event.clientX : window.innerWidth - e.clientX
                    var bottomedge = ie5 ? document.body.clientHeight - event.clientY : window.innerHeight - e.clientY

                    //if the horizontal distance isn't enough to accomodate the width of the context menu
                    if (rightedge < menuobj.offsetWidth)
                    //move the horizontal position of the menu to the left by it's width
                        menuobj.style.left = ie5 ? document.body.scrollLeft + event.clientX - menuobj.offsetWidth : window.pageXOffset + e.clientX - menuobj.offsetWidth
                    else
                    //position the horizontal position of the menu where the mouse was clicked
                        menuobj.style.left = ie5 ? document.body.scrollLeft + event.clientX : window.pageXOffset + e.clientX

                    //same concept with the vertical position
                    if (bottomedge < menuobj.offsetHeight)
                        menuobj.style.top = ie5 ? document.body.scrollTop + event.clientY - menuobj.offsetHeight : window.pageYOffset + e.clientY - menuobj.offsetHeight
                    else
                        menuobj.style.top = ie5 ? document.body.scrollTop + event.clientY : window.pageYOffset + e.clientY


                    menuobj.style.visibility = "visible"

                    return false
                }

                function hidemenuie5(e) {
                    menuobj.style.visibility = "hidden"
                }

                function highlightie5(e) {
                    var firingobj = ie5 ? event.srcElement : e.target
                    if (firingobj.className == "menuitems" || ns6 && firingobj.parentNode.className == "menuitems") {
                        if (ns6 && firingobj.parentNode.className == "menuitems") firingobj = firingobj.parentNode //up one node
                        firingobj.style.backgroundColor = "highlight"
                        firingobj.style.color = "white"
                        if (display_url == 1)
                            window.status = event.srcElement.url
                    }
                }

                function lowlightie5(e) {
                    var firingobj = ie5 ? event.srcElement : e.target
                    if (firingobj.className == "menuitems" || ns6 && firingobj.parentNode.className == "menuitems") {
                        if (ns6 && firingobj.parentNode.className == "menuitems") firingobj = firingobj.parentNode //up one node
                        firingobj.style.backgroundColor = ""
                        firingobj.style.color = "black"
                        window.status = ''
                    }
                }

                function jumptoie5(e) {
                    var firingobj = ie5 ? event.srcElement : e.target
                    if (firingobj.className == "menuitems" || ns6 && firingobj.parentNode.className == "menuitems") {
                        if (ns6 && firingobj.parentNode.className == "menuitems") firingobj = firingobj.parentNode
                        if (firingobj.getAttribute("target"))
                            window.open(firingobj.getAttribute("url"), firingobj.getAttribute("target"))
                        else
                            window.location = firingobj.getAttribute("url")
                    }
                }

                function setmenu() {
                    document.onclick = hidemenuie5
                }

                /*Added By Omkar M || MASCLI - 1946 || 01-Nov-2021*/
                function TxRowsPerPage_TextChanged(e) {


                    if (e.keyCode == 13) {
                        document.getElementById('<%=btnSetPageSize.ClientID%>').click();
                    }
                }

                function checkloginlenght(str) {
                    //alert(document.getElementById(str).value.length);
                    if (document.getElementById(str).value.length > 16) {

                        lblError.innerHTML = "Login Name Maximum 16 characters only";
                        return false;
                    }
                }
            </script>

            <table cellspacing="1" cellpadding="1" class="FilterPad">
                <tr>
                    <td>
                        <table cellspacing="1" cellpadding="1" >
                            <tr>
                                <td>
                                    <table>
                                      <%--  <tr>
                                            <td nowrap="nowrap" class="background_gray">
                                                Authoriser
                                            </td>
                                        </tr>--%>
                                        <tr>
                                            <td>
                                                <asp:Label ID="lblError" runat="server" CssClass="lblError"></asp:Label>
                                                <asp:Label ID="lblSuccess" runat="server" CssClass="lblSuccess" ></asp:Label>
                                                <asp:Label ID="lblInfo" runat="server" CssClass="lblInfo" ></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="">
                                                <table id="Table1">
                                                    <tr>
                                                         <%--ManasiA / Netra S|| 15-Apr-2021 || Layout changes || Start ||--%>
                                                         <td class="lbl" style="width: 90px;" >
                                                            Search By
                                                        </td>
                                                        <td>
                                                            <asp:DropDownList ID="ddlSearch" runat="server" CssClass="ddl" Width="100px">
                                                                <asp:ListItem Value="All">All</asp:ListItem>
                                                                <asp:ListItem Value="Group Id">Group Id</asp:ListItem> 
                                                                <asp:ListItem Value="Group Name">Group Name</asp:ListItem>
                                                                <asp:ListItem Value="User Id">User Id</asp:ListItem>
                                                               
                                                                <asp:ListItem Value="User Name">User Name</asp:ListItem>
                                                            </asp:DropDownList>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtSearch" runat="server" CssClass="txtbox" Width="200px"></asp:TextBox>
                                                        </td>
                                                          <td style="width:230px">
                                                            <asp:Button ID="btnload" runat="server" CssClass="btn" Text="Search" Width="80px"></asp:Button>
                                                        </td>
                                                    </tr>
                                                    </table>
                                                <table>
                                                  <tr id="trFilter" runat="server">
                                                                    <td class="lbl" style="width: 90px;">
                                                            Filter By
                                                        </td>                                                        
                                                        <td  style="width:280px">
                                                            <asp:DropDownList ID="ddlFilterBy" runat="server" CssClass="ddl" width="305px" AutoPostBack="true">
                                                                <asp:ListItem Value="All">All</asp:ListItem>                                                              
                                                                <asp:ListItem Value="UnAuthorized">Authorization Pending Groups & Users</asp:ListItem> 
                                                                 <asp:ListItem Value="Authorized">Authorized Groups and Users</asp:ListItem>
                                                            </asp:DropDownList>
                                                        </td>
                                                       
                                                     
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="">
                                                <table>
                                                    <tr>
                                                        <td class="Header">
                                                            Group Class
                                                           
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <div id="DIV1" style="overflow: auto;  max-height: 360px" runat="server">
                                                                <asp:DataGrid ID="Grid_Group" runat="server" CssClass="Grid" ShowFooter="True" 
                                                                    AutoGenerateColumns="False" AllowPaging="True" DataKeyField="EntityID" PageSize="10">
                                                                   <SelectedItemStyle CssClass="GridItemSelect" />
                                                                    <ItemStyle CssClass ="GridItem" />
                                                                    <HeaderStyle CssClass="GridHeader" HorizontalAlign="Center" VerticalAlign="Middle" Wrap="true" />
                                                                    <FooterStyle CssClass="GridFooter" />
                                                                    <PagerStyle CssClass="GridPager" />
                                                                    <Columns>
                                                                        <asp:TemplateColumn SortExpression="OptionID" HeaderText="Group ID">
                                                                           
                                                                            <ItemStyle HorizontalAlign="Left"></ItemStyle>
                                                                            <ItemTemplate>
                                                                                <asp:LinkButton ID="Linkbutton4" runat="server" CssClass="lnk" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.GroupID").toString) %>'
                                                                                    CommandName="Select" CommandArgument='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.GroupID").ToString)%>'
                                                                                    CausesValidation="false">
                                                                                </asp:LinkButton>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateColumn>
                                                                        <asp:TemplateColumn HeaderText="Entity Name">
                                                                            
                                                                            <ItemStyle Wrap="False" HorizontalAlign="Left"></ItemStyle>
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="Label1" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.EntityName").ToString)%>'
                                                                                    NAME="Label1">
                                                                                </asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateColumn>
                                                                        <asp:TemplateColumn HeaderText="Status">
                                                                              <ItemStyle HorizontalAlign="center"></ItemStyle>
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="Label2" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Status").ToString)%>'
                                                                                    NAME="Label2">
                                                                                </asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateColumn>
                                                                        <asp:TemplateColumn HeaderText="Role">
                                                                            <ItemStyle Wrap="False" HorizontalAlign="Left"></ItemStyle>
                                                                            <ItemTemplate>
                                                                                <asp:Label runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Role").toString) %>'
                                                                                    ID="Label3" NAME="Label3">
                                                                                </asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateColumn>
                                                                        <asp:TemplateColumn HeaderText="Group Name">
                                                                            
                                                                            <ItemStyle Wrap="False" HorizontalAlign="Left"></ItemStyle>
                                                                            <ItemTemplate>
                                                                                <asp:Label runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Names").ToString)%>'
                                                                                    ID="Label4" NAME="Label4">
                                                                                </asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateColumn>
                                                                        <asp:TemplateColumn HeaderText="Organisation">
                                                                            <ItemStyle Wrap="False" HorizontalAlign="Left"></ItemStyle>
                                                                            <ItemTemplate>
                                                                                <asp:Label runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.GroupName").ToString)%>'
                                                                                    ID="Label5" NAME="Label5">
                                                                                </asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateColumn>
                                                                        <asp:TemplateColumn HeaderText="Address">
                                                                            <ItemStyle Wrap="False" HorizontalAlign="Left"></ItemStyle>
                                                                            <ItemTemplate>
                                                                                <asp:Label runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Address").toString) %>'
                                                                                    ID="Label6" NAME="Label6">
                                                                                </asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateColumn>
                                                                        <asp:TemplateColumn HeaderText="Mobile">
                                                                            <ItemStyle Wrap="False" HorizontalAlign="Left"></ItemStyle>
                                                                            <ItemTemplate>
                                                                                <asp:Label runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Mobile").toString) %>'
                                                                                    ID="Label7" NAME="Label7">
                                                                                </asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateColumn>
                                                                        <asp:TemplateColumn HeaderText="Phone">
                                                                            <ItemStyle Wrap="False" HorizontalAlign="Left"></ItemStyle>
                                                                            <ItemTemplate>
                                                                                <asp:Label runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Phone").toString) %>'
                                                                                    ID="Label8" NAME="Label8">
                                                                                </asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateColumn>
                                                                        <asp:TemplateColumn HeaderText="Fax">
                                                                            <ItemStyle Wrap="False" HorizontalAlign="Left"></ItemStyle>
                                                                            <ItemTemplate>
                                                                                <asp:Label runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Fax").toString) %>'
                                                                                    ID="Label9" NAME="Label9">
                                                                                </asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateColumn>
                                                                        <asp:TemplateColumn HeaderText="Email Id">
                                                                            <ItemStyle Wrap="False" HorizontalAlign="Left"></ItemStyle>
                                                                            <ItemTemplate>
                                                                                <asp:Label runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Email").toString) %>'
                                                                                    ID="Label10" NAME="Label10">
                                                                                </asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateColumn>
                                                                          <asp:TemplateColumn HeaderText="Group Admin" HeaderStyle-HorizontalAlign="Center">
                                                                            <ItemStyle Wrap="False" HorizontalAlign="Left"></ItemStyle>
                                                                            <ItemTemplate>
                                                                                <asp:Label runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.GroupAdmin").ToString)%>'
                                                                                    ID="Label13">
                                                                                </asp:Label>
                                                                            </ItemTemplate>
                                                                            <FooterTemplate>
                                                                                <asp:TextBox ID="txt_GrpAdm" runat="server" Visible="False"></asp:TextBox>
                                                                            </FooterTemplate>
                                                                            <EditItemTemplate>
                                                                              <asp:DropDownList runat="server" ID="ddlGrpAdm" AutoPostBack="false" > </asp:DropDownList>
                                                                            </EditItemTemplate>
                                                                        </asp:TemplateColumn>
                                                                        <asp:TemplateColumn HeaderText="Group Authoriser" HeaderStyle-HorizontalAlign="Center">
                                                                            <ItemStyle Wrap="False" HorizontalAlign="Left"></ItemStyle>
                                                                            <ItemTemplate>
                                                                                <asp:Label runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.GroupAut").ToString)%>'
                                                                                    ID="Label14">
                                                                                </asp:Label>
                                                                            </ItemTemplate>
                                                                            <FooterTemplate>
                                                                                <asp:TextBox ID="txt_GrpAuth" runat="server" Visible="False"></asp:TextBox>
                                                                            </FooterTemplate>
                                                                            <EditItemTemplate>
                                                                                <asp:DropDownList runat="server" ID="ddlGrpAut" AutoPostBack="false" > </asp:DropDownList>
                                                                            </EditItemTemplate>
                                                                        </asp:TemplateColumn>
                                                                        <asp:TemplateColumn HeaderText="Table Flag" Visible="false" HeaderStyle-HorizontalAlign="Center">
                                                                            <ItemStyle Wrap="False" HorizontalAlign="Left"></ItemStyle>
                                                                            <ItemTemplate>
                                                                                <asp:Label runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.TableFlag").ToString)%>'
                                                                                    ID="lblGroupTableFlag">
                                                                                </asp:Label>
                                                                            </ItemTemplate>                                                                           
                                                                        </asp:TemplateColumn>
                                                                         <asp:TemplateColumn HeaderText="Entity Id" Visible="true">
                                                                            
                                                                            <ItemStyle Wrap="False" HorizontalAlign="center"></ItemStyle>
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="lblEntityId" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.EntityId").ToString)%>'>                                                                          </asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateColumn>
                                                                    </Columns>
                                                                    <PagerStyle CssClass="DataGrid1Pager" Mode="NumericPages"></PagerStyle>
                                                                </asp:DataGrid>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr><td style="height:10px;"></td></tr>
                            <tr>
                                <td>
                                    <table class="">
                                        <tr>
                                            <td class="Header">
                                                User Ids Of [<asp:Label ID="lbl_userid" runat="server"></asp:Label>]
                                               <%-- ManasiA || 18-June-2021 || To display user count --%>
                                              <asp:Label ID="lblCount" runat="server" Text="| User count :"></asp:Label>
                                                <asp:Label ID="lblUserCount" runat="server" Text="" CssClass="lbl"></asp:Label>

                                               <%-- Added By Omkar M || MASCLI - 1946 || 01-Nov-2021--%>
                                                 <%-- Added  Tooltip, Updated Title  By Omkar M || MASCLI - 1946 || 01-Nov-2021--%>
                                                 <asp:Label ID="lblRecordsPerpage" runat="server" CssClass="lbl CashHoldingsRecordsPerPage" title="Enter record(s) per page in textbox. Press enter/tab." style="margin-left:20px"></asp:Label>
                                                 <asp:TextBox ID="TxRowsPerPage" runat="server" AutoPostBack="true" MaxLength="3" Text="10" 
                                                  Style="text-align: right;vertical-align:middle;height:24px"  onkeypress="return AllowOnlyNumeric()"
                                                  onkeydown="return TxRowsPerPage_TextChanged(event)" Width="32" ToolTip="Record(s) Per Page"  ></asp:TextBox>
                                                 <asp:Button ID="btnSetPageSize" runat="server" Style="display: none"></asp:Button>
                                            </td>
                                           
                                        </tr>
                                        <tr><td style="width:380px;" > <asp:Button ID="Button4" runat="server"  BackColor="LightYellow"
                                                    Width="15px" Height="15px" BorderColor="Gray" BorderWidth="1px"></asp:Button>&nbsp;<font
                                                        size="2">Authorisation of own created user(s) not allowed.</font></td>
                                          <%-- ManasiA || 18-June-2021 || Added Bulk user authorisation functionality --%>		
										     <td>
                                                          <asp:Button ID="btnAuthAllUsers" runat="server" CssClass="btn" Text="Authorise All Users" Width="170px" Visible="false"></asp:Button>
                                                      </td>
                                             <td>
                                                          <asp:Button ID="btnAuthCurrentPage" runat="server" CssClass="btn" Text="Authorise Current Page Users" Width="170px" Visible="false"></asp:Button>
                                                      </td>
                                             <td>
                                                          <asp:Button ID="btnUnauthAllUsers" runat="server" CssClass="btn" Text="Unauthorise All Users" Width="170px" Visible="false"></asp:Button>
                                                      </td>
                                                     
                                                      <td>
                                                          <asp:Button ID="btnUnauthCurrentPage" runat="server" CssClass="btn" Text="Unauthorise Current Page Users" Width="170px" Visible="false"></asp:Button>
                                                      </td>
                                                     


                                        </tr>
                                        </table>
                                    <table>
									 <%-- ManasiA || 18-June-2021 || Added Bulk user authorisation functionality --%>	
                                        <tr>
                                            <td>
                                                <%-- Max height removed By Omkar M || MASCLI - 1946 || 02-Nov-2021--%>
                                                <div id="DIV2" style="overflow: auto; margin-top:10px;" runat="server"><%--width: 1350px; --%>
                                                    <asp:DataGrid ID="Grid_User" runat="server" CssClass="Grid" ShowFooter="True" AutoGenerateColumns="False"
                                                        AllowPaging="True" PageSize="50"  AllowSorting="True">
                                                         <SelectedItemStyle CssClass="GridItemSelect" />
                                                                    <ItemStyle CssClass ="GridItem" />
                                                                    <HeaderStyle CssClass="GridHeader" HorizontalAlign="Center" VerticalAlign="Middle" Wrap="true" />
                                                                    <FooterStyle CssClass="GridFooter" />
                                                                    <PagerStyle CssClass="GridPager" />
                                                        <Columns>
                                                              <asp:TemplateColumn  >                                                                        
                                                                            <ItemStyle HorizontalAlign="Left"></ItemStyle>
                                                                            <ItemTemplate>
                                                                                <asp:LinkButton ID="lnkApprove" runat="server"  CssClass="lnk" Text="Authorise" CommandName="Select" CommandArgument='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.UserActive").ToString)%>'  CausesValidation="false">
                                                                                </asp:LinkButton>
                                                                            </ItemTemplate>
                                                                  </asp:TemplateColumn>
                                                             <asp:TemplateColumn >                                                                        
                                                                            <ItemStyle HorizontalAlign="Left"></ItemStyle>
                                                                            <ItemTemplate>
                                                                                <asp:LinkButton ID="lnkReject" runat="server"  CssClass="lnk" Text="Reject" CommandName="Delete" CommandArgument='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.UserActive").ToString)%>'  CausesValidation="false">
                                                                                </asp:LinkButton>
                                                                            </ItemTemplate>
                                                                  </asp:TemplateColumn>
                                                            <asp:TemplateColumn HeaderText="UserId">
                                                                <ItemStyle Wrap="False" HorizontalAlign="Left"></ItemStyle>
                                                                <ItemTemplate>
                                                                    <asp:Label ID="Label11" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Userid").ToString)%>'>
                                                                    </asp:Label>
                                                                </ItemTemplate>
                                                                <FooterTemplate>
                                                                    <asp:TextBox ID="txt_Userid" Visible="False" runat="server"></asp:TextBox>
                                                                </FooterTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:Label ID="userid" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Userid").ToString)%>'
                                                                        runat="server">
                                                                    </asp:Label>
                                                                </EditItemTemplate>
                                                            </asp:TemplateColumn>
                                                            <asp:TemplateColumn HeaderText="Login Name">
                                                                <ItemStyle Wrap="False" HorizontalAlign="Left"></ItemStyle>
                                                                <ItemTemplate>
                                                                    <asp:Label ID="Label12" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.UserHostName").ToString)%>'>
                                                                    </asp:Label>
                                                                </ItemTemplate>
                                                                <FooterTemplate>
                                                                    <asp:TextBox ID="txt_LoginName" runat="server" Visible="False"></asp:TextBox>
                                                                </FooterTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:TextBox ID="Textbox7" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.UserHostName").ToString)%>'>
                                                                    </asp:TextBox>
                                                                </EditItemTemplate>
                                                            </asp:TemplateColumn>
                                                            <asp:TemplateColumn HeaderText="External ID">
                                                                <ItemStyle Wrap="False" HorizontalAlign="Left"></ItemStyle>
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblExternal_id" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.ExternalUserID").ToString)%>'>
                                                                    </asp:Label>
                                                                </ItemTemplate>
                                                                <FooterTemplate>
                                                                    <asp:TextBox ID="txt_ExternalID" Visible="False" runat="server"></asp:TextBox>
                                                                </FooterTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:TextBox ID="txtExternalid" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.ExternalUserID").ToString)%>'
                                                                        runat="server">
                                                                    </asp:TextBox>
                                                                </EditItemTemplate>
                                                            </asp:TemplateColumn>
                                                            <asp:TemplateColumn HeaderText="Primary Email Address">
                                                                <ItemStyle Wrap="False" HorizontalAlign="Left"></ItemStyle>
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblPrimaryEmailAddress" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.PrimaryEmailAddress").ToString)%>'>
                                                                    </asp:Label>
                                                                </ItemTemplate>
                                                                <FooterTemplate>
                                                                    <asp:TextBox ID="txt_PrimaryEmailAddress" Visible="False" runat="server"></asp:TextBox>
                                                                </FooterTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:TextBox ID="txtPrimaryEmailAddress" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.PrimaryEmailAddress").ToString)%>'
                                                                        runat="server">
                                                                    </asp:TextBox>
                                                                </EditItemTemplate>
                                                            </asp:TemplateColumn>
                                                              <asp:TemplateColumn HeaderText="Primary Phone Number">
                                                                <ItemStyle Wrap="False" HorizontalAlign="Left"></ItemStyle>
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblPrimaryPhoneNumber" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.PrimaryPhoneNumber").ToString)%>'>
                                                                    </asp:Label>
                                                                </ItemTemplate>
                                                                <FooterTemplate>
                                                                    <asp:TextBox ID="txt_PrimaryPhoneNumber" Visible="False" runat="server"></asp:TextBox>
                                                                </FooterTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:TextBox ID="txtPrimaryPhoneNumber" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.PrimaryPhoneNumber").ToString)%>'
                                                                        runat="server">
                                                                    </asp:TextBox>
                                                                </EditItemTemplate>
                                                            </asp:TemplateColumn>
                                                             <asp:TemplateColumn HeaderText="Secondary Email Address" Visible="false">
                                                                <ItemStyle Wrap="False" HorizontalAlign="Left"></ItemStyle>
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblSecondaryEmailAddress" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.SecondaryEmailAddress").ToString)%>'>
                                                                    </asp:Label>
                                                                </ItemTemplate>
                                                                <FooterTemplate>
                                                                    <asp:TextBox ID="txt_SecondaryEmailAddress" Visible="False" runat="server"></asp:TextBox>
                                                                </FooterTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:TextBox ID="txtSecondaryEmailAddress" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.SecondaryEmailAddress").ToString)%>'
                                                                        runat="server">
                                                                    </asp:TextBox>
                                                                </EditItemTemplate>
                                                            </asp:TemplateColumn>
                                                             <asp:TemplateColumn HeaderText="Secondary Phone Number" Visible="false">
                                                                <ItemStyle Wrap="False" HorizontalAlign="Left"></ItemStyle>
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblSecondaryPhoneNumber" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.SecondaryPhoneNumber").ToString)%>'>
                                                                    </asp:Label>
                                                                </ItemTemplate>
                                                                <FooterTemplate>
                                                                    <asp:TextBox ID="txt_SecondaryPhoneNumber" Visible="False" runat="server"></asp:TextBox>
                                                                </FooterTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:TextBox ID="txtSecondaryPhoneNumber" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.SecondaryPhoneNumber").ToString)%>'
                                                                        runat="server">
                                                                    </asp:TextBox>
                                                                </EditItemTemplate>
                                                            </asp:TemplateColumn>
                                                            <asp:TemplateColumn HeaderText="Status">
                                                                  <ItemStyle HorizontalAlign="center"></ItemStyle>
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblLoginStatus" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.UserStatus").ToString)%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:TextBox runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.UserStatus").ToString)%>'></asp:TextBox>
                                                                </EditItemTemplate>
                                                            </asp:TemplateColumn>
                                                             <asp:TemplateColumn HeaderText="Status Reason">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblStatusReason" runat="server" Width="20px" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.UserStatusReason").ToString)%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:TextBox ID="txtStatusReason" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.UserStatusReason").ToString)%>'></asp:TextBox>
                                                                </EditItemTemplate>
                                                            </asp:TemplateColumn>
                                                             <asp:TemplateColumn HeaderText="Login AD Domain">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblLoginDomain" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.UserDomainName").ToString)%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:TextBox ID="txtLoginDomain" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.UserDomainName").ToString)%>'></asp:TextBox>
                                                                </EditItemTemplate>
                                                            </asp:TemplateColumn>
                                                            	<%--<ManasiA(24-Nov-2021) || Jira : HSBCELIINT-200 || Added header name>--%>
                                                            <asp:TemplateColumn HeaderText="Active" ItemStyle-HorizontalAlign="Center">
                                                                <ItemTemplate>
                                                                    <asp:CheckBox ID="chk" OnCheckedChanged="CheckBox1_CheckedChanged" runat="server"
                                                                        Checked='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.UserActive").ToString)%>' AutoPostBack="True">
                                                                    </asp:CheckBox>
                                                                </ItemTemplate>
                                                            </asp:TemplateColumn>     
                                                            	 	<%--<ManasiA(21-May-2021) || Jira : BBVACLI-31 || Asked By : Sijo G || For User wise MFA feature>--%>
																		
                                                            <asp:TemplateColumn HeaderText="MFA Required" ItemStyle-HorizontalAlign="Center" Visible="false">
                                                                <ItemTemplate>
                                                                    <asp:CheckBox ID="chkMFA" runat="server" Enabled="false" Checked='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.MFARequired"))%>'></asp:CheckBox>
                                                                </ItemTemplate>
                                                            </asp:TemplateColumn>
	<%--<ManasiA(21-May-2021) || Jira : BBVACLI-31 || Asked By : Sijo G || For User wise MFA feature>--%>
                                                            <asp:BoundColumn HeaderText="Created At"></asp:BoundColumn>
                                                            <asp:BoundColumn HeaderText="Created By"></asp:BoundColumn>
                                                             <asp:TemplateColumn HeaderText="Table Flag" Visible="false" HeaderStyle-HorizontalAlign="Center">
                                                                            <ItemStyle Wrap="False" HorizontalAlign="Left"></ItemStyle>
                                                                            <ItemTemplate>
                                                                                <asp:Label runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.TableFlag").ToString)%>'
                                                                                    ID="UserTableFlag">
                                                                                </asp:Label>
                                                                            </ItemTemplate>                                                                           
                                                              </asp:TemplateColumn>
                                                             <asp:TemplateColumn HeaderText="Create RM" ItemStyle-HorizontalAlign="Center">
                                                                <ItemTemplate>
                                                                   
                                                                       <asp:CheckBox ID="chkRM" runat="server" Checked='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AutoCreateRM").ToString)%>' AutoPostBack="True" enabled="false">
                                                              
                                                                      </asp:CheckBox>
                                                                    
                                                                  
                                                                 </ItemTemplate>

                                                                <EditItemTemplate>
                                                                    <asp:TextBox ID="txtAutoCreateRM" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.AutoCreateRM").ToString)%>'></asp:TextBox>
                                                                </EditItemTemplate>
                                                            </asp:TemplateColumn>

                                                              <asp:TemplateColumn HeaderText="Department Name">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblDepartmentName" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.DepartmentName").ToString)%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:TextBox ID="txtDepartmentName" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.DepartmentName").ToString)%>'></asp:TextBox>
                                                                </EditItemTemplate>
                                                            </asp:TemplateColumn>
                                                   
												   														

                                                            <%--  Synced this change on 27-Apr-2022 for BBVA SOLAR. [BEGIN: Sijo.P.George (01-Mar-2022): (JIRA: FPTDCINT - 836) Added Region column in the user grid to show readonly value] --%>
                                                            <asp:TemplateColumn HeaderText="Region">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblRegion" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Region").ToString)%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:TextBox ID="lblRegion" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Region").ToString)%>'></asp:TextBox>
                                                                </EditItemTemplate>
                                                            </asp:TemplateColumn>
                                                            <%--  Synced this change on 27-Apr-2022 for BBVA SOLAR. [END: Sijo.P.George (01-Mar-2022): (JIRA: FPTDCINT - 836) Added Region column in the user grid to show readonly value] --%>
                                                        </Columns>
                                                        <PagerStyle CssClass="DataGrid1Pager" Mode="NumericPages"></PagerStyle>
                                                    </asp:DataGrid>
													 <%-- ManasiA || 18-June-2021 || Added flag for bulk user authorisation functionality --%>	
                                                    <asp:HiddenField ID="hdnAuthorisationFlag" runat="server" Value="" />
                                                     <asp:HiddenField ID="hdnUseMakerCheckerForNewUserCreation" runat="server" Value="" />
                                                     <asp:HiddenField ID="hdnAllowBulkUserAuthorisationInLSS" runat="server" Value="" />
                                                   
                                                </div>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
