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

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server">
		<h1>CSV-eksport av innsendte søknader</h1>
	    <p>På denne siden kan det eksportéres søknadsdata til CSV-filer. Filene inneholder referansenummer, innsendt dato, og alle bruker-inntastede data (unntatt vedlegg) i innsendte søknader for pålogget organisasjon.
		Hvis det er flere versjoner av skjema, opprettes det én CSV-fil pr versjon. Filene presenteres i en zip-fil, og de kan åpnes i Excel eller OpenOffice. CSV-filene benytter semikolon (;) som skilletegn.<br/>
		</p>
		<table>
			<%--<tr>
				<td>
					<asp:Label id="Label1" runat="server">Organisasjon *</asp:Label>
				</td>
				<td>
					<asp:DropDownList id="ddlConsumer" runat="server" Width="500px" DataTextField="Name" DataValueField="ConsumerID" TabIndex="0"></asp:DropDownList>
				</td>
				<td>
					<asp:hyperlink id="Hyperlink1" runat="server" Target="_blank" Visible="False">Help</asp:hyperlink>
				</td>
				<td>
					<asp:RequiredFieldValidator id="RequiredFieldValidator4" runat="server" ErrorMessage="Du må velge en organisasjon." ControlToValidate="ddlConsumer"></asp:RequiredFieldValidator>
				</td>
			</tr>--%>
			<tr>
				<td>
					<asp:Label id="Label2" runat="server">Skjema *</asp:Label>
				</td>
				<td>
					<asp:DropDownList id="ddlTemplates" runat="server" Width="500px" TabIndex="1"></asp:DropDownList>
				</td>
				<td>
					<asp:hyperlink id="Hyperlink2" runat="server" Target="_blank" Visible="False">Help</asp:hyperlink>
				</td>
				<td>
					<asp:RequiredFieldValidator id="RequiredFieldValidator2" runat="server" ErrorMessage="Du må velge et skjema." ControlToValidate="ddlTemplates"></asp:RequiredFieldValidator>
				</td>
			</tr>
			<tr>
				<td>
					<asp:Label id="Label3" runat="server">Fra dato *</asp:Label>
				</td>
				<td>
					<asp:TextBox ID="txtFromDate" runat="server" TabIndex="2"></asp:TextBox>
				</td>
				<td>
					<asp:hyperlink id="Hyperlink3" runat="server" Target="_blank" Visible="False">Help</asp:hyperlink>
				</td>
				<td>
					<asp:RequiredFieldValidator id="RequiredFieldValidator1" runat="server" ErrorMessage="Du må oppgi en dato." ControlToValidate="txtFromDate"></asp:RequiredFieldValidator>
					<asp:CompareValidator ID="CompareValidator1" runat="server" ControlToValidate="txtFromDate" ErrorMessage="Feil datoformat, riktig format er dd.mm.åååå" Operator="DataTypeCheck" Type="Date"></asp:CompareValidator>
				</td>
			</tr>
			<tr>
				<td>
					<asp:Label id="Label4" runat="server">Til dato *</asp:Label>
				</td>
				<td>
					<asp:TextBox ID="txtToDate" runat="server" TabIndex="3"></asp:TextBox>
				</td>
				<td>
					<asp:hyperlink id="Hyperlink4" runat="server" Target="_blank" Visible="False">Help</asp:hyperlink>
				</td>
				<td>
					<asp:RequiredFieldValidator id="RequiredFieldValidator3" runat="server" ErrorMessage="Du må oppgi dato." ControlToValidate="txtToDate"></asp:RequiredFieldValidator>
					<asp:CompareValidator ID="CompareValidator2" runat="server" ControlToValidate="txtToDate" ErrorMessage="Feil datoformat, riktig format er dd.mm.åååå" Operator="DataTypeCheck" Type="Date"></asp:CompareValidator>
				</td>
			</tr>
		</table>
		<asp:Button ID="btnGetCsv" runat="server" Text="Eksportér" OnClick="BtnGetCsv_Click"></asp:Button>
		<asp:Label id="lblMessage" runat="server" ForeColor="Green"></asp:Label>
		<asp:Label id="lblError" runat="server" ForeColor="Red"></asp:Label>
		
<script>
	$(function()
	{
		$("#<%= txtFromDate.ClientID %>").datepicker();
	});
	$(function()
	{
		$("#<%= txtToDate.ClientID %>").datepicker();
	});
</script>
<script>
/* Norwegian initialisation for the jQuery UI date picker plugin. */
/* Written by Naimdjon Takhirov (naimdjon@gmail.com). */
jQuery(function($){
    $.datepicker.regional['no'] = {
		closeText: 'Lukk',
		prevText: '&laquo;Forrige',
		nextText: 'Neste&raquo;',
		currentText: 'I dag',
		monthNames: ['Januar','Februar','Mars','April','Mai','Juni','Juli','August','September','Oktober','November','Desember'],
		monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','Jun','Jul','Aug','Sep','Okt','Nov','Des'],
		dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'],
		dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'],
		dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'],
		weekHeader: 'Uke',
		dateFormat: 'dd.mm.yy',
		firstDay: 1,
		isRTL: false,
		showMonthAfterYear: false,
		yearSuffix: ''};
	$.datepicker.setDefaults($.datepicker.regional['no']);
});
</script>
<style type="text/css">
/* How to style jQuery UI DatePicker: http://www.hongkiat.com/blog/jquery-ui-datepicker/ */
.ui-datepicker-header
{  
	background: #8CAAE6;
	color: #e0e0e0;
	border-style: solid;
	border-color: #111;
}
</style>
</asp:Content>