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

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="Server">
    <h1 class="skjema-admin__page-title">
        Oversikt over viewere
    </h1>

    <p class="mb-5">
        Denne siden gir en oversikt over de viewer objektene du har opprettet. Du kan se detaljer for, redigere og 
		slette eksisterende viewer objekter.
    </p>

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

    <asp:DataGrid 
        ID="dgViewers" 
        runat="server" 
        AutoGenerateColumns="False" 
        Width="100%" 
        CssClass="skjema-admin__table"
        Border="0"
        HeaderStyle-CssClass="HeaderStyle"
        ItemStyle-CssClass="ItemStyle" 
        AlternatingItemStyle-CssClass="AlternatingItemStyle" 
        AllowSorting="False">
        <Columns>
            <asp:BoundColumn DataField="Id" Visible="False"></asp:BoundColumn>
            <asp:BoundColumn DataField="Name" SortExpression="Name ASC" HeaderText="Navn"></asp:BoundColumn>
            <asp:BoundColumn DataField="Url" SortExpression="Url ASC" HeaderText="URL"></asp:BoundColumn>
            <asp:BoundColumn DataField="Comment" HeaderText="Kommentar"></asp:BoundColumn>
            <asp:BoundColumn DataField="CreatedOn" SortExpression="CreatedOn ASC" HeaderText="Opprettet"></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>
