From 0c1bd7e78fe9c8011b12bc798634879498ef3605 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 3 Oct 2017 09:49:12 +0200 Subject: [PATCH] completato modifica DS x campo IdxMacchina da INT a STRING --- MapoDb/DS_applicazione.Designer.cs | 210 +++++++++++++++++++++-------- MapoDb/DS_applicazione.xsd | 93 ++++++------- MapoDb/DS_applicazione.xss | 56 ++++---- 3 files changed, 231 insertions(+), 128 deletions(-) diff --git a/MapoDb/DS_applicazione.Designer.cs b/MapoDb/DS_applicazione.Designer.cs index 7fed5d99..0fbbcf0f 100644 --- a/MapoDb/DS_applicazione.Designer.cs +++ b/MapoDb/DS_applicazione.Designer.cs @@ -6446,7 +6446,7 @@ namespace MapoDb { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public DatiMacchineRow AddDatiMacchineRow(int idxMacchina, bool palletChange, string serialPort, int refreshPeriod, bool simulazione, bool simplePallet, bool insEnabled, bool sLogEnabled, string CodArticolo_A, string CodArticolo_B) { + public DatiMacchineRow AddDatiMacchineRow(string idxMacchina, bool palletChange, string serialPort, int refreshPeriod, bool simulazione, bool simplePallet, bool insEnabled, bool sLogEnabled, string CodArticolo_A, string CodArticolo_B) { DatiMacchineRow rowDatiMacchineRow = ((DatiMacchineRow)(this.NewRow())); object[] columnValuesArray = new object[] { idxMacchina, @@ -6466,7 +6466,7 @@ namespace MapoDb { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public DatiMacchineRow FindByidxMacchina(int idxMacchina) { + public DatiMacchineRow FindByidxMacchina(string idxMacchina) { return ((DatiMacchineRow)(this.Rows.Find(new object[] { idxMacchina}))); } @@ -6503,7 +6503,7 @@ namespace MapoDb { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] private void InitClass() { - this.columnidxMacchina = new global::System.Data.DataColumn("idxMacchina", typeof(int), null, global::System.Data.MappingType.Element); + this.columnidxMacchina = new global::System.Data.DataColumn("idxMacchina", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnidxMacchina); this.columnpalletChange = new global::System.Data.DataColumn("palletChange", typeof(bool), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnpalletChange); @@ -8615,7 +8615,7 @@ namespace MapoDb { [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class MSFDDataTable : global::System.Data.TypedTableBase { - private global::System.Data.DataColumn columnidxmacchina; + private global::System.Data.DataColumn columnIdxMacchina; private global::System.Data.DataColumn columncodmacchina; @@ -8686,9 +8686,9 @@ namespace MapoDb { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public global::System.Data.DataColumn idxmacchinaColumn { + public global::System.Data.DataColumn IdxMacchinaColumn { get { - return this.columnidxmacchina; + return this.columnIdxMacchina; } } @@ -8866,7 +8866,7 @@ namespace MapoDb { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public MSFDRow AddMSFDRow( - string idxmacchina, + string IdxMacchina, string codmacchina, bool palletChange, string CodArticolo_A, @@ -8886,7 +8886,7 @@ namespace MapoDb { string pallet) { MSFDRow rowMSFDRow = ((MSFDRow)(this.NewRow())); object[] columnValuesArray = new object[] { - idxmacchina, + IdxMacchina, codmacchina, palletChange, CodArticolo_A, @@ -8911,9 +8911,9 @@ namespace MapoDb { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public MSFDRow FindByidxmacchina(string idxmacchina) { + public MSFDRow FindByIdxMacchina(string IdxMacchina) { return ((MSFDRow)(this.Rows.Find(new object[] { - idxmacchina}))); + IdxMacchina}))); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -8933,7 +8933,7 @@ namespace MapoDb { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] internal void InitVars() { - this.columnidxmacchina = base.Columns["idxmacchina"]; + this.columnIdxMacchina = base.Columns["IdxMacchina"]; this.columncodmacchina = base.Columns["codmacchina"]; this.columnpalletChange = base.Columns["palletChange"]; this.columnCodArticolo_A = base.Columns["CodArticolo_A"]; @@ -8956,8 +8956,8 @@ namespace MapoDb { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] private void InitClass() { - this.columnidxmacchina = new global::System.Data.DataColumn("idxmacchina", typeof(string), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnidxmacchina); + this.columnIdxMacchina = new global::System.Data.DataColumn("IdxMacchina", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnIdxMacchina); this.columncodmacchina = new global::System.Data.DataColumn("codmacchina", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columncodmacchina); this.columnpalletChange = new global::System.Data.DataColumn("palletChange", typeof(bool), null, global::System.Data.MappingType.Element); @@ -8993,18 +8993,13 @@ namespace MapoDb { this.columnpallet = new global::System.Data.DataColumn("pallet", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnpallet); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { - this.columnidxmacchina}, true)); - this.columnidxmacchina.AllowDBNull = false; - this.columnidxmacchina.Unique = true; - this.columnidxmacchina.MaxLength = 50; + this.columnIdxMacchina}, true)); + this.columnIdxMacchina.AllowDBNull = false; + this.columnIdxMacchina.Unique = true; + this.columnIdxMacchina.MaxLength = 50; this.columncodmacchina.MaxLength = 50; this.columnCodArticolo_A.MaxLength = 50; this.columnCodArticolo_B.MaxLength = 50; - this.columnsLogEnabled.AllowDBNull = false; - this.columnIdxFamigliaIngresso.AllowDBNull = false; - this.columnIdxMicroStato.AllowDBNull = false; - this.columnIdxFamiglia.AllowDBNull = false; - this.columnIdxStato.AllowDBNull = false; this.columnlastVal.MaxLength = 50; this.columnCodArticolo.MaxLength = 50; this.columnpallet.MaxLength = 20; @@ -11341,9 +11336,9 @@ namespace MapoDb { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public int idxMacchina { + public string idxMacchina { get { - return ((int)(this[this.tableDatiMacchine.idxMacchinaColumn])); + return ((string)(this[this.tableDatiMacchine.idxMacchinaColumn])); } set { this[this.tableDatiMacchine.idxMacchinaColumn] = value; @@ -12328,12 +12323,12 @@ namespace MapoDb { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public string idxmacchina { + public string IdxMacchina { get { - return ((string)(this[this.tableMSFD.idxmacchinaColumn])); + return ((string)(this[this.tableMSFD.IdxMacchinaColumn])); } set { - this[this.tableMSFD.idxmacchinaColumn] = value; + this[this.tableMSFD.IdxMacchinaColumn] = value; } } @@ -12437,7 +12432,12 @@ namespace MapoDb { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public bool sLogEnabled { get { - return ((bool)(this[this.tableMSFD.sLogEnabledColumn])); + try { + return ((bool)(this[this.tableMSFD.sLogEnabledColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'sLogEnabled\' nella tabella \'MSFD\' è DBNull.", e); + } } set { this[this.tableMSFD.sLogEnabledColumn] = value; @@ -12448,7 +12448,12 @@ namespace MapoDb { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public int IdxFamigliaIngresso { get { - return ((int)(this[this.tableMSFD.IdxFamigliaIngressoColumn])); + try { + return ((int)(this[this.tableMSFD.IdxFamigliaIngressoColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'IdxFamigliaIngresso\' nella tabella \'MSFD\' è DBNull.", e); + } } set { this[this.tableMSFD.IdxFamigliaIngressoColumn] = value; @@ -12459,7 +12464,12 @@ namespace MapoDb { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public int IdxMicroStato { get { - return ((int)(this[this.tableMSFD.IdxMicroStatoColumn])); + try { + return ((int)(this[this.tableMSFD.IdxMicroStatoColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'IdxMicroStato\' nella tabella \'MSFD\' è DBNull.", e); + } } set { this[this.tableMSFD.IdxMicroStatoColumn] = value; @@ -12470,7 +12480,12 @@ namespace MapoDb { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public int IdxFamiglia { get { - return ((int)(this[this.tableMSFD.IdxFamigliaColumn])); + try { + return ((int)(this[this.tableMSFD.IdxFamigliaColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'IdxFamiglia\' nella tabella \'MSFD\' è DBNull.", e); + } } set { this[this.tableMSFD.IdxFamigliaColumn] = value; @@ -12481,7 +12496,12 @@ namespace MapoDb { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public int IdxStato { get { - return ((int)(this[this.tableMSFD.IdxStatoColumn])); + try { + return ((int)(this[this.tableMSFD.IdxStatoColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'IdxStato\' nella tabella \'MSFD\' è DBNull.", e); + } } set { this[this.tableMSFD.IdxStatoColumn] = value; @@ -12656,6 +12676,66 @@ namespace MapoDb { this[this.tableMSFD.insEnabledColumn] = global::System.Convert.DBNull; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public bool IssLogEnabledNull() { + return this.IsNull(this.tableMSFD.sLogEnabledColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public void SetsLogEnabledNull() { + this[this.tableMSFD.sLogEnabledColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public bool IsIdxFamigliaIngressoNull() { + return this.IsNull(this.tableMSFD.IdxFamigliaIngressoColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public void SetIdxFamigliaIngressoNull() { + this[this.tableMSFD.IdxFamigliaIngressoColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public bool IsIdxMicroStatoNull() { + return this.IsNull(this.tableMSFD.IdxMicroStatoColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public void SetIdxMicroStatoNull() { + this[this.tableMSFD.IdxMicroStatoColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public bool IsIdxFamigliaNull() { + return this.IsNull(this.tableMSFD.IdxFamigliaColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public void SetIdxFamigliaNull() { + this[this.tableMSFD.IdxFamigliaColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public bool IsIdxStatoNull() { + return this.IsNull(this.tableMSFD.IdxStatoColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public void SetIdxStatoNull() { + this[this.tableMSFD.IdxStatoColumn] = global::System.Convert.DBNull; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public bool IslastValNull() { @@ -21598,7 +21678,7 @@ SELECT MatrOpr, Cognome, Nome, isAdmin, authKey FROM AnagraficaOperatori WHERE ( this._adapter.DeleteCommand.Connection = this.Connection; this._adapter.DeleteCommand.CommandText = @"DELETE FROM [DatiMacchine] WHERE (([idxMacchina] = @Original_idxMacchina) AND ((@IsNull_palletChange = 1 AND [palletChange] IS NULL) OR ([palletChange] = @Original_palletChange)) AND ((@IsNull_CodArticolo_A = 1 AND [CodArticolo_A] IS NULL) OR ([CodArticolo_A] = @Original_CodArticolo_A)) AND ((@IsNull_CodArticolo_B = 1 AND [CodArticolo_B] IS NULL) OR ([CodArticolo_B] = @Original_CodArticolo_B)) AND ((@IsNull_serialPort = 1 AND [serialPort] IS NULL) OR ([serialPort] = @Original_serialPort)) AND ((@IsNull_refreshPeriod = 1 AND [refreshPeriod] IS NULL) OR ([refreshPeriod] = @Original_refreshPeriod)) AND ((@IsNull_simulazione = 1 AND [simulazione] IS NULL) OR ([simulazione] = @Original_simulazione)) AND ((@IsNull_simplePallet = 1 AND [simplePallet] IS NULL) OR ([simplePallet] = @Original_simplePallet)) AND ((@IsNull_insEnabled = 1 AND [insEnabled] IS NULL) OR ([insEnabled] = @Original_insEnabled)) AND ([sLogEnabled] = @Original_sLogEnabled))"; this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxMacchina", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxMacchina", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxMacchina", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxMacchina", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_palletChange", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "palletChange", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_palletChange", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "palletChange", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_CodArticolo_A", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodArticolo_A", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); @@ -21620,7 +21700,7 @@ SELECT MatrOpr, Cognome, Nome, isAdmin, authKey FROM AnagraficaOperatori WHERE ( this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = @"INSERT INTO [DatiMacchine] ([idxMacchina], [palletChange], [CodArticolo_A], [CodArticolo_B], [serialPort], [refreshPeriod], [simulazione], [simplePallet], [insEnabled], [sLogEnabled]) VALUES (@idxMacchina, @palletChange, @CodArticolo_A, @CodArticolo_B, @serialPort, @refreshPeriod, @simulazione, @simplePallet, @insEnabled, @sLogEnabled)"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxMacchina", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxMacchina", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxMacchina", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxMacchina", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@palletChange", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "palletChange", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodArticolo_A", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodArticolo_A", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodArticolo_B", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodArticolo_B", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); @@ -21634,7 +21714,7 @@ SELECT MatrOpr, Cognome, Nome, isAdmin, authKey FROM AnagraficaOperatori WHERE ( this._adapter.UpdateCommand.Connection = this.Connection; this._adapter.UpdateCommand.CommandText = @"UPDATE [DatiMacchine] SET [idxMacchina] = @idxMacchina, [palletChange] = @palletChange, [CodArticolo_A] = @CodArticolo_A, [CodArticolo_B] = @CodArticolo_B, [serialPort] = @serialPort, [refreshPeriod] = @refreshPeriod, [simulazione] = @simulazione, [simplePallet] = @simplePallet, [insEnabled] = @insEnabled, [sLogEnabled] = @sLogEnabled WHERE (([idxMacchina] = @Original_idxMacchina) AND ((@IsNull_palletChange = 1 AND [palletChange] IS NULL) OR ([palletChange] = @Original_palletChange)) AND ((@IsNull_CodArticolo_A = 1 AND [CodArticolo_A] IS NULL) OR ([CodArticolo_A] = @Original_CodArticolo_A)) AND ((@IsNull_CodArticolo_B = 1 AND [CodArticolo_B] IS NULL) OR ([CodArticolo_B] = @Original_CodArticolo_B)) AND ((@IsNull_serialPort = 1 AND [serialPort] IS NULL) OR ([serialPort] = @Original_serialPort)) AND ((@IsNull_refreshPeriod = 1 AND [refreshPeriod] IS NULL) OR ([refreshPeriod] = @Original_refreshPeriod)) AND ((@IsNull_simulazione = 1 AND [simulazione] IS NULL) OR ([simulazione] = @Original_simulazione)) AND ((@IsNull_simplePallet = 1 AND [simplePallet] IS NULL) OR ([simplePallet] = @Original_simplePallet)) AND ((@IsNull_insEnabled = 1 AND [insEnabled] IS NULL) OR ([insEnabled] = @Original_insEnabled)) AND ([sLogEnabled] = @Original_sLogEnabled))"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxMacchina", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxMacchina", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxMacchina", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxMacchina", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@palletChange", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "palletChange", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodArticolo_A", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodArticolo_A", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodArticolo_B", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodArticolo_B", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); @@ -21644,7 +21724,7 @@ SELECT MatrOpr, Cognome, Nome, isAdmin, authKey FROM AnagraficaOperatori WHERE ( this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@simplePallet", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "simplePallet", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@insEnabled", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "insEnabled", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@sLogEnabled", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "sLogEnabled", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxMacchina", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxMacchina", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxMacchina", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxMacchina", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_palletChange", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "palletChange", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_palletChange", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "palletChange", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_CodArticolo_A", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodArticolo_A", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); @@ -21677,16 +21757,13 @@ SELECT MatrOpr, Cognome, Nome, isAdmin, authKey FROM AnagraficaOperatori WHERE ( this._commandCollection = new global::System.Data.SqlClient.SqlCommand[2]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; - this._commandCollection[0].CommandText = "SELECT idxMacchina, palletChange, CodArticolo_A, CodArticolo_B, serialPort, refre" + - "shPeriod, simulazione, simplePallet, insEnabled, sLogEnabled FROM DatiMacchine"; + this._commandCollection[0].CommandText = "SELECT * FROM DatiMacchine"; 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 = "SELECT CodArticolo_A, CodArticolo_B, idxMacchina, insEnabled, palletChange, refre" + - "shPeriod, sLogEnabled, serialPort, simplePallet, simulazione FROM DatiMacchine W" + - "HERE (idxMacchina = @idxMacchina)"; + this._commandCollection[1].CommandText = "SELECT *\r\nFROM DatiMacchine WHERE (idxMacchina = @idxMacchina)"; this._commandCollection[1].CommandType = global::System.Data.CommandType.Text; - this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxMacchina", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "idxMacchina", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxMacchina", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, "idxMacchina", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -21717,9 +21794,14 @@ SELECT MatrOpr, Cognome, Nome, isAdmin, authKey FROM AnagraficaOperatori WHERE ( [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] - public virtual DS_applicazione.DatiMacchineDataTable GetByIdx(int idxMacchina) { + public virtual DS_applicazione.DatiMacchineDataTable GetByIdx(string idxMacchina) { this.Adapter.SelectCommand = this.CommandCollection[1]; - this.Adapter.SelectCommand.Parameters[0].Value = ((int)(idxMacchina)); + if ((idxMacchina == null)) { + throw new global::System.ArgumentNullException("idxMacchina"); + } + else { + this.Adapter.SelectCommand.Parameters[0].Value = ((string)(idxMacchina)); + } DS_applicazione.DatiMacchineDataTable dataTable = new DS_applicazione.DatiMacchineDataTable(); this.Adapter.Fill(dataTable); return dataTable; @@ -21758,8 +21840,13 @@ SELECT MatrOpr, Cognome, Nome, isAdmin, authKey FROM AnagraficaOperatori WHERE ( [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] - public virtual int Delete(int Original_idxMacchina, global::System.Nullable Original_palletChange, string Original_CodArticolo_A, string Original_CodArticolo_B, string Original_serialPort, global::System.Nullable Original_refreshPeriod, global::System.Nullable Original_simulazione, global::System.Nullable Original_simplePallet, global::System.Nullable Original_insEnabled, bool Original_sLogEnabled) { - this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_idxMacchina)); + public virtual int Delete(string Original_idxMacchina, global::System.Nullable Original_palletChange, string Original_CodArticolo_A, string Original_CodArticolo_B, string Original_serialPort, global::System.Nullable Original_refreshPeriod, global::System.Nullable Original_simulazione, global::System.Nullable Original_simplePallet, global::System.Nullable Original_insEnabled, bool Original_sLogEnabled) { + if ((Original_idxMacchina == null)) { + throw new global::System.ArgumentNullException("Original_idxMacchina"); + } + else { + this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_idxMacchina)); + } if ((Original_palletChange.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[2].Value = ((bool)(Original_palletChange.Value)); @@ -21845,8 +21932,13 @@ SELECT MatrOpr, Cognome, Nome, isAdmin, authKey FROM AnagraficaOperatori WHERE ( [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] - public virtual int Insert(int idxMacchina, global::System.Nullable palletChange, string CodArticolo_A, string CodArticolo_B, string serialPort, global::System.Nullable refreshPeriod, global::System.Nullable simulazione, global::System.Nullable simplePallet, global::System.Nullable insEnabled, bool sLogEnabled) { - this.Adapter.InsertCommand.Parameters[0].Value = ((int)(idxMacchina)); + public virtual int Insert(string idxMacchina, global::System.Nullable palletChange, string CodArticolo_A, string CodArticolo_B, string serialPort, global::System.Nullable refreshPeriod, global::System.Nullable simulazione, global::System.Nullable simplePallet, global::System.Nullable insEnabled, bool sLogEnabled) { + if ((idxMacchina == null)) { + throw new global::System.ArgumentNullException("idxMacchina"); + } + else { + this.Adapter.InsertCommand.Parameters[0].Value = ((string)(idxMacchina)); + } if ((palletChange.HasValue == true)) { this.Adapter.InsertCommand.Parameters[1].Value = ((bool)(palletChange.Value)); } @@ -21917,7 +22009,7 @@ SELECT MatrOpr, Cognome, Nome, isAdmin, authKey FROM AnagraficaOperatori WHERE ( [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] public virtual int Update( - int idxMacchina, + string idxMacchina, global::System.Nullable palletChange, string CodArticolo_A, string CodArticolo_B, @@ -21927,7 +22019,7 @@ SELECT MatrOpr, Cognome, Nome, isAdmin, authKey FROM AnagraficaOperatori WHERE ( global::System.Nullable simplePallet, global::System.Nullable insEnabled, bool sLogEnabled, - int Original_idxMacchina, + string Original_idxMacchina, global::System.Nullable Original_palletChange, string Original_CodArticolo_A, string Original_CodArticolo_B, @@ -21937,7 +22029,12 @@ SELECT MatrOpr, Cognome, Nome, isAdmin, authKey FROM AnagraficaOperatori WHERE ( global::System.Nullable Original_simplePallet, global::System.Nullable Original_insEnabled, bool Original_sLogEnabled) { - this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(idxMacchina)); + if ((idxMacchina == null)) { + throw new global::System.ArgumentNullException("idxMacchina"); + } + else { + this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(idxMacchina)); + } if ((palletChange.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[1].Value = ((bool)(palletChange.Value)); } @@ -21987,7 +22084,12 @@ SELECT MatrOpr, Cognome, Nome, isAdmin, authKey FROM AnagraficaOperatori WHERE ( this.Adapter.UpdateCommand.Parameters[8].Value = global::System.DBNull.Value; } this.Adapter.UpdateCommand.Parameters[9].Value = ((bool)(sLogEnabled)); - this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(Original_idxMacchina)); + if ((Original_idxMacchina == null)) { + throw new global::System.ArgumentNullException("Original_idxMacchina"); + } + else { + this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(Original_idxMacchina)); + } if ((Original_palletChange.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[12].Value = ((bool)(Original_palletChange.Value)); @@ -22083,7 +22185,7 @@ SELECT MatrOpr, Cognome, Nome, isAdmin, authKey FROM AnagraficaOperatori WHERE ( global::System.Nullable simplePallet, global::System.Nullable insEnabled, bool sLogEnabled, - int Original_idxMacchina, + string Original_idxMacchina, global::System.Nullable Original_palletChange, string Original_CodArticolo_A, string Original_CodArticolo_B, @@ -24518,7 +24620,7 @@ SELECT CodArticolo, DescArticolo, CurrRev, ProdRev, FlagIsNew FROM AnagArticoli global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "MSFD"; - tableMapping.ColumnMappings.Add("idxmacchina", "idxmacchina"); + tableMapping.ColumnMappings.Add("idxmacchina", "IdxMacchina"); tableMapping.ColumnMappings.Add("codmacchina", "codmacchina"); tableMapping.ColumnMappings.Add("palletChange", "palletChange"); tableMapping.ColumnMappings.Add("CodArticolo_A", "CodArticolo_A"); diff --git a/MapoDb/DS_applicazione.xsd b/MapoDb/DS_applicazione.xsd index e6e80be5..9897fbd7 100644 --- a/MapoDb/DS_applicazione.xsd +++ b/MapoDb/DS_applicazione.xsd @@ -1774,12 +1774,12 @@ SELECT MatrOpr, Cognome, Nome, isAdmin, authKey FROM AnagraficaOperatori WHERE ( - + DELETE FROM [DatiMacchine] WHERE (([idxMacchina] = @Original_idxMacchina) AND ((@IsNull_palletChange = 1 AND [palletChange] IS NULL) OR ([palletChange] = @Original_palletChange)) AND ((@IsNull_CodArticolo_A = 1 AND [CodArticolo_A] IS NULL) OR ([CodArticolo_A] = @Original_CodArticolo_A)) AND ((@IsNull_CodArticolo_B = 1 AND [CodArticolo_B] IS NULL) OR ([CodArticolo_B] = @Original_CodArticolo_B)) AND ((@IsNull_serialPort = 1 AND [serialPort] IS NULL) OR ([serialPort] = @Original_serialPort)) AND ((@IsNull_refreshPeriod = 1 AND [refreshPeriod] IS NULL) OR ([refreshPeriod] = @Original_refreshPeriod)) AND ((@IsNull_simulazione = 1 AND [simulazione] IS NULL) OR ([simulazione] = @Original_simulazione)) AND ((@IsNull_simplePallet = 1 AND [simplePallet] IS NULL) OR ([simplePallet] = @Original_simplePallet)) AND ((@IsNull_insEnabled = 1 AND [insEnabled] IS NULL) OR ([insEnabled] = @Original_insEnabled)) AND ([sLogEnabled] = @Original_sLogEnabled)) - + @@ -1804,7 +1804,7 @@ SELECT MatrOpr, Cognome, Nome, isAdmin, authKey FROM AnagraficaOperatori WHERE ( INSERT INTO [DatiMacchine] ([idxMacchina], [palletChange], [CodArticolo_A], [CodArticolo_B], [serialPort], [refreshPeriod], [simulazione], [simplePallet], [insEnabled], [sLogEnabled]) VALUES (@idxMacchina, @palletChange, @CodArticolo_A, @CodArticolo_B, @serialPort, @refreshPeriod, @simulazione, @simplePallet, @insEnabled, @sLogEnabled) - + @@ -1819,7 +1819,7 @@ SELECT MatrOpr, Cognome, Nome, isAdmin, authKey FROM AnagraficaOperatori WHERE ( - SELECT idxMacchina, palletChange, CodArticolo_A, CodArticolo_B, serialPort, refreshPeriod, simulazione, simplePallet, insEnabled, sLogEnabled FROM DatiMacchine + SELECT * FROM DatiMacchine @@ -1827,7 +1827,7 @@ SELECT MatrOpr, Cognome, Nome, isAdmin, authKey FROM AnagraficaOperatori WHERE ( UPDATE [DatiMacchine] SET [idxMacchina] = @idxMacchina, [palletChange] = @palletChange, [CodArticolo_A] = @CodArticolo_A, [CodArticolo_B] = @CodArticolo_B, [serialPort] = @serialPort, [refreshPeriod] = @refreshPeriod, [simulazione] = @simulazione, [simplePallet] = @simplePallet, [insEnabled] = @insEnabled, [sLogEnabled] = @sLogEnabled WHERE (([idxMacchina] = @Original_idxMacchina) AND ((@IsNull_palletChange = 1 AND [palletChange] IS NULL) OR ([palletChange] = @Original_palletChange)) AND ((@IsNull_CodArticolo_A = 1 AND [CodArticolo_A] IS NULL) OR ([CodArticolo_A] = @Original_CodArticolo_A)) AND ((@IsNull_CodArticolo_B = 1 AND [CodArticolo_B] IS NULL) OR ([CodArticolo_B] = @Original_CodArticolo_B)) AND ((@IsNull_serialPort = 1 AND [serialPort] IS NULL) OR ([serialPort] = @Original_serialPort)) AND ((@IsNull_refreshPeriod = 1 AND [refreshPeriod] IS NULL) OR ([refreshPeriod] = @Original_refreshPeriod)) AND ((@IsNull_simulazione = 1 AND [simulazione] IS NULL) OR ([simulazione] = @Original_simulazione)) AND ((@IsNull_simplePallet = 1 AND [simplePallet] IS NULL) OR ([simplePallet] = @Original_simplePallet)) AND ((@IsNull_insEnabled = 1 AND [insEnabled] IS NULL) OR ([insEnabled] = @Original_insEnabled)) AND ([sLogEnabled] = @Original_sLogEnabled)) - + @@ -1837,7 +1837,7 @@ SELECT MatrOpr, Cognome, Nome, isAdmin, authKey FROM AnagraficaOperatori WHERE ( - + @@ -1873,12 +1873,13 @@ SELECT MatrOpr, Cognome, Nome, isAdmin, authKey FROM AnagraficaOperatori WHERE ( - + - SELECT CodArticolo_A, CodArticolo_B, idxMacchina, insEnabled, palletChange, refreshPeriod, sLogEnabled, serialPort, simplePallet, simulazione FROM DatiMacchine WHERE (idxMacchina = @idxMacchina) + SELECT * +FROM DatiMacchine WHERE (idxMacchina = @idxMacchina) - + @@ -2335,7 +2336,7 @@ SELECT CodArticolo, DescArticolo, CurrRev, ProdRev, FlagIsNew FROM AnagArticoli - + dbo.stp_MSFD_getAll @@ -2347,7 +2348,7 @@ SELECT CodArticolo, DescArticolo, CurrRev, ProdRev, FlagIsNew FROM AnagArticoli - + @@ -2776,7 +2777,7 @@ SELECT CodArticolo, DescArticolo, CurrRev, ProdRev, FlagIsNew FROM AnagArticoli - + @@ -2807,7 +2808,7 @@ SELECT CodArticolo, DescArticolo, CurrRev, ProdRev, FlagIsNew FROM AnagArticoli - + @@ -2829,7 +2830,7 @@ SELECT CodArticolo, DescArticolo, CurrRev, ProdRev, FlagIsNew FROM AnagArticoli - + @@ -2865,7 +2866,7 @@ SELECT CodArticolo, DescArticolo, CurrRev, ProdRev, FlagIsNew FROM AnagArticoli - + @@ -2901,7 +2902,7 @@ SELECT CodArticolo, DescArticolo, CurrRev, ProdRev, FlagIsNew FROM AnagArticoli - + @@ -2918,7 +2919,7 @@ SELECT CodArticolo, DescArticolo, CurrRev, ProdRev, FlagIsNew FROM AnagArticoli - + @@ -2942,7 +2943,7 @@ SELECT CodArticolo, DescArticolo, CurrRev, ProdRev, FlagIsNew FROM AnagArticoli - + @@ -2977,10 +2978,10 @@ SELECT CodArticolo, DescArticolo, CurrRev, ProdRev, FlagIsNew FROM AnagArticoli - + - + @@ -3011,11 +3012,11 @@ SELECT CodArticolo, DescArticolo, CurrRev, ProdRev, FlagIsNew FROM AnagArticoli - - - - - + + + + + @@ -3152,31 +3153,31 @@ SELECT CodArticolo, DescArticolo, CurrRev, ProdRev, FlagIsNew FROM AnagArticoli - + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MapoDb/DS_applicazione.xss b/MapoDb/DS_applicazione.xss index 8f19f397..1ac2d572 100644 --- a/MapoDb/DS_applicazione.xss +++ b/MapoDb/DS_applicazione.xss @@ -4,32 +4,32 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - - - - - - - + + + + + + + - - - - + + + + - - - - - - - - - - - + + + + + + + + + + + @@ -124,7 +124,7 @@ - + 1285 @@ -196,7 +196,7 @@ - + 716 @@ -220,7 +220,7 @@ - + 1285 @@ -240,7 +240,7 @@ - + 943 @@ -296,7 +296,7 @@ - + 627