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

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

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

    <p class="mb-5">
        Denne siden gir en oversikt over de abonnementene du har publisert og de du abonnerer på. Du kan se detaljer for, redigere og 
				slette eksisterende abonnement.
    </p>

    <div class="mb-5">
  

        <div class="skjema-admin__search-bar">
            <asp:TextBox 
                ID="txtConsumer" 
                CssClass="skjema-admin__search-bar__input"
                placeholder="Søketekst"
                OnTextChanged="btnSearch_Click" 
                runat="server">
            </asp:TextBox>

            <asp:Button 
                ID="btnSearch" 
                runat="server" 
                CssClass="skjema-admin__button skjema-admin__button--primary"
                Text="Søk" 
                OnClick="btnSearch_Click">
            </asp:Button>
        </div>

        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Du må angi et kundenavn" ControlToValidate="txtConsumer"></asp:RequiredFieldValidator>
    </div>

    <h3 class="skjema-admin__section-title">
        Publiserte:
    </h3>

    <asp:DataGrid 
        ID="dgSubscriptions" 
        runat="server" 
        AutoGenerateColumns="False" 
        Width="100%" 
        Border="0"
        CssClass="skjema-admin__table"
        AllowSorting="False">
        <Columns>
            <asp:BoundColumn DataField="SubscriptionID" Visible="False"></asp:BoundColumn>
            <asp:BoundColumn DataField="SubscribedByConsumerID" Visible="False"></asp:BoundColumn>
            <asp:BoundColumn DataField="eDocumentTemplateID" Visible="False"></asp:BoundColumn>
            <asp:BoundColumn DataField="SubscribedByConsumerName" HeaderText="Organisasjon"></asp:BoundColumn>
            <asp:BoundColumn DataField="eDocumentTemplateName" HeaderText="Skjema"></asp:BoundColumn>
            <asp:BoundColumn DataField="eDocumentTemplateShortName" HeaderText="Form ID"></asp:BoundColumn>
            <%--<asp:BoundColumn DataField="Comment" HeaderText="Kommentar"></asp:BoundColumn>--%>
            <%--<asp:BoundColumn DataField="CreatedOn" SortExpression="CreatedOn ASC" HeaderText="Opprettet"></asp:BoundColumn>--%>
            <%--					<asp:BoundColumn DataField="FromDate" HeaderText="Fra dato"></asp:BoundColumn>
					<asp:BoundColumn DataField="ToDate" HeaderText="Til dato"></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 runat="server" ID="lblNoSubscriptions" Text="Ingen publiserte"></asp:Label>


    <asp:Label ID="lblMessage" runat="server" ForeColor="Red"></asp:Label>
</asp:Content>
