<%@ Page Title="" Language="C#" AutoEventWireup="false" MasterPageFile="~/SiteMaster.master"
    CodeBehind="UsersPage.aspx.cs" Inherits="MKinsight.Online.UIServices.UsersPage" %>

<%@ Register Assembly="UIWebControls" Namespace="UIWebControls" TagPrefix="cc4" %>
<%@ Register Src="../UIControls/Header.ascx" TagName="Header" TagPrefix="uc1" %>
<%@ Register Src="../UIControls/MessageBox.ascx" TagName="MessageBox" TagPrefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <script type="text/javascript" src="../scripts/jquery/jquery_min.js"></script>
    <script type="text/javascript" src="../scripts/jquery/jquery.box-min.js"></script>
    <link rel="stylesheet" type="text/css" href="../scripts/jquery/jqbox.css" />

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="c_M" runat="server">
    <uc1:Header ID="u_H" runat="server" />
    <uc2:MessageBox ID="u_M" runat="server" />

    <asp:Panel ID="tbP" runat="server" CssClass="w-bar">

        <asp:LinkButton runat="server" ID="tbl_Users" CssClass="w-button" Style="background: url(../images/user32.png);"
            PostBackUrl="~/Community/UsersPage.aspx">
            <asp:Label ID="tbl_UsersLabel" runat="server"></asp:Label>

        </asp:LinkButton>

        <asp:LinkButton runat="server" ID="tbl_Roles" CssClass="w-button" Style="background: url(../images/role32.png);">
            <asp:Label ID="tbl_RolesLabel" runat="server"></asp:Label>

        </asp:LinkButton>

        <asp:LinkButton runat="server" ID="tbl_UserFlags" CssClass="w-button" Style="background: url(../images/support32.png);"
            PostBackUrl="~/Community/ManageUserTypesPage.aspx">
            <asp:Label ID="tbl_UserFlagsLabel" runat="server"></asp:Label>

        </asp:LinkButton>

      

        <asp:DropDownList ID="drp_U" runat="server" Height="28" Style="border: solid 1px #CCCCCC; background-color: #F7F7F7;"
            AutoPostBack="true">
        </asp:DropDownList>

    </asp:Panel>

    <asp:Panel ID="tbM" runat="server" CssClass="w-bar">

        <asp:LinkButton runat="server" ID="tbl_Import" CssClass="w-button" Style="background: url(../images/import32.png);">
            <asp:Label ID="tbl_ImportLabel" runat="server"></asp:Label>

        </asp:LinkButton>

        <asp:LinkButton runat="server" ID="tbl_ProvisionUsers" CssClass="w-button" Style="background: url(../images/import32.png);">
            <asp:Label ID="tbl_ProvisionUsersLabel" runat="server"></asp:Label>

        </asp:LinkButton>

        <asp:LinkButton runat="server" ID="tbl_ADNew" CssClass="w-button" Style="background: url(../images/add32.png);">
            <asp:Label ID="tbl_ADNewLable" runat="server"></asp:Label>

        </asp:LinkButton>

        <asp:LinkButton runat="server" ID="tbl_New" CssClass="w-button" Style="background: url(../images/add32.png);">
            <asp:Label ID="tbl_NewLabel" runat="server"></asp:Label>

        </asp:LinkButton>

    

        <asp:LinkButton runat="server" ID="tbl_Filter" CssClass="w-button" Style="background: url(../images/filterapply32.png);">
            <asp:Label ID="tbl_FilterLabel" runat="server"></asp:Label>

        </asp:LinkButton>

        <asp:LinkButton runat="server" ID="tbl_FilterRemove" CssClass="w-button" Style="background: url(../images/filterremove32.png);" Visible="false">
            <asp:Label ID="tbl_FilterRemoveLabel" runat="server"></asp:Label>

        </asp:LinkButton>

    </asp:Panel>
    <cc4:MKGridView ID="d_u" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
        BorderStyle="None" CellPadding="3" DataKeyNames="ID" PageSize="20"
        OnRowDataBound="OnRowDataBound" Width="95%">
        <AlternatingRowStyle CssClass="alternatingrowstyle" />
        <FooterStyle BackColor="White" ForeColor="#000066" />
        <HeaderStyle CssClass="headerstyle" Font-Bold="True" HorizontalAlign="Left" Wrap="False" />
        <PagerStyle HorizontalAlign="Left" />
        <Columns>
            <asp:TemplateField ItemStyle-Width="32">
                <ItemTemplate>
                    <img enableviewstate="true" alt="Open in new window" onclick="$.colorbox({ transition: 'none', width: '95%', height: '98%', iframe: true,href:'AddEditUserPage.aspx?id=<%#DataBinder.Eval(Container.DataItem,"Id")%>',onClosed:function(){ window.parent.location.href = window.parent.location.href; } });"
                        src="../images/windows16.png" style="cursor: pointer;" />
                </ItemTemplate>
            </asp:TemplateField>
               <asp:TemplateField ItemStyle-Width="32">
                <ItemTemplate>
                    <img enableviewstate="true" alt="Convert User Type" onclick="$.colorbox({ transition: 'none', width: '95%', height: '98%', iframe: true,href:'NewCredentialsPage.aspx?id=<%#DataBinder.Eval(Container.DataItem,"Id")%>',onClosed:function(){ window.parent.location.href = window.parent.location.href; } });"
                        src="../images/edituser16.png" style="cursor: pointer;" />
                </ItemTemplate>
            </asp:TemplateField>

            <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
            <asp:BoundField DataField="Ref" HeaderText="Ref" SortExpression="Ref" />
            <asp:BoundField DataField="un" HeaderText="User_Name" SortExpression="un" />
            <asp:BoundField DataField="Type" HeaderText="Type" SortExpression="Type" />
        </Columns>
        <PagerTemplate>
            <asp:Label ID="lbl_ShowRows" runat="server" Text="Show rows:" /><asp:DropDownList
                ID="ddlPageSize" runat="server" AutoPostBack="true" OnSelectedIndexChanged="OnSelectedIndexChanged">
                <asp:ListItem Value="20" />
                <asp:ListItem Value="50" />
                <asp:ListItem Value="100" />
                <asp:ListItem Value="150" />
                <asp:ListItem Value="300" />
                <asp:ListItem Value="1000" />
            </asp:DropDownList>
            <asp:Label ID="lbl_page" runat="server" Text="Page" />
            <asp:TextBox ID="txtGoToPage" runat="server" AutoPostBack="true" CssClass="gotopage"
                OnTextChanged="GoToPageOnTextChanged" />
            <asp:Label ID="lbl_Of" runat="server" Text="of" />
            <asp:Label ID="lblTotalNumberOfPages" runat="server" />
            <asp:Button ID="btn_p" runat="server" CommandArgument="Prev" SkinID="_" CommandName="Page"
                CssClass="previous" ToolTip="Previous Page" /><asp:Button ID="btn_n" runat="server"
                    CommandArgument="Next" SkinID="_" CommandName="Page" CssClass="next" ToolTip="Next Page" />
        </PagerTemplate>
        <SelectedRowStyle BackColor="#D6E8FF" ForeColor="Black" />
    </cc4:MKGridView>
    <hr class="ee" />
    <div>
        <table>
            <tr>
                <td>
                    <asp:Label ID="lbl_RiskLice" runat="server" ForeColor="Blue"></asp:Label>
                </td>
                <td class="amend_field">
                    <asp:Label ID="lbl_TotalLice" runat="server" ForeColor="Blue"></asp:Label>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lbl_InAv" runat="server" ForeColor="Blue"></asp:Label>
                </td>
                <td class="amend_field">
                    <asp:Label ID="lbl_InAvValue" runat="server" ForeColor="Blue"></asp:Label>
                </td>
            </tr>
        </table>
    </div>
    <br />
</asp:Content>
