Files
Samuele E. Locatelli 941fe4b2cf aggiunta funzione puntuale x data uploader
refresh online con url locale corretto
installato in RigaSRV02
2015-09-17 17:44:34 +02:00

72 lines
1.5 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace DataUploader
{
public partial class Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if(!Page.IsPostBack)
{
anno = DateTime.Now.Year;
DOC = "OC000000";
}
}
protected void btnUpload_Click(object sender, EventArgs e)
{
caricaDoc();
}
public int anno
{
get
{
int answ = DateTime.Now.Year;
try
{
answ = Convert.ToInt32(txtAnno.Text.Trim());
}
catch
{ }
return answ;
}
set
{
txtAnno.Text = value.ToString();
}
}
public string DOC
{
get
{
string answ = "";
try
{
answ = txtDoc.Text.Trim();
}
catch
{ }
return answ;
}
set
{
txtDoc.Text = value;
}
}
private void caricaDoc()
{
if (txtDoc.Text.Trim() != "")
{
Response.Redirect(string.Format("SyncDoc.aspx?DOC={0}&Anno={1}", DOC, anno));
}
}
}
}