aggiunti metodi setka/getka x MP/IO

This commit is contained in:
Samuele E. Locatelli
2017-06-08 14:14:26 +02:00
parent a4e8555249
commit b46cc769ae
2 changed files with 67 additions and 14 deletions
+53
View File
@@ -83,6 +83,59 @@ namespace MP_IO.Controllers
}
return answ;
}
// GET: IOB/setka/5
public string setka(int? id)
{
string answ = "ND";
// se id nullo --> KO!
if (id == null)
{
answ = "KO";
}
else
{
int idx = 0;
Int32.TryParse(id.ToString(), out idx);
try
{
// verifico se sia abilitato SignalLog x una data macchina
MapoDb.MapoDb.obj.scriviKeepAlive(idx.ToString(), DateTime.Now);
answ = "OK";
}
catch (Exception exc)
{
logger.lg.scriviLog(string.Format("Errore in setka{0}{1}", Environment.NewLine, exc));
answ = "NO";
}
}
return answ;
}
// GET: IOB/getka/5
public string getka(int? id)
{
string answ = "ND";
// se id nullo --> KO!
if (id == null)
{
answ = "KO";
}
else
{
int idx = 0;
Int32.TryParse(id.ToString(), out idx);
try
{
// verifico se sia abilitato SignalLog x una data macchina
answ = MapoDb.MapoDb.obj.taKeepAlive.getByIdxMacchina(idx.ToString())[0].DataOraServer.ToString();
}
catch (Exception exc)
{
logger.lg.scriviLog(string.Format("Errore in getka{0}{1}", Environment.NewLine, exc));
answ = "NO";
}
}
return answ;
}
// GET: IOB/input/5?valore=3&dtEve=20161223180600000&dtCurr=20161223180600000&cnt=999
public string input(string id, string valore, string dtEve, string dtCurr, string cnt)
{
+14 -14
View File
@@ -68,20 +68,20 @@ namespace MapoDb
#region area table adapters
// area applicazione
protected DS_applicazioneTableAdapters.EventListTableAdapter taEvList;
protected DS_applicazioneTableAdapters.DiarioDiBordoTableAdapter taDiario;
protected DS_applicazioneTableAdapters.AnagraficaEventiTableAdapter taAnagEv;
protected DS_applicazioneTableAdapters.AnagraficaStatiTableAdapter taAnagSt;
protected DS_applicazioneTableAdapters.MacchineTableAdapter taMacchine;
protected DS_applicazioneTableAdapters.TransizioneEventiTableAdapter taTranEv;
protected DS_applicazioneTableAdapters.TransizioneStatiTableAdapter taTranSt;
protected DS_applicazioneTableAdapters.StatoMacchineTableAdapter taStatoMacchine;
protected DS_applicazioneTableAdapters.KeepAliveTableAdapter taKeepAlive;
protected DS_applicazioneTableAdapters.RemoteRebootLogTableAdapter taRRL;
protected DS_applicazioneTableAdapters.TransizioneIngressiTableAdapter taTransIngr;
protected DS_applicazioneTableAdapters.AnagraficaOperatoriTableAdapter taAnOpr;
protected DS_applicazioneTableAdapters.DatiMacchineTableAdapter taDatiMacch;
protected DS_applicazioneTableAdapters.MicroStatoMacchinaTableAdapter taMSM;
public DS_applicazioneTableAdapters.EventListTableAdapter taEvList;
public DS_applicazioneTableAdapters.DiarioDiBordoTableAdapter taDiario;
public DS_applicazioneTableAdapters.AnagraficaEventiTableAdapter taAnagEv;
public DS_applicazioneTableAdapters.AnagraficaStatiTableAdapter taAnagSt;
public DS_applicazioneTableAdapters.MacchineTableAdapter taMacchine;
public DS_applicazioneTableAdapters.TransizioneEventiTableAdapter taTranEv;
public DS_applicazioneTableAdapters.TransizioneStatiTableAdapter taTranSt;
public DS_applicazioneTableAdapters.StatoMacchineTableAdapter taStatoMacchine;
public DS_applicazioneTableAdapters.KeepAliveTableAdapter taKeepAlive;
public DS_applicazioneTableAdapters.RemoteRebootLogTableAdapter taRRL;
public DS_applicazioneTableAdapters.TransizioneIngressiTableAdapter taTransIngr;
public DS_applicazioneTableAdapters.AnagraficaOperatoriTableAdapter taAnOpr;
public DS_applicazioneTableAdapters.DatiMacchineTableAdapter taDatiMacch;
public DS_applicazioneTableAdapters.MicroStatoMacchinaTableAdapter taMSM;
// area tempi ciclo
protected DS_ProdTempiTableAdapters.TempiCicloRilevatiTableAdapter taTCRilevati;