diff --git a/GPW_Admin/infoPage.aspx.cs b/GPW_Admin/infoPage.aspx.cs
index 1cf83de..14bbe3f 100644
--- a/GPW_Admin/infoPage.aspx.cs
+++ b/GPW_Admin/infoPage.aspx.cs
@@ -6,9 +6,9 @@ using System.Web.UI;
using System.Web.UI.WebControls;
using GPW_data;
-namespace GPW
+namespace GPW_Admin
{
- public partial class infoPage : System.Web.UI.Page
+ public partial class infoPage : BasePage
{
protected void Page_Load(object sender, EventArgs e)
{
diff --git a/GPW_Admin/infoPage.aspx.designer.cs b/GPW_Admin/infoPage.aspx.designer.cs
index ff5de0c..2ce59e1 100644
--- a/GPW_Admin/infoPage.aspx.designer.cs
+++ b/GPW_Admin/infoPage.aspx.designer.cs
@@ -1,68 +1,70 @@
//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
+//
+// Codice generato da uno strumento.
//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
+// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
+// il codice viene rigenerato.
+//
//------------------------------------------------------------------------------
-namespace GPW {
-
-
- public partial class infoPage {
-
+namespace GPW_Admin
+{
+
+
+ public partial class infoPage
+ {
+
///
- /// pnlCheck control.
+ /// Controllo pnlCheck.
///
///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.Panel pnlCheck;
-
+
///
- /// lblInstallation control.
+ /// Controllo lblInstallation.
///
///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.Label lblInstallation;
-
+
///
- /// lblApplication control.
+ /// Controllo lblApplication.
///
///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.Label lblApplication;
-
+
///
- /// lblNumLic control.
+ /// Controllo lblNumLic.
///
///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.Label lblNumLic;
-
+
///
- /// lblExpiryDate control.
+ /// Controllo lblExpiryDate.
///
///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.Label lblExpiryDate;
-
+
///
- /// lblAuthKey control.
+ /// Controllo lblAuthKey.
///
///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.Label lblAuthKey;
}
diff --git a/GPW_Admin/login.aspx.cs b/GPW_Admin/login.aspx.cs
index f6a268e..4c7616a 100644
--- a/GPW_Admin/login.aspx.cs
+++ b/GPW_Admin/login.aspx.cs
@@ -7,14 +7,14 @@ using System.Web.UI.WebControls;
namespace GPW_Admin
{
- public partial class login : System.Web.UI.Page
+ public partial class login : BasePage
{
protected string _nextPage
{
get
{
string pagina = SteamWare.memLayer.ML.StringSessionObj("nextPage");
- if (pagina == "")
+ if (string.IsNullOrEmpty(pagina))
{
pagina = "menu.aspx";
}
diff --git a/GPW_Admin/menu.aspx.cs b/GPW_Admin/menu.aspx.cs
index 0dc7ed3..f164c8f 100644
--- a/GPW_Admin/menu.aspx.cs
+++ b/GPW_Admin/menu.aspx.cs
@@ -7,7 +7,7 @@ using System.Web.UI.WebControls;
namespace GPW_Admin
{
- public partial class menu : System.Web.UI.Page
+ public partial class menu :BasePage
{
protected void Page_Load(object sender, EventArgs e)
{
diff --git a/GPW_Admin/progetti.aspx.cs b/GPW_Admin/progetti.aspx.cs
index 612f1b4..244a4f5 100644
--- a/GPW_Admin/progetti.aspx.cs
+++ b/GPW_Admin/progetti.aspx.cs
@@ -7,7 +7,7 @@ using System.Web.UI.WebControls;
namespace GPW_Admin
{
- public partial class progetti : System.Web.UI.Page
+ public partial class progetti :BasePage
{
protected void Page_Load(object sender, EventArgs e)
{
diff --git a/GPW_Admin/reportProgetti.aspx.cs b/GPW_Admin/reportProgetti.aspx.cs
index bbaf962..cc60a52 100644
--- a/GPW_Admin/reportProgetti.aspx.cs
+++ b/GPW_Admin/reportProgetti.aspx.cs
@@ -7,7 +7,7 @@ using System.Web.UI.WebControls;
namespace GPW_Admin
{
- public partial class reportProgetti : System.Web.UI.Page
+ public partial class reportProgetti :BasePage
{
protected void Page_Load(object sender, EventArgs e)
{
diff --git a/GPW_Admin/reviewTimbrature.aspx.cs b/GPW_Admin/reviewTimbrature.aspx.cs
index cc0866f..4a11a0d 100644
--- a/GPW_Admin/reviewTimbrature.aspx.cs
+++ b/GPW_Admin/reviewTimbrature.aspx.cs
@@ -7,7 +7,7 @@ using System.Web.UI.WebControls;
namespace GPW_Admin
{
- public partial class reviewTimbrature : System.Web.UI.Page
+ public partial class reviewTimbrature :BasePage
{
protected void Page_Load(object sender, EventArgs e)
{
diff --git a/GPW_Admin/spostaFasi.aspx.cs b/GPW_Admin/spostaFasi.aspx.cs
index 97a49bd..8a87ef4 100644
--- a/GPW_Admin/spostaFasi.aspx.cs
+++ b/GPW_Admin/spostaFasi.aspx.cs
@@ -9,17 +9,8 @@ using SteamWare;
namespace GPW_Admin
{
- public partial class spostaFasi : System.Web.UI.Page
+ public partial class spostaFasi : BasePage
{
- ///
- /// effettua traduzione del lemma
- ///
- ///
- ///
- public string traduci(string lemma)
- {
- return user_std.UtSn.Traduci(lemma);
- }
///
/// caricamento pagina
///
diff --git a/GPW_Admin/spostaOre.aspx.cs b/GPW_Admin/spostaOre.aspx.cs
index 0e1135a..e63cf28 100644
--- a/GPW_Admin/spostaOre.aspx.cs
+++ b/GPW_Admin/spostaOre.aspx.cs
@@ -7,7 +7,7 @@ using System.Web.UI.WebControls;
namespace GPW_Admin
{
- public partial class spostaOre : System.Web.UI.Page
+ public partial class spostaOre :BasePage
{
protected void Page_Load(object sender, EventArgs e)
{
diff --git a/GPW_Admin/timbratureMensili.aspx.cs b/GPW_Admin/timbratureMensili.aspx.cs
index 6b2d8f3..31d3b1c 100644
--- a/GPW_Admin/timbratureMensili.aspx.cs
+++ b/GPW_Admin/timbratureMensili.aspx.cs
@@ -7,7 +7,7 @@ using System.Web.UI.WebControls;
namespace GPW_Admin
{
- public partial class timbratureMensili : System.Web.UI.Page
+ public partial class timbratureMensili :BasePage
{
protected void Page_Load(object sender, EventArgs e)
{
diff --git a/GPW_Admin/unauthorized.aspx.cs b/GPW_Admin/unauthorized.aspx.cs
index 25300ef..b05e4ae 100644
--- a/GPW_Admin/unauthorized.aspx.cs
+++ b/GPW_Admin/unauthorized.aspx.cs
@@ -7,7 +7,7 @@ using System.Web.UI.WebControls;
namespace GPW_Admin
{
- public partial class unauthorized1 : System.Web.UI.Page
+ public partial class unauthorized1 :BasePage
{
protected void Page_Load(object sender, EventArgs e)
{
diff --git a/GPW_Admin/utility.cs b/GPW_Admin/utility.cs
deleted file mode 100644
index e87babd..0000000
--- a/GPW_Admin/utility.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-using SteamWare;
-
-namespace GPW_Admin
-{
- public class utility
- {
- ///
- /// determina se si debba usare CDN x scaricare librerie asp.net ajax
- ///
- public static bool EnableCdnAjax
- {
- get
- {
- bool answ = false;
- try
- {
- answ = memLayer.ML.confReadBool("EnableCdnAjax");
- }
- catch
- {
- }
- return answ;
- }
- }
- ///
- /// determina se si debba usare CDN x scaricare librerie jquery
- ///
- public static bool EnableCdnJQ
- {
- get
- {
- bool answ = false;
- try
- {
- answ = memLayer.ML.confReadBool("EnableCdnJQ");
- }
- catch
- {
- }
- return answ;
- }
- }
- }
-}
\ No newline at end of file
diff --git a/GPW_Barcode/GPW_Barcode.csproj b/GPW_Barcode/GPW_Barcode.csproj
index 9cab8e5..3d92e42 100644
--- a/GPW_Barcode/GPW_Barcode.csproj
+++ b/GPW_Barcode/GPW_Barcode.csproj
@@ -24,7 +24,7 @@
-
3.7
+
3.9
true
diff --git a/GPW_Barcode/Web.config b/GPW_Barcode/Web.config
index f149b51..70fa3b5 100644
--- a/GPW_Barcode/Web.config
+++ b/GPW_Barcode/Web.config
@@ -44,9 +44,6 @@
-
-
-
diff --git a/GPW_Barcode/WebUserControls/mod_bCodeTimb.ascx.cs b/GPW_Barcode/WebUserControls/mod_bCodeTimb.ascx.cs
index ba7c34b..cf6b991 100644
--- a/GPW_Barcode/WebUserControls/mod_bCodeTimb.ascx.cs
+++ b/GPW_Barcode/WebUserControls/mod_bCodeTimb.ascx.cs
@@ -9,465 +9,465 @@ using GPW_data;
namespace GPW.WebUserControls
{
- public partial class mod_bCodeTimb : System.Web.UI.UserControl
- {
- ///
- /// salva il dato se il prox sia entrata...
- ///
- protected bool nextIsEntrata
+ public partial class mod_bCodeTimb : System.Web.UI.UserControl
{
- get
- {
- return memLayer.ML.BoolSessionObj("nextIsEntrata");
- }
- set
- {
- memLayer.ML.setSessionVal("nextIsEntrata", value);
- }
- }
- ///
- /// dataora associata all'evento scansioen BCode
- ///
- protected DateTime orarioBCode
- {
- get
- {
- return (DateTime)memLayer.ML.objSessionObj("dataOraBCode");
- }
- set
- {
- memLayer.ML.setSessionVal("dataOraBCode", value);
- }
- }
- ///
- /// indica i secondi di countdown rimasti x auto-commit
- ///
- protected int countDown
- {
- get
- {
- return memLayer.ML.IntSessionObj("countDownBCode");
- }
- set
- {
- memLayer.ML.setSessionVal("countDownBCode", value);
- }
- }
- ///
- /// pagina corrente
- ///
- protected string paginaCorrente
- {
- get
- {
- string answ = "";
- Uri MyUrl = Request.Url;
- string delimStr = "/";
- char[] delimiter = delimStr.ToCharArray();
- string[] finalUrl = MyUrl.LocalPath.ToString().Split(delimiter);
- int n = finalUrl.Length;
- answ = finalUrl[n - 1].ToString();
- return answ;
- }
- }
- ///
- /// prox messaggio utente (da mostrare)
- ///
- protected string nextUsrMsg
- {
- get
- {
- string answ = "";
- try
+ ///
+ /// salva il dato se il prox sia entrata...
+ ///
+ protected bool nextIsEntrata
{
- answ = memLayer.ML.StringSessionObj("nextUsrMsg");
- }
- catch
- { }
- if (answ == "")
- {
- answ = "...waiting...";
- }
- return answ;
- }
- set
- {
- memLayer.ML.setSessionVal("nextUsrMsg", value);
- }
- }
-
- ///
- /// caricamento pagina
- ///
- ///
- ///
- protected void Page_Load(object sender, EventArgs e)
- {
- chekIpPostazione();
- if (!Page.IsPostBack)
- {
- DataProxy.idxDipendente = -1;
- bool visibile = false;
- setCtrlState(visibile);
- checkBarcode();
- }
- timerConf.Tick += new EventHandler(timerConf_Tick);
- lblDipendenteAttivo.Text = nextUsrMsg;
- txtBarcode.Focus();
- }
- ///
- /// verifica IP della postazione chiamante, se non è tra quelli permessi (o non è indicato "*") rimanda a pagina precedente...
- ///
- private void chekIpPostazione()
- {
- // recupero IP
- string IPv4 = Request.UserHostName;
- // controllo se IP locale = approvata...
- if (!memLayer.ML.confReadString("ipv4StazBCode").Contains(IPv4) && memLayer.ML.confReadString("ipv4StazBCode") != "*")
- {
- Response.Redirect("~/Default.aspx");
- }
- }
- ///
- /// allo scadere del timer controllo countdown!
- ///
- ///
- ///
- void timerConf_Tick(object sender, EventArgs e)
- {
- contatorePag = 0;
- if (countDown > 1)
- {
- countDown = countDown - 1;
- lblCountDown.Text = countDown.ToString();
- txtBarcode.Focus();
- }
- else
- {
- // salvo operazione di default!
- registraTimbratura(nextIsEntrata);
- // reset visualizzazione
- setCtrlState(false);
- timerConf.Enabled = false;
- // reset valori
- Response.Redirect(paginaCorrente);
- }
- }
- ///
- /// imposta lo stato visibile dei controlli
- ///
- ///
- private void setCtrlState(bool visibile)
- {
- pnlTimer.Visible = visibile;
- //imgRun.Visible = visibile;
- if (DataProxy.idxDipendente > 0)
- {
- grView.Visible = true;
- }
- else
- {
- grView.Visible = visibile;
- }
- }
- ///
- /// verifica in che stato debbano essere i buttons (se barcode utente valido)
- ///
- private void checkButtons()
- {
- // controllo se il prox comando DOVREBBE essere entrata o uscita
- nextIsEntrata = true;
- // controllo dipendente
- if (DataProxy.idxDipendente > 0)
- {
- // ricavo ultima timbratura..
- nextIsEntrata = timbratrice.nextIsEntrata(DataProxy.idxDipendente);
- string tipoTimb = "uscita";
- // di conseguenza cambio abilitazione ad un buttons
- if (nextIsEntrata)
- {
- btnEntrata.CssClass = "btnPreferred";
- btnUscita.CssClass = "btnStd";
- tipoTimb = "ENTRATA";
- }
- else
- {
- btnEntrata.CssClass = "btnStd";
- btnUscita.CssClass = "btnPreferred";
- tipoTimb = "USCITA";
- }
- lblNextTimbr.Text = string.Format("Allo scadere del timer verrà registrata una timbratura di {0}", tipoTimb);
-
- }
- else
- {
- btnEntrata.CssClass = "btnStd";
- btnUscita.CssClass = "btnStd";
- lblNextTimbr.Text = "";
- }
- }
-
- ///
- /// controlla se ci sia un barcode valido, tra:
- /// - idxDipendente (INT, eventuale padding di zero...)
- /// - matr dipendente
- /// - cf dipendente
- ///
- private void checkBarcode()
- {
- if (barcodeIn != "")
- {
- // mostro i buttons enabled
- btnEntrata.Enabled = true;
- btnUscita.Enabled = true;
- lblMessaggi.Text = "Barcode";
-
- switch (tipoBCode)
- {
- case tipoCodiceBarcode.idxDipendente:
- // calcolo idxOperatore...
- int idxOper = 0;
- try
+ get
{
- idxOper = Convert.ToInt32(barcodeIn.ToLowerInvariant().Replace("idx", ""));
+ return memLayer.ML.BoolSessionObj("nextIsEntrata");
}
- catch
- { }
- // controllo esista il codice idxDipendente scansionato
- if (DataProxy.DP.taDipendenti.getByIdx(idxOper).Rows.Count == 0)
+ set
{
- setCtrlState(false);
- DataProxy.idxDipendente = 0;
- orarioBCode = DateTime.Now;
- timerConf.Enabled = false;
- nextUsrMsg = "...waiting...";
- lblMessaggi.Text += " - codice non valido / non trovato.";
- pnlAll.CssClass = "stileComandoKo";
+ memLayer.ML.setSessionVal("nextIsEntrata", value);
+ }
+ }
+ ///
+ /// dataora associata all'evento scansioen BCode
+ ///
+ protected DateTime orarioBCode
+ {
+ get
+ {
+ return (DateTime)memLayer.ML.objSessionObj("dataOraBCode");
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("dataOraBCode", value);
+ }
+ }
+ ///
+ /// indica i secondi di countdown rimasti x auto-commit
+ ///
+ protected int countDown
+ {
+ get
+ {
+ return memLayer.ML.IntSessionObj("countDownBCode");
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("countDownBCode", value);
+ }
+ }
+ ///
+ /// pagina corrente
+ ///
+ protected string paginaCorrente
+ {
+ get
+ {
+ string answ = "";
+ Uri MyUrl = Request.Url;
+ string delimStr = "/";
+ char[] delimiter = delimStr.ToCharArray();
+ string[] finalUrl = MyUrl.LocalPath.ToString().Split(delimiter);
+ int n = finalUrl.Length;
+ answ = finalUrl[n - 1].ToString();
+ return answ;
+ }
+ }
+ ///
+ /// prox messaggio utente (da mostrare)
+ ///
+ protected string nextUsrMsg
+ {
+ get
+ {
+ string answ = "";
+ try
+ {
+ answ = memLayer.ML.StringSessionObj("nextUsrMsg");
+ }
+ catch
+ { }
+ if (string.IsNullOrEmpty(answ))
+ {
+ answ = "...waiting...";
+ }
+ return answ;
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("nextUsrMsg", value);
+ }
+ }
+
+ ///
+ /// caricamento pagina
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ chekIpPostazione();
+ if (!Page.IsPostBack)
+ {
+ DataProxy.idxDipendente = -1;
+ bool visibile = false;
+ setCtrlState(visibile);
+ checkBarcode();
+ }
+ timerConf.Tick += new EventHandler(timerConf_Tick);
+ lblDipendenteAttivo.Text = nextUsrMsg;
+ txtBarcode.Focus();
+ }
+ ///
+ /// verifica IP della postazione chiamante, se non è tra quelli permessi (o non è indicato "*") rimanda a pagina precedente...
+ ///
+ private void chekIpPostazione()
+ {
+ // recupero IP
+ string IPv4 = Request.UserHostName;
+ // controllo se IP locale = approvata...
+ if (!memLayer.ML.confReadString("ipv4StazBCode").Contains(IPv4) && memLayer.ML.confReadString("ipv4StazBCode") != "*")
+ {
+ Response.Redirect("~/Default.aspx");
+ }
+ }
+ ///
+ /// allo scadere del timer controllo countdown!
+ ///
+ ///
+ ///
+ void timerConf_Tick(object sender, EventArgs e)
+ {
+ contatorePag = 0;
+ if (countDown > 1)
+ {
+ countDown = countDown - 1;
+ lblCountDown.Text = countDown.ToString();
+ txtBarcode.Focus();
}
else
{
- setCtrlState(true);
- DataProxy.idxDipendente = idxOper;
- orarioBCode = DateTime.Now;
- DS_Applicazione.DipendentiRow rigaDip = DataProxy.DP.taDipendenti.getByIdx(idxOper)[0];
- nextUsrMsg = string.Format("{0} {1} - {2: HH:mm:ss}", rigaDip.Cognome, rigaDip.Nome, orarioBCode);
- lblMessaggi.Text += " - impostato dipendente!";
- pnlAll.CssClass = "stileComandoOk";
- // faccio partire countdown
- countDown = SteamWare.memLayer.ML.confReadInt("secTimeoutBCode");
- lblCountDown.Text = countDown.ToString();
- timerConf.Enabled = true;
+ // salvo operazione di default!
+ registraTimbratura(nextIsEntrata);
+ // reset visualizzazione
+ setCtrlState(false);
+ timerConf.Enabled = false;
+ // reset valori
+ Response.Redirect(paginaCorrente);
}
- txtBarcode.Focus();
- break;
- case tipoCodiceBarcode.matrDipendente:
- // fare!!!
- txtBarcode.Focus();
- break;
- case tipoCodiceBarcode.cfDipendente:
- // fare!!!
- txtBarcode.Focus();
- break;
- case tipoCodiceBarcode.Comando:
- // procedo SOLO se ho cod dipendente
- if (DataProxy.DP.taDipendenti.getByIdx(DataProxy.idxDipendente).Rows.Count > 0)
+ }
+ ///
+ /// imposta lo stato visibile dei controlli
+ ///
+ ///
+ private void setCtrlState(bool visibile)
+ {
+ pnlTimer.Visible = visibile;
+ //imgRun.Visible = visibile;
+ if (DataProxy.idxDipendente > 0)
{
- timerConf.Enabled = false;
- setCtrlState(false);
+ grView.Visible = true;
}
- nextUsrMsg = "...waiting...";
- // controlla se sia entra/esci (IN/OUT)
- if (barcodeIn.ToUpperInvariant() == "CMDIN")
+ else
{
- // registro ingresso!
- registraTimbratura(true);
- Response.Redirect(paginaCorrente);
+ grView.Visible = visibile;
}
- else if (barcodeIn.ToUpperInvariant() == "CMDOUT")
+ }
+ ///
+ /// verifica in che stato debbano essere i buttons (se barcode utente valido)
+ ///
+ private void checkButtons()
+ {
+ // controllo se il prox comando DOVREBBE essere entrata o uscita
+ nextIsEntrata = true;
+ // controllo dipendente
+ if (DataProxy.idxDipendente > 0)
{
- // registro uscita!
- registraTimbratura(false);
- Response.Redirect(paginaCorrente);
+ // ricavo ultima timbratura..
+ nextIsEntrata = timbratrice.nextIsEntrata(DataProxy.idxDipendente);
+ string tipoTimb = "uscita";
+ // di conseguenza cambio abilitazione ad un buttons
+ if (nextIsEntrata)
+ {
+ btnEntrata.CssClass = "btnPreferred";
+ btnUscita.CssClass = "btnStd";
+ tipoTimb = "ENTRATA";
+ }
+ else
+ {
+ btnEntrata.CssClass = "btnStd";
+ btnUscita.CssClass = "btnPreferred";
+ tipoTimb = "USCITA";
+ }
+ lblNextTimbr.Text = string.Format("Allo scadere del timer verrà registrata una timbratura di {0}", tipoTimb);
+
}
- //else if (barcodeIn.ToUpperInvariant() == "CMD")
- //{
- // Response.Redirect(paginaCorrente);
- //}
- //DataProxy.idxDipendente = -1;
+ else
+ {
+ btnEntrata.CssClass = "btnStd";
+ btnUscita.CssClass = "btnStd";
+ lblNextTimbr.Text = "";
+ }
+ }
+
+ ///
+ /// controlla se ci sia un barcode valido, tra:
+ /// - idxDipendente (INT, eventuale padding di zero...)
+ /// - matr dipendente
+ /// - cf dipendente
+ ///
+ private void checkBarcode()
+ {
+ if (barcodeIn != "")
+ {
+ // mostro i buttons enabled
+ btnEntrata.Enabled = true;
+ btnUscita.Enabled = true;
+ lblMessaggi.Text = "Barcode";
+
+ switch (tipoBCode)
+ {
+ case tipoCodiceBarcode.idxDipendente:
+ // calcolo idxOperatore...
+ int idxOper = 0;
+ try
+ {
+ idxOper = Convert.ToInt32(barcodeIn.ToLowerInvariant().Replace("idx", ""));
+ }
+ catch
+ { }
+ // controllo esista il codice idxDipendente scansionato
+ if (DataProxy.DP.taDipendenti.getByIdx(idxOper).Rows.Count == 0)
+ {
+ setCtrlState(false);
+ DataProxy.idxDipendente = 0;
+ orarioBCode = DateTime.Now;
+ timerConf.Enabled = false;
+ nextUsrMsg = "...waiting...";
+ lblMessaggi.Text += " - codice non valido / non trovato.";
+ pnlAll.CssClass = "stileComandoKo";
+ }
+ else
+ {
+ setCtrlState(true);
+ DataProxy.idxDipendente = idxOper;
+ orarioBCode = DateTime.Now;
+ DS_Applicazione.DipendentiRow rigaDip = DataProxy.DP.taDipendenti.getByIdx(idxOper)[0];
+ nextUsrMsg = string.Format("{0} {1} - {2: HH:mm:ss}", rigaDip.Cognome, rigaDip.Nome, orarioBCode);
+ lblMessaggi.Text += " - impostato dipendente!";
+ pnlAll.CssClass = "stileComandoOk";
+ // faccio partire countdown
+ countDown = SteamWare.memLayer.ML.confReadInt("secTimeoutBCode");
+ lblCountDown.Text = countDown.ToString();
+ timerConf.Enabled = true;
+ }
+ txtBarcode.Focus();
+ break;
+ case tipoCodiceBarcode.matrDipendente:
+ // fare!!!
+ txtBarcode.Focus();
+ break;
+ case tipoCodiceBarcode.cfDipendente:
+ // fare!!!
+ txtBarcode.Focus();
+ break;
+ case tipoCodiceBarcode.Comando:
+ // procedo SOLO se ho cod dipendente
+ if (DataProxy.DP.taDipendenti.getByIdx(DataProxy.idxDipendente).Rows.Count > 0)
+ {
+ timerConf.Enabled = false;
+ setCtrlState(false);
+ }
+ nextUsrMsg = "...waiting...";
+ // controlla se sia entra/esci (IN/OUT)
+ if (barcodeIn.ToUpperInvariant() == "CMDIN")
+ {
+ // registro ingresso!
+ registraTimbratura(true);
+ Response.Redirect(paginaCorrente);
+ }
+ else if (barcodeIn.ToUpperInvariant() == "CMDOUT")
+ {
+ // registro uscita!
+ registraTimbratura(false);
+ Response.Redirect(paginaCorrente);
+ }
+ //else if (barcodeIn.ToUpperInvariant() == "CMD")
+ //{
+ // Response.Redirect(paginaCorrente);
+ //}
+ //DataProxy.idxDipendente = -1;
+ txtBarcode.Focus();
+ break;
+ default:
+ txtBarcode.Focus();
+ break;
+ }
+ barcodeIn = "";
+ }
+ else
+ {
+ lblMessaggi.Text = "...attesa barcode...";
+ }
+ grView.DataBind();
+ checkButtons();
txtBarcode.Focus();
- break;
- default:
- txtBarcode.Focus();
- break;
}
- barcodeIn = "";
- }
- else
- {
- lblMessaggi.Text = "...attesa barcode...";
- }
- grView.DataBind();
- checkButtons();
- txtBarcode.Focus();
- }
- ///
- /// valore barcode
- ///
- public string barcodeIn
- {
- get
- {
- return txtBarcode.Text.Trim();
- }
- set
- {
- txtBarcode.Text = value;
- }
- }
- ///
- /// salvo entrata
- ///
- ///
- ///
- protected void btnEntrata_Click(object sender, EventArgs e)
- {
- // salvo entrata...
- registraTimbratura(true);
- Response.Redirect(paginaCorrente);
- }
- ///
- /// salvo uscita
- ///
- ///
- ///
- protected void btnUscita_Click(object sender, EventArgs e)
- {
- // salvo uscita
- registraTimbratura(false);
- Response.Redirect(paginaCorrente);
- }
- ///
- /// registro timbratura
- ///
- ///
- ///
- private void registraTimbratura(bool isEntrata)
- {
- // salvo evento entrata...
- string IPv4 = Request.UserHostName;
- // auto-approvazione da web.config
- bool approvata = memLayer.ML.confReadBool("barcodeAutoApprove");
- if (DataProxy.idxDipendente > 0)
- {
- string CognomeNome = "";
- if (memLayer.ML.confReadBool("showNameAfterCmd"))
+ ///
+ /// valore barcode
+ ///
+ public string barcodeIn
{
- CognomeNome = DataProxy.DP.CognomeNomeByIdx(DataProxy.idxDipendente);
+ get
+ {
+ return txtBarcode.Text.Trim();
+ }
+ set
+ {
+ txtBarcode.Text = value;
+ }
}
- if (nextIsEntrata)
+ ///
+ /// salvo entrata
+ ///
+ ///
+ ///
+ protected void btnEntrata_Click(object sender, EventArgs e)
{
- nextUsrMsg = string.Format("{1} ENTRATA {0:HH:mm:ss}", orarioBCode, CognomeNome);
+ // salvo entrata...
+ registraTimbratura(true);
+ Response.Redirect(paginaCorrente);
}
- else
+ ///
+ /// salvo uscita
+ ///
+ ///
+ ///
+ protected void btnUscita_Click(object sender, EventArgs e)
{
- nextUsrMsg = string.Format("{1} USCITA {0:HH:mm:ss}", orarioBCode, CognomeNome);
+ // salvo uscita
+ registraTimbratura(false);
+ Response.Redirect(paginaCorrente);
}
- timbratrice.registraTimbratura(DataProxy.idxDipendente, orarioBCode, isEntrata, IPv4, "Web", approvata);
- //aggiorno timbrature visualizzate
- setButtons();
- grView.DataBind();
- }
- else
- {
- lblMessaggi.Text = "IdxDipendente non trovato! timbratura impossibile";
- pnlAll.CssClass = "stileComandoND";
- }
- }
- ///
- /// imposta i buttons secondo i valori in sessione...
- ///
- private void setButtons()
- {
- // mostrare e abilitare secondo condizioni al contorno
- }
- ///
- /// decodifica il tipo barcode acquisito
- ///
- public tipoCodiceBarcode tipoBCode
- {
- get
- {
- tipoCodiceBarcode answ = tipoCodiceBarcode.ND;
- // controllo non si tratti di un comando...
- string preCmd = memLayer.ML.confReadString("prefComandi");
- if (barcodeIn.StartsWith(preCmd, StringComparison.InvariantCultureIgnoreCase))
+ ///
+ /// registro timbratura
+ ///
+ ///
+ ///
+ private void registraTimbratura(bool isEntrata)
{
- answ = tipoCodiceBarcode.Comando;
+ // salvo evento entrata...
+ string IPv4 = Request.UserHostName;
+ // auto-approvazione da web.config
+ bool approvata = memLayer.ML.confReadBool("barcodeAutoApprove");
+ if (DataProxy.idxDipendente > 0)
+ {
+ string CognomeNome = "";
+ if (memLayer.ML.confReadBool("showNameAfterCmd"))
+ {
+ CognomeNome = DataProxy.DP.CognomeNomeByIdx(DataProxy.idxDipendente);
+ }
+ if (nextIsEntrata)
+ {
+ nextUsrMsg = string.Format("{1} ENTRATA {0:HH:mm:ss}", orarioBCode, CognomeNome);
+ }
+ else
+ {
+ nextUsrMsg = string.Format("{1} USCITA {0:HH:mm:ss}", orarioBCode, CognomeNome);
+ }
+ timbratrice.registraTimbratura(DataProxy.idxDipendente, orarioBCode, isEntrata, IPv4, "Web", approvata);
+ //aggiorno timbrature visualizzate
+ setButtons();
+ grView.DataBind();
+ }
+ else
+ {
+ lblMessaggi.Text = "IdxDipendente non trovato! timbratura impossibile";
+ pnlAll.CssClass = "stileComandoND";
+ }
}
- // controllo se sia un codice "idx"
- else if (barcodeIn.StartsWith("idx", StringComparison.InvariantCultureIgnoreCase))
+ ///
+ /// imposta i buttons secondo i valori in sessione...
+ ///
+ private void setButtons()
{
- answ = tipoCodiceBarcode.idxDipendente;
+ // mostrare e abilitare secondo condizioni al contorno
}
- // controllo se sia un codice "matr"
- else if (barcodeIn.StartsWith("matr", StringComparison.InvariantCultureIgnoreCase))
+ ///
+ /// decodifica il tipo barcode acquisito
+ ///
+ public tipoCodiceBarcode tipoBCode
{
- answ = tipoCodiceBarcode.matrDipendente;
+ get
+ {
+ tipoCodiceBarcode answ = tipoCodiceBarcode.ND;
+ // controllo non si tratti di un comando...
+ string preCmd = memLayer.ML.confReadString("prefComandi");
+ if (barcodeIn.StartsWith(preCmd, StringComparison.InvariantCultureIgnoreCase))
+ {
+ answ = tipoCodiceBarcode.Comando;
+ }
+ // controllo se sia un codice "idx"
+ else if (barcodeIn.StartsWith("idx", StringComparison.InvariantCultureIgnoreCase))
+ {
+ answ = tipoCodiceBarcode.idxDipendente;
+ }
+ // controllo se sia un codice "matr"
+ else if (barcodeIn.StartsWith("matr", StringComparison.InvariantCultureIgnoreCase))
+ {
+ answ = tipoCodiceBarcode.matrDipendente;
+ }
+ // controllo se sia un codice "cf"
+ else if (barcodeIn.StartsWith("cf", StringComparison.InvariantCultureIgnoreCase))
+ {
+ answ = tipoCodiceBarcode.cfDipendente;
+ }
+ return answ;
+ }
}
- // controllo se sia un codice "cf"
- else if (barcodeIn.StartsWith("cf", StringComparison.InvariantCultureIgnoreCase))
+ ///
+ /// inverte valore booleano
+ ///
+ ///
+ ///
+ public bool invBool(object valore)
{
- answ = tipoCodiceBarcode.cfDipendente;
+ bool answ = true;
+ try
+ {
+ answ = !Convert.ToBoolean(valore);
+ }
+ catch
+ { }
+ return answ;
+ }
+ ///
+ /// evento cambio testo
+ ///
+ ///
+ ///
+ protected void txtBarcode_TextChanged(object sender, EventArgs e)
+ {
+ // solo se ho ALMENO 3 char...
+ if (barcodeIn.Length >= 3)
+ {
+ contatorePag = 0;
+ checkBarcode();
+ }
}
- return answ;
- }
- }
- ///
- /// inverte valore booleano
- ///
- ///
- ///
- public bool invBool(object valore)
- {
- bool answ = true;
- try
- {
- answ = !Convert.ToBoolean(valore);
- }
- catch
- { }
- return answ;
- }
- ///
- /// evento cambio testo
- ///
- ///
- ///
- protected void txtBarcode_TextChanged(object sender, EventArgs e)
- {
- // solo se ho ALMENO 3 char...
- if (barcodeIn.Length >= 3)
- {
- contatorePag = 0;
- checkBarcode();
- }
- }
- ///
- /// variabile che conta numero di refresh parziali prima di fare reload completo
- ///
- protected int contatorePag
- {
- get
- {
- return memLayer.ML.IntSessionObj("numChiamatePaginaBCode");
- }
- set
- {
- memLayer.ML.setSessionVal("numChiamatePaginaBCode", value);
- }
- }
+ ///
+ /// variabile che conta numero di refresh parziali prima di fare reload completo
+ ///
+ protected int contatorePag
+ {
+ get
+ {
+ return memLayer.ML.IntSessionObj("numChiamatePaginaBCode");
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("numChiamatePaginaBCode", value);
+ }
+ }
- }
+ }
}
\ No newline at end of file
diff --git a/GPW_Commesse/GPW_Commesse.csproj b/GPW_Commesse/GPW_Commesse.csproj
index 433fd39..3d5efad 100644
--- a/GPW_Commesse/GPW_Commesse.csproj
+++ b/GPW_Commesse/GPW_Commesse.csproj
@@ -24,7 +24,8 @@
- 3.5
+ 3.9
+
true
@@ -128,7 +129,6 @@
-
..\packages\System.Diagnostics.PerformanceCounter.4.7.0\lib\net461\System.Diagnostics.PerformanceCounter.dll
@@ -197,7 +197,6 @@
..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.7\lib\net45\System.Web.Http.WebHost.dll
-
@@ -227,6 +226,7 @@
..\packages\Microsoft.AspNet.FriendlyUrls.Core.1.0.2\lib\net45\Microsoft.AspNet.FriendlyUrls.dll
+
..\packages\WebGrease.1.6.0\lib\WebGrease.dll
True
diff --git a/GPW_Commesse/Web.config b/GPW_Commesse/Web.config
index 54b4227..2d6c07f 100644
--- a/GPW_Commesse/Web.config
+++ b/GPW_Commesse/Web.config
@@ -1,85 +1,89 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
\ No newline at end of file
diff --git a/GPW_Commesse/WebUserControls/mod_autocomplete.ascx.cs b/GPW_Commesse/WebUserControls/mod_autocomplete.ascx.cs
index 382cc57..183b6b7 100644
--- a/GPW_Commesse/WebUserControls/mod_autocomplete.ascx.cs
+++ b/GPW_Commesse/WebUserControls/mod_autocomplete.ascx.cs
@@ -61,7 +61,7 @@ namespace GPW_Commesse.WebUserControls
protected void txtSel_TextChanged(object sender, EventArgs e)
{
- if (txtSel.Text.Trim() == "")
+ if (string.IsNullOrEmpty(txtSel.Text.Trim()))
{
hiddenFieldID.Text = defaultVal;
_valore = defaultVal;
@@ -130,7 +130,7 @@ namespace GPW_Commesse.WebUserControls
{
answ = txtSel.Text.Trim();
}
- if (answ == "")
+ if (string.IsNullOrEmpty(answ))
{
answ = txtSel.Text.Trim();
}
diff --git a/GPW_Commesse/WebUserControls/mod_dateTime.ascx.cs b/GPW_Commesse/WebUserControls/mod_dateTime.ascx.cs
index 5dccdd5..1d9538c 100644
--- a/GPW_Commesse/WebUserControls/mod_dateTime.ascx.cs
+++ b/GPW_Commesse/WebUserControls/mod_dateTime.ascx.cs
@@ -54,7 +54,7 @@ namespace GPW_Commesse.WebUserControls
///
protected void Page_Load(object sender, EventArgs e)
{
- if (!Page.IsPostBack)// || txtData.Text == "")
+ if (!Page.IsPostBack)
{
setInitVal();
valoreDateTime = dataOra;
diff --git a/GPW_Commesse/WebUserControls/mod_filtro.ascx.cs b/GPW_Commesse/WebUserControls/mod_filtro.ascx.cs
index 3b0598f..f0a1ad5 100644
--- a/GPW_Commesse/WebUserControls/mod_filtro.ascx.cs
+++ b/GPW_Commesse/WebUserControls/mod_filtro.ascx.cs
@@ -32,7 +32,7 @@ public partial class mod_filtro : ApplicationUserControl
{
get
{
- bool answ=false;
+ bool answ = false;
try
{
memLayer.ML.isInSessionObject(string.Format("valFiltro_{0}", this.ID));
@@ -40,7 +40,7 @@ public partial class mod_filtro : ApplicationUserControl
catch
{ }
return answ;
- }
+ }
}
protected bool _changeCheckEnabled = true;
protected bool _changeCheckVisible = true;
@@ -76,8 +76,8 @@ public partial class mod_filtro : ApplicationUserControl
base.OnInit(e);
if (!Page.IsPostBack)
{
- if (_showFiltered == "") _showFiltered = "mostraSoloSelez";
- if (_showAll == "") _showAll = "mostraTutti";
+ if (string.IsNullOrEmpty(_showFiltered)) _showFiltered = "mostraSoloSelez";
+ if (string.IsNullOrEmpty(_showAll)) _showAll = "mostraTutti";
}
}
@@ -304,7 +304,7 @@ public partial class mod_filtro : ApplicationUserControl
chkFilt.Checked = true;
}
}
- catch(Exception exc)
+ catch (Exception exc)
{
logger.lg.scriviLog(string.Format("Eccezione:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
dlFilt.SelectedIndex = 0;
@@ -376,7 +376,7 @@ public partial class mod_filtro : ApplicationUserControl
updateChkLbl();
}
}
-
+
///
/// oggetto ODS con cui popolare il selettore, VINCOLO abbia campi value(key) / label
///
diff --git a/GPW_Commesse/WebUserControls/mod_menuTopFull.ascx.cs b/GPW_Commesse/WebUserControls/mod_menuTopFull.ascx.cs
index 12f98a1..3a3d94a 100644
--- a/GPW_Commesse/WebUserControls/mod_menuTopFull.ascx.cs
+++ b/GPW_Commesse/WebUserControls/mod_menuTopFull.ascx.cs
@@ -53,7 +53,7 @@ namespace GPW_Commesse.WebUserControls
///
private void checkUser()
{
- if (user_std.UtSn.CognomeNome == "")
+ if (string.IsNullOrEmpty(user_std.UtSn.CognomeNome))
{
// fix
memLayer.ML.setSessionVal("preUrlString", "", true);
diff --git a/GPW_Commesse/WebUserControls/mod_ricercaGenerica.ascx.cs b/GPW_Commesse/WebUserControls/mod_ricercaGenerica.ascx.cs
index c4917b9..fb623c7 100644
--- a/GPW_Commesse/WebUserControls/mod_ricercaGenerica.ascx.cs
+++ b/GPW_Commesse/WebUserControls/mod_ricercaGenerica.ascx.cs
@@ -19,8 +19,8 @@ public partial class mod_ricercaGenerica : ApplicationUserControl
#endregion
- # region area protected
-
+ #region area protected
+
protected override void Page_Load(object sender, EventArgs e)
{
base.Page_Load(sender, e);
@@ -64,7 +64,7 @@ public partial class mod_ricercaGenerica : ApplicationUserControl
///
protected void salvaCerca()
{
- if (testoRicerca == "")
+ if (string.IsNullOrEmpty(testoRicerca))
{
SteamWare.memLayer.ML.emptySessionVal("valoreCercato");
}
diff --git a/GPW_Commesse/login.aspx.cs b/GPW_Commesse/login.aspx.cs
index 2c6f39b..be8e04f 100644
--- a/GPW_Commesse/login.aspx.cs
+++ b/GPW_Commesse/login.aspx.cs
@@ -14,7 +14,7 @@ namespace GPW.A4
get
{
string pagina = SteamWare.memLayer.ML.StringSessionObj("nextPage");
- if (pagina == "")
+ if (string.IsNullOrEmpty(pagina))
{
pagina = "commesseUtente";
}
diff --git a/GPW_Smart/GPW_Smart.csproj b/GPW_Smart/GPW_Smart.csproj
index f952ae5..c367624 100644
--- a/GPW_Smart/GPW_Smart.csproj
+++ b/GPW_Smart/GPW_Smart.csproj
@@ -24,7 +24,7 @@
- 3.5
+ 3.9
true
diff --git a/GPW_Smart/Web.config b/GPW_Smart/Web.config
index fef0cd1..953295c 100644
--- a/GPW_Smart/Web.config
+++ b/GPW_Smart/Web.config
@@ -57,9 +57,6 @@
-
-
-
diff --git a/GPW_Smart/WebUserControls/cmp_menuTop.ascx.cs b/GPW_Smart/WebUserControls/cmp_menuTop.ascx.cs
index 8b8f24a..921e654 100644
--- a/GPW_Smart/WebUserControls/cmp_menuTop.ascx.cs
+++ b/GPW_Smart/WebUserControls/cmp_menuTop.ascx.cs
@@ -98,7 +98,7 @@ namespace GPW_Smart.WebUserControls
try
{
HttpCookie cookie = Request.Cookies["AuthGPW"];
- if (cookie == null || cookie.Value == "")
+ if (cookie == null || string.IsNullOrEmpty(cookie.Value ))
{
// rimando pagina x registrazione devices
Response.Redirect("~/regNewDevice.aspx");
diff --git a/HOME/HOME.csproj b/HOME/HOME.csproj
index c915b7f..334d441 100644
--- a/HOME/HOME.csproj
+++ b/HOME/HOME.csproj
@@ -26,7 +26,7 @@
- 3.7
+ 3.9
true