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

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server">
		<p>Fra denne siden kan du søke opp en kunde sine abonnementer.</p>
		<p>
			<asp:Label id="lblConsumer" runat="server">Skriv inn navnet på kunden </asp:Label>
			<asp:Textbox id="txtConsumer" runat="server"></asp:Textbox>
			<asp:Button id="btnSearch" runat="server" Text="Søk" PostBackUrl="~/Subscription/Search.aspx"></asp:Button>
			<asp:Requiredfieldvalidator id="RequiredFieldValidator1" runat="server" ErrorMessage="Du må angi et kundenavn" ControlToValidate="txtConsumer"></asp:Requiredfieldvalidator>
		</p>
		
		<asp:datagrid id="dgSubscribed" runat="server" AutoGenerateColumns="False" Width="100%" HeaderStyle-CssClass="HeaderStyle"
			ItemStyle-CssClass="ItemStyle" AlternatingItemStyle-CssClass="AlternatingItemStyle" AllowSorting="True">
			<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="Kunde"></asp:BoundColumn>
				<asp:BoundColumn DataField="eDocumentTemplateShortName" HeaderText="Form ID"></asp:BoundColumn>
				<asp:BoundColumn DataField="eDocumentTemplateName" HeaderText="Skjema"></asp:BoundColumn>
				<asp:BoundColumn DataField="Comment" HeaderText="Kommentar"></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="lblNoSubscribed" Text="Ingen abonnerte"></asp:Label>
		
		<p><asp:Label id="lblMessage" runat="server" ForeColor="Red"></asp:Label></p>
</asp:Content>