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

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="Server">
    <p class="mb-4">
        Denne siden gir en oversikt over alle innsendte instanser det ikke har blitt 
		utført noen prosess for (hverken vellykket og feilet).
    </p>

    <asp:GridView 
        ID="dgInstanceWithNoProcess" 
        CssClass="skjema-admin__table"
        Border="0"
        runat="server" 
        OnRowDataBound="dgInstanceWithNoProcess_OnRowDataBound"
        AutoGenerateColumns="False">

        <Columns>
            <asp:BoundField Visible="True" DataField="instanceRefId" HeaderText="Ref ID"></asp:BoundField>
            
            <asp:HyperLinkField Visible="True" DataNavigateUrlFormatString="~/eDocumentTemplate/Edit.aspx?eDocumentTemplateID={0}"
                                DataNavigateUrlFields="templateId" HeaderText="Skjema" DataTextField="templateName" />

            <asp:BoundField Visible="True" DataField="submittedOn" HeaderText="Innsendt"></asp:BoundField>
            
            <asp:HyperLinkField Visible="True" DataNavigateUrlFormatString="ExecuteRegisteredProcess.aspx?eDocumentInstanceID={0}&BackUrl=~/InstanceWithNoProcess/List.aspx"
                                DataNavigateUrlFields="instanceId" Text="Kjør registrert prosess" />

            <asp:HyperLinkField Visible="True" DataNavigateUrlFormatString="~/Process/Execute.aspx?eDocumentInstanceID={0}&BackUrl=~/InstanceWithNoProcess/List.aspx"
                                DataNavigateUrlFields="instanceId" Text="Kjør valgfri prosess" />

            <%--<asp:HyperLinkField Visible="True" DataNavigateUrlFormatString="~/eDocumentInstance/Delete.aspx?eDocumentInstanceID={0}"
                                DataNavigateUrlFields="instanceId" Text="Slett" />--%>
        </Columns>
    </asp:GridView>

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