Update x tanti "micro-errori" ed eccezioni

This commit is contained in:
Samuele E. Locatelli
2018-12-21 16:28:56 +01:00
parent 5264861a65
commit 09e571a8cf
21 changed files with 1539 additions and 1491 deletions
+7 -4
View File
@@ -2057,12 +2057,15 @@ namespace GMW_data
public int numUdcDaPart(string CodCS, string Particolare, string codEsponente, string codFigura, string CodImballo, string codTipoLista)
{
int answ = 0;
try
if (Particolare != "")
{
answ = taVParticolariOverwiew.getByDatiListaPrelievo(Particolare, CodCS, codEsponente, codFigura, CodImballo, codTipoLista)[0].NumUDC;
try
{
answ = taVParticolariOverwiew.getByDatiListaPrelievo(Particolare, CodCS, codEsponente, codFigura, CodImballo, codTipoLista)[0].NumUDC;
}
catch
{ }
}
catch
{ }
return answ;
}
/// <summary>
+241 -238
View File
@@ -2,246 +2,249 @@
namespace GMW_data
{
/// <summary>
/// classe gestione dati inerenti la postazione (fisica) da cui si esegue la pagina web
/// </summary>
public class Postazione
{
/// <summary>
/// classe gestione dati inerenti la postazione (fisica) da cui si esegue la pagina web
/// indica stampante associata alla postazione corrente
/// </summary>
public class Postazione
public static string printer
{
/// <summary>
/// indica stampante associata alla postazione corrente
/// </summary>
public static string printer
{
get
{
return memLayer.ML.StringSessionObj("postazione_printer");
}
set
{
memLayer.ML.setSessionVal("postazione_printer", value);
}
}
/// <summary>
/// indica formato Dmtx associato alla postazione corrente
/// </summary>
public static string formatoDmtx
{
get
{
return memLayer.ML.StringSessionObj("postazione_formatoDmtx");
}
set
{
memLayer.ML.setSessionVal("postazione_formatoDmtx", value);
}
}
/// <summary>
/// indica name della postazione corrente
/// </summary>
public static string name
{
get
{
return memLayer.ML.StringSessionObj("postazione_name");
}
set
{
memLayer.ML.setSessionVal("postazione_name", value);
}
}
/// <summary>
/// indica ip della postazione corrente
/// </summary>
public static string IP
{
get
{
return memLayer.ML.StringSessionObj("postazione_IP");
}
set
{
memLayer.ML.setSessionVal("postazione_IP", value);
}
}
/// <summary>
/// warning text x la postazione corrente
/// </summary>
public static string warningText
{
get
{
return memLayer.ML.StringSessionObj("warningText");
}
set
{
memLayer.ML.setSessionVal("warningText", value);
}
}
/// <summary>
/// MESSAGGI text x la postazione corrente
/// </summary>
public static string messaggiText
{
get
{
return memLayer.ML.StringSessionObj("messaggiText");
}
set
{
memLayer.ML.setSessionVal("messaggiText", value);
}
}
/// <summary>
/// indica calsse css della postazione corrente
/// </summary>
public static string CssClass
{
get
{
return memLayer.ML.StringSessionObj("cssClass");
}
set
{
memLayer.ML.setSessionVal("cssClass", value);
}
}
/// <summary>
/// codice della linea corrente
/// </summary>
public static string currCodLinea
{
get
{
string answ = "";
if (memLayer.ML.isInSessionObject(string.Format("codLinea-{0}", Postazione.IP)))
{
answ = memLayer.ML.StringSessionObj(string.Format("codLinea-{0}", Postazione.IP));
}
return answ;
}
set
{
memLayer.ML.setSessionVal(string.Format("codLinea-{0}", Postazione.IP), value);
}
}
/// <summary>
/// NOME della linea corrente
/// </summary>
public static string currNomeLinea
{
get
{
string answ = "";
if (memLayer.ML.isInSessionObject(string.Format("nomeLinea-{0}", Postazione.IP)))
{
answ = memLayer.ML.StringSessionObj(string.Format("nomeLinea-{0}", Postazione.IP));
}
return answ;
}
set
{
memLayer.ML.setSessionVal(string.Format("nomeLinea-{0}", Postazione.IP), value);
}
}
/// <summary>
/// idx cella associata alla linea corrente
/// </summary>
public static int currIdxCella
{
get
{
int answ = 0;
if (memLayer.ML.isInSessionObject(string.Format("IdxCella-{0}", Postazione.IP)))
{
answ = memLayer.ML.IntSessionObj(string.Format("IdxCella-{0}", Postazione.IP));
}
return answ;
}
set
{
memLayer.ML.setSessionVal(string.Format("IdxCella-{0}", Postazione.IP), value);
}
}
/// <summary>
/// cod cella associata alla linea corrente
/// </summary>
public static string currCodCella
{
get
{
string answ = "";
if (memLayer.ML.isInSessionObject(string.Format("CodCella-{0}", Postazione.IP)))
{
answ = memLayer.ML.StringSessionObj(string.Format("CodCella-{0}", Postazione.IP));
}
return answ;
}
set
{
memLayer.ML.setSessionVal(string.Format("CodCella-{0}", Postazione.IP), value);
}
}
/// <summary>
/// cod blocco associata alla linea corrente
/// </summary>
public static string currCodBlocco
{
get
{
string answ = "";
try
{
answ = currCodCella.Substring(0, 3);
}
catch
{ }
return answ;
}
}
/// <summary>
/// definisce se mostrare lo storico
/// </summary>
public static bool showStorico
{
get
{
bool answ = false;
if (memLayer.ML.isInSessionObject("showHist"))
{
answ = memLayer.ML.BoolSessionObj("showHist");
}
return answ;
}
set
{
memLayer.ML.setSessionVal("showHist", value);
}
}
/// <summary>
/// effettua calcolo parametri postazione dato IP
/// </summary>
public static void setupPrinter()
{
name = dnsUtils.DetermineCompName(IP);
// cerco stampante x postazione
printer = "n.d.";
try
{
DS_Applicazione.ElencoPostazioniDataTable tabPost = DataProxy.obj.taElPost.getByCod(name);
if (tabPost.Rows.Count > 0)
{
printer = tabPost[0].stampante;
formatoDmtx = tabPost[0].FormatoDtmx;
}
else
{
tabPost = DataProxy.obj.taElPost.getByCod("default");
printer = tabPost[0].stampante;
formatoDmtx = tabPost[0].FormatoDtmx;
}
}
catch
{ }
}
get
{
return memLayer.ML.StringSessionObj("postazione_printer");
}
set
{
memLayer.ML.setSessionVal("postazione_printer", value);
}
}
/// <summary>
/// indica formato Dmtx associato alla postazione corrente
/// </summary>
public static string formatoDmtx
{
get
{
return memLayer.ML.StringSessionObj("postazione_formatoDmtx");
}
set
{
memLayer.ML.setSessionVal("postazione_formatoDmtx", value);
}
}
/// <summary>
/// indica name della postazione corrente
/// </summary>
public static string name
{
get
{
return memLayer.ML.StringSessionObj("postazione_name");
}
set
{
memLayer.ML.setSessionVal("postazione_name", value);
}
}
/// <summary>
/// indica ip della postazione corrente
/// </summary>
public static string IP
{
get
{
return memLayer.ML.StringSessionObj("postazione_IP");
}
set
{
memLayer.ML.setSessionVal("postazione_IP", value);
}
}
/// <summary>
/// warning text x la postazione corrente
/// </summary>
public static string warningText
{
get
{
return memLayer.ML.StringSessionObj("warningText");
}
set
{
memLayer.ML.setSessionVal("warningText", value);
}
}
/// <summary>
/// MESSAGGI text x la postazione corrente
/// </summary>
public static string messaggiText
{
get
{
return memLayer.ML.StringSessionObj("messaggiText");
}
set
{
memLayer.ML.setSessionVal("messaggiText", value);
}
}
/// <summary>
/// indica calsse css della postazione corrente
/// </summary>
public static string CssClass
{
get
{
return memLayer.ML.StringSessionObj("cssClass");
}
set
{
memLayer.ML.setSessionVal("cssClass", value);
}
}
/// <summary>
/// codice della linea corrente
/// </summary>
public static string currCodLinea
{
get
{
string answ = "";
if (memLayer.ML.isInSessionObject(string.Format("codLinea-{0}", Postazione.IP)))
{
answ = memLayer.ML.StringSessionObj(string.Format("codLinea-{0}", Postazione.IP));
}
return answ;
}
set
{
memLayer.ML.setSessionVal(string.Format("codLinea-{0}", Postazione.IP), value);
}
}
/// <summary>
/// NOME della linea corrente
/// </summary>
public static string currNomeLinea
{
get
{
string answ = "";
if (memLayer.ML.isInSessionObject(string.Format("nomeLinea-{0}", Postazione.IP)))
{
answ = memLayer.ML.StringSessionObj(string.Format("nomeLinea-{0}", Postazione.IP));
}
return answ;
}
set
{
memLayer.ML.setSessionVal(string.Format("nomeLinea-{0}", Postazione.IP), value);
}
}
/// <summary>
/// idx cella associata alla linea corrente
/// </summary>
public static int currIdxCella
{
get
{
int answ = 0;
if (memLayer.ML.isInSessionObject(string.Format("IdxCella-{0}", Postazione.IP)))
{
answ = memLayer.ML.IntSessionObj(string.Format("IdxCella-{0}", Postazione.IP));
}
return answ;
}
set
{
memLayer.ML.setSessionVal(string.Format("IdxCella-{0}", Postazione.IP), value);
}
}
/// <summary>
/// cod cella associata alla linea corrente
/// </summary>
public static string currCodCella
{
get
{
string answ = "";
if (memLayer.ML.isInSessionObject(string.Format("CodCella-{0}", Postazione.IP)))
{
answ = memLayer.ML.StringSessionObj(string.Format("CodCella-{0}", Postazione.IP));
}
return answ;
}
set
{
memLayer.ML.setSessionVal(string.Format("CodCella-{0}", Postazione.IP), value);
}
}
/// <summary>
/// cod blocco associata alla linea corrente
/// </summary>
public static string currCodBlocco
{
get
{
string answ = "";
if (currCodCella.Length > 3)
{
try
{
answ = currCodCella.Substring(0, 3);
}
catch
{ }
}
return answ;
}
}
/// <summary>
/// definisce se mostrare lo storico
/// </summary>
public static bool showStorico
{
get
{
bool answ = false;
if (memLayer.ML.isInSessionObject("showHist"))
{
answ = memLayer.ML.BoolSessionObj("showHist");
}
return answ;
}
set
{
memLayer.ML.setSessionVal("showHist", value);
}
}
/// <summary>
/// effettua calcolo parametri postazione dato IP
/// </summary>
public static void setupPrinter()
{
name = dnsUtils.DetermineCompName(IP);
// cerco stampante x postazione
printer = "n.d.";
try
{
DS_Applicazione.ElencoPostazioniDataTable tabPost = DataProxy.obj.taElPost.getByCod(name);
if (tabPost.Rows.Count > 0)
{
printer = tabPost[0].stampante;
formatoDmtx = tabPost[0].FormatoDtmx;
}
else
{
tabPost = DataProxy.obj.taElPost.getByCod("default");
printer = tabPost[0].stampante;
formatoDmtx = tabPost[0].FormatoDtmx;
}
}
catch
{ }
}
}
}