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

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

    <h1 class="skjema-admin__page-title">
        Skjemakatalog
    </h1>

    <div id="divMaxTemplateCountReached" runat="server" Visible="False" style="color:red">
        <asp:Label runat="server" id="lblMaxTemplatesReached">Du har nådd maksimalt antall skjema for denne lisensen:</asp:Label> 
        <asp:Label runat="server" ID="lblMaxTemplateCount" />
        <br/>
    </div>
    <br/>

    <%--			<asp:label id="lblConsumer" runat="server">Søk på kunde </asp:label>
			<asp:textbox id="txtConsumer" OnTextChanged="btnSearch_Click" runat="server"></asp:textbox>
			<asp:button id="btnSearch" runat="server" Text="Søk" onclick="btnSearch_Click"></asp:button>
			<asp:requiredfieldvalidator id="RequiredFieldValidator1" runat="server" ErrorMessage="Du må angi et kundenavn" ControlToValidate="txtConsumer"></asp:requiredfieldvalidator>--%>

    <asp:GridView 
        runat="server" 
        ID="grid"
        CssClass="skjema-admin__table"
        Border="0"
        Width="100%"
        DataKeyNames="Id"
        ItemType="eDocument.Server.Administrator.Subscription.Template2"
        AutoGenerateEditButton="False"
        SelectMethod="GetData"
        AutoGenerateColumns="false">
        <Columns>
            <asp:DynamicField DataField="Id" Visible="False" />
            <asp:DynamicField DataField="TemplateName" />
            <asp:DynamicField DataField="CustomerName" />
            <asp:TemplateField HeaderText="Abonner">
                <ItemTemplate>
                    <asp:LinkButton runat="server" CommandName="Action" ID="btnSubscribe" Text="Abonner" OnCommand="btnSubscribe_OnClick" CommandArgument='<%#Bind("Id") %>'>Abonner</asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>

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