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

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server">
        <h1>
            Legg til handling</h1>
        <p>
            Fra denne siden kan du velge hvilke handlinger du ønsker å legge til prosessen.
            Sett et kryss i avkrysningsboksen for den/de handlingen(e) du ønsker å legge til
            og klikk "Utfør" knappen.
        </p>
        <p>
        <a href='../Action/Create1.aspx?Return=~/Process/AttachAction.aspx?ProcessID=<%= Request.QueryString["ProcessID"] %>'>Opprett handling</a>
        </p>
        <asp:DataGrid ID="dgActions" runat="server" AutoGenerateColumns="False" Width="100%"
            HeaderStyle-CssClass="HeaderStyle" ItemStyle-CssClass="ItemStyle" AlternatingItemStyle-CssClass="AlternatingItemStyle"
            AllowSorting="False">
            <Columns>
                <asp:BoundColumn DataField="ActionID" Visible="False"></asp:BoundColumn>
                <asp:BoundColumn DataField="ActionTypeID" Visible="False"></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 HeaderText="Handlingstype"></asp:BoundColumn>
                <asp:BoundColumn DataField="Comment" HeaderText="Kommentar"></asp:BoundColumn>
                <asp:BoundColumn DataField="CreatedOn" SortExpression="CreatedOn ASC" HeaderText="Opprettet">
                </asp:BoundColumn>
            </Columns>
        </asp:DataGrid>
        <p>
            <asp:Label ID="lblNoActionsMessage" runat="server">Ingen tilgjengelige handlinger.</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>