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

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server">
			<h1>Legg til prosess</h1>
			<p>
				Fra denne siden kan du velge hvilke prosesser du ønsker å legge til abonnementet. Prosessen(e) vil bli utført når skjemaet sendes inn. Sett et kryss i avkrysningsboksen for den/de prosessen(e) du ønsker å legge til og klikk "Utfør" knappen.
			</p>
    
        <asp:Button 
            ID="btnCreate" 
            CssClass="skjema-admin__button skjema-admin__button--primary mb-4"
            runat="server" 
            Text="Opprett ny prosess"
            OnClick="btnCreate_OnClick" />
        

			<asp:datagrid id="dgProcesses" runat="server" AllowSorting="False" AlternatingItemStyle-CssClass="AlternatingItemStyle"
				ItemStyle-CssClass="ItemStyle" HeaderStyle-CssClass="HeaderStyle" Width="100%" AutoGenerateColumns="False">
				<AlternatingItemStyle CssClass="AlternatingItemStyle"></AlternatingItemStyle>
				<ItemStyle CssClass="ItemStyle"></ItemStyle>
				<HeaderStyle CssClass="HeaderStyle"></HeaderStyle>
				<Columns>
					<asp:BoundColumn Visible="False" DataField="ProcessID"></asp:BoundColumn>
					<asp:TemplateColumn>
						<HeaderTemplate>
							Velg
						</HeaderTemplate>
						<ItemTemplate>
							<asp:CheckBox runat="server" ID="cbSelect" />
						</ItemTemplate>
					</asp:TemplateColumn>
					<asp:BoundColumn DataField="Name" SortExpression="Name ASC" HeaderText="Navn"></asp:BoundColumn>
					<asp:BoundColumn DataField="Comment" HeaderText="Kommentar"></asp:BoundColumn>
					<asp:BoundColumn DataField="CreatedOn" SortExpression="CreatedOn ASC" HeaderText="Opprettet"></asp:BoundColumn>
					<asp:TemplateColumn Visible="false">
						<HeaderTemplate>
							IsAsync
						</HeaderTemplate>
						<ItemTemplate>
							<asp:CheckBox runat="server" ID="cbIsAsync" />
						</ItemTemplate>
					</asp:TemplateColumn>
				</Columns>
			</asp:datagrid>
			<P><asp:label id="lblNoProcessesMessage" runat="server">Ingen tilgjengelige prosesser. <a href="../Process/Create.aspx">Klikk her for å opprette en ny prosess.</a></asp:label></P>
			<P><asp:button id="btnCancel" runat="server" Text="Avbryt" onclick="btnCancel_Click"></asp:button>&nbsp;
				<asp:button id="btnAttach" runat="server" Text="Utfør" onclick="btnAttach_Click"></asp:button><asp:label id="lblMessage" runat="server" ForeColor="Red"></asp:label>
			</P>
</asp:Content>