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


<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="Server">
     <script type="text/javascript">
        //<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:ScriptManagerProxy ID="ScriptManagerProxy" runat="server">
    </asp:ScriptManagerProxy>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>

            <table>

                <tr>
                    <td>
                        <asp:Label ID="lblerror" CssClass="lblerror" runat="server"></asp:Label>
                        <asp:Label ID="lblInfo" CssClass="lblInfo" runat="server"></asp:Label>
                    </td>
                </tr>
            </table>
            <table style="margin-top:10px">

                <tr>
                    <td style="width: 40px">
                        <asp:Label ID="lblEntity" Text="Entity" CssClass="lbl" runat="server"></asp:Label>
                    </td>
                    <td style="width: 180px">
                        <asp:DropDownList ID="lstEntityName" runat="server" AutoPostBack="True" TabIndex="1"
                            CssClass="ddl" Width="160px">
                        </asp:DropDownList>
                    </td>
                    <td style="width: 45px">
                        <asp:Label ID="lblSelect" runat="server" CssClass="lbl" Text="Select"></asp:Label>

                    </td>
                    <td>
                        <asp:DropDownList ID="ddlGroupName" runat="server" AutoPostBack="true" CssClass="ddl" Width="60px">
                            <asp:ListItem Value="ALL"></asp:ListItem>
                            <asp:ListItem Value="User"></asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td style="width: 180px">
                        <asp:TextBox ID="txtsearch" runat="server" Width="160px" onkeydown="EnterKeyOnSearch(event)"></asp:TextBox>
                    </td>
                    <td>
                        <asp:Button ID="btnLoad" runat="server" CssClass="btn" Text="Load"
                            Width="80px" />
                    </td>
 <%--ManasiA || 15-Apr-2021 || Export to excel icon and layout changes--%>
                    <td style="width:70px">
                        <%--<asp:Button ID="btnExcel" runat="server" CssClass="btn" Text="Export To Excel" Width="100px" />--%>
                         <asp:Button ID="btnExcel" runat="server" CssClass="btnExcel" ToolTip="Export To Excel" /> 
                    </td>


                    <td class="lbl">Page Count 
                    </td>
                    <td style="width:50px">
                        <asp:TextBox ID="txtpagecount" runat="server" Width="35px" Text="10" AutoPostBack="true" MaxLength="3"></asp:TextBox>
                    </td>

                    <td>
                        <asp:Label ID="Label2" runat="server">Total Records :</asp:Label>
                        <asp:Label ID="lblTotalRecords" runat="server"></asp:Label>
                    </td>
                </tr>
            </table>
          
            <table style="margin-top:15px">
                <tr>
                    <td>
                        <asp:DataGrid ID="dgLoginProfile" runat="server" AutoGenerateColumns="False"
                            AllowPaging="true" CssClass="Grid">
                            <ItemStyle CssClass="GridItem"></ItemStyle>
                            <HeaderStyle ForeColor="Black" CssClass="GridHeader"></HeaderStyle>
                            <Columns>
                                <asp:BoundColumn DataField="GroupName" HeaderText="Group Name">
                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                    <ItemStyle Wrap="False" HorizontalAlign="Left" VerticalAlign="Middle" Width="150px"></ItemStyle>
                                </asp:BoundColumn>
                                <asp:BoundColumn DataField="UserId" HeaderText="User Id">
                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                    <ItemStyle Wrap="False" HorizontalAlign="Left" VerticalAlign="Middle"  Width="150px"></ItemStyle>
                                </asp:BoundColumn>
                                <asp:BoundColumn DataField="UserName" HeaderText="User Name">
                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                    <ItemStyle Wrap="False" HorizontalAlign="Left" VerticalAlign="Middle"  Width="150px"></ItemStyle>
                                </asp:BoundColumn>

                            </Columns>
                            <PagerStyle HorizontalAlign="Left" CssClass="GridPager" Mode="NumericPages"></PagerStyle>
                        </asp:DataGrid>
                    </td>
                </tr>
            </table>

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