fix warnings vari...

This commit is contained in:
Samuele E. Locatelli
2019-06-10 16:39:43 +02:00
parent b7442c6fab
commit bbbc7c69dc
2 changed files with 7 additions and 66 deletions
+7 -6
View File
@@ -2,6 +2,7 @@
using SteamWare;
using System;
using System.Data;
using System.Globalization;
using System.Web.UI.WebControls;
namespace GMW.WebUserControls
@@ -244,12 +245,12 @@ namespace GMW.WebUserControls
get
{
bool answ = false;
bool.TryParse(hfEnableSelect.Value, out answ);
bool convOk = bool.TryParse(hfEnableSelect.Value, out answ);
return answ;
}
set
{
hfEnableSelect.Value = value.ToString();
hfEnableSelect.Value = value.ToString(new CultureInfo("en-US"));
}
}
/// <summary>
@@ -260,12 +261,12 @@ namespace GMW.WebUserControls
get
{
bool answ = false;
bool.TryParse(hfEnableEdit.Value, out answ);
bool convOk = bool.TryParse(hfEnableEdit.Value, out answ);
return answ;
}
set
{
hfEnableEdit.Value = value.ToString();
hfEnableEdit.Value = value.ToString(new CultureInfo("en-US"));
}
}
/// <summary>
@@ -276,12 +277,12 @@ namespace GMW.WebUserControls
get
{
bool answ = false;
bool.TryParse(hfShowDetail.Value, out answ);
bool convOk = bool.TryParse(hfShowDetail.Value, out answ);
return answ;
}
set
{
hfShowDetail.Value = value.ToString();
hfShowDetail.Value = value.ToString(new CultureInfo("en-US"));
}
}
-60
View File
@@ -1133,66 +1133,6 @@ namespace GMW_data
}
}
/// <summary>
/// Verifica un particolare SE ABBIA un veto data la linea
/// </summary>
/// <param name="codParticolare"></param>
/// <returns></returns>
public virtual bool checkPartVetoByLinea(string codParticolare)
{
bool answ = false;
// cerco se avessi già in redis un controllo particolare/linea attivo e il suo risultato...
string mHash = memLayer.ML.redHash($"lineePartVeto:{Postazione.currCodLinea}:{codParticolare}");
if (memLayer.ML.getRSV(mHash) != null && memLayer.ML.getRSV(mHash) != "")
{
// recupero info...
bool.TryParse(memLayer.ML.getRSV(mHash), out answ);
}
else
{
// se non ho attributi sulal linea è già SENZA veto...
DS_magazzino.ConfLineaDataTable tabConf = MagClass.magazzino.taConfLin.getByLinea(Postazione.currCodLinea);
if (tabConf.Count > 0)
{
// verifico PRIMO RECORD x capire se sono in modalità "passa"
if (tabConf[0].Modo == 1)
{
//--> IMPOSTO VETO
answ = true;
// cerco il recordo del particolare x TOGLIERE VETO
foreach (var item in tabConf)
{
// se trovo il record corrente
if (item.Valore == codParticolare)
{
// tolgo veto ed esco!
answ = false;
break;
}
}
}
// modalità NON PASSA
else
{
// cerco il recordo del particolare x METTERE IL VETO
foreach (var item in tabConf)
{
// se trovo il record corrente
if (item.Valore == codParticolare)
{
// metto veto ed esco!
answ = true;
break;
}
}
}
}
// salvo in redis x 5 minuti il controllo fatto...
memLayer.ML.setRSV(mHash, answ.ToString(), 5 * 60);
}
// restituisco risultato!
return answ;
}
/// <summary>
/// Processa UDC nuovo (eventualmente creando) e vecchio (eventualmente consumando)
/// </summary>
/// <param name="idxCellaCurr"></param>