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

<%--<%@ Register Src="~/FinIQ_User_Controls/FinIQ_EntityCombo.ascx" TagName="FinIQ_EntityCombo" TagPrefix="ucEntity" %>--%>

<asp:Content ID="cont" ContentPlaceHolderID="MainContent" runat="server">
    <%--Added by Aayushi on 17-Jan-2018--%>
    <script>
        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 || code == 9) {
                document.getElementById('<%=btnSetPageSize.ClientID%>').click();
            }
        }
        //<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('<%=btn.ClientID%>').click();
            }
        }
        //</Added by Suraj Jaigude || 11-Apr-2020 || RHBUPINT-554 || search work on enter/tab out>
    </script>
    <asp:ScriptManagerProxy ID="ScriptManagerProxy11" runat="server">
    </asp:ScriptManagerProxy>
    <asp:UpdatePanel ID="UpdatePanelCP" runat="server">
        <ContentTemplate>
            <%--Modified on 08-May-2020 || ManasiA || RHB upgrade || Removed unnecessary attributes and layout changes --%>
            <asp:HiddenField ID="hdnSortOrder" runat="server" />
            <table>
                <tr>
                    <td>
                        <asp:Label ID="lblError" runat="server" CssClass="lblerror"></asp:Label>
                        <asp:Label ID="lblInfo" runat="server" CssClass="lblinfo"></asp:Label>      <%--Added by Aayushi on 07-Jun-2018 on HLBUP-458--%>
                    
                    </td>
                </tr>
            </table>
            <table style="margin-top:10px">
                
                <tr>
                  
                    <%-- <td>
                         <%--Added by Aayushi on 09-May-2018--%>
<%-- <ucEntity:FinIQ_EntityCombo ID="entityCombo" runat="server" AddALLInEntityList="True" />
                    </td>--%>
                      <%--'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" CssClass="ddl" AutoPostBack="true" Width="60px">
                            <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">
                        <asp:TextBox ID="txtname" CssClass="txt" runat="server" Width="150px" ondragstart="return false;" ondrop="return false;" onpaste="return false" oncut="return false" oncopy="return false" onkeypress="return DisAllowSpecialChar();" MaxLength="50" onkeydown="EnterKeyOnSearch(event)"></asp:TextBox>
                    </td>
                    <td class="lbl" style="">Inactive Days
                    </td>
                    <td style="width:70px">
                        <asp:TextBox ID="txtInActiveDays" runat="server" Width="50px" onkeypress="return isNumberKey(event)" MaxLength="4" onkeydown="EnterKeyOnSearch(event)">90</asp:TextBox>
                    </td>
                    <td>
                        <asp:Button ID="btn" runat="server" CssClass="btn" Text="Load" Width="80px"></asp:Button>
                    </td>
					 <%--ManasiA || 15-Apr-2021 || Export to excel icon and layout changes--%>
                    <td  style="width:70px">
                        <%--<asp:Button ID="btnexcel" runat="server" CssClass="btn" Width="100px" Text="Export To Excel"></asp:Button>--%>
                         <asp:Button ID="btnExcel" runat="server" CssClass="btnExcel" ToolTip="Export To Excel" /> 
                    </td>
                    <td class="lbl" style="">
                        <asp:Label ID="Label2" CssClass="lbl" runat="server" Text="Record(s) Per Page"></asp:Label>
                        <%--<Manasi || 15-May-2020 || RHBUPINT-1137 || changes maxlength 3 to allow 999 records>--%>
                        <asp:TextBox ID="txtpagecount" runat="server" AutoPostBack="true" Width="35px" Text="10" MaxLength="3" Style="margin-left: 5px" oncut="return false" onkeypress="return isNumberKey(event)" onkeydown="EnterKeyEvent(event)"></asp:TextBox>
                        <asp:Button ID="btnSetPageSize" runat="server" Style="display: none" CssClass="rowPerPageMargin"></asp:Button>
                    </td>
                    <td style="padding-left: 10px">
                        <asp:Label ID="Label1" runat="server" CssClass="lbl">Total Record(s)</asp:Label>

                        <asp:Label ID="lbltotalcount" runat="server" CssClass="lbl" Style="margin-left: 5px"></asp:Label>
                    </td>
                  
                </tr>
            </table>
          
            <table style="padding-top:15px">
                <tr>
                    <td>
                        <asp:GridView ID="DgDormantUser" runat="server" AllowPaging="True" AutoGenerateColumns="False" PageSize="10" CssClass="Grid" 
                            AllowSorting="true" ShowHeaderWhenEmpty="true">
                            <SelectedRowStyle CssClass="GridItemSelect" />
                            <RowStyle CssClass="GridItem" />
                            <HeaderStyle CssClass="GridHeader" />
                            <FooterStyle CssClass="GridFooter" />
                            <PagerStyle CssClass="GridPager" />
                            <Columns>
                                <asp:TemplateField HeaderText="Login ID" HeaderStyle-HorizontalAlign="Center" Visible="true">
                                    <HeaderStyle Width="80px" />
                                    <ItemStyle Wrap="true" HorizontalAlign="Left"></ItemStyle>
                                    <ItemTemplate>
                                        <asp:Label runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.LoginID").ToString)%>'
                                            ID="lblLoginID">
                                        </asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Login Name" HeaderStyle-HorizontalAlign="Center" Visible="true">
                                    <HeaderStyle Width="120px" />
                                    <ItemStyle Wrap="true" HorizontalAlign="Left"></ItemStyle>
                                    <ItemTemplate>
                                        <asp:Label runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.LoginName").ToString)%>'
                                            ID="lblLoginName">
                                        </asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                 <asp:TemplateField HeaderText="Group ID" HeaderStyle-HorizontalAlign="Center" Visible="true">
                                    <HeaderStyle Width="80px" />
                                    <ItemStyle Wrap="true" HorizontalAlign="Left"></ItemStyle>
                                    <ItemTemplate>
                                        <asp:Label runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.GroupID").ToString)%>'
                                            ID="lblGroupID">
                                        </asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                 <asp:TemplateField HeaderText="User Role" HeaderStyle-HorizontalAlign="Center" Visible="true">
                                    <HeaderStyle Width="80px" />
                                    <ItemStyle Wrap="true" HorizontalAlign="Left"></ItemStyle>
                                    <ItemTemplate>
                                        <asp:Label runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.UserRole").ToString)%>'
                                            ID="lblUserRole">
                                        </asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Last Login Date" HeaderStyle-HorizontalAlign="Center" Visible="true">
                                    <HeaderStyle Width="180px" />
                                    <ItemStyle Wrap="true" HorizontalAlign="Center"></ItemStyle>
                                    <ItemTemplate>
                                        <asp:Label runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.LastLoginDate").ToString)%>'
                                            ID="lblLastLoginDate">
                                        </asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                  <%--Added by Prachi karnewar on 13-Oct-2019--%>

                                  <asp:TemplateField HeaderText="InActive Days" HeaderStyle-HorizontalAlign="Center" Visible="true">
                                    <HeaderStyle Width="80px" />
                                    <ItemStyle Wrap="true" HorizontalAlign="Center"></ItemStyle>
                                    <ItemTemplate>
                                        <asp:Label runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.InactiveDays").ToString)%>'
                                            ID="lblInactiveDays">
                                        </asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                 <%--Added by Prachi karnewar on 13-Oct-2019--%>

                                <%-- <asp:BoundField DataField="CreatedAt" HeaderText="Created At" SortExpression="CreatedAt">
                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="true" Width="150px"></HeaderStyle>
                                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle"></ItemStyle>
                                </asp:BoundField>--%>

                                <%--<asp:BoundColumn DataField="LoginID" HeaderText="Login ID" SortExpression="LoginID">
                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="true" Width="60px"></HeaderStyle>
                                    <ItemStyle Wrap="False" HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                                </asp:BoundColumn>
                                <asp:BoundColumn DataField="LoginName" HeaderText="Login Name" SortExpression="LoginName">
                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="true" Width="80px"></HeaderStyle>
                                    <ItemStyle Wrap="False" HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                                </asp:BoundColumn>
                                <asp:BoundColumn DataField="GroupID" HeaderText="Group ID" SortExpression="Group">
                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="true" Width="60px"></HeaderStyle>
                                    <ItemStyle Wrap="False" HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                                </asp:BoundColumn>
                                <asp:BoundColumn DataField="UserRole" HeaderText="User Role" SortExpression="UserRole">
                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="true" Width="70px"></HeaderStyle>
                                    <ItemStyle Wrap="False" HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                                </asp:BoundColumn>
                                <asp:BoundColumn DataField="LastLoginDate" HeaderText="Last Login" SortExpression="LastLoginDate">
                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="true" Width="150px"></HeaderStyle>
                                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle"></ItemStyle>
                                </asp:BoundColumn>--%>
                                <%--<asp:BoundColumn DataField="InactiveDays" HeaderText="InActive Days" >
									<HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
									<ItemStyle Wrap="False" HorizontalAlign="Center" VerticalAlign="Middle"></ItemStyle>
								</asp:BoundColumn>--%>
                            </Columns>
                            <PagerStyle CssClass="GridPager"></PagerStyle>
                        </asp:GridView>
                    </td>
                </tr>
            </table>

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