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

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server">
			<P>Denne siden viser deg de avbrutte prosess-instansene for en prosess. Du kan 
				gjenoppta, restarte og kansellere en avbrutt prosess-instans.
			</P>
			<P>&nbsp;</P>
			<asp:DataGrid id="dgAbortedProcess" runat="server" AutoGenerateColumns="False" OnItemDataBound="dgAbortedProcess_OnItemDataBound">
				<Columns>
					<asp:BoundColumn Visible="False" DataField="AbortedProcessID"></asp:BoundColumn>
                    <asp:BoundColumn Visible="False" DataField="eDocumentInstanceID"></asp:BoundColumn>
                    <asp:BoundColumn Visible="False" DataField="IsTemplateOwner"></asp:BoundColumn>
                    <asp:BoundColumn Visible="False" DataField="SubscriptionID"></asp:BoundColumn>
                    <asp:BoundColumn Visible="False" DataField="eDocumentTemplateID"></asp:BoundColumn>
					<asp:HyperLinkColumn DataTextField="eDocumentTemplateName" HeaderText="Skjema" DataNavigateUrlField="eDocumentTemplateID" DataNavigateUrlFormatString="../eDocumentTemplate/Details.aspx?eDocumentTemplateID={0}" />
					<asp:BoundColumn Visible="True" DataField="eDocumentTemplateVersionVersion" HeaderText="Versjon"></asp:BoundColumn>
					<asp:BoundColumn Visible="True" DataField="EventLogItemDescription" HeaderText="Feilmelding"></asp:BoundColumn>
                    <asp:BoundColumn Visible="True" DataField="eDocumentInstanceCreatedOn" HeaderText="Opprettet"></asp:BoundColumn>
					<asp:BoundColumn Visible="True" DataField="eDocumentInstanceSubmittedOn" HeaderText="Innsendt"></asp:BoundColumn>
					<asp:BoundColumn Visible="True" DataField="AbortedProcessAbortedOn" HeaderText="Avbrutt"></asp:BoundColumn>
					<asp:BoundColumn Visible="False" DataField="eDocumentInstanceReferenceNumber" HeaderText="Referansenummer"></asp:BoundColumn>
					<asp:HyperLinkColumn DataTextField="ConsumerName" HeaderText="Kundenavn" DataNavigateUrlField="AbortedProcessInvokerConsumerID" DataNavigateUrlFormatString="../Consumer/Update.aspx?ConsumerID={0}" />
					<asp:BoundColumn Visible="True" DataField="EventLogItemStackTrace" HeaderText="Stacktrace"></asp:BoundColumn>
					<asp:ButtonColumn Text="Gjenoppta" CommandName="Resume"></asp:ButtonColumn>
					<asp:ButtonColumn Text="Restart" CommandName="Restart"></asp:ButtonColumn>
					<asp:ButtonColumn Text="Kanseler" CommandName="Cancel"></asp:ButtonColumn>
                    <asp:ButtonColumn Text="Kanseler og kjør isteden..." CommandName="CancelAndExecuteOther"></asp:ButtonColumn>
					
					<asp:TemplateColumn HeaderText="" Visible="False">
                        <ItemTemplate>
                                <asp:Hyperlink Target="_blank" ID="lnkShowXml" runat="server" Text='Vis XML' NavigateUrl='<%# "~/eDocumentInstance/DownloadXmlResponse.aspx?eDocumentInstanceID=" + DataBinder.Eval(Container.DataItem, "eDocumentInstanceID") + "&SubscriberConsumerID=" + DataBinder.Eval(Container.DataItem, "AbortedProcessInvokerConsumerID") %>'/>
                        </ItemTemplate>
                    </asp:TemplateColumn>

					<asp:TemplateColumn HeaderText="" Visible="False">
                        <ItemTemplate>
                                <asp:Hyperlink Target="_blank" ID="lnkShowTransformedXml" runat="server" Text='Vis trans. XML' NavigateUrl='<%# "~/eDocumentInstance/DownloadTransformedXmlResponse.aspx?eDocumentInstanceID=" + DataBinder.Eval(Container.DataItem, "eDocumentInstanceID") + "&SubscriberConsumerID=" + DataBinder.Eval(Container.DataItem, "AbortedProcessInvokerConsumerID") + "&ProcessID=" + DataBinder.Eval(Container.DataItem, "ProcessID") %>'/>
                        </ItemTemplate>
                    </asp:TemplateColumn>

					<asp:HyperLinkColumn Visible="False" Target="_blank" DataNavigateUrlFormatString="~/eDocumentInstance/DownloadPdfResponse.aspx?eDocumentInstanceID={0}"
						DataNavigateUrlField="eDocumentInstanceID" Text="Vis PDF" />
				</Columns>
			</asp:DataGrid>
			<P>
				<asp:Button id="btnRefresh" runat="server" Text="Oppdater" onclick="btnRefresh_Click"></asp:Button></P>
			<h2>Oppgaver:</h2>
			<P>
				<asp:Button id="btnResumeAll" runat="server" Text="Gjenoppta alle" onclick="btnResumeAll_Click"></asp:Button>
				<asp:Button id="btnRestartAll" runat="server" Text="Restart alle" onclick="btnRestartAll_Click"></asp:Button>
				<asp:Button id="btnCancelAll" runat="server" Text="Kanseler alle" onclick="btnCancelAll_Click"></asp:Button>
                <asp:Button id="btnCancelAndExecuteOtherForAll" runat="server" Text="Kanseler og kjør isteden for alle..." onclick="btnCancelAndExecuteOtherForAll_Click"></asp:Button>
			<P>
				<asp:Label id="lblMessage" runat="server" ForeColor="Red"></asp:Label></P>
</asp:Content>