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


<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server"></asp:ScriptManagerProxy>

     <script type="text/javascript">
         function isNumberKey(evt) {
             var charCode = (evt.which) ? evt.which : evt.keyCode;
             if (charCode > 31 && (charCode < 48 || charCode > 57))
                 return false;
             return true;
         }
         //<Added by Suraj Jaigude || 11-Apr-2020 || RHBUPINT-554 || search work on enter/tab out>
         function EnterKeyOnSearch(evt) {
             var code = (evt.which) ? evt.which : evt.keyCode;

             if (code == 13 || code == 9) {
                 document.getElementById('<%=btnLoad.ClientID%>').click();
            }
        }
        //</Added by Suraj Jaigude || 11-Apr-2020 || RHBUPINT-554 || search work on enter/tab out>
    </script>

    <asp:UpdatePanel ID="Updatepanel1" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
              <%--Modified on 08-May-2020 || ManasiA || RHB upgrade || layout changes --%>
 
            <table>
            <%--  <tr>
                    <td>
                        <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1"
                            DisplayAfter="0">
                            <ProgressTemplate>
                                <div style="position: absolute; left: 430px; top: 60px;">
                                    <img alt="Loading" src="../App_Resources/loading.gif" /><span class="lbl">Loading...
                                    </span>
                                </div>
                            </ProgressTemplate>
                        </asp:UpdateProgress>
                    </td>
                </tr>--%>
                 <tr>
                    <td>
                        <asp:Label ID="lblError" runat="server" Text="" CssClass="lblError"> </asp:Label>
                        <asp:Label ID="lblInfo" runat="server" CssClass="lblinfo" Text=""></asp:Label>
                    </td>
                </tr>
            </table>

            <table>
                <tr>
                    <td  style="width:50px" >
                        <asp:Label ID="lblEntity" runat="server" CssClass="lbl" Text="Entity"></asp:Label>
                    </td>
                    <td style="width:170px">
                        <asp:DropDownList ID="ddlEntity" runat="server" CssClass="ddl" Width="150px" TabIndex="1"></asp:DropDownList>
                    </td>
                    <td style="width:35px">
                        <asp:Label ID="lblSelect" runat="server" CssClass="lbl" Text="Select"></asp:Label>
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlSelect" runat="server" CssClass="ddl" Width="100px" TabIndex="1" AutoPostBack="true">
                            <asp:ListItem Text="ALL" Value="ALL"></asp:ListItem>
                            <asp:ListItem Text="Menu Group" Value="Menu Group"></asp:ListItem>
                            <asp:ListItem Text="User" Value="User"></asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td style="width:165px">
                        <asp:TextBox ID="txtName" CssClass="txt" runat="server" Width="150px" onkeydown="EnterKeyOnSearch(event)"></asp:TextBox>
                    </td>
                     <td class="">
                        <asp:Button ID="btnLoad" runat="server" CssClass="btn" Text="Load" Width="80px"  />
                    </td>
                   <td style="width:70px">
				    <%--ManasiA || 15-Apr-2021 || Export to excel icon and layout changes--%>
                        <%--<asp:Button ID="btnExport" runat="server" CssClass="btn" ToolTip="Export To Excel"  Width="100px" Text="Export to Excel" />--%>
                   <asp:Button ID="btnExport" runat="server" CssClass="btnExcel" ToolTip="Export To Excel" /> 
                       </td>
                    <td>
                        <asp:Label ID="lblRowsPerPage" runat="server" CssClass="lbl" Text="Row(s) Per Page"></asp:Label>
                    </td>
                    <td style="width:50px">
                        <%--<Manasi || 18-May-2020 || RHBUPINT-1137 || changes maxlength 3 to allow 999 records>--%>
                        <asp:TextBox ID="txtRowsPerPage" runat="server" CssClass="txt" MaxLength="3" Width="35" AutoPostBack="true" ></asp:TextBox>
                  <%--<ManasiA> || 22-June-2020 || RHBUPINT- ||  --%> 
                        <%--onkeypress="return isNumberKey(event)" onkeydown="return isNumberKey(event)"--%>
                        </td>
                    <td>
                        <asp:Label ID="lblTotalCount" runat="server" CssClass="lbl" Text="Total Record(s) : "></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="lblCount" runat="server" CssClass="lbl"></asp:Label>
                    </td>
                    
                </tr>
                </table>
         
            <table style="margin-top:5px">
                <tr>
                     <asp:GridView ID="gvUserAccessMatrix" runat="server" EnableViewState="true"
                            ShowFooter="false" AutoGenerateColumns="false"
                            CellPadding="4"  Font-Bold="false"
                            GridLines="None"  ShowHeaderWhenEmpty="true" CssClass="Grid" AllowPaging="true">  <%-- Removed color properties from grid by Tejaswini K @30-May-2022 BBVAORINT-435 page numbers not visible in All Black Theme--%>
                            <HeaderStyle CssClass="GridHeader" />
                            <PagerStyle CssClass="GridPager" />
                         <FooterStyle CssClass="GridFooter"></FooterStyle>
                            <RowStyle CssClass="GridItem" />
                            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="false" ForeColor="#333333" />

                            <%--<EmptyDataTemplate>
                                <asp:Label ID="lblqueuedatagrid" runat="server" Text="No data found."></asp:Label>
                            </EmptyDataTemplate>--%>
                            <Columns>
                              <asp:TemplateField HeaderText="Menu Group" Visible="true" SortExpression="MenuGroup">
                                   <HeaderStyle Width="120px" />
                                   <ItemStyle Wrap="true" Width="120px" HorizontalAlign="center" />
                                   <ItemTemplate>
                                       <asp:Label ID="lblMenuGroup" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.MenuGroup").ToString)%>' />
                                   </ItemTemplate>
                               </asp:TemplateField>

                                <asp:TemplateField HeaderText="Login ID" Visible="true" SortExpression="LoginID">
                                   <HeaderStyle Width="120px" />
                                   <ItemStyle Wrap="true" Width="120px" HorizontalAlign="Left" />
                                   <ItemTemplate>
                                       <asp:Label ID="lblLoginID" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.LoginID").ToString)%>' />
                                   </ItemTemplate>
                               </asp:TemplateField>

<%--                                Start - AjinkyaS || 06-Dec-2019 ||--%>
                                <asp:TemplateField HeaderText="Group ID" Visible="false" SortExpression="GroupID" >
                                   <HeaderStyle Width="120px" />
                                   <ItemStyle Wrap="true" Width="120px" HorizontalAlign="Left" />
                                   <ItemTemplate>
                                       <asp:Label ID="lblGroupID" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.GroupID").ToString)%>' />
                                   </ItemTemplate>
                               </asp:TemplateField>
<%--                                End - AjinkyaS || 06-Dec-2019 ||--%>

                                <asp:TemplateField HeaderText="Title / Option" Visible="true" SortExpression="TitleOption">
                                   <HeaderStyle Width="120px" />
                                   <ItemStyle Wrap="true" Width="120px" HorizontalAlign="Left" />
                                   <ItemTemplate>
                                       <asp:Label ID="lblTitleOption" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.TitleOption").ToString)%>' />
                                   </ItemTemplate>
                               </asp:TemplateField>

                                

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

        </ContentTemplate>
         <Triggers>
            <asp:PostBackTrigger ControlID="btnExport" />
        </Triggers>
    </asp:UpdatePanel>
    
</asp:Content>