From c5b4cb4a307b400ed710325cebfb6deccd1d1139 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 4 Jan 2023 18:14:19 +0100 Subject: [PATCH 1/2] Fix display calendario con opzioni - chiusure aziendali - malattia - richeiste dip --- GPW_Admin/WebUserControls/cmp_calAnnuale.ascx | 11 +- .../WebUserControls/cmp_calAnnuale.ascx.cs | 114 ++- .../cmp_calAnnuale.ascx.designer.cs | 36 + .../WebUserControls/cmp_gestMalattia.ascx | 2 +- .../WebUserControls/cmp_gestMalattia.ascx.cs | 2 +- .../WebUserControls/cmp_gestRichDip.ascx | 2 +- .../WebUserControls/cmp_gestRichDip.ascx.cs | 2 +- .../WebUserControls/mod_gestCalendario.ascx | 95 +-- .../mod_gestCalendario.ascx.cs | 63 +- .../mod_gestCalendario.ascx.designer.cs | 35 +- GPW_Data/DS_Applicazione.Designer.cs | 717 ++++++++++++++++-- GPW_Data/DS_Applicazione.xsd | 48 +- GPW_Data/DS_Applicazione.xss | 75 +- 13 files changed, 969 insertions(+), 233 deletions(-) diff --git a/GPW_Admin/WebUserControls/cmp_calAnnuale.ascx b/GPW_Admin/WebUserControls/cmp_calAnnuale.ascx index 1adb17a..8c37bac 100644 --- a/GPW_Admin/WebUserControls/cmp_calAnnuale.ascx +++ b/GPW_Admin/WebUserControls/cmp_calAnnuale.ascx @@ -2,20 +2,25 @@
-
+
FESTIVITA'
-
+
CHIUSURE AZIENDALI
-
+
WEEK-END
+
+ MALATTIE +
+
+
<%# Container.DataItem %>
diff --git a/GPW_Admin/WebUserControls/cmp_calAnnuale.ascx.cs b/GPW_Admin/WebUserControls/cmp_calAnnuale.ascx.cs index 7ad4242..1f654e7 100644 --- a/GPW_Admin/WebUserControls/cmp_calAnnuale.ascx.cs +++ b/GPW_Admin/WebUserControls/cmp_calAnnuale.ascx.cs @@ -17,23 +17,51 @@ namespace GPW_Admin.WebUserControls { _anno = value; //doUpdateCal(); - //odsMesi.DataBind(); + odsMesi.DataBind(); repCal.DataBind(); } } - public bool showAll { get; set; } = true; + /// + /// Mostra anche richieste (permessi/ferie/104) confermate o solo da confermare + /// + public bool showAlsoConf { get; set; } = true; + /// + /// Mostrare/Colorare sul calendario le richieste dipendente + /// public bool showRichDip { get => _showRichDip; set { - if (_showRichDip != value) - { - _showRichDip = value; - divRichDip.Visible = value; - } + _showRichDip = value; + divRichDip.Visible = value; + } + } + /// + /// Mostrare/Colorare sul calendario le chiusure aziendali programmate + /// + public bool showCalAz + { + get => _showCalAz; + set + { + _showCalAz = value; + divCalAz.Visible = value; + divFes.Visible = value; + } + } + /// + /// Mostrare/Colorare sul calendario le malattie ricevute + /// + public bool showMal + { + get => _showMal; + set + { + _showMal = value; + divMal.Visible = value; } } @@ -61,6 +89,8 @@ namespace GPW_Admin.WebUserControls protected List listRR { get; set; } + protected List listRM { get; set; } + #endregion Protected Properties #region Protected Methods @@ -73,15 +103,32 @@ namespace GPW_Admin.WebUserControls protected void calDisplay_DayRender(object sender, System.Web.UI.WebControls.DayRenderEventArgs e) { bool isColored = false; - // coloro se fa parte delle festività/ferie... - if (listCFF != null && listCFF.Count > 0) + if (showCalAz) { - // cerco riga... - var thisDate = listCFF.Where(x => x.data == e.Day.Date).FirstOrDefault(); - if (thisDate != null && e.Cell.CssClass != "text-light") + // coloro se fa parte delle festività/ferie... + if (listCFF != null && listCFF.Count > 0) { - isColored = true; - e.Cell.CssClass = thisDate.codGiust == "FEST" ? "bg-danger text-warning" : "bg-warning"; + // cerco riga... + var thisDate = listCFF.Where(x => x.data == e.Day.Date).FirstOrDefault(); + if (thisDate != null && e.Cell.CssClass != "text-light") + { + isColored = true; + e.Cell.CssClass = thisDate.codGiust == "FEST" ? "bg-danger text-warning" : "bg-warning"; + } + } + } + if (showMal) + { + // coloro se fa parte delle festività/ferie... + if (listRM != null && listRM.Count > 0) + { + // cerco riga... + var thisDate = listRM.Where(x => x.DtInizio == e.Day.Date).FirstOrDefault(); + if (thisDate != null && e.Cell.CssClass != "text-light") + { + isColored = true; + e.Cell.CssClass = "bg-dark text-light"; + } } } if (showRichDip) @@ -164,11 +211,18 @@ namespace GPW_Admin.WebUserControls protected void doUpdateCal() { - listCFF = CffListByAnno(anno); + if (showCalAz) + { + listCFF = CffListByAnno(anno); + } if (showRichDip) { listRR = RRListByAnno(anno); } + if (showMal) + { + listRM = RMListByAnno(anno); + } } protected void Page_Load(object sender, EventArgs e) @@ -187,8 +241,22 @@ namespace GPW_Admin.WebUserControls #region Private Properties - private int _anno { get; set; } = DateTime.Today.Year; + private int _anno + { + get + { + int answ = 0; + int.TryParse(hfAnno.Value, out answ); + return answ; + } + set + { + hfAnno.Value = $"{value}"; + } + } private bool _showRichDip { get; set; } = true; + private bool _showCalAz { get; set; } = true; + private bool _showMal { get; set; } = false; #endregion Private Properties @@ -214,7 +282,19 @@ namespace GPW_Admin.WebUserControls { DateTime inizio = new DateTime(reqYear, 1, 1); DateTime fine = inizio.AddYears(1); - List result = DataProxy.DP.taRR.getPeriod(0, inizio, fine, showAll).ToList(); + List result = DataProxy.DP.taRR.getPeriod(0, inizio, fine, showAlsoConf).ToList(); + return result; + } + + /// + /// Elenco Richieste Dipendenti x anno + /// + /// + private List RMListByAnno(int reqYear) + { + DateTime inizio = new DateTime(reqYear, 1, 1); + DateTime fine = inizio.AddYears(1); + List result = DataProxy.DP.taRM.getPeriod(0, inizio, fine).ToList(); return result; } diff --git a/GPW_Admin/WebUserControls/cmp_calAnnuale.ascx.designer.cs b/GPW_Admin/WebUserControls/cmp_calAnnuale.ascx.designer.cs index 216e2d0..c6dcd78 100644 --- a/GPW_Admin/WebUserControls/cmp_calAnnuale.ascx.designer.cs +++ b/GPW_Admin/WebUserControls/cmp_calAnnuale.ascx.designer.cs @@ -14,6 +14,42 @@ namespace GPW_Admin.WebUserControls public partial class cmp_calAnnuale { + /// + /// divFes control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl divFes; + + /// + /// divCalAz control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl divCalAz; + + /// + /// divMal control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl divMal; + + /// + /// hfAnno control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.HiddenField hfAnno; + /// /// repCal control. /// diff --git a/GPW_Admin/WebUserControls/cmp_gestMalattia.ascx b/GPW_Admin/WebUserControls/cmp_gestMalattia.ascx index e60431e..1d8e5d7 100644 --- a/GPW_Admin/WebUserControls/cmp_gestMalattia.ascx +++ b/GPW_Admin/WebUserControls/cmp_gestMalattia.ascx @@ -90,6 +90,6 @@
- +
diff --git a/GPW_Admin/WebUserControls/cmp_gestMalattia.ascx.cs b/GPW_Admin/WebUserControls/cmp_gestMalattia.ascx.cs index 67738b5..d9d15da 100644 --- a/GPW_Admin/WebUserControls/cmp_gestMalattia.ascx.cs +++ b/GPW_Admin/WebUserControls/cmp_gestMalattia.ascx.cs @@ -100,7 +100,7 @@ namespace GPW_Admin.WebUserControls protected void chkShowAll_CheckedChanged(object sender, EventArgs e) { chkShowAll.Text = chkShowAll.Checked ? "Mostra Tutti" : "Da Confermare"; - cmp_calAnnuale.showAll = chkShowAll.Checked; + cmp_calAnnuale.showAlsoConf = chkShowAll.Checked; } protected string datiDip(object idxDip) diff --git a/GPW_Admin/WebUserControls/cmp_gestRichDip.ascx b/GPW_Admin/WebUserControls/cmp_gestRichDip.ascx index f179dc2..25257ff 100644 --- a/GPW_Admin/WebUserControls/cmp_gestRichDip.ascx +++ b/GPW_Admin/WebUserControls/cmp_gestRichDip.ascx @@ -104,6 +104,6 @@
- +
diff --git a/GPW_Admin/WebUserControls/cmp_gestRichDip.ascx.cs b/GPW_Admin/WebUserControls/cmp_gestRichDip.ascx.cs index 3732c60..acff91e 100644 --- a/GPW_Admin/WebUserControls/cmp_gestRichDip.ascx.cs +++ b/GPW_Admin/WebUserControls/cmp_gestRichDip.ascx.cs @@ -102,7 +102,7 @@ namespace GPW_Admin.WebUserControls protected void chkShowAll_CheckedChanged(object sender, EventArgs e) { chkShowAll.Text = chkShowAll.Checked ? "Mostra Tutti" : "Da Confermare"; - cmp_calAnnuale.showAll = chkShowAll.Checked; + cmp_calAnnuale.showAlsoConf = chkShowAll.Checked; } protected string datiDip(object idxDip) diff --git a/GPW_Admin/WebUserControls/mod_gestCalendario.ascx b/GPW_Admin/WebUserControls/mod_gestCalendario.ascx index b889dc2..80363f1 100644 --- a/GPW_Admin/WebUserControls/mod_gestCalendario.ascx +++ b/GPW_Admin/WebUserControls/mod_gestCalendario.ascx @@ -1,14 +1,16 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_gestCalendario.ascx.cs" Inherits="GPW_Admin.WebUserControls.mod_gestCalendario" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> <%@ Register Src="~/WebUserControls/cmp_periodoAnalisi.ascx" TagPrefix="uc1" TagName="cmp_periodoAnalisi" %> +<%@ Register Src="~/WebUserControls/cmp_calAnnuale.ascx" TagPrefix="uc1" TagName="cmp_calAnnuale" %> +
-
- +
+ + +
- Anno: -
ADD FESTIVITA' (Anno) @@ -17,67 +19,34 @@ - -
-
-
-
- Inizio: - -
-
- Fine: - -
+
+
+
+ Anno
+ Inizio:
+ Fine:
- - -
-
- Descrizione: - -
-
- Aggiungi Ferie -
-
-
+
+ Descrizione:
+ Aggiungi Ferie
- -   - - - -   - - - +   +   - - - - - - - - - + + - -   - - - - +   + @@ -103,26 +72,6 @@
-
-
- FESTIVITA' -
-
- FERIE -
-
- WEEK-END -
-
-
- - -
- -
-
-
-
- +
diff --git a/GPW_Admin/WebUserControls/mod_gestCalendario.ascx.cs b/GPW_Admin/WebUserControls/mod_gestCalendario.ascx.cs index f991fa0..4655482 100644 --- a/GPW_Admin/WebUserControls/mod_gestCalendario.ascx.cs +++ b/GPW_Admin/WebUserControls/mod_gestCalendario.ascx.cs @@ -25,7 +25,6 @@ namespace GPW_Admin.WebUserControls // aggiorno! grView.PageSize = utils.pageSize; grView.DataBind(); - repCal.DataBind(); } public List elencoMesi() @@ -66,6 +65,48 @@ namespace GPW_Admin.WebUserControls } } + protected DateTime Fine + { + get + { + DateTime answ = new DateTime(anno + 1, 1, 1); + if (!string.IsNullOrEmpty(hfFine.Value)) + { + DateTime.TryParse(hfFine.Value, out answ); + } + else + { + hfFine.Value = $"{answ}"; + } + return answ; + } + set + { + hfFine.Value = $"{value}"; + } + } + + protected DateTime Inizio + { + get + { + DateTime answ = new DateTime(anno, 1, 1); + if (!string.IsNullOrEmpty(hfInizio.Value)) + { + DateTime.TryParse(hfInizio.Value, out answ); + } + else + { + hfInizio.Value = $"{answ}"; + } + return answ; + } + set + { + hfInizio.Value = $"{value}"; + } + } + protected List listCFF { get; set; } #endregion Protected Properties @@ -156,6 +197,7 @@ namespace GPW_Admin.WebUserControls if (!Page.IsPostBack) { anno = DateTime.Now.Year; + cmp_calAnnuale.anno = anno; intervalloDate currAnno = new intervalloDate { inizio = DateTime.Today.AddYears(-2), @@ -178,6 +220,12 @@ namespace GPW_Admin.WebUserControls doUpdateCal(); } + protected void txtAnno_TextChanged(object sender, EventArgs e) + { + reportAnno(); + doUpdateCal(); + } + #endregion Protected Methods #region Private Properties @@ -226,6 +274,19 @@ namespace GPW_Admin.WebUserControls return result; } + private void reportAnno() + { + Inizio = new DateTime(anno, 1, 1); + Fine = new DateTime(anno + 1, 1, 1); + intervalloDate currAnno = new intervalloDate + { + inizio = Inizio, + fine = Fine + }; + cmp_periodoAnalisi.intervalloAnalisi = currAnno; + cmp_calAnnuale.anno = anno; + } + private void setupFestAnno(int reqYear) { // recupero elenco festività diff --git a/GPW_Admin/WebUserControls/mod_gestCalendario.ascx.designer.cs b/GPW_Admin/WebUserControls/mod_gestCalendario.ascx.designer.cs index 4c2ee74..e96acf7 100644 --- a/GPW_Admin/WebUserControls/mod_gestCalendario.ascx.designer.cs +++ b/GPW_Admin/WebUserControls/mod_gestCalendario.ascx.designer.cs @@ -24,13 +24,22 @@ namespace GPW_Admin.WebUserControls protected global::GPW_Admin.WebUserControls.cmp_periodoAnalisi cmp_periodoAnalisi; /// - /// txtAnno control. + /// hfInizio control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.TextBox txtAnno; + protected global::System.Web.UI.WebControls.HiddenField hfInizio; + + /// + /// hfFine control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.HiddenField hfFine; /// /// lbtSetupYear control. @@ -59,6 +68,15 @@ namespace GPW_Admin.WebUserControls /// protected global::System.Web.UI.WebControls.Label lblTestoFerie; + /// + /// txtAnno control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtAnno; + /// /// divInsFerie control. /// @@ -132,21 +150,12 @@ namespace GPW_Admin.WebUserControls protected global::System.Web.UI.WebControls.ObjectDataSource ods; /// - /// repCal control. + /// cmp_calAnnuale control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Repeater repCal; - - /// - /// odsMesi control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.ObjectDataSource odsMesi; + protected global::GPW_Admin.WebUserControls.cmp_calAnnuale cmp_calAnnuale; } } diff --git a/GPW_Data/DS_Applicazione.Designer.cs b/GPW_Data/DS_Applicazione.Designer.cs index 503b6a3..42a4930 100644 --- a/GPW_Data/DS_Applicazione.Designer.cs +++ b/GPW_Data/DS_Applicazione.Designer.cs @@ -80,6 +80,8 @@ namespace GPW_data { private RegistroMalattieDataTable tableRegistroMalattie; + private CalMesiDataTable tableCalMesi; + private global::System.Data.DataRelation relationFK_Timbrature_Dipendenti; private global::System.Data.DataRelation relationFK_AnagFasi_AnagProgetti; @@ -208,6 +210,9 @@ namespace GPW_data { if ((ds.Tables["RegistroMalattie"] != null)) { base.Tables.Add(new RegistroMalattieDataTable(ds.Tables["RegistroMalattie"])); } + if ((ds.Tables["CalMesi"] != null)) { + base.Tables.Add(new CalMesiDataTable(ds.Tables["CalMesi"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -506,6 +511,16 @@ namespace GPW_data { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] + public CalMesiDataTable CalMesi { + get { + return this.tableCalMesi; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.BrowsableAttribute(true)] @@ -657,6 +672,9 @@ namespace GPW_data { if ((ds.Tables["RegistroMalattie"] != null)) { base.Tables.Add(new RegistroMalattieDataTable(ds.Tables["RegistroMalattie"])); } + if ((ds.Tables["CalMesi"] != null)) { + base.Tables.Add(new CalMesiDataTable(ds.Tables["CalMesi"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -858,6 +876,12 @@ namespace GPW_data { this.tableRegistroMalattie.InitVars(); } } + this.tableCalMesi = ((CalMesiDataTable)(base.Tables["CalMesi"])); + if ((initTable == true)) { + if ((this.tableCalMesi != null)) { + this.tableCalMesi.InitVars(); + } + } this.relationFK_Timbrature_Dipendenti = this.Relations["FK_Timbrature_Dipendenti"]; this.relationFK_AnagFasi_AnagProgetti = this.Relations["FK_AnagFasi_AnagProgetti"]; this.relationFK_RegAttivita_AnagFasi = this.Relations["FK_RegAttivita_AnagFasi"]; @@ -932,6 +956,8 @@ namespace GPW_data { base.Tables.Add(this.tableRegistroRichieste); this.tableRegistroMalattie = new RegistroMalattieDataTable(); base.Tables.Add(this.tableRegistroMalattie); + this.tableCalMesi = new CalMesiDataTable(); + base.Tables.Add(this.tableCalMesi); this.relationFK_Timbrature_Dipendenti = new global::System.Data.DataRelation("FK_Timbrature_Dipendenti", new global::System.Data.DataColumn[] { this.tableDipendenti.idxDipendenteColumn}, new global::System.Data.DataColumn[] { this.tableTimbrature.idxDipendenteColumn}, false); @@ -1134,6 +1160,12 @@ namespace GPW_data { return false; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private bool ShouldSerializeCalMesi() { + return false; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) { @@ -1273,6 +1305,9 @@ namespace GPW_data { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public delegate void RegistroMalattieRowChangeEventHandler(object sender, RegistroMalattieRowChangeEvent e); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public delegate void CalMesiRowChangeEventHandler(object sender, CalMesiRowChangeEvent e); + /// ///Represents the strongly named DataTable class. /// @@ -12836,6 +12871,254 @@ namespace GPW_data { } } + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class CalMesiDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnMese; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public CalMesiDataTable() { + this.TableName = "CalMesi"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal CalMesiDataTable(global::System.Data.DataTable table) { + this.TableName = table.TableName; + if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { + this.CaseSensitive = table.CaseSensitive; + } + if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { + this.Locale = table.Locale; + } + if ((table.Namespace != table.DataSet.Namespace)) { + this.Namespace = table.Namespace; + } + this.Prefix = table.Prefix; + this.MinimumCapacity = table.MinimumCapacity; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected CalMesiDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context) { + this.InitVars(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn MeseColumn { + get { + return this.columnMese; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + public int Count { + get { + return this.Rows.Count; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public CalMesiRow this[int index] { + get { + return ((CalMesiRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event CalMesiRowChangeEventHandler CalMesiRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event CalMesiRowChangeEventHandler CalMesiRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event CalMesiRowChangeEventHandler CalMesiRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event CalMesiRowChangeEventHandler CalMesiRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void AddCalMesiRow(CalMesiRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public CalMesiRow AddCalMesiRow(System.DateTime Mese) { + CalMesiRow rowCalMesiRow = ((CalMesiRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + Mese}; + rowCalMesiRow.ItemArray = columnValuesArray; + this.Rows.Add(rowCalMesiRow); + return rowCalMesiRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public override global::System.Data.DataTable Clone() { + CalMesiDataTable cln = ((CalMesiDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataTable CreateInstance() { + return new CalMesiDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal void InitVars() { + this.columnMese = base.Columns["Mese"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitClass() { + this.columnMese = new global::System.Data.DataColumn("Mese", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnMese); + this.columnMese.ReadOnly = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public CalMesiRow NewCalMesiRow() { + return ((CalMesiRow)(this.NewRow())); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { + return new CalMesiRow(builder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Type GetRowType() { + return typeof(CalMesiRow); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.CalMesiRowChanged != null)) { + this.CalMesiRowChanged(this, new CalMesiRowChangeEvent(((CalMesiRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.CalMesiRowChanging != null)) { + this.CalMesiRowChanging(this, new CalMesiRowChangeEvent(((CalMesiRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.CalMesiRowDeleted != null)) { + this.CalMesiRowDeleted(this, new CalMesiRowChangeEvent(((CalMesiRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.CalMesiRowDeleting != null)) { + this.CalMesiRowDeleting(this, new CalMesiRowChangeEvent(((CalMesiRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void RemoveCalMesiRow(CalMesiRow row) { + this.Rows.Remove(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + DS_Applicazione ds = new DS_Applicazione(); + global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); + any1.Namespace = "http://www.w3.org/2001/XMLSchema"; + any1.MinOccurs = new decimal(0); + any1.MaxOccurs = decimal.MaxValue; + any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any1); + global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; + any2.MinOccurs = new decimal(1); + any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any2); + global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute1.Name = "namespace"; + attribute1.FixedValue = ds.Namespace; + type.Attributes.Add(attribute1); + global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute2.Name = "tableTypeName"; + attribute2.FixedValue = "CalMesiDataTable"; + type.Attributes.Add(attribute2); + type.Particle = sequence; + global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); + if (xs.Contains(dsSchema.TargetNamespace)) { + global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); + global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); + try { + global::System.Xml.Schema.XmlSchema schema = null; + dsSchema.Write(s1); + for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { + schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); + s2.SetLength(0); + schema.Write(s2); + if ((s1.Length == s2.Length)) { + s1.Position = 0; + s2.Position = 0; + for (; ((s1.Position != s1.Length) + && (s1.ReadByte() == s2.ReadByte())); ) { + ; + } + if ((s1.Position == s1.Length)) { + return type; + } + } + } + } + finally { + if ((s1 != null)) { + s1.Close(); + } + if ((s2 != null)) { + s2.Close(); + } + } + } + xs.Add(dsSchema); + return type; + } + } + /// ///Represents strongly named DataRow class. /// @@ -20256,6 +20539,49 @@ namespace GPW_data { } } + /// + ///Represents strongly named DataRow class. + /// + public partial class CalMesiRow : global::System.Data.DataRow { + + private CalMesiDataTable tableCalMesi; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal CalMesiRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableCalMesi = ((CalMesiDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public System.DateTime Mese { + get { + try { + return ((global::System.DateTime)(this[this.tableCalMesi.MeseColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Mese\' in table \'CalMesi\' is DBNull.", e); + } + } + set { + this[this.tableCalMesi.MeseColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsMeseNull() { + return this.IsNull(this.tableCalMesi.MeseColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetMeseNull() { + this[this.tableCalMesi.MeseColumn] = global::System.Convert.DBNull; + } + } + /// ///Row event argument class /// @@ -21207,6 +21533,40 @@ namespace GPW_data { } } } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public class CalMesiRowChangeEvent : global::System.EventArgs { + + private CalMesiRow eventRow; + + private global::System.Data.DataRowAction eventAction; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public CalMesiRowChangeEvent(CalMesiRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public CalMesiRow Row { + get { + return this.eventRow; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } + } + } } } namespace GPW_data.DS_ApplicazioneTableAdapters { @@ -38661,6 +39021,213 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa } } + /// + ///Represents the connection and commands used to retrieve and save data. + /// + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.ComponentModel.DataObjectAttribute(true)] + [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public partial class CalMesiTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.SqlClient.SqlDataAdapter _adapter; + + private global::System.Data.SqlClient.SqlConnection _connection; + + private global::System.Data.SqlClient.SqlTransaction _transaction; + + private global::System.Data.SqlClient.SqlCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public CalMesiTableAdapter() { + this.ClearBeforeFill = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { + get { + if ((this._adapter == null)) { + this.InitAdapter(); + } + return this._adapter; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlConnection Connection { + get { + if ((this._connection == null)) { + this.InitConnection(); + } + return this._connection; + } + set { + this._connection = value; + if ((this.Adapter.InsertCommand != null)) { + this.Adapter.InsertCommand.Connection = value; + } + if ((this.Adapter.DeleteCommand != null)) { + this.Adapter.DeleteCommand.Connection = value; + } + if ((this.Adapter.UpdateCommand != null)) { + this.Adapter.UpdateCommand.Connection = value; + } + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + if ((this.CommandCollection[i] != null)) { + ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; + } + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlTransaction Transaction { + get { + return this._transaction; + } + set { + this._transaction = value; + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + this.CommandCollection[i].Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.DeleteCommand != null))) { + this.Adapter.DeleteCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.InsertCommand != null))) { + this.Adapter.InsertCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.UpdateCommand != null))) { + this.Adapter.UpdateCommand.Transaction = this._transaction; + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { + get { + if ((this._commandCollection == null)) { + this.InitCommandCollection(); + } + return this._commandCollection; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool ClearBeforeFill { + get { + return this._clearBeforeFill; + } + set { + this._clearBeforeFill = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitAdapter() { + this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); + global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); + tableMapping.SourceTable = "Table"; + tableMapping.DataSetTable = "CalMesi"; + tableMapping.ColumnMappings.Add("Mese", "Mese"); + this._adapter.TableMappings.Add(tableMapping); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitConnection() { + this._connection = new global::System.Data.SqlClient.SqlConnection(); + this._connection.ConnectionString = global::GPW_data.Properties.Settings.Default.GPWConnectionString; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitCommandCollection() { + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; + this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "dbo.stp_CAL_getMonths"; + this._commandCollection[0].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@anno", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@mese", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@numMonth", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] + public virtual int Fill(DS_Applicazione.CalMesiDataTable dataTable, global::System.Nullable anno, global::System.Nullable mese, global::System.Nullable numMonth) { + this.Adapter.SelectCommand = this.CommandCollection[0]; + if ((anno.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(anno.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + if ((mese.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[2].Value = ((int)(mese.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; + } + if ((numMonth.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[3].Value = ((int)(numMonth.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[3].Value = global::System.DBNull.Value; + } + if ((this.ClearBeforeFill == true)) { + dataTable.Clear(); + } + int returnValue = this.Adapter.Fill(dataTable); + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] + public virtual DS_Applicazione.CalMesiDataTable GetData(global::System.Nullable anno, global::System.Nullable mese, global::System.Nullable numMonth) { + this.Adapter.SelectCommand = this.CommandCollection[0]; + if ((anno.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(anno.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + if ((mese.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[2].Value = ((int)(mese.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; + } + if ((numMonth.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[3].Value = ((int)(numMonth.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[3].Value = global::System.DBNull.Value; + } + DS_Applicazione.CalMesiDataTable dataTable = new DS_Applicazione.CalMesiDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + } + /// ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios /// @@ -39168,15 +39735,6 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private int UpdateUpdatedRows(DS_Applicazione dataSet, global::System.Collections.Generic.List allChangedRows, global::System.Collections.Generic.List allAddedRows) { int result = 0; - if ((this._dipendenti2GruppiTableAdapter != null)) { - global::System.Data.DataRow[] updatedRows = dataSet.Dipendenti2Gruppi.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); - updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); - if (((updatedRows != null) - && (0 < updatedRows.Length))) { - result = (result + this._dipendenti2GruppiTableAdapter.Update(updatedRows)); - allChangedRows.AddRange(updatedRows); - } - } if ((this._anagProgettiTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.AnagProgetti.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); @@ -39186,6 +39744,15 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa allChangedRows.AddRange(updatedRows); } } + if ((this._dipendenti2GruppiTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.Dipendenti2Gruppi.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._dipendenti2GruppiTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } if ((this._anagGruppiTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.AnagGruppi.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); @@ -39231,6 +39798,15 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa allChangedRows.AddRange(updatedRows); } } + if ((this._registroRichiesteTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.RegistroRichieste.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._registroRichiesteTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } if ((this._listTagDDTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.ListTagDD.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); @@ -39258,6 +39834,15 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa allChangedRows.AddRange(updatedRows); } } + if ((this._registroMalattieTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.RegistroMalattie.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._registroMalattieTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } if ((this._giustificativiTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.Giustificativi.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); @@ -39267,15 +39852,6 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa allChangedRows.AddRange(updatedRows); } } - if ((this._registroRichiesteTableAdapter != null)) { - global::System.Data.DataRow[] updatedRows = dataSet.RegistroRichieste.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); - updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); - if (((updatedRows != null) - && (0 < updatedRows.Length))) { - result = (result + this._registroRichiesteTableAdapter.Update(updatedRows)); - allChangedRows.AddRange(updatedRows); - } - } if ((this._calendFesteFerieTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.CalendFesteFerie.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); @@ -39330,15 +39906,6 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa allChangedRows.AddRange(updatedRows); } } - if ((this._registroMalattieTableAdapter != null)) { - global::System.Data.DataRow[] updatedRows = dataSet.RegistroMalattie.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); - updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); - if (((updatedRows != null) - && (0 < updatedRows.Length))) { - result = (result + this._registroMalattieTableAdapter.Update(updatedRows)); - allChangedRows.AddRange(updatedRows); - } - } return result; } @@ -39349,14 +39916,6 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private int UpdateInsertedRows(DS_Applicazione dataSet, global::System.Collections.Generic.List allAddedRows) { int result = 0; - if ((this._dipendenti2GruppiTableAdapter != null)) { - global::System.Data.DataRow[] addedRows = dataSet.Dipendenti2Gruppi.Select(null, null, global::System.Data.DataViewRowState.Added); - if (((addedRows != null) - && (0 < addedRows.Length))) { - result = (result + this._dipendenti2GruppiTableAdapter.Update(addedRows)); - allAddedRows.AddRange(addedRows); - } - } if ((this._anagProgettiTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.AnagProgetti.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) @@ -39365,6 +39924,14 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa allAddedRows.AddRange(addedRows); } } + if ((this._dipendenti2GruppiTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.Dipendenti2Gruppi.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._dipendenti2GruppiTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } if ((this._anagGruppiTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.AnagGruppi.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) @@ -39405,6 +39972,14 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa allAddedRows.AddRange(addedRows); } } + if ((this._registroRichiesteTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.RegistroRichieste.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._registroRichiesteTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } if ((this._listTagDDTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.ListTagDD.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) @@ -39429,6 +40004,14 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa allAddedRows.AddRange(addedRows); } } + if ((this._registroMalattieTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.RegistroMalattie.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._registroMalattieTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } if ((this._giustificativiTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.Giustificativi.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) @@ -39437,14 +40020,6 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa allAddedRows.AddRange(addedRows); } } - if ((this._registroRichiesteTableAdapter != null)) { - global::System.Data.DataRow[] addedRows = dataSet.RegistroRichieste.Select(null, null, global::System.Data.DataViewRowState.Added); - if (((addedRows != null) - && (0 < addedRows.Length))) { - result = (result + this._registroRichiesteTableAdapter.Update(addedRows)); - allAddedRows.AddRange(addedRows); - } - } if ((this._calendFesteFerieTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.CalendFesteFerie.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) @@ -39493,14 +40068,6 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa allAddedRows.AddRange(addedRows); } } - if ((this._registroMalattieTableAdapter != null)) { - global::System.Data.DataRow[] addedRows = dataSet.RegistroMalattie.Select(null, null, global::System.Data.DataViewRowState.Added); - if (((addedRows != null) - && (0 < addedRows.Length))) { - result = (result + this._registroMalattieTableAdapter.Update(addedRows)); - allAddedRows.AddRange(addedRows); - } - } return result; } @@ -39511,14 +40078,6 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private int UpdateDeletedRows(DS_Applicazione dataSet, global::System.Collections.Generic.List allChangedRows) { int result = 0; - if ((this._registroMalattieTableAdapter != null)) { - global::System.Data.DataRow[] deletedRows = dataSet.RegistroMalattie.Select(null, null, global::System.Data.DataViewRowState.Deleted); - if (((deletedRows != null) - && (0 < deletedRows.Length))) { - result = (result + this._registroMalattieTableAdapter.Update(deletedRows)); - allChangedRows.AddRange(deletedRows); - } - } if ((this._timbratureExplTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.TimbratureExpl.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) @@ -39567,14 +40126,6 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa allChangedRows.AddRange(deletedRows); } } - if ((this._registroRichiesteTableAdapter != null)) { - global::System.Data.DataRow[] deletedRows = dataSet.RegistroRichieste.Select(null, null, global::System.Data.DataViewRowState.Deleted); - if (((deletedRows != null) - && (0 < deletedRows.Length))) { - result = (result + this._registroRichiesteTableAdapter.Update(deletedRows)); - allChangedRows.AddRange(deletedRows); - } - } if ((this._giustificativiTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.Giustificativi.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) @@ -39583,6 +40134,14 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa allChangedRows.AddRange(deletedRows); } } + if ((this._registroMalattieTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.RegistroMalattie.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._registroMalattieTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } if ((this._registroEventiTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.RegistroEventi.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) @@ -39607,6 +40166,14 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa allChangedRows.AddRange(deletedRows); } } + if ((this._registroRichiesteTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.RegistroRichieste.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._registroRichiesteTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } if ((this._timbratureTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.Timbrature.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) @@ -39647,14 +40214,6 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa allChangedRows.AddRange(deletedRows); } } - if ((this._anagProgettiTableAdapter != null)) { - global::System.Data.DataRow[] deletedRows = dataSet.AnagProgetti.Select(null, null, global::System.Data.DataViewRowState.Deleted); - if (((deletedRows != null) - && (0 < deletedRows.Length))) { - result = (result + this._anagProgettiTableAdapter.Update(deletedRows)); - allChangedRows.AddRange(deletedRows); - } - } if ((this._dipendenti2GruppiTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.Dipendenti2Gruppi.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) @@ -39663,6 +40222,14 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa allChangedRows.AddRange(deletedRows); } } + if ((this._anagProgettiTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.AnagProgetti.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._anagProgettiTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } return result; } diff --git a/GPW_Data/DS_Applicazione.xsd b/GPW_Data/DS_Applicazione.xsd index f2a521b..f06f27c 100644 --- a/GPW_Data/DS_Applicazione.xsd +++ b/GPW_Data/DS_Applicazione.xsd @@ -3575,6 +3575,27 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa + + + + + + dbo.stp_CAL_getMonths + + + + + + + + + + + + + + + @@ -4565,7 +4586,7 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa - + @@ -4590,7 +4611,7 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa - + @@ -4608,6 +4629,13 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa + + + + + + + @@ -4735,14 +4763,14 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa - - - - - - - - + + + + + + + + \ No newline at end of file diff --git a/GPW_Data/DS_Applicazione.xss b/GPW_Data/DS_Applicazione.xss index 813133e..3c4a228 100644 --- a/GPW_Data/DS_Applicazione.xss +++ b/GPW_Data/DS_Applicazione.xss @@ -4,39 +4,40 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + 391 @@ -48,7 +49,7 @@ - + 1046 @@ -60,7 +61,7 @@ - + 871 @@ -76,7 +77,7 @@ - + 585 @@ -88,7 +89,7 @@ - + 332 @@ -100,7 +101,7 @@ - + 285 @@ -112,7 +113,7 @@ - + 286 @@ -128,7 +129,7 @@ - + 428 From 396695792114353325de8250d64bd947fc4a4a20 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 4 Jan 2023 18:32:34 +0100 Subject: [PATCH 2/2] COmpletato fix calendario x ADM --- GPW_Admin/WebUserControls/cmp_calAnnuale.ascx | 11 ++- .../WebUserControls/cmp_calAnnuale.ascx.cs | 88 ++++++++++--------- 2 files changed, 55 insertions(+), 44 deletions(-) diff --git a/GPW_Admin/WebUserControls/cmp_calAnnuale.ascx b/GPW_Admin/WebUserControls/cmp_calAnnuale.ascx index 8c37bac..da62d98 100644 --- a/GPW_Admin/WebUserControls/cmp_calAnnuale.ascx +++ b/GPW_Admin/WebUserControls/cmp_calAnnuale.ascx @@ -20,12 +20,17 @@
-
<%# Container.DataItem %>
- +
- + + + + + + +
diff --git a/GPW_Admin/WebUserControls/cmp_calAnnuale.ascx.cs b/GPW_Admin/WebUserControls/cmp_calAnnuale.ascx.cs index 1f654e7..d138928 100644 --- a/GPW_Admin/WebUserControls/cmp_calAnnuale.ascx.cs +++ b/GPW_Admin/WebUserControls/cmp_calAnnuale.ascx.cs @@ -16,8 +16,7 @@ namespace GPW_Admin.WebUserControls set { _anno = value; - //doUpdateCal(); - odsMesi.DataBind(); + //odsMesi.DataBind(); repCal.DataBind(); } } @@ -27,18 +26,6 @@ namespace GPW_Admin.WebUserControls ///
public bool showAlsoConf { get; set; } = true; - /// - /// Mostrare/Colorare sul calendario le richieste dipendente - /// - public bool showRichDip - { - get => _showRichDip; - set - { - _showRichDip = value; - divRichDip.Visible = value; - } - } /// /// Mostrare/Colorare sul calendario le chiusure aziendali programmate /// @@ -52,6 +39,7 @@ namespace GPW_Admin.WebUserControls divFes.Visible = value; } } + /// /// Mostrare/Colorare sul calendario le malattie ricevute /// @@ -65,21 +53,20 @@ namespace GPW_Admin.WebUserControls } } - #endregion Public Properties - - #region Public Methods - - public List elencoMesi() + /// + /// Mostrare/Colorare sul calendario le richieste dipendente + /// + public bool showRichDip { - List listaMesi = new List(); - for (int i = 0; i < 12; i++) + get => _showRichDip; + set { - listaMesi.Add(new DateTime(_anno, 1 + i, 1)); + _showRichDip = value; + divRichDip.Visible = value; } - return listaMesi; } - #endregion Public Methods + #endregion Public Properties #region Protected Properties @@ -87,9 +74,8 @@ namespace GPW_Admin.WebUserControls protected List listCFF { get; set; } - protected List listRR { get; set; } - protected List listRM { get; set; } + protected List listRR { get; set; } #endregion Protected Properties @@ -114,6 +100,7 @@ namespace GPW_Admin.WebUserControls { isColored = true; e.Cell.CssClass = thisDate.codGiust == "FEST" ? "bg-danger text-warning" : "bg-warning"; + e.Cell.ToolTip = $"{thisDate.descrizione}"; } } } @@ -123,11 +110,29 @@ namespace GPW_Admin.WebUserControls if (listRM != null && listRM.Count > 0) { // cerco riga... - var thisDate = listRM.Where(x => x.DtInizio == e.Day.Date).FirstOrDefault(); + var listMal = listRM.Where(x => e.Day.Date >= x.DtInizio && e.Day.Date < x.DtInizio.AddDays(x.NumGG)).ToList(); + var thisDate = listMal.FirstOrDefault(); if (thisDate != null && e.Cell.CssClass != "text-light") { isColored = true; e.Cell.CssClass = "bg-dark text-light"; + // se ho 1 sola riga --> metto 1, altrimenti compilo multiplo... + string toolTip = ""; + if (listMal.Count == 1) + { + toolTip = $"{datiDip(thisDate.IdxDipendente)}"; + } + else + { + foreach (var item in listMal) + { + toolTip += $"{datiDip(item.IdxDipendente)} | "; + } + // elimino ultimo + //
+ toolTip = toolTip.Substring(0, toolTip.Length - 3); + } + e.Cell.ToolTip = toolTip; } } } @@ -166,7 +171,7 @@ namespace GPW_Admin.WebUserControls } } // se ho 1 sola riga --> metto 1, altrimenti compilo multiplo... - string toolTip = $""; + string toolTip = ""; if (listReq.Count == 1) { toolTip = $"{thisDate.CodGiust}, {datiDip(thisDate.IdxDipendente)}"; @@ -254,9 +259,10 @@ namespace GPW_Admin.WebUserControls hfAnno.Value = $"{value}"; } } - private bool _showRichDip { get; set; } = true; + private bool _showCalAz { get; set; } = true; private bool _showMal { get; set; } = false; + private bool _showRichDip { get; set; } = true; #endregion Private Properties @@ -274,18 +280,6 @@ namespace GPW_Admin.WebUserControls return result; } - /// - /// Elenco Richieste Dipendenti x anno - /// - /// - private List RRListByAnno(int reqYear) - { - DateTime inizio = new DateTime(reqYear, 1, 1); - DateTime fine = inizio.AddYears(1); - List result = DataProxy.DP.taRR.getPeriod(0, inizio, fine, showAlsoConf).ToList(); - return result; - } - /// /// Elenco Richieste Dipendenti x anno /// @@ -298,6 +292,18 @@ namespace GPW_Admin.WebUserControls return result; } + /// + /// Elenco Richieste Dipendenti x anno + /// + /// + private List RRListByAnno(int reqYear) + { + DateTime inizio = new DateTime(reqYear, 1, 1); + DateTime fine = inizio.AddYears(1); + List result = DataProxy.DP.taRR.getPeriod(0, inizio, fine, showAlsoConf).ToList(); + return result; + } + #endregion Private Methods } } \ No newline at end of file