<%@ Page Language="c#" CodeBehind="List.aspx.cs" AutoEventWireup="True" Inherits="eDocument.Server.Administrator.eDocumentTemplateCategory.List" MasterPageFile="~/Site.Master" %>

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

    <h1 class="skjema-admin__page-title">
        Oversikt over kategorier
    </h1>

    <p class="mb-5">
        Denne siden gir en oversikt over de kategoriene du har opprettet. 
        Du kan redigere og slette eksisterende kategorier.
    </p>

    <asp:Button 
        ID="btnCreate" 
        CssClass="skjema-admin__button skjema-admin__button--primary mb-4"
        runat="server" 
        Text="OPPRETT"
        OnClick="btnCreate_OnClick" />

    <asp:DataGrid 
        ID="dgEDocumentTemplateCategories" 
        runat="server" 
        CssClass="skjema-admin__table"
        Border="0"
        AutoGenerateColumns="False" 
        Width="100%"
        HeaderStyle-CssClass="HeaderStyle" 
        ItemStyle-CssClass="ItemStyle" 
        AlternatingItemStyle-CssClass="AlternatingItemStyle"
        AllowSorting="False">
        <Columns>
            <asp:BoundColumn DataField="eDocumentTemplateCategoryID" Visible="False" HeaderText="Kategori ID"></asp:BoundColumn>
            <asp:BoundColumn DataField="Name" SortExpression="Name ASC" HeaderText="Navn"></asp:BoundColumn>
            <asp:BoundColumn DataField="Code" SortExpression="Code ASC" HeaderText="Kortnavn" Visible="True"></asp:BoundColumn>
            <asp:BoundColumn DataField="Description" HeaderText="Beskrivelse" Visible="False"></asp:BoundColumn>
            <asp:BoundColumn DataField="CreatedOn" Visible="False" SortExpression="CreatedOn ASC" HeaderText="Opprettet"></asp:BoundColumn>
            <asp:BoundColumn DataField="ConsumerID" Visible="False" HeaderText="ConsumerID"></asp:BoundColumn>
            <asp:ButtonColumn Text="Detaljer" CommandName="Details"></asp:ButtonColumn>
            <asp:ButtonColumn Text="Rediger" CommandName="Edit"></asp:ButtonColumn>
            <asp:ButtonColumn Text="Slett" CommandName="Delete"></asp:ButtonColumn>
        </Columns>
    </asp:DataGrid><asp:Label ID="lblMessage" runat="server" ForeColor="Red"></asp:Label>
</asp:Content>
