<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Licenses.aspx.cs" Inherits="eDocument.Server.Administrator.SuperUser.Licenses" MasterPageFile="~/Site.Master" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="Server">
    <h1>Liste over ALLE lisenser</h1>

    <asp:GridView 
        runat="server" 
        ID="grid"
        DataKeyNames="Id"
        AutoGenerateEditButton="False"
        CssClass="skjema-admin__table"
        Border="0"
        AutoGenerateColumns="false">

        <Columns>
            <asp:DynamicField DataField="Id" Visible="False" />
            <asp:DynamicField DataField="Username" />
            <asp:DynamicField DataField="DisplayName" />
            <asp:DynamicField DataField="Email" />
            <%--<asp:DynamicField DataField="Roles" />--%>
            <asp:TemplateField HeaderText="Roles">
                <ItemTemplate>
                    <%#Eval("Roles")%>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Fjern tilgang">
                <ItemTemplate>
                    <asp:LinkButton runat="server" CommandName="Action" ID="btnRevokeAccess" Text="Fjern tilgang" OnCommand="btnRevokeAccess_OnClick" CommandArgument='<%#Bind("Id") %>'>Fjern tilgang</asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <ItemTemplate>
                    <a href='Edit.aspx?id=<%#Eval("Id")%>'>Edit</a>
                    <%--<asp:linkbutton id="btnEdit" runat="server" commandname="Edit" text="Edit" />--%>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
</asp:Content>