diff --git a/GPW_Smart/WebUserControls/cmp_params.ascx.cs b/GPW_Smart/WebUserControls/cmp_params.ascx.cs
new file mode 100644
index 0000000..d558244
--- /dev/null
+++ b/GPW_Smart/WebUserControls/cmp_params.ascx.cs
@@ -0,0 +1,51 @@
+using SteamWare;
+using System;
+
+namespace GPW_Smart.WebUserControls
+{
+ public partial class cmp_params : BaseUserControl
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!Page.IsPostBack)
+ {
+ try
+ {
+ ddlNumCol.SelectedValue = numColEU.ToString();
+ ddlNumRow.SelectedValue = numRowTimb.ToString();
+ chkAbilitaAll.Checked = abilitaAll;
+ ddlTextSize.SelectedValue = textSize.ToString();
+ }
+ catch
+ { }
+ }
+ }
+
+ protected void ddlNumRow_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ lbtSalva.Visible = true;
+ }
+ protected void ddlNumCol_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ lbtSalva.Visible = true;
+ }
+ protected void chkAbilitaAll_CheckedChanged(object sender, EventArgs e)
+ {
+ lbtSalva.Visible = true;
+ }
+
+ protected void lbtSalva_Click(object sender, EventArgs e)
+ {
+ numRowTimb = Convert.ToInt32(ddlNumRow.SelectedValue);
+ numColEU = Convert.ToInt32(ddlNumCol.SelectedValue);
+ abilitaAll = chkAbilitaAll.Checked;
+ textSize = ddlTextSize.SelectedValue;
+ Response.Redirect("Timbrature");
+ }
+
+ protected void ddlTextSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ lbtSalva.Visible = true;
+ }
+ }
+}
\ No newline at end of file
diff --git a/GPW_Smart/WebUserControls/cmq_params.ascx.designer.cs b/GPW_Smart/WebUserControls/cmp_params.ascx.designer.cs
similarity index 98%
rename from GPW_Smart/WebUserControls/cmq_params.ascx.designer.cs
rename to GPW_Smart/WebUserControls/cmp_params.ascx.designer.cs
index 7826e2a..f55df5f 100644
--- a/GPW_Smart/WebUserControls/cmq_params.ascx.designer.cs
+++ b/GPW_Smart/WebUserControls/cmp_params.ascx.designer.cs
@@ -11,7 +11,7 @@ namespace GPW_Smart.WebUserControls
{
- public partial class cmq_params
+ public partial class cmp_params
{
///
diff --git a/GPW_Smart/WebUserControls/mod_timbrature.ascx.cs b/GPW_Smart/WebUserControls/mod_timbrature.ascx.cs
index 02e676b..597c4ca 100644
--- a/GPW_Smart/WebUserControls/mod_timbrature.ascx.cs
+++ b/GPW_Smart/WebUserControls/mod_timbrature.ascx.cs
@@ -1,4 +1,5 @@
using GPW_data;
+using GPW_Smart;
using SteamWare;
using System;
using System.Web.UI;
@@ -6,7 +7,7 @@ using System.Web.UI.WebControls;
namespace GPW.WebUserControls
{
- public partial class mod_timbrature : System.Web.UI.UserControl
+ public partial class mod_timbrature : BaseUserControl
{
protected bool forceButtons
{
@@ -19,26 +20,6 @@ namespace GPW.WebUserControls
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)
@@ -58,53 +39,6 @@ namespace GPW.WebUserControls
divTable.Style.Add("font-size", textSize);
}
- public int 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);
- }
- }
- public int numRowTimb
- {
- get
- {
- return memLayer.ML.IntSessionObj("numRowTimb");
- }
- set
- {
- memLayer.ML.setSessionVal("numRowTimb", value);
- }
- }
-
-
- public string textSize
- {
- get
- {
- string answ = memLayer.ML.StringSessionObj("textSize");
- if (string.IsNullOrEmpty(answ))
- answ = "1em";
- return answ;
- }
- set
- {
- memLayer.ML.setSessionVal("textSize", value);
- }
- }
-
///
/// fix buttons button
///
@@ -206,6 +140,16 @@ namespace GPW.WebUserControls
timbratrice.registraTimbratura(IdxDipendente, DateTime.Now, isEntrata, IPv4, "Web", approvata);
lblWarning.Visible = false;
abilitaAll = false;
+ // se manca temperatura x il giorno --> rimando a pagina!
+ DateTime dataRif = DateTime.Today;
+ var tabRT = DataProxy.DP.taRT.getByKey(IdxDipendente, dataRif);
+ if (tabRT.Rows.Count == 0)
+ {
+ // salvo in sessione...
+ memLayer.ML.setSessionVal("dataRif", dataRif);
+ // reinvio
+ Response.Redirect($"TempRil?dataRif={dataRif:yyyy-MM-dd}");
+ }
//aggiorno timbrature visualizzate
setButtons();
updateTimbrature();
@@ -218,27 +162,11 @@ namespace GPW.WebUserControls
}
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)
{
diff --git a/Jenkinsfile b/Jenkinsfile
index a1865c6..c7daa3b 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -10,7 +10,7 @@ pipeline {
steps {
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
script {
- withEnv(['NEXT_BUILD_NUMBER=4116']) {
+ withEnv(['NEXT_BUILD_NUMBER=4117']) {
// 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'