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

<%@ Register Src="../FinIQ_User_Controls/DateControl.ascx" TagName="DateControl"
    TagPrefix="uc1" %>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
    </asp:ScriptManagerProxy>
   <script>
    function EnterKeyOnSearch(evt) {
            var code = (evt.which) ? evt.which : evt.keyCode;

            if (code == 13 || code == 9) {
                document.getElementById('<%=btnLoad.ClientID%>').click();
            }
       }
       /*<START> <Added by Suraj J || 04-Oct-2021 || HLBINT-620 || To allow alpha numeric values only> */
       function AllowAlphaNumeric(e) {
           var keycode;
           if (window.event)
               keycode = window.event.keyCode;
           else if (event)
               keycode = event.keyCode;
           else if (e)
               keycode = e.which;
           else return true;

           if ((keycode > 47 && keycode < 58) || (keycode > 64 && keycode < 91) || (keycode > 96 && keycode < 123) ) {
               return true;
           }
           else {
               return false;
           }
           return true;
       }
       /*<END> <Added by Suraj J || 04-Oct-2021 || HLBINT-620 || To allow alpha numeric values only> */
   </script>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <%--Modified on 21-May-2020 || ManasiA || RHB upgrade || Removed unnecessary attributes and layout changes --%>


            <table>

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

                <tr>
                    <%--'Added by Prachi karnewar on 13-Oct-2019--%>
                    <td style="width:75px">
                        <asp:Label ID="lblEntity" Text="Select Entity" CssClass="lbl" runat="server"></asp:Label>
                    </td>
                    <td style="width:160px">
                        <asp:DropDownList ID="lstEntityName" runat="server" AutoPostBack="True" TabIndex="1"
                            CssClass="ddl" Width="150px">
                        </asp:DropDownList>
                    </td>
                    <%--'Added by Prachi karnewar on 13-Oct-2019--%>
                    <td style="width:40px" class="lbl">Select</td>
                    <td>
                        <asp:DropDownList ID="ddlGroupName" runat="server" Width="80" CssClass="ddl" AutoPostBack="true">
                            <asp:ListItem Value="ALL"></asp:ListItem>
                            <asp:ListItem Value="Group"></asp:ListItem>
                            <asp:ListItem Value="User"></asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td style="width:165px">
                        <%--<Added by Suraj J || 04-OCT-2021 || HLBINT-620 || To allow alpha numeric values only>--%>
                        <asp:TextBox ID="txtname" runat="server" Style="padding-bottom: 3px;" Width="150px" CssClass="txt" MaxLength="30" AutoPostBack="true" onkeypress="return AllowAlphaNumeric();" onkeydown="EnterKeyOnSearch(event)"></asp:TextBox>
                    </td>
                    <td style="width:110px">
                        <asp:DropDownList ID="ddlActive" CssClass="ddl" runat="server" AutoPostBack="true" width="90px">
                            <asp:ListItem Value="Active" Text="Active"></asp:ListItem>
                            <asp:ListItem Value="Deactive" Text="Deactive"></asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <%--<td>
                                                <asp:Label ID="lblfrom" runat="server" CssClass="lbl" Text="From"></asp:Label>
                                            </td>
                                            <td>
                                                <uc1:DateControl ID="txtfromdate" runat="server" CalenderCss="btn1" TextBoxCss="txt" />
                                            </td>
                                            <td>
                                                <asp:Label ID="lblTo" runat="server" CssClass="lbl" Text="To"></asp:Label>
                                            </td>
                                            <td>
                                                <uc1:DateControl ID="txttodate" runat="server" CalenderCss="btn1" TextBoxCss="txt" />
                                            </td>
                                            <td> commented as per UOB not needed/not present in query on 20-9-16--%>
                    <td>
                        <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="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>
                        <asp:TextBox ID="txtpagecount" runat="server" Width="35px" Text="10" MaxLength="3" AutoPostBack="true"></asp:TextBox>
                    </td>
                    <td style="padding-left: 10px">
                        <asp:Label ID="Label2" runat="server" CssClass="lbl">Total Records :</asp:Label>
                        <asp:Label ID="lblTotalRecords" runat="server" CssClass="lbl"></asp:Label></td>
                </tr>

            </table>
          
            <table style="margin-top:15px">
                <tr>
                    <td>
                        <asp:DataGrid ID="DgApplicationProfileG" runat="server" AutoGenerateColumns="False"
                            CellPadding="0" AllowPaging="True" CssClass="Grid CssGridBorder">
                            <ItemStyle CssClass="grid"></ItemStyle>
                            <SelectedItemStyle CssClass="GridItemSelect" />
                            <ItemStyle CssClass="GridItem" />
                            <HeaderStyle CssClass="GridHeaderTitle" />
                            <FooterStyle CssClass="GridFooter" />
                            <PagerStyle CssClass="GridPager" />
                            <Columns>
                                <%--Column : 0 --%>
                                <asp:BoundColumn DataField="LoginID" HeaderText="Login User ID">
                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                    <ItemStyle Wrap="False" HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                                </asp:BoundColumn>
                                <%--Column : 1 --%>
                                <asp:BoundColumn DataField="LoginName" HeaderText="Login User Name">
                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                    <ItemStyle Wrap="False" HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                                </asp:BoundColumn>
                                <%--Column : 2 --%>
                                <asp:BoundColumn DataField="Department" HeaderText="Department" Visible="false">
                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                    <ItemStyle Wrap="True" HorizontalAlign="Center" VerticalAlign="Middle"></ItemStyle>
                                </asp:BoundColumn>
                                <%--Column : 3 --%>
                                <asp:BoundColumn DataField="Status" HeaderText="Status" Visible="false">
                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                    <ItemStyle Wrap="True" HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                                </asp:BoundColumn>
                                <%--Column : 4 --%>
                                <asp:BoundColumn DataField="Customer_Segment_group" HeaderText="Customer Segment" Visible="false">
                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                    <ItemStyle Wrap="True" HorizontalAlign="Center" VerticalAlign="Middle"></ItemStyle>
                                </asp:BoundColumn>
                                <%-- <asp:BoundColumn DataField="Staff_Indicator" HeaderText="Staff Indicators"  Visible ="false">
                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                    <ItemStyle Wrap="True" HorizontalAlign="Left" VerticalAlign="Middle" ></ItemStyle>
                                </asp:BoundColumn>--%>
                                <%--  <asp:BoundColumn DataField="DeptName" HeaderText="Department Name">
                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                    <ItemStyle Wrap="False" HorizontalAlign="Left" VerticalAlign="Middle" Width="120px"></ItemStyle>
                                </asp:BoundColumn>--%>
                                <%--Column : 5 --%>
                                <asp:BoundColumn DataField="GroupID" HeaderText="Login User Group">
                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                    <ItemStyle Wrap="False" HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                                </asp:BoundColumn>
                                <%--Column : 6 --%>
                                <asp:BoundColumn DataField="LoginGroupDescription" HeaderText="Login Group Description">
                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                    <ItemStyle Wrap="False" HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                                </asp:BoundColumn>
                                <%--Column : 7 --%>
                                <asp:BoundColumn DataField="BranchNames" HeaderText="Branch Names">
                                    <HeaderStyle HorizontalAlign="Left" VerticalAlign="Middle"></HeaderStyle>
                                    <ItemStyle Wrap="True" HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                                </asp:BoundColumn>
                                <%--Column : 8 --%>
                                <asp:BoundColumn DataField="LoginStatus" HeaderText="User Login Status">
                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                    <ItemStyle Wrap="True" HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                                </asp:BoundColumn>
                                <%--Column : 9 --%>
                                <asp:BoundColumn DataField="AuthorisationStatus" HeaderText="User Authorisation Status">
                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                    <ItemStyle Wrap="True" HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                                </asp:BoundColumn>
                                <%--Column : 10 --%>
                                <asp:BoundColumn DataField="DeactivationReason" HeaderText="User Status Remarks">
                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                    <ItemStyle Wrap="True" HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                                </asp:BoundColumn>
                                <%--Column : 11 --%>
                                <asp:BoundColumn DataField="CreatedAt" HeaderText="Creation Date">
                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                    <ItemStyle Wrap="True" HorizontalAlign="Center" VerticalAlign="Middle" ></ItemStyle>
                                </asp:BoundColumn>
                                <%--Column : 12 --%>
                                <asp:BoundColumn DataField="LastLoginDate" HeaderText="Last Login Date">
                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                    <ItemStyle Wrap="True" HorizontalAlign="Center" VerticalAlign="Middle"></ItemStyle>
                                </asp:BoundColumn>
                                 <%--Column : 13 --%>
                                <asp:BoundColumn DataField="External_ID" HeaderText="External ID">
                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                    <ItemStyle Wrap="True" HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                                </asp:BoundColumn>
                            </Columns>
                            <PagerStyle Mode="NumericPages"></PagerStyle>
                        </asp:DataGrid>
                    </td>
                </tr>
            </table>
               
                <asp:TextBox ID="txt_All" runat="server" Visible="False"></asp:TextBox>
        </ContentTemplate>
        <Triggers>
            <asp:PostBackTrigger ControlID="btnExcel" />
        </Triggers>
    </asp:UpdatePanel>
</asp:Content>

