pulizia codice commentato
This commit is contained in:
@@ -101,189 +101,5 @@ namespace MP_IO.Controllers
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
#if false
|
||||
// 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
|
||||
{
|
||||
MapoDb.MapoDb.obj.scriviKeepAlive(idx.ToString(), DateTime.Now);
|
||||
answ = MapoDb.MapoDb.obj.taKeepAlive.getByIdxMacchina(idx.ToString())[0].DataOraServer.ToString();
|
||||
memLayer.ML.setRSV(string.Format("KA{0}", idx), DateTime.Now.ToString());
|
||||
}
|
||||
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
|
||||
{
|
||||
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/setredis/5
|
||||
public string setredis(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
|
||||
{
|
||||
memLayer.ML.setRSV(string.Format("KA{0}", idx), DateTime.Now.ToString());
|
||||
answ = memLayer.ML.getRSV(string.Format("KA{0}", idx));
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Errore in setredis{0}{1}", Environment.NewLine, exc));
|
||||
answ = "NO";
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
// GET: IOB/getredis/5
|
||||
public string getredis(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
|
||||
{
|
||||
answ = memLayer.ML.getRSV(string.Format("KA{0}", idx));
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Errore in getredis{0}{1}", Environment.NewLine, exc));
|
||||
answ = "NO";
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
// GET: IOB/setrediscount/5
|
||||
public string setrediscount(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
|
||||
{
|
||||
long count = memLayer.ML.setRCntI(string.Format("CNT{0}", idx));
|
||||
answ = count.ToString();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Errore in setrediscount{0}{1}", Environment.NewLine, exc));
|
||||
answ = "NO";
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
// GET: IOB/getrediscount/5
|
||||
public string getrediscount(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
|
||||
{
|
||||
int answInt = memLayer.ML.getRCnt(string.Format("CNT{0}", idx));
|
||||
answ = answInt.ToString();
|
||||
//answ = answ != "" ? answ : "0";
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Errore in getrediscount{0}{1}", Environment.NewLine, exc));
|
||||
answ = "NO";
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
// GET: IOB/resetrediscount/5
|
||||
public string resetrediscount(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
|
||||
{
|
||||
bool fatto = memLayer.ML.resetRCnt(string.Format("CNT{0}", idx));
|
||||
answ = fatto ? "ZEROED" : "ERROR";
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Errore in getrediscount{0}{1}", Environment.NewLine, exc));
|
||||
answ = "NO";
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user