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

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server">
    <table style="padding: 3px">
        <tr>
            <td valign="top">
		        <asp:Label ID="lblCustomer" runat="server">Innsendt av kunde</asp:Label><br/>
		        <asp:ListBox ID="lbConsumer" runat="server" DataTextField="Name" DataValueField="ConsumerID" Height="144px" Width="248px"></asp:ListBox><br/>
                <br/>
		        <asp:Label ID="Label3" runat="server">Lagret</asp:Label><br/>
		        <asp:ListBox ID="lbIsSaved" 
			        runat="server" Height="64px" Width="248px">
			        <asp:ListItem Value="All" Selected="True">Alle</asp:ListItem>
			        <asp:ListItem Value="True">Ja</asp:ListItem>
			        <asp:ListItem Value="False">Nei</asp:ListItem>
		        </asp:ListBox><br/>
                <br/>
		        <asp:Label ID="Label4" runat="server">Innsendt</asp:Label><br/>
		        <asp:ListBox ID="lbIsSubmitted" 
			        runat="server" Height="64px" Width="248px">
			        <asp:ListItem Value="All" Selected="True">Alle</asp:ListItem>
			        <asp:ListItem Value="True">Ja</asp:ListItem>
			        <asp:ListItem Value="False">Nei</asp:ListItem>
		        </asp:ListBox><br/>
                <br/>
		        <asp:Label ID="Label2" runat="server">Skjema</asp:Label><br/>
		        <asp:ListBox ID="lbEDocumentTemplate" runat="server" Height="176px" Width="248px"></asp:ListBox><br/>
                <br/>
		        <asp:Label ID="Label6" runat="server">Fra og med</asp:Label><br/>
		        <asp:TextBox ID="txtFrom" runat="server"></asp:TextBox>
		        <asp:Label ID="lblInvalidFrom" runat="server" ForeColor="Red"></asp:Label><br/>
                <br/>
		        <asp:Label ID="Label7" runat="server">Til</asp:Label><br/>
		        <asp:TextBox ID="txtTo" runat="server"></asp:TextBox>
		        <asp:Label ID="lblInvalidTo" runat="server" ForeColor="Red"></asp:Label><br/>
                <br/>
		        <asp:Button ID="btnSearch" runat="server" Text="Søk" OnClick="btnSearch_Click"></asp:Button>
            </td>
            <td valign="top">
		        <asp:Label ID="Label5" runat="server">Resultat</asp:Label><br/>
                <br/>
		        <asp:Button ID="btnExecuteProcess" runat="server" Text="Eksekver prosess" Enabled="False" OnClick="btnExecuteProcess_Click"></asp:Button>
			    <asp:button id="btnConnectToWorkflow" runat="server" Text="Koble til arbeidsflyt" onclick="btnConnectToWorkflow_Click"></asp:button><br/>
		        <asp:Label ID="lblCount" runat="server"></asp:Label><br/>
                <br/>
		        <asp:DataGrid ID="dgInstances" 
			        runat="server" Height="40px" Width="888px" AutoGenerateColumns="False">
			        <Columns>
				        <asp:BoundColumn DataField="eDocumentInstanceID" HeaderText="eDocumentInstanceID" Visible="True"></asp:BoundColumn>
				        <asp:BoundColumn DataField="ReferenceNumber" HeaderText="ReferenceNumber" Visible="True"></asp:BoundColumn>
				        <asp:BoundColumn DataField="CreatedOn" HeaderText="CreatedOn" Visible="True"></asp:BoundColumn>
				        <asp:BoundColumn DataField="SavedOn" HeaderText="SavedOn" Visible="True"></asp:BoundColumn>
				        <asp:BoundColumn DataField="SubmittedOn" HeaderText="SubmittedOn" Visible="True"></asp:BoundColumn>
				        <asp:BoundColumn DataField="IsSubmitted" HeaderText="IsSubmitted" Visible="True"></asp:BoundColumn>
				        <asp:BoundColumn DataField="IsSaved" HeaderText="IsSaved" Visible="True"></asp:BoundColumn>
			        </Columns>
		        </asp:DataGrid>
                <br/>
		        <asp:Label ID="lblMessage" 
			        runat="server" ForeColor="Red"></asp:Label>
                <br/>
            </td>
        </tr>
    </table>
</asp:Content>