-
-
-
-
-
- <%# Eval("dataLav", "{0:MM.dd} {0:ddd}") %>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+ <%# Eval("dataLav", "{0:MM.dd} {0:ddd}") %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GPW_Smart/WebUserControls/mod_timbrature.ascx.cs b/GPW_Smart/WebUserControls/mod_timbrature.ascx.cs
index 80218c3..9663592 100644
--- a/GPW_Smart/WebUserControls/mod_timbrature.ascx.cs
+++ b/GPW_Smart/WebUserControls/mod_timbrature.ascx.cs
@@ -6,251 +6,278 @@ using System.Web.UI.WebControls;
namespace GPW.WebUserControls
{
- public partial class mod_timbrature : System.Web.UI.UserControl
- {
- protected bool forceButtons
+ public partial class mod_timbrature : System.Web.UI.UserControl
{
- get
- {
- return !abilitaAll;
- }
- set
- {
- abilitaAll = !(value);
- }
- }
- public bool abilitaAll
- {
- get
- {
- bool answ = false;
- try
+ protected bool forceButtons
{
- string rawData = memLayer.ML.getRSV("abilitaAll");
- bool.TryParse(rawData, out answ);
+ get
+ {
+ return !abilitaAll;
+ }
+ set
+ {
+ abilitaAll = !(value);
+ }
+ }
+ public bool abilitaAll
+ {
+ get
+ {
+ bool answ = false;
+ try
+ {
+ string rawData = memLayer.ML.getRSV("abilitaAll");
+ bool.TryParse(rawData, out answ);
+ }
+ catch
+ { }
+ return answ;
+ }
+ set
+ {
+ int ttlSec = value ? memLayer.ML.CRI("ttlAbilitaAll") : 0;
+ memLayer.ML.setRSV("abilitaAll", value.ToString(), ttlSec);
+ }
+ }
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!Page.IsPostBack)
+ {
+ // verifico se ci sia un numero di righe selezionate altrimenti lo imposto...
+ if (!memLayer.ML.isInSessionObject("numColEU")) numColEU = 2;
+ if (!memLayer.ML.isInSessionObject("numRowTimb")) numRowTimb = 10;
+ memLayer.ML.setSessionVal("dataRif", DateTime.Today);
+ }
+ setButtons();
}
- catch
- { }
- return answ;
- }
- set
- {
- int ttlSec = value ? memLayer.ML.CRI("ttlAbilitaAll") : 0;
- memLayer.ML.setRSV("abilitaAll", value.ToString(), ttlSec);
- }
- }
- protected void Page_Load(object sender, EventArgs e)
- {
- if (!Page.IsPostBack)
- {
- // verifico se ci sia un numero di righe selezionate altrimenti lo imposto...
- if (!memLayer.ML.isInSessionObject("numColEU")) numColEU = 2;
- if (!memLayer.ML.isInSessionObject("numRowTimb")) numRowTimb = 10;
- memLayer.ML.setSessionVal("dataRif", DateTime.Today);
- }
- setButtons();
- }
- public int numColEU
- {
- get
- {
- int answ = 2;
- try
+ public int numColEU
{
- answ = memLayer.ML.IntSessionObj("numColEU");
+ get
+ {
+ int answ = 2;
+ try
+ {
+ answ = memLayer.ML.IntSessionObj("numColEU");
+ }
+ catch
+ { }
+ if (answ <= 0) answ = 2;
+ return answ;
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("numColEU", value);
+ }
}
- catch
- { }
- if (answ <= 0) answ = 2;
- return answ;
- }
- set
- {
- memLayer.ML.setSessionVal("numColEU", value);
- }
- }
- public int numRowTimb
- {
- get
- {
- return memLayer.ML.IntSessionObj("numRowTimb");
- }
- set
- {
- memLayer.ML.setSessionVal("numRowTimb", value);
- }
- }
- ///
- /// fix buttons button
- ///
- private void setButtons()
- {
- // controllo SE voglio inibire i buttons...
- if (forceButtons)
- {
- // controllo se il prox comando DOVREBBE essere entrata o uscita
- bool nextIsEntrata = true;
- // controllo dipendente
- if (IdxDipendente > 0)
+ public int numRowTimb
{
- // ricavo ultima timbratura..
- nextIsEntrata = timbratrice.nextIsEntrata(IdxDipendente);
- // di conseguenza cambio abilitazione ad un buttons
- if (nextIsEntrata)
- {
- fixBtnInOut(true, false);
- }
- else
- {
- fixBtnInOut(false, true);
- }
+ get
+ {
+ return memLayer.ML.IntSessionObj("numRowTimb");
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("numRowTimb", value);
+ }
}
- else
+ ///
+ /// fix buttons button
+ ///
+ private void setButtons()
{
- fixBtnInOut(false, false);
+ // controllo SE voglio inibire i buttons...
+ if (forceButtons)
+ {
+ // controllo se il prox comando DOVREBBE essere entrata o uscita
+ bool nextIsEntrata = true;
+ // controllo dipendente
+ if (IdxDipendente > 0)
+ {
+ // ricavo ultima timbratura..
+ nextIsEntrata = timbratrice.nextIsEntrata(IdxDipendente);
+ // di conseguenza cambio abilitazione ad un buttons
+ if (nextIsEntrata)
+ {
+ fixBtnInOut(true, false);
+ }
+ else
+ {
+ fixBtnInOut(false, true);
+ }
+ }
+ else
+ {
+ fixBtnInOut(false, false);
+ }
+ }
+ else
+ {
+ fixBtnInOut(true, true);
+ }
}
- }
- else
- {
- fixBtnInOut(true, true);
- }
- }
- private void fixBtnInOut(bool showIn, bool showOut)
- {
- lbtEntrata.Enabled = showIn;
- lbtUscita.Enabled = showOut;
- lbtEntrata.CssClass = showIn ? "btn btn-primary btn-block" : "btn btn-outline-primary disabled btn-block";
- lbtUscita.CssClass = showOut ? "btn btn-success btn-block" : "btn btn-outline-success disabled btn-block";
- }
-
- ///
- /// timbro entrata...
- ///
- ///
- ///
- protected void lbtEntrata_Click(object sender, EventArgs e)
- {
- bool isEntrata = true;
- registraTimbratura(isEntrata);
- }
- ///
- /// uscita...
- ///
- ///
- ///
- protected void lbtUscita_Click(object sender, EventArgs e)
- {
- bool isEntrata = false;
- registraTimbratura(isEntrata);
- }
- ///
- /// Aggiorno visualizzazione
- ///
- public void doUpdate()
- {
- setButtons();
- grView.DataBind();
- }
- ///
- /// update elenco ultime timbrature
- ///
- private void updateTimbrature()
- {
- // aggiorno datagrid
- }
- ///
- /// registro timbratura
- ///
- ///
- ///
- private int registraTimbratura(bool isEntrata)
- {
- // salvo evento entrata...
- string IPv4 = "";
- bool approvata = false;
- if (IdxDipendente > 0)
- {
- // recupero IP
- IPv4 = Request.UserHostName;
- // controllo se IP locale = approvata...
- if (IPv4.Contains(memLayer.ML.confReadString("localNet")))
+ private void fixBtnInOut(bool showIn, bool showOut)
{
- approvata = true;
+ lbtEntrata.Enabled = showIn;
+ lbtUscita.Enabled = showOut;
+ lbtEntrata.CssClass = showIn ? "btn btn-primary btn-block" : "btn btn-outline-primary disabled btn-block";
+ lbtUscita.CssClass = showOut ? "btn btn-success btn-block" : "btn btn-outline-success disabled btn-block";
}
- timbratrice.registraTimbratura(IdxDipendente, DateTime.Now, isEntrata, IPv4, "Web", approvata);
- lblWarning.Visible = false;
- abilitaAll = false;
- //aggiorno timbrature visualizzate
- setButtons();
- updateTimbrature();
- grView.DataBind();
- }
- else
- {
- lblWarning.Text = "IdxDipendente non trovato! timbratura impossibile";
- lblWarning.Visible = true;
- }
- return IdxDipendente;
- }
- ///
- /// idx dipendente loggato
- ///
- protected int IdxDipendente
- {
- get
- {
- int idx = 0;
- try
+
+ ///
+ /// timbro entrata...
+ ///
+ ///
+ ///
+ protected void lbtEntrata_Click(object sender, EventArgs e)
{
- idx = memLayer.ML.IntSessionObj("IdxDipendente");
+ bool isEntrata = true;
+ registraTimbratura(isEntrata);
+ }
+ ///
+ /// uscita...
+ ///
+ ///
+ ///
+ protected void lbtUscita_Click(object sender, EventArgs e)
+ {
+ bool isEntrata = false;
+ registraTimbratura(isEntrata);
+ }
+ ///
+ /// Aggiorno visualizzazione
+ ///
+ public void doUpdate()
+ {
+ setButtons();
+ grView.DataBind();
+ }
+ ///
+ /// update elenco ultime timbrature
+ ///
+ private void updateTimbrature()
+ {
+ // aggiorno datagrid
+ }
+ ///
+ /// registro timbratura
+ ///
+ ///
+ ///
+ private int registraTimbratura(bool isEntrata)
+ {
+ // salvo evento entrata...
+ string IPv4 = "";
+ bool approvata = false;
+ if (IdxDipendente > 0)
+ {
+ // recupero IP
+ IPv4 = Request.UserHostName;
+ // controllo se IP locale = approvata...
+ if (IPv4.Contains(memLayer.ML.confReadString("localNet")))
+ {
+ approvata = true;
+ }
+ timbratrice.registraTimbratura(IdxDipendente, DateTime.Now, isEntrata, IPv4, "Web", approvata);
+ lblWarning.Visible = false;
+ abilitaAll = false;
+ //aggiorno timbrature visualizzate
+ setButtons();
+ updateTimbrature();
+ grView.DataBind();
+ }
+ else
+ {
+ lblWarning.Text = "IdxDipendente non trovato! timbratura impossibile";
+ lblWarning.Visible = true;
+ }
+ return IdxDipendente;
+ }
+ ///
+ /// idx dipendente loggato
+ ///
+ protected int IdxDipendente
+ {
+ get
+ {
+ int idx = 0;
+ try
+ {
+ idx = memLayer.ML.IntSessionObj("IdxDipendente");
+ }
+ catch
+ { }
+ return idx;
+ }
+ }
+ ///
+ /// inverte valore booleano
+ ///
+ ///
+ ///
+ public bool invBool(object valore)
+ {
+ bool answ = true;
+ try
+ {
+ answ = !Convert.ToBoolean(valore);
+ }
+ catch
+ { }
+ return answ;
}
- catch
- { }
- return idx;
- }
- }
- ///
- /// inverte valore booleano
- ///
- ///
- ///
- public bool invBool(object valore)
- {
- bool answ = true;
- try
- {
- answ = !Convert.ToBoolean(valore);
- }
- catch
- { }
- return answ;
- }
- protected void grView_RowCreated(object sender, GridViewRowEventArgs e)
- {
- int maxNum = e.Row.Cells.Count - 2;
- for (int i = numColEU * 2 + 1; i < maxNum; i++)
- {
- e.Row.Cells[i].Visible = false;
- }
- }
+ protected void grView_RowCreated(object sender, GridViewRowEventArgs e)
+ {
+ int maxNum = e.Row.Cells.Count - 2;
+ for (int i = numColEU * 2 + 1; i < maxNum; i++)
+ {
+ e.Row.Cells[i].Visible = false;
+ }
+ }
- protected void grView_SelectedIndexChanged(object sender, EventArgs e)
- {
- // rimando ai progetti sulla data indicata...
- DateTime dataRif = DateTime.Today;
- try
- {
- dataRif = Convert.ToDateTime(grView.SelectedDataKey["dataLav"]);
- }
- catch
- { }
- // salvo in sessione...
- memLayer.ML.setSessionVal("dataRif", dataRif);
- // reinvio
- Response.Redirect(string.Format("Progetti?dataRif={0:yyyy-MM-dd}", dataRif));
+ protected void grView_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ // rimando ai progetti sulla data indicata...
+ DateTime dataRif = DateTime.Today;
+ try
+ {
+ dataRif = Convert.ToDateTime(grView.SelectedDataKey["dataLav"]);
+ }
+ catch
+ { }
+ // salvo in sessione...
+ memLayer.ML.setSessionVal("dataRif", dataRif);
+ // reinvio
+ Response.Redirect($"Progetti?dataRif={dataRif:yyyy-MM-dd}");
+ }
+
+ public bool gtZero(object _valore)
+ {
+ bool answ = false;
+ decimal valore = 0;
+ decimal.TryParse(_valore.ToString(), out valore);
+ answ = valore > 0;
+ return answ;
+ }
+
+ protected void lbShowTemp_Click(object sender, EventArgs e)
+ {
+ // recupero data di riferimento
+ try
+ {
+ LinkButton lbt = (LinkButton)sender;
+ string cmdArg = lbt.CommandArgument;
+ DateTime dataRif = DateTime.Today;
+ DateTime.TryParse(cmdArg, out dataRif);
+ // salvo in sessione...
+ memLayer.ML.setSessionVal("dataRif", dataRif);
+ // reinvio
+ Response.Redirect($"TempRil?dataRif={dataRif:yyyy-MM-dd}");
+ }
+ catch
+ { }
+ }
}
- }
}
\ No newline at end of file
diff --git a/GPW_Smart/WebUserControls/mod_timbrature.ascx.designer.cs b/GPW_Smart/WebUserControls/mod_timbrature.ascx.designer.cs
index d2df10f..90e24d8 100644
--- a/GPW_Smart/WebUserControls/mod_timbrature.ascx.designer.cs
+++ b/GPW_Smart/WebUserControls/mod_timbrature.ascx.designer.cs
@@ -7,11 +7,13 @@
//
//------------------------------------------------------------------------------
-namespace GPW.WebUserControls {
-
-
- public partial class mod_timbrature {
-
+namespace GPW.WebUserControls
+{
+
+
+ public partial class mod_timbrature
+ {
+
///
/// Controllo lbtEntrata.
///
@@ -20,7 +22,7 @@ namespace GPW.WebUserControls {
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.LinkButton lbtEntrata;
-
+
///
/// Controllo lbtUscita.
///
@@ -29,7 +31,7 @@ namespace GPW.WebUserControls {
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.LinkButton lbtUscita;
-
+
///
/// Controllo lblWarning.
///
@@ -38,7 +40,7 @@ namespace GPW.WebUserControls {
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.Label lblWarning;
-
+
///
/// Controllo grView.
///
@@ -47,7 +49,7 @@ namespace GPW.WebUserControls {
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.GridView grView;
-
+
///
/// Controllo ods.
///
diff --git a/Jenkinsfile b/Jenkinsfile
index 633105f..6f35c08 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -10,7 +10,7 @@ pipeline {
steps {
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
script {
- withEnv(['NEXT_BUILD_NUMBER=4114']) {
+ withEnv(['NEXT_BUILD_NUMBER=4115']) {
// env.versionNumber = VersionNumber(versionNumberString : '2.6.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
env.versionNumber = VersionNumber(versionNumberString : '2.6.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
env.APP_NAME = 'GPW'