<%@ Page Language="C#" AutoEventWireup="true" Inherits="Instances" Codebehind="Instances.aspx.cs" UICulture="auto" %>
<%@ OutputCache Location="None" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
	<title><asp:Literal runat="server" text="<%$ Resources:Resource, application_title%>"/></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <asp:HyperLink ID="lnkMainPage" runat="server" NavigateUrl="~/Default.aspx" Text="<%$ Resources:Resource, link_main%>"/><br />
            <br />
            <h1><asp:Literal ID="Literal1" runat="server" text="<%$ Resources:Resource, text_saved%>"/></h1>
            <asp:GridView ID="gwSaved" runat="server" AutoGenerateColumns="False" OnRowCommand="gwSaved_RowCommand">
                <Columns>
                    <asp:HyperLinkField DataTextField="InstanceName" DataNavigateUrlFields="ReferenceNumber, QueryString" DataNavigateUrlFormatString="~/Viewer.aspx?ReferenceID={0}&{1}" HeaderText="<%$ Resources:Resource, column_name%>" />
                    <asp:BoundField DataField="UpdatedOn" HeaderText="<%$ Resources:Resource, column_savedOn%>" />
										<asp:BoundField DataField="FlowStatusName"  />
                    <asp:HyperLinkField Target="_blank" DataNavigateUrlFields="eDocumentInstanceID" DataNavigateUrlFormatString="Viewer.aspx?CopyInstanceID={0}" Text="<%$ Resources:Resource, column_copy%>" HeaderText="<%$ Resources:Resource, column_copy%>" />
                    <asp:TemplateField HeaderText="<%$ Resources:Resource, column_delete%>">
                        <ItemTemplate>
                            <asp:LinkButton ID="lnkDelete" CausesValidation="false" CommandArgument='<%# Eval("eDocumentInstanceID") %>'
                                CommandName="Del" runat="server" Text="<%$ Resources:Resource, column_delete%>"/>
                        </ItemTemplate>
                    </asp:TemplateField>                    
                </Columns>
            </asp:GridView>
			<h1><asp:Literal ID="Literal2" runat="server" text="<%$ Resources:Resource, text_submitted%>"/></h1>
            <asp:GridView ID="gwSubmitted" runat="server" AutoGenerateColumns="False" OnRowCommand="gwSubmitted_RowCommand" DataKeyNames="eDocumentInstanceID">
                <Columns>
                    <asp:HyperLinkField DataTextField="InstanceName" Target="_blank" DataNavigateUrlFields="eDocumentInstanceID" DataNavigateUrlFormatString="ResponseItems/Pdf.ashx?eDocumentInstanceID={0}" HeaderText="<%$ Resources:Resource, column_name%>" />
                    <asp:BoundField DataField="ReferenceNumber" HeaderText="<%$ Resources:Resource, column_referenceID%>" />
                    <asp:BoundField DataField="ExternalReferenceID" HeaderText="<%$ Resources:Resource, column_externalReferenceID%>" />
										<asp:BoundField DataField="FlowStatusName"  />
                    <asp:BoundField DataField="UpdatedOn" HeaderText="<%$ Resources:Resource, column_submittedOn%>" />
                    <asp:HyperLinkField Target="_blank" DataNavigateUrlFields="eDocumentInstanceID" DataNavigateUrlFormatString="Viewer.aspx?CopyInstanceID={0}" Text="<%$ Resources:Resource, column_copy%>" HeaderText="<%$ Resources:Resource, column_copy%>" />
					<asp:TemplateField HeaderText="<%$ Resources:Resource, column_remove%>">
                        <ItemTemplate>
                            <asp:LinkButton ID="lnkDelete" CausesValidation="false" CommandArgument='<%# Eval("eDocumentInstanceID") %>'
                                CommandName="Del" runat="server" Text="<%$ Resources:Resource, column_remove%>"/>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
        </div>
    </form>
</body>
</html>
