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

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

    <script language="javascript" type="text/javascript">

        //        function CheckOpt() {
        //            var mUserChecked = window.Form1.optUser.checked;
        //            var mGroupChecked = window.Form1.optGroup.checked;

        //            if (mUserChecked == true) {
        //                document.getElementById("rptLogIn").style.visibility = "visible";
        //            }

        //            if (mGroupChecked == true) {
        //                document.getElementById("cboGroup").style.visibility = "visible";
        //                document.getElementById("rptLogIn").style.visibility = "hidden";
        //            }
        //        }
        //        function CheckOptUser() {
        //            document.getElementById("rptLogIn").style.visibility = "visible";

        //        }
        //        function CheckOptGroup() {
        //            document.getElementById("rptLogIn").style.visibility = "hidden";
        //        }

        function checkAll() {
            for (i = 0; i < document.forms[0].elements.length; i++) {
                elm = document.forms[0].elements[i]

                if (elm.type == 'checkbox') {
                    if (document.getElementById("chk_all").checked == true)
                        elm.checked = true;
                    else
                        elm.checked = false;
                }
            }
        }

        //Start Added on 03-Mar-2021 for UBP
        document.onkeyup = function (e) {
            if (e.ctrlKey && e.key == "r") {
                document.getElementById('<%= btnLoad.ClientID %>').click();
            } else if (e.ctrlKey && e.shiftKey && e.key == "E") {
                document.getElementById('<%= BtnExport.ClientID %>').click();
            }
        }
        //End Added on 03-Mar-2021 for UBP
    </script>
    <style type="text/css">
        /*UBPINT-393 Start Added on 03-Mar-2021 for UBP*/
		/* ManasiA || 28-Apr-2021 || UBPINT-864 || Application access and authorise UI sync changes */
       .Grid {
           table-layout: fixed;
       }     
       .Grid th, .Grid td {
         
             word-wrap:break-word;
       }
        .tdOne {
            width: 110px;
        }

        .tdTwo {
            width: 60px;
        }

        .tdThree {
            width: 156px;
        }

        .tdFour {
            width: 186px;
        }

        .tdSix {
            width: 100px;
        }

        .tdSeven {
            width: 50px;
        }

        .tdThirteen {
            width: 80px;
        }
       /*End Added on 03-Mar-2021 for UBP*/
    </style>

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
	<%-- ManasiA || 28-Apr-2021 || UBPINT-864 || Application access and authorise UI sync changes --%>
           <table class="" width="100%">
                <tr>
                    <td>
                        <table class="" width="100%">
                    <%--<td nowrap="nowrap" class="background_gray">
                        Application Authorise
                    </td>--%>
                
                <tr>
                    <td>
                        <asp:Label ID="LblError" runat="server" CssClass="lblerror"></asp:Label>
                        <asp:Label ID="lblSuccess" runat="server" CssClass="lblSuccess" ></asp:Label>
                        <asp:Label ID="lblInfo" runat="server" CssClass="lblInfo" ></asp:Label>
                    </td>
                </tr>
                            <tr>
                                <td>
                                     <table width="100%">
                                         <tr>
                                            <td>
                                                <table>
                                        <tr>
                                               <td class="tdOne">
                                                     <asp:DropDownList ID="ddlGroupUser" runat="server" AutoPostBack="true">
                                                                <asp:ListItem Text="Group" Value="Group" Selected="True"></asp:ListItem>
                                                                <asp:ListItem Text="User" Value="User"></asp:ListItem>
                                                        </asp:DropDownList>
                                               </td>
                                            <td class="tdTwo">
                                                <asp:Label ID="lblFilter" runat="server" Text="Select" CssClass="lbl"></asp:Label>
                                            </td>
                                            <td class="tdThree">
                                                <asp:DropDownList ID="ddlList" runat="server"  AutoPostBack="true" Width="150px">
                                                    <asp:ListItem Text="ALL" Value="ALL" Selected="True"></asp:ListItem>
                                                    <asp:ListItem Text="Application ID" Value="Application ID"></asp:ListItem>
                                                    <asp:ListItem Text="Application Name" Value="Application Name"></asp:ListItem>
                                                    <asp:ListItem Text="Tab Name" Value="Tab Name"></asp:ListItem>
                                                </asp:DropDownList>
                                            </td>
                                            <td class="tdFour">
                                                <asp:TextBox ID="txtFilter" runat="server" CssClass="txt" Width="180px"></asp:TextBox>
                                            </td>
                                           
                                            <td class="tdSix">
                                                  <asp:Button ID="BtnLoad" runat="server" CssClass="btn" Text=" Find " Width="70px" />
                                            </td>
                                           
                                            <td class="tdSeven">
                                                <asp:Button ID="BtnExport" runat="server" Visible="true" CssClass="btnExcel" ToolTip="Export Excel (ctrl + shift + e)" />
                                            </td>
                                            <td class="">
                                                <asp:TextBox ID="TxtGranted" runat="server" BackColor="LightGreen" ReadOnly="true"
                                                    Width="25px" CssClass="txt"></asp:TextBox>
                                            </td>
                                            <td class="">
                                                <asp:Label ID="LblGranted" runat="server" CssClass="lbl" Text="Granted"></asp:Label>
                                            </td>
                                            <td class="">
                                                <asp:TextBox ID="TxtRevoked" runat="server" Width="25px" BackColor="Pink" ReadOnly="true"
                                                    CssClass="txt"></asp:TextBox>
                                            </td>
                                            <td class="">
                                                <asp:Label ID="LblRevoked" runat="server" Text="Revoked" CssClass="lbl"></asp:Label>
                                            </td>
                                            <td class="">
                                                <asp:TextBox ID="TxtPending" runat="server" Width="25px" BackColor="LightBlue" ReadOnly="true"
                                                    CssClass="txt"></asp:TextBox>
                                            </td>
                                            <td class="tdThirteen">
                                                <asp:Label ID="LblPending" runat="server" Text="Pending" CssClass="lbl"></asp:Label>
                                            </td>
                                             <td>
          
                                                            <asp:Label ID="LblName" runat="server" CssClass="lbl">Name : </asp:Label><asp:Label
                                                                ID="LblNameValue" runat="server" CssClass="lbl"></asp:Label>
                                                        </td>
                                                        <td class="">
                                                            <asp:Label ID="lblSpace" Text="     " runat="server"></asp:Label>
                                                        </td>
                                                        <td class="">
                                                        </td>
                                                        <td  class="">
                                                            <asp:Label ID="LblApplicationSelCount" runat="server" CssClass="lbl" Text="Application Sel Count : "></asp:Label>
                                                            <asp:Label ID="LblAppselcountvalue" runat="server" CssClass="lbl"></asp:Label>
                                                        </td>
                                                       
                                        </tr>
                                        <tr>
                                            <td></td>
                                             <td class="">
                                                <asp:Label ID="LblGroup" runat="server" Text="Group" CssClass="lbl"></asp:Label>
                                            </td>
                                            <td class="">
                                                <asp:DropDownList ID="ddlGroup" runat="server" AutoPostBack="True" Width="150px" CssClass="ddl">
                                                </asp:DropDownList>
                                            </td>
                                            <%--<td>
                                                <asp:RadioButtonList ID="rblappaccess" runat="server" AutoPostBack="True" CssClass="RadioBtn" RepeatColumns="2" Enabled="false">
                                                    <asp:ListItem Value="User">User</asp:ListItem>
                                                    <asp:ListItem Value="Group"  Selected="True">Group</asp:ListItem>
                                                </asp:RadioButtonList>
                                            </td>--%>
                                            <td class="">
                                                    <asp:DropDownList ID="ddlCase" Width="180px" runat="server" AutoPostBack="true" CssClass="ddl">
                                                        <asp:ListItem Text="Access Grant Pending"  Value="Access Grant Pending"></asp:ListItem>
                                                        <asp:ListItem Text="Revoke Pending"  Value="Revoke Pending"></asp:ListItem>
                                                        <asp:ListItem Text="Access Granted"  Value="Access Granted"></asp:ListItem>
                                                       
                                                    </asp:DropDownList>
                                            </td>
                                            <td>
                                                <asp:Button ID="BtnUpdate" runat="server" CssClass="btn" Text=" Authorise " Width="70px" />
                                            </td>
                                                    </tr>
                                                    </table>
                                            </td>
                                        </tr>
                                                </table>
                                            
                                </td>
                            </tr>
                         </table>
                     </td>
                    </tr>
               <tr>
                    <td>
                        <table>
                            <tr class="">     
                                <td valign="top">
                                    <asp:Label ID="LblLoginID" runat="server" Text="Login ID" CssClass="lbl"></asp:Label>
                                    <br /> 
								<%-- ManasiA || Width changes as discussed with NetraS || 04-May-2021 || --%>
                                    <asp:ListBox ID="LstLoginID" runat="server" Height="375px" Width="180px" CssClass="lst"
                                        AutoPostBack="true" Enabled="False"></asp:ListBox>
                                </td>
                              
                                <td class="" valign="top">
                                    <br /> 
                                    <% Dim scrollPosURL As String = "ScrollPos.htc"%>
                                    <div style="behavior: url(<%= ResolveURL(scrollPosURL)%>); overflow:auto;height:450px;padding:5px;" class="filter"
                                                    scrollpos="<%= saveScrollPos.Value %>" persistid="<%= saveScrollPos.UniqueID %>">
                                                    <asp:DataGrid ID="dtgAuthorise" runat="server" AllowSorting="True" AutoGenerateColumns="False"
                                                        CellPadding="3" CssClass="Grid" >
                                                        <SelectedItemStyle CssClass="GridItemSelect" />
                                                           <%--  ManasiA || 22-Feb-2021 || UBPINT - 269 || Removed ItemStyle : to apply specific background color to grid || Start || --%>
                                          <%--  <ItemStyle CssClass="GridItem" /> --%>
                                                <%--  ManasiA || 22-Feb-2021 || UBPINT - 269 || Removed ItemStyle : to apply specific background color to grid || End || --%>
                                      
                                                        <HeaderStyle CssClass="GridHeader" />
                                                        <FooterStyle CssClass="GridFooter" />
                                                        <PagerStyle CssClass="GridPager" />
                                       
                                                  <Columns>
                                                <asp:TemplateColumn>
                                                    <HeaderTemplate>
                                                        <input id="chk_all" onclick="checkAll()" type="checkbox">
                                                    </HeaderTemplate>
                                                    <ItemTemplate>
                                                        <asp:CheckBox ID="chk_AppId" runat="server" Enabled="true" Checked='<%#  Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.New_Application_Access")) %>'>
                                                        </asp:CheckBox>
                                                    </ItemTemplate>
                                                </asp:TemplateColumn>
                                                <asp:BoundColumn HeaderText="Sr No." Visible="false">
                                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                                    <ItemStyle Wrap="False" HorizontalAlign="Center" VerticalAlign="Middle"></ItemStyle>
                                                </asp:BoundColumn>
                                                <asp:BoundColumn DataField="AppMisc1" HeaderText="Tab Name" SortExpression="AppMisc1" ItemStyle-Width="150px">
                                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                                                </asp:BoundColumn>
                                                <asp:BoundColumn DataField="ApplicationName" HeaderText="Application Name" SortExpression="ApplicationName" ItemStyle-Width="240px">
                                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                                                </asp:BoundColumn>
                                                <asp:BoundColumn DataField="ApplicationID" HeaderText="Application Id" SortExpression="ApplicationID" ItemStyle-Width="200px">
                                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                                                </asp:BoundColumn>
                                                <asp:BoundColumn DataField="ApplicationPath" HeaderText="Application Path" SortExpression="ApplicationPath" ItemStyle-Width="160px">
                                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                                                </asp:BoundColumn>
                                                <asp:BoundColumn Visible="false" DataField="RegistrationDate" HeaderText="Time Stamp" ItemStyle-Width="200px">
                                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                                                </asp:BoundColumn>
                                                 <asp:BoundColumn Visible="false" DataField="AppDnetVersion" HeaderText="Login AD Domain" ItemStyle-Width="250px">
                                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                                                </asp:BoundColumn>
                                              <%--  <asp:BoundColumn Visible="False" DataField="New_Application_Access" HeaderText="New_Application_Access">
                                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                                                </asp:BoundColumn>
                                                <asp:BoundColumn Visible="False" DataField="Application_Access" HeaderText="Application_Access">
                                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                                                </asp:BoundColumn>
                                                <%--<asp:BoundColumn Visible="False" DataField="Count" HeaderText="Count"></asp:BoundColumn>--%>
                                                <%--<asp:BoundColumn DataField="Createdby" HeaderText="Created By">
                                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle"></ItemStyle>
                                                </asp:BoundColumn>
                                                <asp:BoundColumn DataField="createdat" HeaderText="Created At">
                                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                                                </asp:BoundColumn>
                                                <asp:BoundColumn DataField="Authorisedby" HeaderText="Authorised By">
                                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                                    <ItemStyle Wrap="False" HorizontalAlign="Center" VerticalAlign="Middle"></ItemStyle>
                                                </asp:BoundColumn>
                                                <asp:BoundColumn DataField="AuthorisedAt" HeaderText="Authorised At">
                                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                                    <ItemStyle Wrap="False" HorizontalAlign="Center" VerticalAlign="Middle"></ItemStyle>
                                                </asp:BoundColumn>
                                                <asp:BoundColumn DataField="Revokedby" HeaderText="Revoked By">
                                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                                                </asp:BoundColumn>
                                                <asp:BoundColumn DataField="RevokedAt" HeaderText="Revoked At">
                                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                                                </asp:BoundColumn>
                                                <asp:BoundColumn DataField="RevokeAutby" HeaderText="RevokeAut By">
                                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                                                </asp:BoundColumn>
                                                <asp:BoundColumn DataField="RevokeAuthAt" HeaderText="RevokeAuth At">
                                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                                                </asp:BoundColumn>--%>
                                            </Columns>
                                            <PagerStyle CssClass="GridFooter" HorizontalAlign="Left" Mode="NumericPages" />
                                        </asp:DataGrid>
                                    </div>
                                    <input id="saveScrollPos" type="hidden" name="saveScrollPos" runat="server" />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </ContentTemplate>
        <Triggers>
            <asp:PostBackTrigger ControlID="BtnExport" />
        </Triggers>
    </asp:UpdatePanel>
</asp:Content>
