Files
MoonPro.net/MP-IO/sigLogEnabled.aspx.cs
T
2017-04-14 13:56:01 +02:00

65 lines
2.0 KiB
C#

using System;
namespace MP_IO
{
public partial class sigLogEnabled : System.Web.UI.Page
{
/// <summary>
/// caricamento pagina
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
Response.Redirect(string.Format("IOB/slog/{0}", Request.QueryString["idxMacchina"]));
#if false
// legge i get x processare la seriale
int idxMacchina = 0;
bool enabled = false;
string answ = "ND";
try
{
idxMacchina = Convert.ToInt32(Request.QueryString["idxMacchina"]);
}
catch
{
idxMacchina = 0;
}
if (idxMacchina != 0)
{
try
{
enabled = MapoDb.MapoDb.obj.sLogEnabled(idxMacchina);
if (enabled)
{
answ = "OK";
}
else
{
answ = "NO";
}
}
catch (Exception exc)
{
if (memLayer.ML.confReadInt("_logLevel") > 5)
{
string errore = string.Format("Errore: {0}{1}", Environment.NewLine, exc);
logger.lg.scriviLog(errore, tipoLog.EXCEPTION);
answ = errore;
}
}
}
else
{
string errore = "Errore: parametri macchina vuoti";
logger.lg.scriviLog(errore, tipoLog.ERROR);
answ = errore;
}
// ripulisco pagina restituita e tolgo html (solo codice ok/NO)
Response.Clear();
Response.Write(answ);
Context.Response.End();
#endif
}
}
}