From bf3969cf5ecdb2d44c4ba79d8f3ffb37814ed6eb Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 20 Mar 2024 17:44:54 +0100 Subject: [PATCH 1/3] Fix iniziale DB x SQL2019 + add AnagFasi (DS) --- GPW_Admin/GPW_Admin.csproj | 16 + .../WebUserControls/cmp_gestTagFasi.ascx | 16 + .../WebUserControls/cmp_gestTagFasi.ascx.cs | 17 + .../cmp_gestTagFasi.ascx.designer.cs | 17 + GPW_Admin/tags.aspx | 17 + GPW_Admin/tags.aspx.cs | 33 + GPW_Admin/tags.aspx.designer.cs | 35 + GPW_Data/DS_Applicazione.Designer.cs | 654 +++++++++++++++- GPW_Data/DS_Applicazione.xsd | 739 ++++++++++-------- GPW_Data/DS_Applicazione.xss | 77 +- GPW_Data/Properties/Settings.Designer.cs | 11 +- GPW_Data/Properties/Settings.settings | 18 +- GPW_data/App.config | 8 +- 13 files changed, 1235 insertions(+), 423 deletions(-) create mode 100644 GPW_Admin/WebUserControls/cmp_gestTagFasi.ascx create mode 100644 GPW_Admin/WebUserControls/cmp_gestTagFasi.ascx.cs create mode 100644 GPW_Admin/WebUserControls/cmp_gestTagFasi.ascx.designer.cs create mode 100644 GPW_Admin/tags.aspx create mode 100644 GPW_Admin/tags.aspx.cs create mode 100644 GPW_Admin/tags.aspx.designer.cs diff --git a/GPW_Admin/GPW_Admin.csproj b/GPW_Admin/GPW_Admin.csproj index c8080cd..1008494 100644 --- a/GPW_Admin/GPW_Admin.csproj +++ b/GPW_Admin/GPW_Admin.csproj @@ -692,6 +692,7 @@ + @@ -703,6 +704,7 @@ + @@ -1019,6 +1021,13 @@ tagMensili.aspx + + tags.aspx + ASPXCodeBehind + + + tags.aspx + Test.aspx ASPXCodeBehind @@ -1121,6 +1130,13 @@ cmp_gestRichDip.ascx + + cmp_gestTagFasi.ascx + ASPXCodeBehind + + + cmp_gestTagFasi.ascx + cmp_homeButtons.ascx ASPXCodeBehind diff --git a/GPW_Admin/WebUserControls/cmp_gestTagFasi.ascx b/GPW_Admin/WebUserControls/cmp_gestTagFasi.ascx new file mode 100644 index 0000000..5e9ab4f --- /dev/null +++ b/GPW_Admin/WebUserControls/cmp_gestTagFasi.ascx @@ -0,0 +1,16 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_gestTagFasi.ascx.cs" Inherits="GPW_Admin.WebUserControls.cmp_gestTagFasi" %> +<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> + + + + +
+
+ gestione tags fasi (x ora solo queste) +
+
+
+
+ ... +
+
diff --git a/GPW_Admin/WebUserControls/cmp_gestTagFasi.ascx.cs b/GPW_Admin/WebUserControls/cmp_gestTagFasi.ascx.cs new file mode 100644 index 0000000..fc71ac9 --- /dev/null +++ b/GPW_Admin/WebUserControls/cmp_gestTagFasi.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_Admin.WebUserControls +{ + public partial class cmp_gestTagFasi : System.Web.UI.UserControl + { + protected void Page_Load(object sender, EventArgs e) + { + + } + } +} \ No newline at end of file diff --git a/GPW_Admin/WebUserControls/cmp_gestTagFasi.ascx.designer.cs b/GPW_Admin/WebUserControls/cmp_gestTagFasi.ascx.designer.cs new file mode 100644 index 0000000..11505eb --- /dev/null +++ b/GPW_Admin/WebUserControls/cmp_gestTagFasi.ascx.designer.cs @@ -0,0 +1,17 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace GPW_Admin.WebUserControls +{ + + + public partial class cmp_gestTagFasi + { + } +} diff --git a/GPW_Admin/tags.aspx b/GPW_Admin/tags.aspx new file mode 100644 index 0000000..63e54cc --- /dev/null +++ b/GPW_Admin/tags.aspx @@ -0,0 +1,17 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/BMP.Master" AutoEventWireup="true" CodeBehind="tags.aspx.cs" Inherits="GPW_Admin.tags" %> +<%@ Register Src="~/WebUserControls/mod_pageSize.ascx" TagPrefix="uc1" TagName="mod_pageSize" %> +<%@ Register Src="~/WebUserControls/cmp_gestTagFasi.ascx" TagPrefix="uc1" TagName="cmp_gestTagFasi" %> + + +
+
+ <%: traduci(titolo) %> +
+
+ +
+ +
+
diff --git a/GPW_Admin/tags.aspx.cs b/GPW_Admin/tags.aspx.cs new file mode 100644 index 0000000..a3c7549 --- /dev/null +++ b/GPW_Admin/tags.aspx.cs @@ -0,0 +1,33 @@ +using GPW_Admin.WebUserControls; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace GPW_Admin +{ + public partial class tags : BasePage + { + #region Private Methods + + private void Mod_pageSize_eh_nuovaSize(object sender, EventArgs e) + { +#if false + mod_adminOrario1.doUpdate(); +#endif + } + + #endregion Private Methods + + #region Protected Methods + + protected void Page_Load(object sender, EventArgs e) + { + mod_pageSize.eh_nuovaSize += Mod_pageSize_eh_nuovaSize; + } + + #endregion Protected Methods + } +} \ No newline at end of file diff --git a/GPW_Admin/tags.aspx.designer.cs b/GPW_Admin/tags.aspx.designer.cs new file mode 100644 index 0000000..5dfb139 --- /dev/null +++ b/GPW_Admin/tags.aspx.designer.cs @@ -0,0 +1,35 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace GPW_Admin +{ + + + public partial class tags + { + + /// + /// cmp_gestTagFasi control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::GPW_Admin.WebUserControls.cmp_gestTagFasi cmp_gestTagFasi; + + /// + /// mod_pageSize control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::GPW_Admin.WebUserControls.mod_pageSize mod_pageSize; + } +} diff --git a/GPW_Data/DS_Applicazione.Designer.cs b/GPW_Data/DS_Applicazione.Designer.cs index acc682f..4f6d7c3 100644 --- a/GPW_Data/DS_Applicazione.Designer.cs +++ b/GPW_Data/DS_Applicazione.Designer.cs @@ -82,6 +82,8 @@ namespace GPW_data { private CalMesiDataTable tableCalMesi; + private AnagTagFasiDataTable tableAnagTagFasi; + private global::System.Data.DataRelation relationFK_Timbrature_Dipendenti; private global::System.Data.DataRelation relationFK_AnagFasi_AnagProgetti; @@ -213,6 +215,9 @@ namespace GPW_data { if ((ds.Tables["CalMesi"] != null)) { base.Tables.Add(new CalMesiDataTable(ds.Tables["CalMesi"])); } + if ((ds.Tables["AnagTagFasi"] != null)) { + base.Tables.Add(new AnagTagFasiDataTable(ds.Tables["AnagTagFasi"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -521,6 +526,16 @@ namespace GPW_data { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] + public AnagTagFasiDataTable AnagTagFasi { + get { + return this.tableAnagTagFasi; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.BrowsableAttribute(true)] @@ -675,6 +690,9 @@ namespace GPW_data { if ((ds.Tables["CalMesi"] != null)) { base.Tables.Add(new CalMesiDataTable(ds.Tables["CalMesi"])); } + if ((ds.Tables["AnagTagFasi"] != null)) { + base.Tables.Add(new AnagTagFasiDataTable(ds.Tables["AnagTagFasi"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -882,6 +900,12 @@ namespace GPW_data { this.tableCalMesi.InitVars(); } } + this.tableAnagTagFasi = ((AnagTagFasiDataTable)(base.Tables["AnagTagFasi"])); + if ((initTable == true)) { + if ((this.tableAnagTagFasi != null)) { + this.tableAnagTagFasi.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"]; @@ -958,6 +982,8 @@ namespace GPW_data { base.Tables.Add(this.tableRegistroMalattie); this.tableCalMesi = new CalMesiDataTable(); base.Tables.Add(this.tableCalMesi); + this.tableAnagTagFasi = new AnagTagFasiDataTable(); + base.Tables.Add(this.tableAnagTagFasi); 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); @@ -1166,6 +1192,12 @@ namespace GPW_data { return false; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + private bool ShouldSerializeAnagTagFasi() { + return false; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) { @@ -1308,6 +1340,9 @@ namespace GPW_data { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public delegate void CalMesiRowChangeEventHandler(object sender, CalMesiRowChangeEvent e); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public delegate void AnagTagFasiRowChangeEventHandler(object sender, AnagTagFasiRowChangeEvent e); + /// ///Represents the strongly named DataTable class. /// @@ -13119,6 +13154,312 @@ namespace GPW_data { } } + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class AnagTagFasiDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnCodTagFase; + + private global::System.Data.DataColumn columnDescrizione; + + private global::System.Data.DataColumn columnEnabled; + + private global::System.Data.DataColumn columnCodGruppo; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public AnagTagFasiDataTable() { + this.TableName = "AnagTagFasi"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + internal AnagTagFasiDataTable(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", "17.0.0.0")] + protected AnagTagFasiDataTable(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", "17.0.0.0")] + public global::System.Data.DataColumn CodTagFaseColumn { + get { + return this.columnCodTagFase; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public global::System.Data.DataColumn DescrizioneColumn { + get { + return this.columnDescrizione; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public global::System.Data.DataColumn EnabledColumn { + get { + return this.columnEnabled; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public global::System.Data.DataColumn CodGruppoColumn { + get { + return this.columnCodGruppo; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.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", "17.0.0.0")] + public AnagTagFasiRow this[int index] { + get { + return ((AnagTagFasiRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public event AnagTagFasiRowChangeEventHandler AnagTagFasiRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public event AnagTagFasiRowChangeEventHandler AnagTagFasiRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public event AnagTagFasiRowChangeEventHandler AnagTagFasiRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public event AnagTagFasiRowChangeEventHandler AnagTagFasiRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public void AddAnagTagFasiRow(AnagTagFasiRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public AnagTagFasiRow AddAnagTagFasiRow(string CodTagFase, string Descrizione, bool Enabled, string CodGruppo) { + AnagTagFasiRow rowAnagTagFasiRow = ((AnagTagFasiRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + CodTagFase, + Descrizione, + Enabled, + CodGruppo}; + rowAnagTagFasiRow.ItemArray = columnValuesArray; + this.Rows.Add(rowAnagTagFasiRow); + return rowAnagTagFasiRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public AnagTagFasiRow FindByCodTagFase(string CodTagFase) { + return ((AnagTagFasiRow)(this.Rows.Find(new object[] { + CodTagFase}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public override global::System.Data.DataTable Clone() { + AnagTagFasiDataTable cln = ((AnagTagFasiDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override global::System.Data.DataTable CreateInstance() { + return new AnagTagFasiDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + internal void InitVars() { + this.columnCodTagFase = base.Columns["CodTagFase"]; + this.columnDescrizione = base.Columns["Descrizione"]; + this.columnEnabled = base.Columns["Enabled"]; + this.columnCodGruppo = base.Columns["CodGruppo"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + private void InitClass() { + this.columnCodTagFase = new global::System.Data.DataColumn("CodTagFase", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnCodTagFase); + this.columnDescrizione = new global::System.Data.DataColumn("Descrizione", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnDescrizione); + this.columnEnabled = new global::System.Data.DataColumn("Enabled", typeof(bool), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnEnabled); + this.columnCodGruppo = new global::System.Data.DataColumn("CodGruppo", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnCodGruppo); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnCodTagFase}, true)); + this.columnCodTagFase.AllowDBNull = false; + this.columnCodTagFase.Unique = true; + this.columnCodTagFase.MaxLength = 50; + this.columnDescrizione.AllowDBNull = false; + this.columnDescrizione.MaxLength = 250; + this.columnEnabled.AllowDBNull = false; + this.columnCodGruppo.AllowDBNull = false; + this.columnCodGruppo.MaxLength = 50; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public AnagTagFasiRow NewAnagTagFasiRow() { + return ((AnagTagFasiRow)(this.NewRow())); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { + return new AnagTagFasiRow(builder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override global::System.Type GetRowType() { + return typeof(AnagTagFasiRow); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.AnagTagFasiRowChanged != null)) { + this.AnagTagFasiRowChanged(this, new AnagTagFasiRowChangeEvent(((AnagTagFasiRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.AnagTagFasiRowChanging != null)) { + this.AnagTagFasiRowChanging(this, new AnagTagFasiRowChangeEvent(((AnagTagFasiRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.AnagTagFasiRowDeleted != null)) { + this.AnagTagFasiRowDeleted(this, new AnagTagFasiRowChangeEvent(((AnagTagFasiRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.AnagTagFasiRowDeleting != null)) { + this.AnagTagFasiRowDeleting(this, new AnagTagFasiRowChangeEvent(((AnagTagFasiRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public void RemoveAnagTagFasiRow(AnagTagFasiRow row) { + this.Rows.Remove(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.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 = "AnagTagFasiDataTable"; + 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. /// @@ -20582,6 +20923,65 @@ namespace GPW_data { } } + /// + ///Represents strongly named DataRow class. + /// + public partial class AnagTagFasiRow : global::System.Data.DataRow { + + private AnagTagFasiDataTable tableAnagTagFasi; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + internal AnagTagFasiRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableAnagTagFasi = ((AnagTagFasiDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public string CodTagFase { + get { + return ((string)(this[this.tableAnagTagFasi.CodTagFaseColumn])); + } + set { + this[this.tableAnagTagFasi.CodTagFaseColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public string Descrizione { + get { + return ((string)(this[this.tableAnagTagFasi.DescrizioneColumn])); + } + set { + this[this.tableAnagTagFasi.DescrizioneColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public bool Enabled { + get { + return ((bool)(this[this.tableAnagTagFasi.EnabledColumn])); + } + set { + this[this.tableAnagTagFasi.EnabledColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public string CodGruppo { + get { + return ((string)(this[this.tableAnagTagFasi.CodGruppoColumn])); + } + set { + this[this.tableAnagTagFasi.CodGruppoColumn] = value; + } + } + } + /// ///Row event argument class /// @@ -21567,6 +21967,40 @@ namespace GPW_data { } } } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public class AnagTagFasiRowChangeEvent : global::System.EventArgs { + + private AnagTagFasiRow eventRow; + + private global::System.Data.DataRowAction eventAction; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public AnagTagFasiRowChangeEvent(AnagTagFasiRow 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", "17.0.0.0")] + public AnagTagFasiRow Row { + get { + return this.eventRow; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } + } + } } } namespace GPW_data.DS_ApplicazioneTableAdapters { @@ -39228,6 +39662,176 @@ 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 AnagTagFasiTableAdapter : 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", "17.0.0.0")] + public AnagTagFasiTableAdapter() { + this.ClearBeforeFill = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.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", "17.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", "17.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", "17.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", "17.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", "17.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 = "AnagTagFasi"; + tableMapping.ColumnMappings.Add("CodTagFase", "CodTagFase"); + tableMapping.ColumnMappings.Add("Descrizione", "Descrizione"); + tableMapping.ColumnMappings.Add("Enabled", "Enabled"); + tableMapping.ColumnMappings.Add("CodGruppo", "CodGruppo"); + this._adapter.TableMappings.Add(tableMapping); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.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", "17.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 = "SELECT * FROM AnagTagFasi"; + this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.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.AnagTagFasiDataTable dataTable) { + this.Adapter.SelectCommand = this.CommandCollection[0]; + 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", "17.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.AnagTagFasiDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + DS_Applicazione.AnagTagFasiDataTable dataTable = new DS_Applicazione.AnagTagFasiDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + } + /// ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios /// @@ -39798,6 +40402,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._registroRichiesteTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.RegistroRichieste.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); @@ -39834,15 +40447,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); - } - } if ((this._giustificativiTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.Giustificativi.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); @@ -39972,6 +40576,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._registroRichiesteTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.RegistroRichieste.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) @@ -40004,14 +40616,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); - } - } if ((this._giustificativiTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.Giustificativi.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) @@ -40134,14 +40738,6 @@ 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) @@ -40174,6 +40770,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._timbratureTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.Timbrature.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) diff --git a/GPW_Data/DS_Applicazione.xsd b/GPW_Data/DS_Applicazione.xsd index f06f27c..bbdcdb8 100644 --- a/GPW_Data/DS_Applicazione.xsd +++ b/GPW_Data/DS_Applicazione.xsd @@ -3596,124 +3596,143 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa + + + + + + SELECT * FROM AnagTagFasi + + + + + + + + + + + + + - + - + - - - - + + + + - + - + - + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - + + + + - + - - + + - - + + - + - - - + + + @@ -3723,225 +3742,225 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa - + - - + + - + - + - + - - + + - + - + - + - + - - - - - + + + + + - + - - + + - + - + - + - + - - - + + + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - - - + + + @@ -3951,63 +3970,63 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa - + - - + + - + - - + + - + - - - - - + + + + + - - - - - + + + + + - + - - + + @@ -4017,91 +4036,91 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa - + - - - + + + - - + + - + - - - - + + + + - + - - - - + + + + - + - - - + + + - - - - - + + + + + - - - - - - - - - - - + + + + + + + + + + + @@ -4111,38 +4130,38 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa - + - - - - - - + + + + + + - - + + - + - - + + - + @@ -4152,95 +4171,95 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa - + - + - + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + - - - - + + + + - - - - - - - - - + + + + + + + + + - + - - - + + + - + - + - - + + - + @@ -4250,71 +4269,71 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa - + - - - + + + - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - + + + + + + @@ -4324,127 +4343,127 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa - + - - - - + + + + - - - + + + - + - + - - - + + + - + - - + + - + - + - - - + + + - + - - - - - + + + + + - - + + - - - - + + + + - + - - + + - + @@ -4454,185 +4473,213 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa - + - - - + + + - + - - + + - + - - - - + + + + - + - + - + - + - + - + - + - + - + - + - + - + - - - - + + + + - + - - + + - + - - - - + + + + - + - + - - - + + + - - - + + + - + - + - - - - - + + + + + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4760,17 +4807,21 @@ 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 3c4a228..ba79429 100644 --- a/GPW_Data/DS_Applicazione.xss +++ b/GPW_Data/DS_Applicazione.xss @@ -4,40 +4,41 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + 391 @@ -49,7 +50,7 @@ - + 1046 @@ -61,7 +62,7 @@ - + 871 @@ -77,7 +78,7 @@ - + 585 @@ -89,7 +90,7 @@ - + 332 @@ -101,7 +102,7 @@ - + 285 @@ -113,7 +114,7 @@ - + 286 @@ -129,7 +130,7 @@ - + 428 diff --git a/GPW_Data/Properties/Settings.Designer.cs b/GPW_Data/Properties/Settings.Designer.cs index 9b5d03b..4f39db0 100644 --- a/GPW_Data/Properties/Settings.Designer.cs +++ b/GPW_Data/Properties/Settings.Designer.cs @@ -33,14 +33,15 @@ namespace GPW_data.Properties { return ((string)(this["ETS_GPWConnectionString"])); } } - + [global::System.Configuration.ApplicationScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)] - [global::System.Configuration.DefaultSettingValueAttribute("Data Source=SQLSTEAM;Initial Catalog=GPW;Persist Security Info=True;User ID=sa;Pa" + - "ssword=keyhammer")] - public string GPWConnectionString { - get { + [global::System.Configuration.DefaultSettingValueAttribute("Data Source=W2019-SQL-STEAM;Initial Catalog=GPW;Persist Security Info=True;User ID=sa;Password=keyhammer16;TrustServerCertificate=True")] + public string GPWConnectionString + { + get + { return ((string)(this["GPWConnectionString"])); } } diff --git a/GPW_Data/Properties/Settings.settings b/GPW_Data/Properties/Settings.settings index b034dea..c0b9ac8 100644 --- a/GPW_Data/Properties/Settings.settings +++ b/GPW_Data/Properties/Settings.settings @@ -2,21 +2,21 @@ + + <?xml version="1.0" encoding="utf-16"?> +<SerializableConnectionString xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <ConnectionString>Data Source=W2019-SQL-STEAM;Initial Catalog=GPW;Persist Security Info=True;User ID=sa;Password=keyhammer16;TrustServerCertificate=True</ConnectionString> + <ProviderName>System.Data.SqlClient</ProviderName> +</SerializableConnectionString> + Data Source=W2019-SQL-STEAM;Initial Catalog=GPW;Persist Security Info=True;User ID=sa;Password=keyhammer16;TrustServerCertificate=True + <?xml version="1.0" encoding="utf-16"?> -<SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> +<SerializableConnectionString xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ConnectionString>Data Source=10.74.82.217\SQL2008R2;Initial Catalog=ETS_GPW;Persist Security Info=True;User ID=sa;Password=keyhammer</ConnectionString> <ProviderName>System.Data.SqlClient</ProviderName> </SerializableConnectionString> Data Source=10.74.82.217\SQL2008R2;Initial Catalog=ETS_GPW;Persist Security Info=True;User ID=sa;Password=keyhammer - - <?xml version="1.0" encoding="utf-16"?> -<SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - <ConnectionString>Data Source=SQLSTEAM;Initial Catalog=GPW;Persist Security Info=True;User ID=sa;Password=keyhammer</ConnectionString> - <ProviderName>System.Data.SqlClient</ProviderName> -</SerializableConnectionString> - Data Source=SQLSTEAM;Initial Catalog=GPW;Persist Security Info=True;User ID=sa;Password=keyhammer - \ No newline at end of file diff --git a/GPW_data/App.config b/GPW_data/App.config index b8de33c..76b3518 100644 --- a/GPW_data/App.config +++ b/GPW_data/App.config @@ -3,8 +3,12 @@ - - + + From 26304ba7113659928a22925134c10f9ec1915cf1 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 20 Mar 2024 18:55:57 +0100 Subject: [PATCH 2/3] Continuo fix AnagTagFasi --- .../WebUserControls/cmp_gestTagFasi.ascx | 75 +- .../WebUserControls/cmp_gestTagFasi.ascx.cs | 202 ++++- .../cmp_gestTagFasi.ascx.designer.cs | 29 +- GPW_Data/DS_Applicazione.Designer.cs | 196 ++++- GPW_Data/DS_Applicazione.xsd | 743 +++++++++--------- GPW_Data/DS_Applicazione.xss | 8 +- 6 files changed, 882 insertions(+), 371 deletions(-) diff --git a/GPW_Admin/WebUserControls/cmp_gestTagFasi.ascx b/GPW_Admin/WebUserControls/cmp_gestTagFasi.ascx index 5e9ab4f..4f97227 100644 --- a/GPW_Admin/WebUserControls/cmp_gestTagFasi.ascx +++ b/GPW_Admin/WebUserControls/cmp_gestTagFasi.ascx @@ -1,16 +1,73 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_gestTagFasi.ascx.cs" Inherits="GPW_Admin.WebUserControls.cmp_gestTagFasi" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> - - - -
-
- gestione tags fasi (x ora solo queste) -
-
- ... + + + + + + + + + +
+ + +
+
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + +
diff --git a/GPW_Admin/WebUserControls/cmp_gestTagFasi.ascx.cs b/GPW_Admin/WebUserControls/cmp_gestTagFasi.ascx.cs index fc71ac9..2ab783a 100644 --- a/GPW_Admin/WebUserControls/cmp_gestTagFasi.ascx.cs +++ b/GPW_Admin/WebUserControls/cmp_gestTagFasi.ascx.cs @@ -1,5 +1,8 @@ -using System; +using GPW_data; +using SteamWare; +using System; using System.Collections.Generic; +using System.Data; using System.Linq; using System.Web; using System.Web.UI; @@ -7,11 +10,204 @@ using System.Web.UI.WebControls; namespace GPW_Admin.WebUserControls { - public partial class cmp_gestTagFasi : System.Web.UI.UserControl + public partial class cmp_gestTagFasi : BaseUserControl { + #region Public Properties + + public string gruppoSel + { + get + { + string answ = ""; + if (grView.SelectedIndex >= 0) + { + answ = $"{grView.SelectedValue}"; + } + return answ; + } + } + + #endregion Public Properties + + #region Protected Methods + + /// + /// gestione evento richiesta nuovo valore (mostra footer, ...) + /// + /// + /// + protected void btnNew_Click(object sender, EventArgs e) + { + DataProxy.DP.taGruppi.insertQuery("_New GROUP", "Descrizione", "", true); + resetSelezione(); + } + + /// + /// reset della selezione + /// + /// + /// + protected void btnReset_Click(object sender, EventArgs e) + { + resetSelezione(); + } + + /// + /// elenco colonne del datagrid + /// + /// + protected DataColumnCollection colonneObj() + { + DataColumnCollection colonne = null; + using ( + DS_Applicazione.AnagClientiDataTable tabella = new DS_Applicazione.AnagClientiDataTable()) + { + colonne = tabella.Columns; + } + return colonne; + } + + /// + /// traduce gli header delle colonne + /// + /// + /// + protected void grView_DataBound(object sender, EventArgs e) + { + if (grView.Rows.Count > 0) + { + LinkButton lb; + // aggiorno gli headers + foreach (TableCell cella in grView.HeaderRow.Cells) + { + try + { + lb = (LinkButton)cella.Controls[0]; + lb.Text = traduci(lb.Text); + } + catch + { } + } + int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1); + lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord); + } + else + { + lblNumRec.Text = ""; + } + } + + protected void grView_SelectedIndexChanged(object sender, EventArgs e) + { + raiseEvent(); + } + + /// + /// annulla inserimento nuovo valore da footer + /// + /// + /// + protected void lblCanc_click(object sender, EventArgs e) + { + // annullo inserimento: nascondo footer, bind controlli... + grView.FooterRow.Visible = false; + } + + /// + /// inserisce nuovo valore da footer + /// + /// + /// + protected void lblIns_click(object sender, EventArgs e) + { + // click su inserimento, chiamo il metodo insert dell'ObjectDataSource + ods.Insert(); + } + + /// + /// check licenze in fase di update... + /// + /// + /// + protected void ods_Updating(object sender, ObjectDataSourceMethodEventArgs e) + { + if (!licenzeGPW.checkLicenze) + { + if (e != null) + { + // annullo insert se licenze sforate... + e.Cancel = true; + grView.EditIndex = -1; + grView.DataBind(); + } + } + } + protected void Page_Load(object sender, EventArgs e) { - + grView.PageSize = utils.pageSize; } + + #endregion Protected Methods + + #region Public Methods + + /// + /// determina se sia eliminabile il record (=non usato) + /// + /// + /// + public bool delEnabled(object gruppo) + { + bool answ = true; + // solo se ha diritti scrittura controllo + if (gruppo != null) + { + answ = !hasChildObj($"{gruppo}"); + } + return answ; + } + + public void doUpdate() + { + grView.PageSize = utils.pageSize; + grView.DataBind(); + } + + /// + /// Determina se abbia child obj --> NON eliminabile + /// + /// + /// + public bool hasChildObj(string gruppo) + { + bool answ = false; + string redKey = memLayer.ML.redHash($"gruppoHasChildObj:{gruppo}"); + // cerco inc ache redis... + string rawData = memLayer.ML.getRSV(redKey); + if (rawData == null) + { + int trovati = DataProxy.DP.taVSD.getByGruppo(gruppo, false).Rows.Count; + answ = (trovati > 0); + memLayer.ML.setRSV(redKey, $"{answ}", 60 * 5); + } + else + { + bool.TryParse(rawData, out answ); + } + return answ; + } + + /// + /// resetta la selezione dei valori in caso di modifiche su altri controlli + /// + public void resetSelezione() + { + grView.SelectedIndex = -1; + grView.DataBind(); + raiseReset(); + } + + #endregion Public Methods } } \ No newline at end of file diff --git a/GPW_Admin/WebUserControls/cmp_gestTagFasi.ascx.designer.cs b/GPW_Admin/WebUserControls/cmp_gestTagFasi.ascx.designer.cs index 11505eb..146904c 100644 --- a/GPW_Admin/WebUserControls/cmp_gestTagFasi.ascx.designer.cs +++ b/GPW_Admin/WebUserControls/cmp_gestTagFasi.ascx.designer.cs @@ -3,7 +3,7 @@ // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// the code is regenerated. // //------------------------------------------------------------------------------ @@ -13,5 +13,32 @@ namespace GPW_Admin.WebUserControls public partial class cmp_gestTagFasi { + + /// + /// grView control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.GridView grView; + + /// + /// ods control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource ods; + + /// + /// lblNumRec control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblNumRec; } } diff --git a/GPW_Data/DS_Applicazione.Designer.cs b/GPW_Data/DS_Applicazione.Designer.cs index 4f6d7c3..acac92f 100644 --- a/GPW_Data/DS_Applicazione.Designer.cs +++ b/GPW_Data/DS_Applicazione.Designer.cs @@ -13169,6 +13169,8 @@ namespace GPW_data { private global::System.Data.DataColumn columnCodGruppo; + private global::System.Data.DataColumn columnNumFasi; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public AnagTagFasiDataTable() { @@ -13234,6 +13236,14 @@ namespace GPW_data { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public global::System.Data.DataColumn NumFasiColumn { + get { + return this.columnNumFasi; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Browsable(false)] @@ -13271,13 +13281,14 @@ namespace GPW_data { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] - public AnagTagFasiRow AddAnagTagFasiRow(string CodTagFase, string Descrizione, bool Enabled, string CodGruppo) { + public AnagTagFasiRow AddAnagTagFasiRow(string CodTagFase, string Descrizione, bool Enabled, string CodGruppo, int NumFasi) { AnagTagFasiRow rowAnagTagFasiRow = ((AnagTagFasiRow)(this.NewRow())); object[] columnValuesArray = new object[] { CodTagFase, Descrizione, Enabled, - CodGruppo}; + CodGruppo, + NumFasi}; rowAnagTagFasiRow.ItemArray = columnValuesArray; this.Rows.Add(rowAnagTagFasiRow); return rowAnagTagFasiRow; @@ -13311,6 +13322,7 @@ namespace GPW_data { this.columnDescrizione = base.Columns["Descrizione"]; this.columnEnabled = base.Columns["Enabled"]; this.columnCodGruppo = base.Columns["CodGruppo"]; + this.columnNumFasi = base.Columns["NumFasi"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -13324,6 +13336,8 @@ namespace GPW_data { base.Columns.Add(this.columnEnabled); this.columnCodGruppo = new global::System.Data.DataColumn("CodGruppo", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnCodGruppo); + this.columnNumFasi = new global::System.Data.DataColumn("NumFasi", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnNumFasi); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnCodTagFase}, true)); this.columnCodTagFase.AllowDBNull = false; @@ -13334,6 +13348,7 @@ namespace GPW_data { this.columnEnabled.AllowDBNull = false; this.columnCodGruppo.AllowDBNull = false; this.columnCodGruppo.MaxLength = 50; + this.columnNumFasi.ReadOnly = true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -20980,6 +20995,34 @@ namespace GPW_data { this[this.tableAnagTagFasi.CodGruppoColumn] = value; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public int NumFasi { + get { + try { + return ((int)(this[this.tableAnagTagFasi.NumFasiColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'NumFasi\' in table \'AnagTagFasi\' is DBNull.", e); + } + } + set { + this[this.tableAnagTagFasi.NumFasiColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public bool IsNumFasiNull() { + return this.IsNull(this.tableAnagTagFasi.NumFasiColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public void SetNumFasiNull() { + this[this.tableAnagTagFasi.NumFasiColumn] = global::System.Convert.DBNull; + } } /// @@ -39787,6 +39830,7 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa tableMapping.ColumnMappings.Add("Descrizione", "Descrizione"); tableMapping.ColumnMappings.Add("Enabled", "Enabled"); tableMapping.ColumnMappings.Add("CodGruppo", "CodGruppo"); + tableMapping.ColumnMappings.Add("NumFasi", "NumFasi"); this._adapter.TableMappings.Add(tableMapping); } @@ -39800,11 +39844,35 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[4]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; - this._commandCollection[0].CommandText = "SELECT * FROM AnagTagFasi"; + this._commandCollection[0].CommandText = "SELECT *\r\nFROM v_AnagTagFasi"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[1].Connection = this.Connection; + this._commandCollection[1].CommandText = "dbo.stp_ATF_deleteQuery"; + this._commandCollection[1].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[1].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[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodTagFase", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[2].Connection = this.Connection; + this._commandCollection[2].CommandText = "dbo.stp_ATF_InsertQuery"; + this._commandCollection[2].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[2].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[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodTagFase", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Descrizione", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Enabled", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodGruppo", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[3].Connection = this.Connection; + this._commandCollection[3].CommandText = "dbo.stp_ATF_updateQuery"; + this._commandCollection[3].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[3].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[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Descrizione", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Enabled", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodGruppo", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodTagFase", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -39830,6 +39898,126 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa this.Adapter.Fill(dataTable); return dataTable; } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int deleteQuery(string Original_CodTagFase) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[1]; + if ((Original_CodTagFase == null)) { + command.Parameters[1].Value = global::System.DBNull.Value; + } + else { + command.Parameters[1].Value = ((string)(Original_CodTagFase)); + } + global::System.Data.ConnectionState previousConnectionState = command.Connection.State; + if (((command.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + command.Connection.Open(); + } + int returnValue; + try { + returnValue = command.ExecuteNonQuery(); + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + command.Connection.Close(); + } + } + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int insertQuery(string CodTagFase, string Descrizione, global::System.Nullable Enabled, string CodGruppo) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[2]; + if ((CodTagFase == null)) { + command.Parameters[1].Value = global::System.DBNull.Value; + } + else { + command.Parameters[1].Value = ((string)(CodTagFase)); + } + if ((Descrizione == null)) { + command.Parameters[2].Value = global::System.DBNull.Value; + } + else { + command.Parameters[2].Value = ((string)(Descrizione)); + } + if ((Enabled.HasValue == true)) { + command.Parameters[3].Value = ((bool)(Enabled.Value)); + } + else { + command.Parameters[3].Value = global::System.DBNull.Value; + } + if ((CodGruppo == null)) { + command.Parameters[4].Value = global::System.DBNull.Value; + } + else { + command.Parameters[4].Value = ((string)(CodGruppo)); + } + global::System.Data.ConnectionState previousConnectionState = command.Connection.State; + if (((command.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + command.Connection.Open(); + } + int returnValue; + try { + returnValue = command.ExecuteNonQuery(); + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + command.Connection.Close(); + } + } + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int updateQuery(string Descrizione, global::System.Nullable Enabled, string CodGruppo, string Original_CodTagFase) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[3]; + if ((Descrizione == null)) { + command.Parameters[1].Value = global::System.DBNull.Value; + } + else { + command.Parameters[1].Value = ((string)(Descrizione)); + } + if ((Enabled.HasValue == true)) { + command.Parameters[2].Value = ((bool)(Enabled.Value)); + } + else { + command.Parameters[2].Value = global::System.DBNull.Value; + } + if ((CodGruppo == null)) { + command.Parameters[3].Value = global::System.DBNull.Value; + } + else { + command.Parameters[3].Value = ((string)(CodGruppo)); + } + if ((Original_CodTagFase == null)) { + command.Parameters[4].Value = global::System.DBNull.Value; + } + else { + command.Parameters[4].Value = ((string)(Original_CodTagFase)); + } + global::System.Data.ConnectionState previousConnectionState = command.Connection.State; + if (((command.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + command.Connection.Open(); + } + int returnValue; + try { + returnValue = command.ExecuteNonQuery(); + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + command.Connection.Close(); + } + } + return returnValue; + } } /// diff --git a/GPW_Data/DS_Applicazione.xsd b/GPW_Data/DS_Applicazione.xsd index bbdcdb8..95061c3 100644 --- a/GPW_Data/DS_Applicazione.xsd +++ b/GPW_Data/DS_Applicazione.xsd @@ -3598,10 +3598,11 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa - + - - SELECT * FROM AnagTagFasi + + SELECT * +FROM v_AnagTagFasi @@ -3612,127 +3613,168 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa + - + + + + + dbo.stp_ATF_deleteQuery + + + + + + + + + + + dbo.stp_ATF_InsertQuery + + + + + + + + + + + + + + dbo.stp_ATF_updateQuery + + + + + + + + + + + - + - + - - - - + + + + - + - + - + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - + + + + - + - - + + - - + + - + - - - + + + @@ -3742,225 +3784,225 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa - + - - + + - + - + - + - - + + - + - + - + - + - - - - - + + + + + - + - - + + - + - + - + - + - - - + + + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - - - + + + @@ -3970,63 +4012,63 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa - + - - + + - + - - + + - + - - - - - + + + + + - - - - - + + + + + - + - - + + @@ -4036,73 +4078,73 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa - + - - - + + + - - + + - + - - - - + + + + - + - - - - + + + + - + - - - + + + - - - - + + + + @@ -4110,17 +4152,17 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa - - - - - - - - - - - + + + + + + + + + + + @@ -4130,38 +4172,38 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa - + - - - - - - + + + + + + - - + + - + - - + + - + @@ -4171,95 +4213,95 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa - + - + - + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + - - - - + + + + - - - - - - - - - + + + + + + + + + - + - - - + + + - + - + - - + + - + @@ -4269,71 +4311,71 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa - + - - - + + + - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - + + + + + + @@ -4343,127 +4385,127 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa - + - - - - + + + + - - - + + + - + - + - - - + + + - + - - + + - + - + - - - + + + - + - - - - - + + + + + - - + + - - - - + + + + - + - - + + - + @@ -4473,213 +4515,214 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa - + - - - + + + - + - - + + - + - - - - + + + + - + - + - + - + - + - + - + - + - + - + - + - + - - - - + + + + - + - - + + - + - - - - + + + + - + - + - - - + + + - - - + + + - + - + - - - - - + + + + + - + - + - + - + - + - + - - + + + @@ -4814,14 +4857,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 ba79429..2cb49ac 100644 --- a/GPW_Data/DS_Applicazione.xss +++ b/GPW_Data/DS_Applicazione.xss @@ -4,7 +4,7 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + @@ -27,15 +27,15 @@ - + - - + + From b0c8c5dddaa211ffe7db975cfd88e18a0e7c4d05 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 20 Mar 2024 19:17:01 +0100 Subject: [PATCH 3/3] Completo aggiunta gestione AnagTagFasi --- .../WebUserControls/cmp_gestTagFasi.ascx | 45 +++++----- .../WebUserControls/cmp_gestTagFasi.ascx.cs | 89 ++++--------------- GPW_Data/DS_Applicazione.Designer.cs | 31 ++++--- GPW_Data/DS_Applicazione.xsd | 1 + GPW_Data/DataProxy.cs | 3 + 5 files changed, 59 insertions(+), 110 deletions(-) diff --git a/GPW_Admin/WebUserControls/cmp_gestTagFasi.ascx b/GPW_Admin/WebUserControls/cmp_gestTagFasi.ascx index 4f97227..8dce845 100644 --- a/GPW_Admin/WebUserControls/cmp_gestTagFasi.ascx +++ b/GPW_Admin/WebUserControls/cmp_gestTagFasi.ascx @@ -3,7 +3,7 @@
- + @@ -24,23 +24,17 @@ - - - - - - - - - - - - + + + + + + - + @@ -50,23 +44,24 @@ - + - + - - - - + + + + - - - - - + + + + + +
diff --git a/GPW_Admin/WebUserControls/cmp_gestTagFasi.ascx.cs b/GPW_Admin/WebUserControls/cmp_gestTagFasi.ascx.cs index 2ab783a..c36887f 100644 --- a/GPW_Admin/WebUserControls/cmp_gestTagFasi.ascx.cs +++ b/GPW_Admin/WebUserControls/cmp_gestTagFasi.ascx.cs @@ -12,22 +12,25 @@ namespace GPW_Admin.WebUserControls { public partial class cmp_gestTagFasi : BaseUserControl { - #region Public Properties + #region Public Methods - public string gruppoSel + public void doUpdate() { - get - { - string answ = ""; - if (grView.SelectedIndex >= 0) - { - answ = $"{grView.SelectedValue}"; - } - return answ; - } + grView.PageSize = utils.pageSize; + grView.DataBind(); } - #endregion Public Properties + /// + /// resetta la selezione dei valori in caso di modifiche su altri controlli + /// + public void resetSelezione() + { + grView.SelectedIndex = -1; + grView.DataBind(); + raiseReset(); + } + + #endregion Public Methods #region Protected Methods @@ -38,7 +41,7 @@ namespace GPW_Admin.WebUserControls /// protected void btnNew_Click(object sender, EventArgs e) { - DataProxy.DP.taGruppi.insertQuery("_New GROUP", "Descrizione", "", true); + DataProxy.DP.taATF.insertQuery("NEW TAG", "Descrizione", true, ""); resetSelezione(); } @@ -149,65 +152,5 @@ namespace GPW_Admin.WebUserControls } #endregion Protected Methods - - #region Public Methods - - /// - /// determina se sia eliminabile il record (=non usato) - /// - /// - /// - public bool delEnabled(object gruppo) - { - bool answ = true; - // solo se ha diritti scrittura controllo - if (gruppo != null) - { - answ = !hasChildObj($"{gruppo}"); - } - return answ; - } - - public void doUpdate() - { - grView.PageSize = utils.pageSize; - grView.DataBind(); - } - - /// - /// Determina se abbia child obj --> NON eliminabile - /// - /// - /// - public bool hasChildObj(string gruppo) - { - bool answ = false; - string redKey = memLayer.ML.redHash($"gruppoHasChildObj:{gruppo}"); - // cerco inc ache redis... - string rawData = memLayer.ML.getRSV(redKey); - if (rawData == null) - { - int trovati = DataProxy.DP.taVSD.getByGruppo(gruppo, false).Rows.Count; - answ = (trovati > 0); - memLayer.ML.setRSV(redKey, $"{answ}", 60 * 5); - } - else - { - bool.TryParse(rawData, out answ); - } - return answ; - } - - /// - /// resetta la selezione dei valori in caso di modifiche su altri controlli - /// - public void resetSelezione() - { - grView.SelectedIndex = -1; - grView.DataBind(); - raiseReset(); - } - - #endregion Public Methods } } \ No newline at end of file diff --git a/GPW_Data/DS_Applicazione.Designer.cs b/GPW_Data/DS_Applicazione.Designer.cs index acac92f..69ebe76 100644 --- a/GPW_Data/DS_Applicazione.Designer.cs +++ b/GPW_Data/DS_Applicazione.Designer.cs @@ -39869,6 +39869,7 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa this._commandCollection[3].CommandText = "dbo.stp_ATF_updateQuery"; this._commandCollection[3].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[3].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[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodTagFase", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Descrizione", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Enabled", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodGruppo", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); @@ -39976,31 +39977,37 @@ SELECT IdxRegMal, DtInizio, NumGG, CodCert FROM RegistroMalattie WHERE (IdxRegMa [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int updateQuery(string Descrizione, global::System.Nullable Enabled, string CodGruppo, string Original_CodTagFase) { + public virtual int updateQuery(string CodTagFase, string Descrizione, global::System.Nullable Enabled, string CodGruppo, string Original_CodTagFase) { global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[3]; - if ((Descrizione == null)) { + if ((CodTagFase == null)) { command.Parameters[1].Value = global::System.DBNull.Value; } else { - command.Parameters[1].Value = ((string)(Descrizione)); + command.Parameters[1].Value = ((string)(CodTagFase)); } - if ((Enabled.HasValue == true)) { - command.Parameters[2].Value = ((bool)(Enabled.Value)); - } - else { + if ((Descrizione == null)) { command.Parameters[2].Value = global::System.DBNull.Value; } - if ((CodGruppo == null)) { - command.Parameters[3].Value = global::System.DBNull.Value; + else { + command.Parameters[2].Value = ((string)(Descrizione)); + } + if ((Enabled.HasValue == true)) { + command.Parameters[3].Value = ((bool)(Enabled.Value)); } else { - command.Parameters[3].Value = ((string)(CodGruppo)); + command.Parameters[3].Value = global::System.DBNull.Value; } - if ((Original_CodTagFase == null)) { + if ((CodGruppo == null)) { command.Parameters[4].Value = global::System.DBNull.Value; } else { - command.Parameters[4].Value = ((string)(Original_CodTagFase)); + command.Parameters[4].Value = ((string)(CodGruppo)); + } + if ((Original_CodTagFase == null)) { + command.Parameters[5].Value = global::System.DBNull.Value; + } + else { + command.Parameters[5].Value = ((string)(Original_CodTagFase)); } global::System.Data.ConnectionState previousConnectionState = command.Connection.State; if (((command.Connection.State & global::System.Data.ConnectionState.Open) diff --git a/GPW_Data/DS_Applicazione.xsd b/GPW_Data/DS_Applicazione.xsd index 95061c3..9f2e8a0 100644 --- a/GPW_Data/DS_Applicazione.xsd +++ b/GPW_Data/DS_Applicazione.xsd @@ -3647,6 +3647,7 @@ FROM v_AnagTagFasi dbo.stp_ATF_updateQuery + diff --git a/GPW_Data/DataProxy.cs b/GPW_Data/DataProxy.cs index 9ba1cca..ad72cae 100644 --- a/GPW_Data/DataProxy.cs +++ b/GPW_Data/DataProxy.cs @@ -27,6 +27,7 @@ namespace GPW_data public static DataProxy DP = new DataProxy(); public DS_ApplicazioneTableAdapters.AnagFasiTableAdapter taAF; + public DS_ApplicazioneTableAdapters.AnagTagFasiTableAdapter taATF; public DS_UtilityTableAdapters.AnagKeyValueTableAdapter taAKV; public DS_ApplicazioneTableAdapters.AnagDevicesTableAdapter taAnagDev; public DS_ApplicazioneTableAdapters.AnagClientiTableAdapter taAnCli; @@ -192,6 +193,7 @@ namespace GPW_data taDip2Ruoli = new DS_ApplicazioneTableAdapters.Dipendenti2RuoliTableAdapter(); taAP = new DS_ApplicazioneTableAdapters.AnagProgettiTableAdapter(); taAF = new DS_ApplicazioneTableAdapters.AnagFasiTableAdapter(); + taATF = new DS_ApplicazioneTableAdapters.AnagTagFasiTableAdapter(); taLCU = new DS_ApplicazioneTableAdapters.v_logCommUtTableAdapter(); taRA = new DS_ApplicazioneTableAdapters.RegAttivitaTableAdapter(); taRAExpl = new DS_ApplicazioneTableAdapters.regAttDayExplTableAdapter(); @@ -233,6 +235,7 @@ namespace GPW_data taDip2Ruoli.Connection.ConnectionString = connGPW; taAP.Connection.ConnectionString = connGPW; taAF.Connection.ConnectionString = connGPW; + taATF.Connection.ConnectionString = connGPW; taLCU.Connection.ConnectionString = connGPW; taRA.Connection.ConnectionString = connGPW; taRAExpl.Connection.ConnectionString = connGPW;