From 01cd5642a304de9f2e4d5abed8d5d83c29979fcb Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Fri, 4 Oct 2019 11:26:13 +0200 Subject: [PATCH] Ulteriore fix mancata timbratura --- GPW_Smart/WebUserControls/mod_dateTime.ascx | 9 +- GPW_Smart/WebUserControls/mod_mancTimb.ascx | 208 ++++++++---------- .../WebUserControls/mod_mancTimb.ascx.cs | 25 ++- .../mod_mancTimb.ascx.designer.cs | 67 +----- Jenkinsfile | 2 +- 5 files changed, 119 insertions(+), 192 deletions(-) diff --git a/GPW_Smart/WebUserControls/mod_dateTime.ascx b/GPW_Smart/WebUserControls/mod_dateTime.ascx index 3c06fc9..5469aa5 100644 --- a/GPW_Smart/WebUserControls/mod_dateTime.ascx +++ b/GPW_Smart/WebUserControls/mod_dateTime.ascx @@ -5,13 +5,12 @@
-
- +
+
-
- +
+
diff --git a/GPW_Smart/WebUserControls/mod_mancTimb.ascx b/GPW_Smart/WebUserControls/mod_mancTimb.ascx index a805fe1..1333a32 100644 --- a/GPW_Smart/WebUserControls/mod_mancTimb.ascx +++ b/GPW_Smart/WebUserControls/mod_mancTimb.ascx @@ -1,126 +1,96 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_mancTimb.ascx.cs" Inherits="GPW.WebUserControls.mod_mancTimb" %> +<%@ Register Src="~/WebUserControls/mod_dateTime.ascx" TagPrefix="uc1" TagName="mod_dateTime" %> -
-
- - - - +
+
+ Gestione mancate timbrature
-
- - - - - - - - -
-
-
-
- -
-
- - - -
-
- -
-
- - - - - - - -
-
-
-
- Richiesta -
-
- Timbrature -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-
- - +
+
+
+ +    ENTRATA +   USCITA + +
+
+
+
+ +
+
+
+
+ Richiesta +
+
+ Timbrature +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
-
- +
+ diff --git a/GPW_Smart/WebUserControls/mod_mancTimb.ascx.cs b/GPW_Smart/WebUserControls/mod_mancTimb.ascx.cs index 99791e5..579c018 100644 --- a/GPW_Smart/WebUserControls/mod_mancTimb.ascx.cs +++ b/GPW_Smart/WebUserControls/mod_mancTimb.ascx.cs @@ -14,17 +14,25 @@ namespace GPW.WebUserControls // salvo data corrente x filtraggi... if (!Page.IsPostBack) { - memLayer.ML.setSessionVal("today", DateTime.Now.ToShortDateString()); + memLayer.ML.setSessionVal("today", DateTime.Today.ToShortDateString()); // imposto entrata rblEntrata.SelectedIndex = 0; - // imposto valori selezionati a metà - DateTime adesso = DateTime.Now; - ddlOra.SelectedValue = adesso.Hour.ToString(); - ddlMin.SelectedValue = "30"; + presetDateTime(); chkShowAll.Visible = userCanApprove; } checkFixOds(); } + + private void presetDateTime() + { + // imposto valori selezionati a metà + DateTime adesso = DateTime.Now; + // arrotondo a 5 minuti... + int minuti = adesso.Minute; + adesso = adesso.AddMinutes(-minuti).AddMinutes((minuti / 5) * 5); + mod_dateTime.valoreDateTime = adesso; + } + public event EventHandler ev_reqUpdate; /// /// registro timbratura NON APPROVATA @@ -61,12 +69,7 @@ namespace GPW.WebUserControls try { CultureInfo ita = new CultureInfo("it-IT"); - logger.lg.scriviLog(string.Format("Data: {0}", ddlData.SelectedValue)); - richiesta = Convert.ToDateTime(ddlData.SelectedValue, ita); - - double ora = Convert.ToDouble(ddlOra.SelectedValue); - double minuto = Convert.ToDouble(ddlMin.SelectedValue); - richiesta = richiesta.AddHours(ora).AddMinutes(minuto); + richiesta = mod_dateTime.valoreDateTime; bool isEntrata = Convert.ToBoolean(rblEntrata.SelectedValue); registraTimbraturaNonApp(isEntrata, richiesta); // aggiorno gridview diff --git a/GPW_Smart/WebUserControls/mod_mancTimb.ascx.designer.cs b/GPW_Smart/WebUserControls/mod_mancTimb.ascx.designer.cs index 6b78068..19b33ad 100644 --- a/GPW_Smart/WebUserControls/mod_mancTimb.ascx.designer.cs +++ b/GPW_Smart/WebUserControls/mod_mancTimb.ascx.designer.cs @@ -22,58 +22,13 @@ namespace GPW.WebUserControls { protected global::System.Web.UI.WebControls.RadioButtonList rblEntrata; /// - /// Controllo ddlData. + /// Controllo mod_dateTime. /// /// /// 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.DropDownList ddlData; - - /// - /// Controllo odsDateValide. - /// - /// - /// 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.ObjectDataSource odsDateValide; - - /// - /// Controllo ddlOra. - /// - /// - /// 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.DropDownList ddlOra; - - /// - /// Controllo odsOra. - /// - /// - /// 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.ObjectDataSource odsOra; - - /// - /// Controllo ddlMin. - /// - /// - /// 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.DropDownList ddlMin; - - /// - /// Controllo odsMin. - /// - /// - /// 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.ObjectDataSource odsMin; + protected global::GPW.WebUserControls.mod_dateTime mod_dateTime; /// /// Controllo lbtRichMT. @@ -111,15 +66,6 @@ namespace GPW.WebUserControls { /// protected global::System.Web.UI.WebControls.ObjectDataSource ods; - /// - /// Controllo txtArrot. - /// - /// - /// 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.TextBox txtArrot; - /// /// Controllo chkShowAll. /// @@ -128,5 +74,14 @@ 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.CheckBox chkShowAll; + + /// + /// Controllo txtArrot. + /// + /// + /// 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.TextBox txtArrot; } } diff --git a/Jenkinsfile b/Jenkinsfile index 3e9843d..18515e1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,7 +14,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=4073']) { + withEnv(['NEXT_BUILD_NUMBER=4075']) { // env.versionNumber = VersionNumber(versionNumberString : '2.5.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '2.5.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.APP_NAME = 'GPW'