From e2ecb3cd279b99f5a9e14e7475d506b16c274df1 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Thu, 3 Sep 2020 09:53:50 +0200 Subject: [PATCH 1/4] Aggiunto gest temp da commesse UT standard --- GPW_Commesse/BaseUserControl.cs | 73 ++ GPW_Commesse/GPW_Commesse.csproj | 11 + GPW_Commesse/WebUserControls/cmp_rilTemp.ascx | 20 + .../WebUserControls/cmp_rilTemp.ascx.cs | 88 ++ .../cmp_rilTemp.ascx.designer.cs | 62 ++ .../WebUserControls/mod_commUtLog.ascx | 261 ++--- .../WebUserControls/mod_commUtLog.ascx.cs | 984 +++++++++--------- .../mod_commUtLog.ascx.designer.cs | 312 +++--- GPW_Data/DS_Applicazione.Designer.cs | 32 +- GPW_Data/DS_Applicazione.xsd | 56 +- GPW_Data/DS_Applicazione.xss | 30 +- GPW_Smart/WebUserControls/cmp_rilTemp.ascx.cs | 1 - 12 files changed, 1147 insertions(+), 783 deletions(-) create mode 100644 GPW_Commesse/BaseUserControl.cs create mode 100644 GPW_Commesse/WebUserControls/cmp_rilTemp.ascx create mode 100644 GPW_Commesse/WebUserControls/cmp_rilTemp.ascx.cs create mode 100644 GPW_Commesse/WebUserControls/cmp_rilTemp.ascx.designer.cs diff --git a/GPW_Commesse/BaseUserControl.cs b/GPW_Commesse/BaseUserControl.cs new file mode 100644 index 0000000..62ce9ea --- /dev/null +++ b/GPW_Commesse/BaseUserControl.cs @@ -0,0 +1,73 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using GPW_data; +using SteamWare; +using System.Globalization; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace GPW_Commesse +{ + public class BaseUserControl : System.Web.UI.UserControl + { + /// + /// Evento cancel + /// + public event EventHandler ehCancel; + /// + /// Evento save + /// + public event EventHandler ehSave; + /// + /// Sollevo evento cancel + /// + protected void raiseCancel() + { + if (ehCancel != null) + { + ehCancel(this, new EventArgs()); + } + } + /// + /// Sollevo evento save + /// + protected void raiseSave() + { + if (ehSave != null) + { + ehSave(this, new EventArgs()); + } + } + /// + /// Verifica se il valore sia > 0 + /// + /// + /// + public bool gtZero(object _valore) + { + bool answ = false; + decimal valore = 0; + decimal.TryParse(_valore.ToString(), out valore); + answ = valore > 0; + return answ; + } + + /// + /// idxDipendente in sessione + /// + protected int idxDip + { + get + { + return memLayer.ML.IntSessionObj("idxDipBCode"); + } + set + { + memLayer.ML.setSessionVal("idxDipBCode", value); + } + } + + } +} \ No newline at end of file diff --git a/GPW_Commesse/GPW_Commesse.csproj b/GPW_Commesse/GPW_Commesse.csproj index 1406c71..4016c52 100644 --- a/GPW_Commesse/GPW_Commesse.csproj +++ b/GPW_Commesse/GPW_Commesse.csproj @@ -444,6 +444,7 @@ + @@ -564,6 +565,9 @@ + + ASPXCodeBehind + commesseUtente.aspx ASPXCodeBehind @@ -610,6 +614,13 @@ AjaxSimpleFull.Master + + cmp_rilTemp.ascx + ASPXCodeBehind + + + cmp_rilTemp.ascx + cmp_toggle.ascx ASPXCodeBehind diff --git a/GPW_Commesse/WebUserControls/cmp_rilTemp.ascx b/GPW_Commesse/WebUserControls/cmp_rilTemp.ascx new file mode 100644 index 0000000..c9c8efd --- /dev/null +++ b/GPW_Commesse/WebUserControls/cmp_rilTemp.ascx @@ -0,0 +1,20 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_rilTemp.ascx.cs" Inherits="GPW_Commesse.WebUserControls.cmp_rilTemp" %> + +
+
+

Temperatura

+
+
+ <%: string.Format("{0:yyyy-MM-dd, dddd}", dtRif) %> +
+
+ +
+
+ Cancel +
+
+ Save +
+
+ \ No newline at end of file diff --git a/GPW_Commesse/WebUserControls/cmp_rilTemp.ascx.cs b/GPW_Commesse/WebUserControls/cmp_rilTemp.ascx.cs new file mode 100644 index 0000000..f51760e --- /dev/null +++ b/GPW_Commesse/WebUserControls/cmp_rilTemp.ascx.cs @@ -0,0 +1,88 @@ +using GPW_data; +using SteamWare; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace GPW_Commesse.WebUserControls +{ + public partial class cmp_rilTemp : BaseUserControl + { + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + setupData(); + } + } + + public DateTime dtRif + { + get + { + + DateTime answ = DateTime.Today; + DateTime.TryParse(hfDataRif.Value, out answ); + return answ; + } + set + { + hfDataRif.Value = value.ToString(); + setupData(); + } + } + + protected decimal tempRilevata + { + get + { + decimal answ = 37; + decimal.TryParse(txtTempRil.Text.Replace(".", ","), out answ); + return answ; + } + set + { + + txtTempRil.Text = $"{value:0.0}".Replace(",", "."); + } + } + + private void setupData() + { + // recupero dati temperatura + decimal tempRil = 0; + try + { + if (DataProxy.idxDipendente > 0) + { + var tabRT = DataProxy.DP.taRT.getByKey(DataProxy.idxDipendente, dtRif); + if (tabRT != null && tabRT.Rows.Count > 0) + { + tempRil = tabRT[0].tempRil; + } + } + } + catch + { } + tempRilevata = tempRil; + } + + + + protected void lbtSave_Click(object sender, EventArgs e) + { + DataProxy.DP.taRT.upsertQuery(DataProxy.idxDipendente, dtRif, tempRilevata); + // evento chiusura + raiseSave(); + } + + protected void lbtCancel_Click(object sender, EventArgs e) + { + // evento chiusura + raiseCancel(); + } + } +} \ No newline at end of file diff --git a/GPW_Commesse/WebUserControls/cmp_rilTemp.ascx.designer.cs b/GPW_Commesse/WebUserControls/cmp_rilTemp.ascx.designer.cs new file mode 100644 index 0000000..7c6c12b --- /dev/null +++ b/GPW_Commesse/WebUserControls/cmp_rilTemp.ascx.designer.cs @@ -0,0 +1,62 @@ +//------------------------------------------------------------------------------ +// +// Codice generato da uno strumento. +// +// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se +// il codice viene rigenerato. +// +//------------------------------------------------------------------------------ + +namespace GPW_Commesse.WebUserControls +{ + + + public partial class cmp_rilTemp + { + + /// + /// Controllo lblData. + /// + /// + /// 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 lblData; + + /// + /// Controllo txtTempRil. + /// + /// + /// 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 txtTempRil; + + /// + /// Controllo lbtCancel. + /// + /// + /// 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.LinkButton lbtCancel; + + /// + /// Controllo lbtSave. + /// + /// + /// 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.LinkButton lbtSave; + + /// + /// Controllo hfDataRif. + /// + /// + /// 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.HiddenField hfDataRif; + } +} diff --git a/GPW_Commesse/WebUserControls/mod_commUtLog.ascx b/GPW_Commesse/WebUserControls/mod_commUtLog.ascx index cefff82..9cec132 100644 --- a/GPW_Commesse/WebUserControls/mod_commUtLog.ascx +++ b/GPW_Commesse/WebUserControls/mod_commUtLog.ascx @@ -6,131 +6,150 @@ <%@ Register Src="mod_elencoTimbr.ascx" TagName="mod_elencoTimbr" TagPrefix="uc5" %> <%@ Register Src="mod_TagCloudProgetti.ascx" TagName="mod_TagCloudProgetti" TagPrefix="uc6" %> <%@ Register Src="~/WebUserControls/cmp_toggle.ascx" TagPrefix="uc2" TagName="cmp_toggle" %> +<%@ Register Src="~/WebUserControls/cmp_rilTemp.ascx" TagPrefix="uc2" TagName="cmp_rilTemp" %> + -
-
+
+
+
+
+
+
+ +
+
+ Sel globale: + +
+
+
+
+ + + + +
+ +
+
+ +
+
+ +
+
+
+
+ + + + No record + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+ + + + + +
+
+
+ + + + + + + + + + + + + +
+ + +
+
+ +
+ +
+
+ +
+ + + + +
+ +
+
+ +
+
+
+ + + + + + + + + +
+
+ +
+ +
+
+
+ + +
+
+
+
+
+
-
-
-
- -
-
- Sel globale: -
-
-
-
- -
- -
-
- -
-
- -
-
-
-
- - - - No record - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
-
- -
- -
-
- -
- - - - -
- -
-
- -
-
-
- - - - - - - - - -
-
- -
- -
-
-
- - -
-
-
-
-
-
-
diff --git a/GPW_Commesse/WebUserControls/mod_commUtLog.ascx.cs b/GPW_Commesse/WebUserControls/mod_commUtLog.ascx.cs index 55a0224..adc56b1 100644 --- a/GPW_Commesse/WebUserControls/mod_commUtLog.ascx.cs +++ b/GPW_Commesse/WebUserControls/mod_commUtLog.ascx.cs @@ -7,491 +7,535 @@ using System.Web.UI.WebControls; namespace GPW_Commesse.WebUserControls { - /// - /// modalità ammesse per il controllo - /// - public enum modoCommesse - { /// - /// elenco giornate e resoconto + /// modalità ammesse per il controllo /// - elenco, - /// - /// edit timbrature attivo - /// - editTimb, - /// - /// edit Registro Attività attivo - /// - editRegAtt - } - public partial class mod_commUtLog : System.Web.UI.UserControl - { - /// - /// Determina se visualizzare entrambe le schede... - /// - protected bool openBoth + public enum modoCommesse { - get - { - return cmp_toggle.toggleValue; - } + /// + /// elenco giornate e resoconto + /// + elenco, + /// + /// edit timbrature attivo + /// + editTimb, + /// + /// edit Registro Attività attivo + /// + editRegAtt, + /// + /// edit Rilievo Temperatura attivo + /// + editRilTemp } - public string cssClassProgetti + public partial class mod_commUtLog : BaseUserControl { - get - { - string answ = ""; - if (openBoth) + /// + /// Determina se visualizzare entrambe le schede... + /// + protected bool openBoth { - answ = " d-inline-block text-truncate"; + get + { + return cmp_toggle.toggleValue; + } } - return answ; - } - } - - public modoCommesse activeMode - { - get - { - modoCommesse answ = modoCommesse.elenco; - try + public string cssClassProgetti { - answ = (modoCommesse)memLayer.ML.objSessionObj("activeModeComm"); + get + { + string answ = ""; + if (openBoth) + { + answ = " d-inline-block text-truncate"; + } + return answ; + } } - catch - { } - return answ; - } - set - { - memLayer.ML.setSessionVal("activeModeComm", value); - } - } - /// - /// Avvio pagina - /// - /// - /// - protected void Page_Load(object sender, EventArgs e) - { - memLayer.ML.setSessionVal("maxErrMin", memLayer.ML.confReadInt("maxErrMin")); - memLayer.ML.setSessionVal("maxErrPlus", memLayer.ML.confReadInt("maxErrPlus")); - if (!Page.IsPostBack) - { - activeMode = modoCommesse.elenco; - intervalloDate periodo = new intervalloDate(); - periodo.fine = DateTime.Now.AddDays(1); - periodo.inizio = periodo.fine.AddDays(memLayer.ML.confReadInt("defDayFrom")); - mod_periodoAnalisi1.intervalloAnalisi = periodo; - // salvo link in HF - hfDataFrom.Value = periodo.inizio.ToString(); - hfDataTo.Value = periodo.fine.ToString(); - // imposto modo tag cloud - string modoTC = memLayer.ML.confReadString("TagCloudMode"); - switch (modoTC) + + public modoCommesse activeMode { - case "elenco": - mod_TagCloudProgetti1.modo = TagCloudMode.elenco; - break; - case "elencoCPF": - mod_TagCloudProgetti1.modo = TagCloudMode.elencoCPF; - break; - case "piramide": - mod_TagCloudProgetti1.modo = TagCloudMode.piramide; - break; - case "standard": - default: - mod_TagCloudProgetti1.modo = TagCloudMode.standard; - break; + get + { + modoCommesse answ = modoCommesse.elenco; + try + { + answ = (modoCommesse)memLayer.ML.objSessionObj("activeModeComm"); + } + catch + { } + return answ; + } + set + { + memLayer.ML.setSessionVal("activeModeComm", value); + } } - } - showPanels(); - grView.DataBind(); - mod_commUtMancTimbr1.eh_nuovoValore += new EventHandler(mod_commUtMancTimbr1_eh_nuovoValore); - mod_commAttivitaDesk1.eh_nuovoValore += new EventHandler(mod_commAttivitaDesk1_eh_nuovoValore); - mod_TagCloudProgetti1.eh_newVal += new EventHandler(mod_TagCloudProgetti1_eh_newVal); - mod_TagCloudProgetti1.eh_refresh += mod_TagCloudProgetti1_eh_refresh; - mod_periodoAnalisi1.eh_doUpdate += mod_periodoAnalisi1_eh_doUpdate; - cmp_toggle.ehToggle += Cmp_toggle_ehToggle; - } - - private void Cmp_toggle_ehToggle(object sender, EventArgs e) - { - showPanels(); - } - - void mod_TagCloudProgetti1_eh_refresh(object sender, EventArgs e) - { - mod_commAttivitaDesk1.doUpdate(); - grView.DataBind(); - } - - void mod_periodoAnalisi1_eh_doUpdate(object sender, EventArgs e) - { - // 2016.04.07: salvo intervallo nei 2 hidden field - hfDataFrom.Value = mod_periodoAnalisi1.intervalloAnalisi.inizio.ToString(); - hfDataTo.Value = mod_periodoAnalisi1.intervalloAnalisi.fine.ToString(); - // update - mod_commAttivitaDesk1.doUpdate(); - grView.DataBind(); - } - - void mod_TagCloudProgetti1_eh_newVal(object sender, EventArgs e) - { - mod_commAttivitaDesk1.doUpdate(); - grView.DataBind(); - } - - void mod_commAttivitaDesk1_eh_nuovoValore(object sender, EventArgs e) - { - mod_TagCloudProgetti1.doUpdate(); - grView.DataBind(); - } - - void mod_commUtMancTimbr1_eh_nuovoValore(object sender, EventArgs e) - { - grView.DataBind(); - } - /// - /// inverte valore booleano - /// - /// - /// - public bool invBool(object valore) - { - bool answ = true; - try - { - answ = !Convert.ToBoolean(valore); - } - catch - { } - return answ; - } - /// - /// idxDipendente in sessione - /// - protected int idxDip - { - get - { - return memLayer.ML.IntSessionObj("idxDipBCode"); - } - set - { - memLayer.ML.setSessionVal("idxDipBCode", value); - } - } - - private void editTimbr(string dataRif) - { - DateTime adesso = DateTime.Now; - CultureInfo ita = new CultureInfo("it-IT"); - mod_commUtMancTimbr1.valoreDateTime = Convert.ToDateTime(dataRif, ita).AddHours(adesso.Hour).AddMinutes(adesso.Minute - adesso.Minute % 5); - //salvo in sessione dati x detail timbrature - memLayer.ML.setSessionVal("inizioDet", Convert.ToDateTime(dataRif, ita).Date); - memLayer.ML.setSessionVal("fineDet", Convert.ToDateTime(dataRif, ita).Date.AddDays(1)); - memLayer.ML.setSessionVal("idxDip_det", DataProxy.idxDipendente); - // imposto modalità - activeMode = modoCommesse.editTimb; - showPanels(); - } - - protected void lnkEditTimbr_Click(object sender, EventArgs e) - { - string dataRif = ((LinkButton)sender).CommandArgument; - // verifico se dip sia attivo... - if (DataProxy.currDipIsActive) - { - editTimbr(dataRif); - // apro anche data dell'altro SE abilitato - if (openBoth) + /// + /// Avvio pagina + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) { - editCommDay(dataRif); + memLayer.ML.setSessionVal("maxErrMin", memLayer.ML.confReadInt("maxErrMin")); + memLayer.ML.setSessionVal("maxErrPlus", memLayer.ML.confReadInt("maxErrPlus")); + if (!Page.IsPostBack) + { + activeMode = modoCommesse.elenco; + intervalloDate periodo = new intervalloDate(); + periodo.fine = DateTime.Now.AddDays(1); + periodo.inizio = periodo.fine.AddDays(memLayer.ML.confReadInt("defDayFrom")); + mod_periodoAnalisi1.intervalloAnalisi = periodo; + // salvo link in HF + hfDataFrom.Value = periodo.inizio.ToString(); + hfDataTo.Value = periodo.fine.ToString(); + // imposto modo tag cloud + string modoTC = memLayer.ML.confReadString("TagCloudMode"); + switch (modoTC) + { + case "elenco": + mod_TagCloudProgetti1.modo = TagCloudMode.elenco; + break; + case "elencoCPF": + mod_TagCloudProgetti1.modo = TagCloudMode.elencoCPF; + break; + case "piramide": + mod_TagCloudProgetti1.modo = TagCloudMode.piramide; + break; + case "standard": + default: + mod_TagCloudProgetti1.modo = TagCloudMode.standard; + break; + } + } + showPanels(); + grView.DataBind(); + mod_commUtMancTimbr1.eh_nuovoValore += new EventHandler(mod_commUtMancTimbr1_eh_nuovoValore); + mod_commAttivitaDesk1.eh_nuovoValore += new EventHandler(mod_commAttivitaDesk1_eh_nuovoValore); + mod_TagCloudProgetti1.eh_newVal += new EventHandler(mod_TagCloudProgetti1_eh_newVal); + mod_TagCloudProgetti1.eh_refresh += mod_TagCloudProgetti1_eh_refresh; + mod_periodoAnalisi1.eh_doUpdate += mod_periodoAnalisi1_eh_doUpdate; + cmp_toggle.ehToggle += Cmp_toggle_ehToggle; + cmp_rilTemp.ehCancel += cmp_rilTemp_ehCancel; + cmp_rilTemp.ehSave += cmp_rilTemp_ehSave; } - } - } - private void editCommDay(string dataRif) - { - CultureInfo ita = new CultureInfo("it-IT"); - mod_commAttivitaDesk1.idxDipCurr = DataProxy.idxDipendente; - mod_commAttivitaDesk1.valoreDateTime = Convert.ToDateTime(dataRif, ita); - mod_TagCloudProgetti1.dataRif = Convert.ToDateTime(dataRif, ita); - //salvo in sessione dati x detail timbrature - memLayer.ML.setSessionVal("inizioDet", Convert.ToDateTime(dataRif, ita).Date); - memLayer.ML.setSessionVal("fineDet", Convert.ToDateTime(dataRif, ita).Date.AddDays(1)); - memLayer.ML.setSessionVal("idxDip_det", DataProxy.idxDipendente); - // imposto modalità - activeMode = modoCommesse.editRegAtt; - showPanels(); - mod_commAttivitaDesk1.doUpdate(); - } - protected void lnkEditComm_Click(object sender, EventArgs e) - { - string dataRif = ((LinkButton)sender).CommandArgument; - // verifico se dip sia attivo... - if (DataProxy.currDipIsActive) - { - editCommDay(dataRif); - // apro anche data dell'altro SE abilitato - if (openBoth) + private void cmp_rilTemp_ehSave(object sender, EventArgs e) { - editTimbr(dataRif); + activeMode = modoCommesse.elenco; + showPanels(); } - } - } - /// - /// indica se sia abilitato l'editing delle attività legate alle commesse e l'utente sia attivo!!! - /// - public bool regAttEnabled - { - get - { - return memLayer.ML.confReadBool("regAttEnabled") && DataProxy.currDipIsActive; - } - } - /// - /// - /// - /// - /// - public string classByPerm(object minPerm) - { - string answ = ""; - if (Convert.ToDouble(minPerm) > 0) - { - answ = "lblWarning"; - } - return answ; - } - /// - /// prepara tooltip permessi/straordinarie - /// - /// - /// - /// - public string tooltipPermStra(object minStra, object minPerm) - { - string answ = ""; - try - { - if (memLayer.ML.confReadBool("reviewShowOreMin")) - { - answ = string.Format("Straordinarie: {0} - Permessi: {1} (h:mm)", utils.formOreMin(Convert.ToDecimal(minStra) / 60), utils.formOreMin(Convert.ToDecimal(minPerm) / 60)); - } - else - { - answ = string.Format("Straordinarie: {0:0.##} h - Permessi: {1:0.##} h", Convert.ToDouble(minStra) / 60, Convert.ToDouble(minPerm) / 60); - } - } - catch - { } - return answ; - } - /// - /// imposta visualizzazione dei pannelli opzionali laterali a seocnda del modo attivo - /// - protected void showPanels() - { - // imposto valori default - bool timbr = false; - bool commesse = false; - divDx.Attributes.Remove("class"); - divCn.Attributes.Remove("class"); - divSx.Attributes.Remove("class"); - if (openBoth) - { - switch (activeMode) - { - case modoCommesse.editTimb: - case modoCommesse.editRegAtt: - timbr = true; - commesse = true; - divCn.Attributes.Add("class", "col-sm-6 px-1"); - divSx.Attributes.Add("class", "col-sm-2 pr-0"); - divDx.Attributes.Add("class", "col-sm-4 pl-0"); - divDx.Visible = true; - divSx.Visible = true; - break; - case modoCommesse.elenco: - default: - divCn.Attributes.Add("class", "col-12"); - divDx.Visible = false; - divSx.Visible = false; - break; - } - } - else - { - switch (activeMode) - { - case modoCommesse.editTimb: - timbr = true; - divCn.Attributes.Add("class", "col-sm-7 col-md-8 col-lg-9"); - divSx.Attributes.Add("class", "col-sm-5 col-md-4 col-lg-3"); - divDx.Visible = false; - divSx.Visible = true; - break; - case modoCommesse.editRegAtt: - commesse = true; - divCn.Attributes.Add("class", "col-sm-6 col-md-7 col-lg-8"); - divDx.Attributes.Add("class", "col-sm-6 col-md-5 col-lg-4"); - divDx.Visible = true; - divSx.Visible = false; - break; - case modoCommesse.elenco: - default: - divCn.Attributes.Add("class", "col-12"); - divDx.Visible = false; - divSx.Visible = false; - break; - } - } - // fix finale! - pnlEditCom.Visible = commesse; - pnlEditOre.Visible = timbr; - mod_commUtMancTimbr1.Visible = timbr; - mod_commAttivitaDesk1.Visible = commesse; - } - /// - /// chiamata del button close (entrambi) - /// - /// - /// - protected void btnClose_Click(object sender, EventArgs e) - { - activeMode = modoCommesse.elenco; - showPanels(); - grView.DataBind(); - } - /// - /// fornisce img x check coerenza ore timbrate e commesse - /// - /// - /// - public string imgChk(object okLavCom) - { - string answ = "~/images/statoKo_m.png"; - try - { - if (Convert.ToBoolean(okLavCom)) - { - answ = "~/images/statoOk_m.png"; - } - } - catch - { } - return answ; - } - /// - /// formatta stringa giustificativi - /// - /// permessi - /// ferie - /// malattia - /// festività - /// MPP - /// - public string txtGiust(object _minPerm, object _minFer, object _minMal, object _minFest, object _minMPP, object _min104, object _minCassa) - { - string answ = ""; - double minPerm = Convert.ToInt32(_minPerm); - double minFer = Convert.ToInt32(_minFer); - double minMal = Convert.ToInt32(_minMal); - double minFest = Convert.ToInt32(_minFest); - double minMpp = Convert.ToInt32(_minMPP); - double min104 = Convert.ToInt32(_min104); - double minCassa = Convert.ToInt32(_minCassa); - if (memLayer.ML.confReadBool("reviewShowOreMin")) - { - if (minPerm > 0) answ += string.Format("{0} Pe ", utils.formOreMin(Convert.ToDecimal(minPerm / 60))); - if (minFer > 0) answ += string.Format("{0} Fe ", utils.formOreMin(Convert.ToDecimal(minFer / 60))); - if (minMal > 0) answ += string.Format("{0} Ma ", utils.formOreMin(Convert.ToDecimal(minMal / 60))); - if (minFest > 0) answ += string.Format("{0} Fs ", utils.formOreMin(Convert.ToDecimal(minFest / 60))); - if (minMpp > 0) answ += string.Format("{0} Mpp ", utils.formOreMin(Convert.ToDecimal(minMpp / 60))); - if (min104 > 0) answ += string.Format("{0} 104 ", utils.formOreMin(Convert.ToDecimal(min104 / 60))); - if (minCassa > 0) answ += string.Format("{0} Cassa ", utils.formOreMin(Convert.ToDecimal(minCassa / 60))); - } - else - { - if (minPerm > 0) answ += string.Format("{0:0.00} Pe ", minPerm / 60); - if (minFer > 0) answ += string.Format("{0:0.00} Fe ", minFer / 60); - if (minMal > 0) answ += string.Format("{0:0.00} Ma ", minMal / 60); - if (minFest > 0) answ += string.Format("{0:0.00} Fs ", minFest / 60); - if (minMpp > 0) answ += string.Format("{0:0.00} Mpp ", minMpp / 60); - if (min104 > 0) answ += string.Format("{0:0.00} 104 ", min104 / 60); - if (minCassa > 0) answ += string.Format("{0:0.00} Cassa ", minCassa / 60); - } - return answ; - } - /// - /// formatta stringa tooltip giustificativi - /// - /// permessi - /// ferie - /// malattia - /// festività - /// MPP - /// - public string tooltipGiust(object _minPerm, object _minFer, object _minMal, object _minFest, object _minMPP, object _min104, object _minCassa) - { - string answ = ""; - double minPerm = Convert.ToInt32(_minPerm); - double minFer = Convert.ToInt32(_minFer); - double minMal = Convert.ToInt32(_minMal); - double minFest = Convert.ToInt32(_minFest); - double minMpp = Convert.ToInt32(_minMPP); - double min104 = Convert.ToInt32(_min104); - double minCassa = Convert.ToInt32(_minCassa); - if (memLayer.ML.confReadBool("reviewShowOreMin")) - { - if (minPerm > 0) answ += string.Format("{0} Permesso ", utils.formOreMin(Convert.ToDecimal(minPerm / 60))); - if (minFer > 0) answ += string.Format("{0} Ferie ", utils.formOreMin(Convert.ToDecimal(minFer / 60))); - if (minMal > 0) answ += string.Format("{0} Malattia ", utils.formOreMin(Convert.ToDecimal(minMal / 60))); - if (minFest > 0) answ += string.Format("{0} Festività ", utils.formOreMin(Convert.ToDecimal(minFest / 60))); - if (minMpp > 0) answ += string.Format("{0} Manc.Pausa Pranzo ", utils.formOreMin(Convert.ToDecimal(minMpp / 60))); - if (min104 > 0) answ += string.Format("{0} Perm 104 ", utils.formOreMin(Convert.ToDecimal(min104 / 60))); - if (minCassa > 0) answ += string.Format("{0} Cassa Integrazione ", utils.formOreMin(Convert.ToDecimal(minCassa / 60))); - } - else - { - if (minPerm > 0) answ += string.Format("{0:0.00}h Permesso ", minPerm / 60); - if (minFer > 0) answ += string.Format("{0:0.00}h Ferie ", minFer / 60); - if (minMal > 0) answ += string.Format("{0:0.00}h Malattia ", minMal / 60); - if (minFest > 0) answ += string.Format("{0:0.00}h Festività ", minFest / 60); - if (minMpp > 0) answ += string.Format("{0:0.00}h Manc.Pausa Pranzo ", minMpp / 60); - if (min104 > 0) answ += string.Format("{0:0.00}h Perm 104 ", min104 / 60); - if (minCassa > 0) answ += string.Format("{0:0.00}h Cassa Integrazione ", minCassa / 60); - } - return answ; - } - /// - /// formatta la durata in ore secondo web.config (centesimale/ore:min) - /// - /// - /// - public string formatDurata(object oreCent) - { - decimal ore = 0; - try - { - ore = Convert.ToDecimal(oreCent); - } - catch - { } - string answ = ""; - if (memLayer.ML.confReadBool("reviewShowOreMin")) - { - answ = utils.formOreMin(ore); - } - else - { - answ = ore.ToString("0.00"); - } - return answ; - } - } + private void cmp_rilTemp_ehCancel(object sender, EventArgs e) + { + activeMode = modoCommesse.elenco; + showPanels(); + } + + private void Cmp_toggle_ehToggle(object sender, EventArgs e) + { + showPanels(); + } + + void mod_TagCloudProgetti1_eh_refresh(object sender, EventArgs e) + { + mod_commAttivitaDesk1.doUpdate(); + grView.DataBind(); + } + + void mod_periodoAnalisi1_eh_doUpdate(object sender, EventArgs e) + { + // 2016.04.07: salvo intervallo nei 2 hidden field + hfDataFrom.Value = mod_periodoAnalisi1.intervalloAnalisi.inizio.ToString(); + hfDataTo.Value = mod_periodoAnalisi1.intervalloAnalisi.fine.ToString(); + // update + mod_commAttivitaDesk1.doUpdate(); + grView.DataBind(); + } + + void mod_TagCloudProgetti1_eh_newVal(object sender, EventArgs e) + { + mod_commAttivitaDesk1.doUpdate(); + grView.DataBind(); + } + + void mod_commAttivitaDesk1_eh_nuovoValore(object sender, EventArgs e) + { + mod_TagCloudProgetti1.doUpdate(); + grView.DataBind(); + } + + void mod_commUtMancTimbr1_eh_nuovoValore(object sender, EventArgs e) + { + grView.DataBind(); + } + /// + /// inverte valore booleano + /// + /// + /// + public bool invBool(object valore) + { + bool answ = true; + try + { + answ = !Convert.ToBoolean(valore); + } + catch + { } + return answ; + } + + + private void editTemp(string dataRif) + { + DateTime adesso = DateTime.Today; + CultureInfo ita = new CultureInfo("it-IT"); + cmp_rilTemp.dtRif = Convert.ToDateTime(dataRif, ita); + //salvo in sessione dati x detail timbrature + memLayer.ML.setSessionVal("idxDip_det", DataProxy.idxDipendente); + // imposto modalità + activeMode = modoCommesse.editRilTemp; + showPanels(); + } + + + protected void lbShowTemp_Click(object sender, EventArgs e) + { + string dataRif = ((LinkButton)sender).CommandArgument; + // verifico se dip sia attivo... + if (DataProxy.currDipIsActive) + { + editTemp(dataRif); + } + } + + private void editTimbr(string dataRif) + { + DateTime adesso = DateTime.Now; + CultureInfo ita = new CultureInfo("it-IT"); + mod_commUtMancTimbr1.valoreDateTime = Convert.ToDateTime(dataRif, ita).AddHours(adesso.Hour).AddMinutes(adesso.Minute - adesso.Minute % 5); + //salvo in sessione dati x detail timbrature + memLayer.ML.setSessionVal("inizioDet", Convert.ToDateTime(dataRif, ita).Date); + memLayer.ML.setSessionVal("fineDet", Convert.ToDateTime(dataRif, ita).Date.AddDays(1)); + memLayer.ML.setSessionVal("idxDip_det", DataProxy.idxDipendente); + // imposto modalità + activeMode = modoCommesse.editTimb; + showPanels(); + } + protected void lnkEditTimbr_Click(object sender, EventArgs e) + { + string dataRif = ((LinkButton)sender).CommandArgument; + // verifico se dip sia attivo... + if (DataProxy.currDipIsActive) + { + editTimbr(dataRif); + // apro anche data dell'altro SE abilitato + if (openBoth) + { + editCommDay(dataRif); + } + } + } + private void editCommDay(string dataRif) + { + CultureInfo ita = new CultureInfo("it-IT"); + mod_commAttivitaDesk1.idxDipCurr = DataProxy.idxDipendente; + mod_commAttivitaDesk1.valoreDateTime = Convert.ToDateTime(dataRif, ita); + mod_TagCloudProgetti1.dataRif = Convert.ToDateTime(dataRif, ita); + //salvo in sessione dati x detail timbrature + memLayer.ML.setSessionVal("inizioDet", Convert.ToDateTime(dataRif, ita).Date); + memLayer.ML.setSessionVal("fineDet", Convert.ToDateTime(dataRif, ita).Date.AddDays(1)); + memLayer.ML.setSessionVal("idxDip_det", DataProxy.idxDipendente); + // imposto modalità + activeMode = modoCommesse.editRegAtt; + showPanels(); + mod_commAttivitaDesk1.doUpdate(); + } + + protected void lnkEditComm_Click(object sender, EventArgs e) + { + string dataRif = ((LinkButton)sender).CommandArgument; + // verifico se dip sia attivo... + if (DataProxy.currDipIsActive) + { + editCommDay(dataRif); + // apro anche data dell'altro SE abilitato + if (openBoth) + { + editTimbr(dataRif); + } + } + } + /// + /// indica se sia abilitato l'editing delle attività legate alle commesse e l'utente sia attivo!!! + /// + public bool regAttEnabled + { + get + { + return memLayer.ML.confReadBool("regAttEnabled") && DataProxy.currDipIsActive; + } + } + /// + /// + /// + /// + /// + public string classByPerm(object minPerm) + { + string answ = ""; + if (Convert.ToDouble(minPerm) > 0) + { + answ = "lblWarning"; + } + return answ; + } + /// + /// prepara tooltip permessi/straordinarie + /// + /// + /// + /// + public string tooltipPermStra(object minStra, object minPerm) + { + string answ = ""; + try + { + if (memLayer.ML.confReadBool("reviewShowOreMin")) + { + answ = string.Format("Straordinarie: {0} - Permessi: {1} (h:mm)", utils.formOreMin(Convert.ToDecimal(minStra) / 60), utils.formOreMin(Convert.ToDecimal(minPerm) / 60)); + } + else + { + answ = string.Format("Straordinarie: {0:0.##} h - Permessi: {1:0.##} h", Convert.ToDouble(minStra) / 60, Convert.ToDouble(minPerm) / 60); + } + } + catch + { } + return answ; + } + /// + /// imposta visualizzazione dei pannelli opzionali laterali a seocnda del modo attivo + /// + protected void showPanels() + { + // imposto valori default + bool commesse = false; + bool temp = false; + bool timbr = false; + divDx.Attributes.Remove("class"); + divCn.Attributes.Remove("class"); + divSx.Attributes.Remove("class"); + if (openBoth) + { + switch (activeMode) + { + case modoCommesse.editTimb: + case modoCommesse.editRegAtt: + commesse = true; + timbr = true; + divCn.Attributes.Add("class", "col-sm-6 px-1"); + divSx.Attributes.Add("class", "col-sm-2 pr-0"); + divDx.Attributes.Add("class", "col-sm-4 pl-0"); + divDx.Visible = true; + divSx.Visible = true; + break; + case modoCommesse.editRilTemp: + temp = true; + divCn.Attributes.Add("class", "col-sm-7 col-md-8 col-lg-9"); + divSx.Attributes.Add("class", "col-sm-5 col-md-4 col-lg-3"); + divDx.Visible = false; + divSx.Visible = true; + break; + case modoCommesse.elenco: + default: + divCn.Attributes.Add("class", "col-12"); + divDx.Visible = false; + divSx.Visible = false; + break; + } + } + else + { + switch (activeMode) + { + case modoCommesse.editTimb: + timbr = true; + divCn.Attributes.Add("class", "col-sm-7 col-md-8 col-lg-9"); + divSx.Attributes.Add("class", "col-sm-5 col-md-4 col-lg-3"); + divDx.Visible = false; + divSx.Visible = true; + break; + case modoCommesse.editRilTemp: + temp = true; + divCn.Attributes.Add("class", "col-sm-7 col-md-8 col-lg-9"); + divSx.Attributes.Add("class", "col-sm-5 col-md-4 col-lg-3"); + divDx.Visible = false; + divSx.Visible = true; + break; + case modoCommesse.editRegAtt: + commesse = true; + divCn.Attributes.Add("class", "col-sm-6 col-md-7 col-lg-8"); + divDx.Attributes.Add("class", "col-sm-6 col-md-5 col-lg-4"); + divDx.Visible = true; + divSx.Visible = false; + break; + case modoCommesse.elenco: + default: + divCn.Attributes.Add("class", "col-12"); + divDx.Visible = false; + divSx.Visible = false; + break; + } + } + // fix finale! + pnlEditCom.Visible = commesse; + pnlEditTemp.Visible = temp; + pnlEditOre.Visible = timbr; + mod_commAttivitaDesk1.Visible = commesse; + cmp_rilTemp.Visible = temp; + mod_commUtMancTimbr1.Visible = timbr; + } + /// + /// chiamata del button close (entrambi) + /// + /// + /// + protected void btnClose_Click(object sender, EventArgs e) + { + activeMode = modoCommesse.elenco; + showPanels(); + grView.DataBind(); + } + /// + /// fornisce img x check coerenza ore timbrate e commesse + /// + /// + /// + public string imgChk(object okLavCom) + { + string answ = "~/images/statoKo_m.png"; + try + { + if (Convert.ToBoolean(okLavCom)) + { + answ = "~/images/statoOk_m.png"; + } + } + catch + { } + return answ; + } + /// + /// formatta stringa giustificativi + /// + /// permessi + /// ferie + /// malattia + /// festività + /// MPP + /// + public string txtGiust(object _minPerm, object _minFer, object _minMal, object _minFest, object _minMPP, object _min104, object _minCassa) + { + string answ = ""; + double minPerm = Convert.ToInt32(_minPerm); + double minFer = Convert.ToInt32(_minFer); + double minMal = Convert.ToInt32(_minMal); + double minFest = Convert.ToInt32(_minFest); + double minMpp = Convert.ToInt32(_minMPP); + double min104 = Convert.ToInt32(_min104); + double minCassa = Convert.ToInt32(_minCassa); + if (memLayer.ML.confReadBool("reviewShowOreMin")) + { + if (minPerm > 0) answ += string.Format("{0} Pe ", utils.formOreMin(Convert.ToDecimal(minPerm / 60))); + if (minFer > 0) answ += string.Format("{0} Fe ", utils.formOreMin(Convert.ToDecimal(minFer / 60))); + if (minMal > 0) answ += string.Format("{0} Ma ", utils.formOreMin(Convert.ToDecimal(minMal / 60))); + if (minFest > 0) answ += string.Format("{0} Fs ", utils.formOreMin(Convert.ToDecimal(minFest / 60))); + if (minMpp > 0) answ += string.Format("{0} Mpp ", utils.formOreMin(Convert.ToDecimal(minMpp / 60))); + if (min104 > 0) answ += string.Format("{0} 104 ", utils.formOreMin(Convert.ToDecimal(min104 / 60))); + if (minCassa > 0) answ += string.Format("{0} Cassa ", utils.formOreMin(Convert.ToDecimal(minCassa / 60))); + } + else + { + if (minPerm > 0) answ += string.Format("{0:0.00} Pe ", minPerm / 60); + if (minFer > 0) answ += string.Format("{0:0.00} Fe ", minFer / 60); + if (minMal > 0) answ += string.Format("{0:0.00} Ma ", minMal / 60); + if (minFest > 0) answ += string.Format("{0:0.00} Fs ", minFest / 60); + if (minMpp > 0) answ += string.Format("{0:0.00} Mpp ", minMpp / 60); + if (min104 > 0) answ += string.Format("{0:0.00} 104 ", min104 / 60); + if (minCassa > 0) answ += string.Format("{0:0.00} Cassa ", minCassa / 60); + } + return answ; + } + /// + /// formatta stringa tooltip giustificativi + /// + /// permessi + /// ferie + /// malattia + /// festività + /// MPP + /// + public string tooltipGiust(object _minPerm, object _minFer, object _minMal, object _minFest, object _minMPP, object _min104, object _minCassa) + { + string answ = ""; + double minPerm = Convert.ToInt32(_minPerm); + double minFer = Convert.ToInt32(_minFer); + double minMal = Convert.ToInt32(_minMal); + double minFest = Convert.ToInt32(_minFest); + double minMpp = Convert.ToInt32(_minMPP); + double min104 = Convert.ToInt32(_min104); + double minCassa = Convert.ToInt32(_minCassa); + if (memLayer.ML.confReadBool("reviewShowOreMin")) + { + if (minPerm > 0) answ += string.Format("{0} Permesso ", utils.formOreMin(Convert.ToDecimal(minPerm / 60))); + if (minFer > 0) answ += string.Format("{0} Ferie ", utils.formOreMin(Convert.ToDecimal(minFer / 60))); + if (minMal > 0) answ += string.Format("{0} Malattia ", utils.formOreMin(Convert.ToDecimal(minMal / 60))); + if (minFest > 0) answ += string.Format("{0} Festività ", utils.formOreMin(Convert.ToDecimal(minFest / 60))); + if (minMpp > 0) answ += string.Format("{0} Manc.Pausa Pranzo ", utils.formOreMin(Convert.ToDecimal(minMpp / 60))); + if (min104 > 0) answ += string.Format("{0} Perm 104 ", utils.formOreMin(Convert.ToDecimal(min104 / 60))); + if (minCassa > 0) answ += string.Format("{0} Cassa Integrazione ", utils.formOreMin(Convert.ToDecimal(minCassa / 60))); + } + else + { + if (minPerm > 0) answ += string.Format("{0:0.00}h Permesso ", minPerm / 60); + if (minFer > 0) answ += string.Format("{0:0.00}h Ferie ", minFer / 60); + if (minMal > 0) answ += string.Format("{0:0.00}h Malattia ", minMal / 60); + if (minFest > 0) answ += string.Format("{0:0.00}h Festività ", minFest / 60); + if (minMpp > 0) answ += string.Format("{0:0.00}h Manc.Pausa Pranzo ", minMpp / 60); + if (min104 > 0) answ += string.Format("{0:0.00}h Perm 104 ", min104 / 60); + if (minCassa > 0) answ += string.Format("{0:0.00}h Cassa Integrazione ", minCassa / 60); + } + return answ; + } + /// + /// formatta la durata in ore secondo web.config (centesimale/ore:min) + /// + /// + /// + public string formatDurata(object oreCent) + { + decimal ore = 0; + try + { + ore = Convert.ToDecimal(oreCent); + } + catch + { } + string answ = ""; + if (memLayer.ML.confReadBool("reviewShowOreMin")) + { + answ = utils.formOreMin(ore); + } + else + { + answ = ore.ToString("0.00"); + } + return answ; + } + + } } \ No newline at end of file diff --git a/GPW_Commesse/WebUserControls/mod_commUtLog.ascx.designer.cs b/GPW_Commesse/WebUserControls/mod_commUtLog.ascx.designer.cs index 20185d2..63c8ade 100644 --- a/GPW_Commesse/WebUserControls/mod_commUtLog.ascx.designer.cs +++ b/GPW_Commesse/WebUserControls/mod_commUtLog.ascx.designer.cs @@ -11,169 +11,187 @@ namespace GPW_Commesse.WebUserControls { - public partial class mod_commUtLog - { + public partial class mod_commUtLog + { - /// - /// Controllo hfDataFrom. - /// - /// - /// 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.HiddenField hfDataFrom; + /// + /// Controllo hfDataFrom. + /// + /// + /// 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.HiddenField hfDataFrom; - /// - /// Controllo hfDataTo. - /// - /// - /// 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.HiddenField hfDataTo; + /// + /// Controllo hfDataTo. + /// + /// + /// 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.HiddenField hfDataTo; - /// - /// Controllo pnlAll. - /// - /// - /// 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 pnlAll; + /// + /// Controllo pnlAll. + /// + /// + /// 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 pnlAll; - /// - /// Controllo mod_periodoAnalisi1. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::mod_periodoAnalisi mod_periodoAnalisi1; + /// + /// Controllo mod_periodoAnalisi1. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::mod_periodoAnalisi mod_periodoAnalisi1; - /// - /// Controllo cmp_toggle. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::GPW_Commesse.WebUserControls.cmp_toggle cmp_toggle; + /// + /// Controllo cmp_toggle. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::GPW_Commesse.WebUserControls.cmp_toggle cmp_toggle; - /// - /// Controllo divSx. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl divSx; + /// + /// Controllo divSx. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl divSx; - /// - /// Controllo pnlEditOre. - /// - /// - /// 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 pnlEditOre; + /// + /// Controllo pnlEditTemp. + /// + /// + /// 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 pnlEditTemp; - /// - /// Controllo btnCloseTimb. - /// - /// - /// 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.Button btnCloseTimb; + /// + /// Controllo cmp_rilTemp. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::GPW_Commesse.WebUserControls.cmp_rilTemp cmp_rilTemp; - /// - /// Controllo mod_elencoTimbr1. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::GPW_Commesse.WebUserControls.mod_elencoTimbr mod_elencoTimbr1; + /// + /// Controllo pnlEditOre. + /// + /// + /// 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 pnlEditOre; - /// - /// Controllo mod_commUtMancTimbr1. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::GPW_Commesse.WebUserControls.mod_commUtMancTimbr mod_commUtMancTimbr1; + /// + /// Controllo btnCloseTimb. + /// + /// + /// 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.Button btnCloseTimb; - /// - /// Controllo divCn. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl divCn; + /// + /// Controllo mod_elencoTimbr1. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::GPW_Commesse.WebUserControls.mod_elencoTimbr mod_elencoTimbr1; - /// - /// Controllo grView. - /// - /// - /// 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.GridView grView; + /// + /// Controllo mod_commUtMancTimbr1. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::GPW_Commesse.WebUserControls.mod_commUtMancTimbr mod_commUtMancTimbr1; - /// - /// Controllo ods. - /// - /// - /// 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 ods; + /// + /// Controllo divCn. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl divCn; - /// - /// Controllo divDx. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl divDx; + /// + /// Controllo grView. + /// + /// + /// 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.GridView grView; - /// - /// Controllo pnlEditCom. - /// - /// - /// 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 pnlEditCom; + /// + /// Controllo ods. + /// + /// + /// 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 ods; - /// - /// Controllo btnCloseRA. - /// - /// - /// 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.Button btnCloseRA; + /// + /// Controllo divDx. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl divDx; - /// - /// Controllo mod_TagCloudProgetti1. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::GPW_Commesse.WebUserControls.mod_TagCloudProgetti mod_TagCloudProgetti1; + /// + /// Controllo pnlEditCom. + /// + /// + /// 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 pnlEditCom; - /// - /// Controllo mod_commAttivitaDesk1. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::GPW_Commesse.WebUserControls.mod_commAttivitaDesk mod_commAttivitaDesk1; - } + /// + /// Controllo btnCloseRA. + /// + /// + /// 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.Button btnCloseRA; + + /// + /// Controllo mod_TagCloudProgetti1. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::GPW_Commesse.WebUserControls.mod_TagCloudProgetti mod_TagCloudProgetti1; + + /// + /// Controllo mod_commAttivitaDesk1. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::GPW_Commesse.WebUserControls.mod_commAttivitaDesk mod_commAttivitaDesk1; + } } diff --git a/GPW_Data/DS_Applicazione.Designer.cs b/GPW_Data/DS_Applicazione.Designer.cs index 6f23a2f..f342761 100644 --- a/GPW_Data/DS_Applicazione.Designer.cs +++ b/GPW_Data/DS_Applicazione.Designer.cs @@ -4819,6 +4819,8 @@ namespace GPW_data { private global::System.Data.DataColumn columnminCassa; + private global::System.Data.DataColumn columntempRil; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public v_logCommUtDataTable() { @@ -4988,6 +4990,14 @@ namespace GPW_data { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn tempRilColumn { + get { + return this.columntempRil; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Browsable(false)] @@ -5042,7 +5052,8 @@ namespace GPW_data { int minFest, int minMpp, int min104, - int minCassa) { + int minCassa, + decimal tempRil) { v_logCommUtRow rowv_logCommUtRow = ((v_logCommUtRow)(this.NewRow())); object[] columnValuesArray = new object[] { Data, @@ -5061,7 +5072,8 @@ namespace GPW_data { minFest, minMpp, min104, - minCassa}; + minCassa, + tempRil}; rowv_logCommUtRow.ItemArray = columnValuesArray; this.Rows.Add(rowv_logCommUtRow); return rowv_logCommUtRow; @@ -5109,6 +5121,7 @@ namespace GPW_data { this.columnminMpp = base.Columns["minMpp"]; this.columnmin104 = base.Columns["min104"]; this.columnminCassa = base.Columns["minCassa"]; + this.columntempRil = base.Columns["tempRil"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -5148,6 +5161,8 @@ namespace GPW_data { base.Columns.Add(this.columnmin104); this.columnminCassa = new global::System.Data.DataColumn("minCassa", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnminCassa); + this.columntempRil = new global::System.Data.DataColumn("tempRil", typeof(decimal), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columntempRil); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnData, this.columnidxDipendente}, true)); @@ -5160,6 +5175,7 @@ namespace GPW_data { this.columnokLavCom.ReadOnly = true; this.columnprogetto.ReadOnly = true; this.columnprogetto.MaxLength = 3; + this.columntempRil.AllowDBNull = false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -13155,6 +13171,17 @@ namespace GPW_data { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public decimal tempRil { + get { + return ((decimal)(this[this.tablev_logCommUt.tempRilColumn])); + } + set { + this[this.tablev_logCommUt.tempRilColumn] = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool IsCognomeNomeNull() { @@ -25381,6 +25408,7 @@ SELECT idxDipendente, CodRuolo FROM Dipendenti2Ruoli WHERE (CodRuolo = @CodRuolo tableMapping.ColumnMappings.Add("minMpp", "minMpp"); tableMapping.ColumnMappings.Add("min104", "min104"); tableMapping.ColumnMappings.Add("minCassa", "minCassa"); + tableMapping.ColumnMappings.Add("tempRil", "tempRil"); this._adapter.TableMappings.Add(tableMapping); } diff --git a/GPW_Data/DS_Applicazione.xsd b/GPW_Data/DS_Applicazione.xsd index 0590906..ef6a289 100644 --- a/GPW_Data/DS_Applicazione.xsd +++ b/GPW_Data/DS_Applicazione.xsd @@ -1775,6 +1775,7 @@ SELECT idxDipendente, CodRuolo FROM Dipendenti2Ruoli WHERE (CodRuolo = @CodRuolo + @@ -2829,7 +2830,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt - + @@ -2853,7 +2854,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt - + @@ -2910,7 +2911,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt - + @@ -2948,7 +2949,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt - + @@ -3076,7 +3077,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt - + @@ -3169,7 +3170,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt - + @@ -3214,7 +3215,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt - + @@ -3228,7 +3229,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt - + @@ -3278,7 +3279,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt - + @@ -3310,10 +3311,11 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt + - + @@ -3333,7 +3335,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt - + @@ -3354,7 +3356,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt - + @@ -3390,7 +3392,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt - + @@ -3415,7 +3417,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt - + @@ -3431,7 +3433,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt - + @@ -3452,7 +3454,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt - + @@ -3517,7 +3519,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt - + @@ -3565,7 +3567,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt - + @@ -3606,7 +3608,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt - + @@ -3627,7 +3629,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt - + @@ -3732,13 +3734,13 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt - - - - - - - + + + + + + + \ No newline at end of file diff --git a/GPW_Data/DS_Applicazione.xss b/GPW_Data/DS_Applicazione.xss index f0ed897..cca4fc2 100644 --- a/GPW_Data/DS_Applicazione.xss +++ b/GPW_Data/DS_Applicazione.xss @@ -4,28 +4,28 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - + - - - + + + - - - - + + + + - + - + - - - + + + @@ -120,7 +120,7 @@ - + 553 diff --git a/GPW_Smart/WebUserControls/cmp_rilTemp.ascx.cs b/GPW_Smart/WebUserControls/cmp_rilTemp.ascx.cs index e927f13..a706a45 100644 --- a/GPW_Smart/WebUserControls/cmp_rilTemp.ascx.cs +++ b/GPW_Smart/WebUserControls/cmp_rilTemp.ascx.cs @@ -13,7 +13,6 @@ namespace GPW_Smart.WebUserControls { protected void Page_Load(object sender, EventArgs e) { - //frmView.ChangeMode(FormViewMode.Edit); if (!Page.IsPostBack) { setupData(); From 20486b9cab5bf96f3c6229f7f7a78785c9e030e8 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Thu, 3 Sep 2020 10:03:24 +0200 Subject: [PATCH 2/4] new rel --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index c7daa3b..50d80fa 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,7 +10,7 @@ pipeline { steps { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=4117']) { + withEnv(['NEXT_BUILD_NUMBER=4118']) { // 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' From 8e5ec21efd88d5f2d920f0f36e7c26dcb80bdece Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Thu, 3 Sep 2020 10:03:41 +0200 Subject: [PATCH 3/4] Inizio add Chart --- GPW_Smart/Content/Style.css | 16 +++---- GPW_Smart/Content/Style.less | 7 +++ GPW_Smart/Content/Style.min.css | 2 +- GPW_Smart/GPW_Smart.csproj | 13 +++++ GPW_Smart/WS/gateway.asmx | 1 + GPW_Smart/WS/gateway.asmx.cs | 85 +++++++++++++++++++++++++++++++++ 6 files changed, 113 insertions(+), 11 deletions(-) create mode 100644 GPW_Smart/WS/gateway.asmx create mode 100644 GPW_Smart/WS/gateway.asmx.cs diff --git a/GPW_Smart/Content/Style.css b/GPW_Smart/Content/Style.css index 47da1c0..8516254 100644 --- a/GPW_Smart/Content/Style.css +++ b/GPW_Smart/Content/Style.css @@ -1,12 +1,5 @@ -@import url('MasterPage.css'); -@import url('BuildBlocks.css'); -@import url('ExtraComp.css'); -@import url('BtnReport.css'); -@import url('JQClock.css'); -.logo { +.logo { background-image: url(../images/logo_sw.png); - -khtml-opacity: 0.5; - -moz-opacity: 0.5; -ms-filter: "alpha(opacity=50)"; filter: alpha(opacity=50); filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0.5); @@ -19,8 +12,6 @@ } .logo:hover { background-image: url(../images/logo_sw.png); - -khtml-opacity: 1; - -moz-opacity: 1; -ms-filter: "alpha(opacity=100)"; filter: alpha(opacity=100); filter: progid:DXImageTransform.Microsoft.Alpha(opacity=1); @@ -31,6 +22,11 @@ vertical-align: middle; background-repeat: no-repeat; } +canvas { + background: #f0f0f0; + width: 100%; + height: auto; +} .bodyMainCenter { /* background-image: url(../images/logo_sw.png); -khtml-opacity: .50; -moz-opacity: .50; -ms-filter: "alpha(opacity=50)"; filter: alpha(opacity=50); filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0.5); opacity: .50; */ vertical-align: middle; diff --git a/GPW_Smart/Content/Style.less b/GPW_Smart/Content/Style.less index 19dcf58..93354f0 100644 --- a/GPW_Smart/Content/Style.less +++ b/GPW_Smart/Content/Style.less @@ -26,6 +26,13 @@ background-repeat: no-repeat; } +canvas { + background: #f0f0f0; + width: 100%; + height: auto; +} + + .bodyMainCenter { /* background-image: url(../images/logo_sw.png); -khtml-opacity: .50; -moz-opacity: .50; -ms-filter: "alpha(opacity=50)"; filter: alpha(opacity=50); filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0.5); opacity: .50; */ diff --git a/GPW_Smart/Content/Style.min.css b/GPW_Smart/Content/Style.min.css index 451d0a0..32fa5ce 100644 --- a/GPW_Smart/Content/Style.min.css +++ b/GPW_Smart/Content/Style.min.css @@ -1 +1 @@ -.logo{background-image:url(../images/logo_sw.png);-ms-filter:"alpha(opacity=50)";filter:alpha(opacity=50);filter:progid:DXImageTransform.Microsoft.Alpha(opacity=.5);opacity:.5;width:800px;height:300px;margin:50px auto 50px auto;vertical-align:middle;background-repeat:no-repeat;}.logo:hover{background-image:url(../images/logo_sw.png);-ms-filter:"alpha(opacity=100)";filter:alpha(opacity=100);filter:progid:DXImageTransform.Microsoft.Alpha(opacity=1);opacity:1;width:800px;height:300px;margin:50px auto 50px auto;vertical-align:middle;background-repeat:no-repeat;}.bodyMainCenter{vertical-align:middle;border-left:#0d0083 1px solid;text-align:center;height:100%;width:100%;background-position:center;background-attachment:scroll;background-repeat:no-repeat;}.bodyCenter{vertical-align:middle;text-align:center;height:100%;width:100%;}.centerMenu{background-color:#fff;text-align:center;border-width:thin;border-style:groove;border-color:#00f;}A:hover{color:#f00;}.bodyMain{vertical-align:top;border-left:#0d0083 1px solid;height:100%;width:100%;background-position:center;background-attachment:scroll;background-repeat:no-repeat;}.bodyMainEmpty{vertical-align:top;border-left:#800000 1px solid;height:100%;width:100%;}.bodyMainWhite{vertical-align:top;border-left:#800000 1px solid;height:100%;width:100%;background-position:center;background-attachment:scroll;background-repeat:no-repeat;}.bodyMainWhite a:hover{color:#fff;}.bodyMainNoLogo{vertical-align:top;border-left:#800000 1px solid;height:100%;width:100%;}.bodyMainLogoPiccolo{background-image:url(../images/sfondoMedio.png);background-position:97% 210px;vertical-align:top;border-left:#800000 1px solid;height:100%;width:100%;background-attachment:scroll;background-repeat:no-repeat;}.textError{color:#f00;} \ No newline at end of file +.logo{background-image:url(../images/logo_sw.png);-ms-filter:"alpha(opacity=50)";filter:alpha(opacity=50);filter:progid:DXImageTransform.Microsoft.Alpha(opacity=.5);opacity:.5;width:800px;height:300px;margin:50px auto 50px auto;vertical-align:middle;background-repeat:no-repeat;}.logo:hover{background-image:url(../images/logo_sw.png);-ms-filter:"alpha(opacity=100)";filter:alpha(opacity=100);filter:progid:DXImageTransform.Microsoft.Alpha(opacity=1);opacity:1;width:800px;height:300px;margin:50px auto 50px auto;vertical-align:middle;background-repeat:no-repeat;}canvas{background:#f0f0f0;width:100%;height:auto;}.bodyMainCenter{vertical-align:middle;border-left:#0d0083 1px solid;text-align:center;height:100%;width:100%;background-position:center;background-attachment:scroll;background-repeat:no-repeat;}.bodyCenter{vertical-align:middle;text-align:center;height:100%;width:100%;}.centerMenu{background-color:#fff;text-align:center;border-width:thin;border-style:groove;border-color:#00f;}A:hover{color:#f00;}.bodyMain{vertical-align:top;border-left:#0d0083 1px solid;height:100%;width:100%;background-position:center;background-attachment:scroll;background-repeat:no-repeat;}.bodyMainEmpty{vertical-align:top;border-left:#800000 1px solid;height:100%;width:100%;}.bodyMainWhite{vertical-align:top;border-left:#800000 1px solid;height:100%;width:100%;background-position:center;background-attachment:scroll;background-repeat:no-repeat;}.bodyMainWhite a:hover{color:#fff;}.bodyMainNoLogo{vertical-align:top;border-left:#800000 1px solid;height:100%;width:100%;}.bodyMainLogoPiccolo{background-image:url(../images/sfondoMedio.png);background-position:97% 210px;vertical-align:top;border-left:#800000 1px solid;height:100%;width:100%;background-attachment:scroll;background-repeat:no-repeat;}.textError{color:#f00;} \ No newline at end of file diff --git a/GPW_Smart/GPW_Smart.csproj b/GPW_Smart/GPW_Smart.csproj index 28e24be..0f1412e 100644 --- a/GPW_Smart/GPW_Smart.csproj +++ b/GPW_Smart/GPW_Smart.csproj @@ -488,6 +488,8 @@ + + compilerconfig.json @@ -819,6 +821,13 @@ Timbrature.aspx + + cmp_chart.ascx + ASPXCodeBehind + + + cmp_chart.ascx + cmp_footer.ascx ASPXCodeBehind @@ -932,6 +941,10 @@ mod_timbrature.ascx + + gateway.asmx + Component + diff --git a/GPW_Smart/WS/gateway.asmx b/GPW_Smart/WS/gateway.asmx new file mode 100644 index 0000000..8dbdd44 --- /dev/null +++ b/GPW_Smart/WS/gateway.asmx @@ -0,0 +1 @@ +<%@ WebService Language="C#" CodeBehind="gateway.asmx.cs" Class="GPW_Smart.WS.gateway" %> diff --git a/GPW_Smart/WS/gateway.asmx.cs b/GPW_Smart/WS/gateway.asmx.cs new file mode 100644 index 0000000..2319622 --- /dev/null +++ b/GPW_Smart/WS/gateway.asmx.cs @@ -0,0 +1,85 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Script.Services; +using System.Web.Services; + +namespace GPW_Smart.WS +{ + /// + /// Descrizione di riepilogo per gateway + /// + [WebService(Namespace = "http://www.steamware.net/")] + [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] + [System.ComponentModel.ToolboxItem(false)] + // Per consentire la chiamata di questo servizio Web dallo script utilizzando ASP.NET AJAX, rimuovere il commento dalla riga seguente. + [System.Web.Script.Services.ScriptService] + public class gateway : System.Web.Services.WebService + { + + [WebMethod] + public string HelloWorld() + { + return "Hello World"; + } + + + /// + /// Restituisce un array di informazioni... + /// - TITOLO + /// - MaxValore + /// - vettore etichette + /// - vettore valori + /// + /// + [WebMethod] + [ScriptMethod(ResponseFormat = ResponseFormat.Json)] + public List userScoreData(int idxUser, DateTime dataRif) + { + // init valori.. + List allData = new List(); + List etichette = new List(); + List valori = new List(); + +#if false + // aggiungo TITOLO della serie dati... + string titolo = string.Format("VMD - {0:yyyy-MM-dd}", dataRif); + allData.Add(titolo); + int maxVal = 4; + allData.Add(maxVal); + // leggo info... + DS_Applicazione.VisVMDDataTable tab = DtProxy.man.taVVMD.getByPaziente(idxUser, dataRif); + // se contiene valori... + if (tab.Rows.Count > 0) + { + // recupero SOLO i PENALTY... e sono 8... + int valore = 0; + for (int i = 0; i < tab.Columns.Count; i++) + { + // recupero nome colonna, se è "_" inserisco... + if (tab.Columns[i].ToString().IndexOf("_p") >= 0) + { + etichette.Add(tab.Columns[i].ToString().Replace("_p", "")); + Int32.TryParse(tab[0][i].ToString(), out valore); + valori.Add(valore); + } + } + } + // altrimenti valori vuoti... + else + { + for (int i = 0; i < 8; i++) + { + etichette.Add(i.ToString()); + valori.Add(0); + } + } +#endif + allData.Add(etichette); + allData.Add(valori); + // restituisco oggetto! + return allData; + } + } +} From cd9045e074bd3906067f6acb4c059bc87d3cd73c Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Thu, 3 Sep 2020 10:28:53 +0200 Subject: [PATCH 4/4] Bozza chart --- GPW_Smart/WS/gateway.asmx.cs | 2 +- GPW_Smart/WebUserControls/cmp_chart.ascx | 116 ++++++++++++++++++ GPW_Smart/WebUserControls/cmp_chart.ascx.cs | 17 +++ .../cmp_chart.ascx.designer.cs | 35 ++++++ 4 files changed, 169 insertions(+), 1 deletion(-) create mode 100644 GPW_Smart/WebUserControls/cmp_chart.ascx create mode 100644 GPW_Smart/WebUserControls/cmp_chart.ascx.cs create mode 100644 GPW_Smart/WebUserControls/cmp_chart.ascx.designer.cs diff --git a/GPW_Smart/WS/gateway.asmx.cs b/GPW_Smart/WS/gateway.asmx.cs index 2319622..6950ff6 100644 --- a/GPW_Smart/WS/gateway.asmx.cs +++ b/GPW_Smart/WS/gateway.asmx.cs @@ -75,9 +75,9 @@ namespace GPW_Smart.WS valori.Add(0); } } -#endif allData.Add(etichette); allData.Add(valori); +#endif // restituisco oggetto! return allData; } diff --git a/GPW_Smart/WebUserControls/cmp_chart.ascx b/GPW_Smart/WebUserControls/cmp_chart.ascx new file mode 100644 index 0000000..7fa939f --- /dev/null +++ b/GPW_Smart/WebUserControls/cmp_chart.ascx @@ -0,0 +1,116 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_chart.ascx.cs" Inherits="GPW_Smart.WebUserControls.cmp_chart" %> + + + + + + +<%----%> \ No newline at end of file diff --git a/GPW_Smart/WebUserControls/cmp_chart.ascx.cs b/GPW_Smart/WebUserControls/cmp_chart.ascx.cs new file mode 100644 index 0000000..27cd0b5 --- /dev/null +++ b/GPW_Smart/WebUserControls/cmp_chart.ascx.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace GPW_Smart.WebUserControls +{ + public partial class cmp_chart : System.Web.UI.UserControl + { + protected void Page_Load(object sender, EventArgs e) + { + + } + } +} \ No newline at end of file diff --git a/GPW_Smart/WebUserControls/cmp_chart.ascx.designer.cs b/GPW_Smart/WebUserControls/cmp_chart.ascx.designer.cs new file mode 100644 index 0000000..aa2d97d --- /dev/null +++ b/GPW_Smart/WebUserControls/cmp_chart.ascx.designer.cs @@ -0,0 +1,35 @@ +//------------------------------------------------------------------------------ +// +// Codice generato da uno strumento. +// +// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se +// il codice viene rigenerato. +// +//------------------------------------------------------------------------------ + +namespace GPW_Smart.WebUserControls +{ + + + public partial class cmp_chart + { + + /// + /// Controllo hfIdxPaziente. + /// + /// + /// 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.HiddenField hfIdxPaziente; + + /// + /// Controllo hfData. + /// + /// + /// 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.HiddenField hfData; + } +}