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

<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="MainContent">
    <style>
        /*Start Added by shubham k on 05-Mar-2021 for UBP*/
        .btn_padding {
            padding-right: 10px !important;
            padding-top: 5px !important;
        }
        /*End Added by shubham k on 05-Mar-2021 for UBP*/
    </style>
    <script type="text/javascript">
        //Start Added by shubham k on 05-Mar-2021 for UBP
        document.onkeyup = function (e) {
            //debugger;
            if (e.ctrlKey && e.key == "r") {
                document.getElementById('<%= btnLoad.ClientID %>').click();
            }
        }

        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) {
                __doPostBack('<%=txtrowsperpage.ClientID%>', 'TextChanged');

            }
        }
        //End Added by shubham k on 05-Mar-2021 for UBP
    </script>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
		<%--  ManasiA || 23-Apr-2021 || Removed unncessary attributes and UI changes || --%>
            <table class="">
               <%-- <tr>
                    <td nowrap class="background_gray">
                        Session Maintenance
                    </td>
                </tr>--%>
                <tr>
                    <td>
                        <asp:Label ID="LblError" runat="server" CssClass="lblerror"></asp:Label>
                        <%--JiraNumber:-UBPINT-393 Added by Shubham K on 05-Mar-2021 for UBP project--%>
                        <asp:Label ID="lblSuccess" runat="server" CssClass="lblSuccess" ></asp:Label>
                        <asp:Label ID="lblInfo" runat="server" CssClass="lblInfo" ></asp:Label>
                    </td>
                </tr>
                </table>
              
                        <table class="" >
                            <tr>
                                <%--<td>--%>
                                   <%-- <table>
                                        <tr>  --%>                                          
                                            <td class="btn_padding"><%--Added by shubham k on 05-Mar-2021--%>
                                                <%--JiraNumber:-UBPINT-393 Added by shubham k on 05-Mar-2021 for UBP, added by width=130px--%>  
                                                <asp:DropDownList ID="ddlActiveInactive" Width="130px" runat="server" AutoPostBack="true" CssClass="ddl">
                                                    <asp:ListItem Value="ALL"></asp:ListItem>
                                                    <asp:ListItem Value="Active Session"></asp:ListItem>
                                                    <asp:ListItem Value="InActive Session"></asp:ListItem>
                                                </asp:DropDownList>
                                            </td>
                                            <td class="btn_padding"><%--Added by shubham k on 05-Mar-2021--%>
                                                <asp:Label ID="Label1" runat="server" CssClass="lbl">Select </asp:Label>
                                            </td>
                                            <td class="btn_padding"><%--Added by shubham k on 05-Mar-2021--%>
                                                 <%--JiraNumber:-UBPINT-393 Added by shubham k on 05-Mar-2021 for UBP, added by width=60px--%> 
                                                <asp:DropDownList ID="ddlView" Width="60px" runat="server" AutoPostBack="true" CssClass="ddl">
                                                    <asp:ListItem Value="ALL"></asp:ListItem>
                                                    <asp:ListItem Value="Group"></asp:ListItem>
                                                    <asp:ListItem Value="User"></asp:ListItem>
                                                </asp:DropDownList>
                                            </td>

                                            <td class="btn_padding"><%--Added by shubham k on 05-Mar-2021--%>
                                                <asp:TextBox ID="txtSearch" runat="server" CssClass="txt"></asp:TextBox>
                                            </td>
                                            <td class="btn_padding"><%--Added by shubham k on 05-Mar-2021--%>
                                                <asp:Button ID="btnLoad" runat="server" CssClass="btn"  Width="100px" Text="Load" ToolTip="Load (ctrl + r)"></asp:Button></td>
                                            <asp:Button ID="Button1" runat="server" CssClass="btn" Visible="False" Height="24px" Width="104px" Text="Login Details"></asp:Button>
                                            <asp:Button ID="Button2" runat="server" CssClass="btn" Visible="False" Height="24px" Width="110px" Text="Default Config"></asp:Button>
                                            <asp:Button ID="Button3" runat="server" CssClass="btn" Visible="False" Height="24px" Width="110px" Text="Config Setting"></asp:Button>

                                            <td class="btn_padding"><%--Added by shubham k on 05-Mar-2021--%>
                                                <asp:Button ID="btnDel" runat="server" Text="Clear Session" CssClass="btn" Width="100px"></asp:Button>
                                            </td>
                                            <%--Start Added by shubham k on 05-Mar-2021--%>
                                            <td class="btn_padding">                                  
                                                <asp:Label ID="lblRowsPerPage" runat="server" Text="Record(s) per page: "/>
                                                <asp:TextBox ID="txtRowsPerPage" runat="server" Text="" Width="40px"  Style="text-align:center;" AutoPostBack="true" MaxLength="3" onkeydown="EnterKeyEvent(event)" onkeypress="return isNumberKey(event)" />
                                            </td>
                                            <td class="btn_padding">
                                                <asp:Label ID="lblCountRow" runat="server" CssClass="lbl" Text="Total Record(s): "></asp:Label>
                                                <asp:Label ID="lblRowCountPrint" CssClass="lbl" runat="server" Text=""></asp:Label>
                                            </td>
                                            <%--End Added by shubham k on 05-Mar-2021--%>
                                        </tr>
                                    </table>
                         
                               
                           <%-- </tr>
                        </table>
                                    </td>--%>
                         <table style="margin-top:20px">

                            <tr>
                                <td valign="top" colspan="3">
                                    <asp:DataGrid ID="DGR_Login" runat="server" AllowSorting="True" AutoGenerateColumns="False" BorderStyle="Solid" CellPadding="3" CssClass="Grid" 
                                        AllowPaging="true" PageSize="10">
                                        <SelectedItemStyle CssClass="GridItemSelect" />
                                        <ItemStyle CssClass="GridItem" />
                                        <HeaderStyle CssClass="GridHeader" />
                                        <FooterStyle CssClass="GridFooter" />
                                        <PagerStyle CssClass="GridPager" />
                                        <Columns>
                                            <asp:TemplateColumn>
                                                <HeaderStyle Width="17px"></HeaderStyle>
                                                <ItemTemplate>
                                                    <asp:CheckBox ID="chkAppId" runat="server"></asp:CheckBox>
                                                </ItemTemplate>
                                            </asp:TemplateColumn>
                                            <asp:BoundColumn DataField="GroupID" SortExpression="GroupID" HeaderText="Group ID">
                                                <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                                <ItemStyle Wrap="False" HorizontalAlign="Left"></ItemStyle>
                                            </asp:BoundColumn>
                                           <%-- <asp:BoundColumn DataField="UserID"  SortExpression="UserID" HeaderText="Group ">
                                                <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                                <ItemStyle Wrap="False"></ItemStyle>                                                
                                            </asp:BoundColumn>--%>
                                            <asp:TemplateColumn HeaderText="Login ID">
                                                                            <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                                                            <ItemStyle Wrap="False" HorizontalAlign="Center"></ItemStyle>
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="Label1" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.UserID").ToString)%>'
                                                                                    NAME="Label1">
                                                                                </asp:Label>
                                                                            </ItemTemplate>
                                            </asp:TemplateColumn>
                                            <asp:TemplateColumn HeaderText="External Id ">
                                                                            <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                                                            <ItemStyle Wrap="False" HorizontalAlign="Center"></ItemStyle>
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="lblExternalid" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.ExternalUserID").ToString)%>'
                                                                                    NAME="lblExternalid">
                                                                                </asp:Label>
                                                                            </ItemTemplate>
                                            </asp:TemplateColumn>
                                            <%--asp:BoundColumn DataField="LoginTime" SortExpression="LoginTime" HeaderText="Login Time">
                                                <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                                <ItemStyle Wrap="False" HorizontalAlign="Left"></ItemStyle>
                                            </asp:BoundColumn>--%>
                                            <asp:TemplateColumn HeaderText="Login Time">
                                                                            <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                                                            <ItemStyle Wrap="False" HorizontalAlign="Center"></ItemStyle>
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="lblLoginTime" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.LoginTime").ToString)%>'
                                                                                    NAME="lblLoginTime">
                                                                                </asp:Label>
                                                                            </ItemTemplate>
                                            </asp:TemplateColumn>
                                           <%-- <asp:BoundColumn DataField="LogOutTime" SortExpression="LogOutTime" HeaderText="Logout Time">
                                                <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                                <ItemStyle Wrap="False" HorizontalAlign="Left"></ItemStyle>
                                            </asp:BoundColumn>--%>
                                             <asp:TemplateColumn HeaderText="Logout Time">
                                                                            <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                                                            <ItemStyle Wrap="False" HorizontalAlign="Center"></ItemStyle>
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="lblLogoutTime" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.LogOutTime").ToString)%>'
                                                                                    NAME="lblLogoutTime">
                                                                                </asp:Label>
                                                                            </ItemTemplate>
                                            </asp:TemplateColumn>
                                            <asp:BoundColumn DataField="AppCode" SortExpression="AppCode" HeaderText="App Code">
                                                <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                                <ItemStyle Wrap="False" HorizontalAlign="Left"></ItemStyle>
                                            </asp:BoundColumn>
                                            <asp:BoundColumn DataField="SessionIP" SortExpression="SessionIP" HeaderText="Login Ip">
                                                <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                                <ItemStyle Wrap="False" HorizontalAlign="Left"></ItemStyle>
                                            </asp:BoundColumn>
                                            <asp:BoundColumn DataField="PreviousLoginTime" SortExpression="PreviousLoginTime" HeaderText="Previous Login Time">
                                                <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                                <ItemStyle Wrap="False" HorizontalAlign="Left"></ItemStyle>
                                            </asp:BoundColumn>
                                            <asp:BoundColumn DataField="PreviousLogoutTime" SortExpression="PreviousLogoutTime" HeaderText="Previous Logout Time">
                                                <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                                <ItemStyle Wrap="False" HorizontalAlign="Left"></ItemStyle>
                                            </asp:BoundColumn>
                                        </Columns>
                                        <PagerStyle CssClass="GridFooter" HorizontalAlign="Left" Mode="NumericPages" />
                                    </asp:DataGrid><asp:TextBox ID="hdn_order" runat="server" Visible="False">desc</asp:TextBox>&nbsp;
                                    <asp:TextBox ID="hdn_txt" runat="server" Visible="False"> ORDER BY login_time desc</asp:TextBox>
                                </td>
                            </tr>
                        </table>
                 
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
