diff --git a/Projects/WebGIM/GIM_data/DS_applicazione.Designer.cs b/Projects/WebGIM/GIM_data/DS_applicazione.Designer.cs index 8822324..af6beca 100644 --- a/Projects/WebGIM/GIM_data/DS_applicazione.Designer.cs +++ b/Projects/WebGIM/GIM_data/DS_applicazione.Designer.cs @@ -8182,6 +8182,8 @@ namespace GIM_data { private global::System.Data.DataColumn columnTotImport; + private global::System.Data.DataColumn columnNote; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public ImpiegoRisorseDataTable() { @@ -8263,6 +8265,14 @@ namespace GIM_data { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn NoteColumn { + get { + return this.columnNote; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Browsable(false)] @@ -8300,7 +8310,7 @@ namespace GIM_data { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public ImpiegoRisorseRow AddImpiegoRisorseRow(int idxImpiego, AnagTipoRisorsaRow parentAnagTipoRisorsaRowByFK_ImpiegoRisorse_AnagTipoRisorsa, v_intervExpRow parentv_intervExpRowByv_intervExp_ImpiegoRisorse, decimal QtaRisorsa, decimal CostoUnit, decimal TotImport) { + public ImpiegoRisorseRow AddImpiegoRisorseRow(int idxImpiego, AnagTipoRisorsaRow parentAnagTipoRisorsaRowByFK_ImpiegoRisorse_AnagTipoRisorsa, v_intervExpRow parentv_intervExpRowByv_intervExp_ImpiegoRisorse, decimal QtaRisorsa, decimal CostoUnit, decimal TotImport, string Note) { ImpiegoRisorseRow rowImpiegoRisorseRow = ((ImpiegoRisorseRow)(this.NewRow())); object[] columnValuesArray = new object[] { idxImpiego, @@ -8308,7 +8318,8 @@ namespace GIM_data { null, QtaRisorsa, CostoUnit, - TotImport}; + TotImport, + Note}; if ((parentAnagTipoRisorsaRowByFK_ImpiegoRisorse_AnagTipoRisorsa != null)) { columnValuesArray[1] = parentAnagTipoRisorsaRowByFK_ImpiegoRisorse_AnagTipoRisorsa[0]; } @@ -8350,6 +8361,7 @@ namespace GIM_data { this.columnQtaRisorsa = base.Columns["QtaRisorsa"]; this.columnCostoUnit = base.Columns["CostoUnit"]; this.columnTotImport = base.Columns["TotImport"]; + this.columnNote = base.Columns["Note"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -8367,6 +8379,8 @@ namespace GIM_data { base.Columns.Add(this.columnCostoUnit); this.columnTotImport = new global::System.Data.DataColumn("TotImport", typeof(decimal), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnTotImport); + this.columnNote = new global::System.Data.DataColumn("Note", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnNote); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnidxImpiego}, true)); this.columnidxImpiego.AllowDBNull = false; @@ -8374,7 +8388,11 @@ namespace GIM_data { this.columnCodRisorsa.AllowDBNull = false; this.columnCodRisorsa.MaxLength = 10; this.columnnumIntMtz.AllowDBNull = false; + this.columnQtaRisorsa.AllowDBNull = false; + this.columnCostoUnit.AllowDBNull = false; this.columnTotImport.ReadOnly = true; + this.columnNote.AllowDBNull = false; + this.columnNote.MaxLength = 2147483647; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -12140,12 +12158,7 @@ namespace GIM_data { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public decimal QtaRisorsa { get { - try { - return ((decimal)(this[this.tableImpiegoRisorse.QtaRisorsaColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'QtaRisorsa\' in table \'ImpiegoRisorse\' is DBNull.", e); - } + return ((decimal)(this[this.tableImpiegoRisorse.QtaRisorsaColumn])); } set { this[this.tableImpiegoRisorse.QtaRisorsaColumn] = value; @@ -12156,12 +12169,7 @@ namespace GIM_data { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public decimal CostoUnit { get { - try { - return ((decimal)(this[this.tableImpiegoRisorse.CostoUnitColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'CostoUnit\' in table \'ImpiegoRisorse\' is DBNull.", e); - } + return ((decimal)(this[this.tableImpiegoRisorse.CostoUnitColumn])); } set { this[this.tableImpiegoRisorse.CostoUnitColumn] = value; @@ -12184,6 +12192,17 @@ namespace GIM_data { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public string Note { + get { + return ((string)(this[this.tableImpiegoRisorse.NoteColumn])); + } + set { + this[this.tableImpiegoRisorse.NoteColumn] = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public AnagTipoRisorsaRow AnagTipoRisorsaRow { @@ -12206,30 +12225,6 @@ namespace GIM_data { } } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsQtaRisorsaNull() { - return this.IsNull(this.tableImpiegoRisorse.QtaRisorsaColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetQtaRisorsaNull() { - this[this.tableImpiegoRisorse.QtaRisorsaColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsCostoUnitNull() { - return this.IsNull(this.tableImpiegoRisorse.CostoUnitColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetCostoUnitNull() { - this[this.tableImpiegoRisorse.CostoUnitColumn] = global::System.Convert.DBNull; - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public bool IsTotImportNull() { @@ -20945,6 +20940,7 @@ ORDER BY numIntMtz DESC"; tableMapping.ColumnMappings.Add("QtaRisorsa", "QtaRisorsa"); tableMapping.ColumnMappings.Add("CostoUnit", "CostoUnit"); tableMapping.ColumnMappings.Add("TotImport", "TotImport"); + tableMapping.ColumnMappings.Add("Note", "Note"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; @@ -20953,26 +20949,26 @@ ORDER BY numIntMtz DESC"; this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxImpiego", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxImpiego", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; - this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[ImpiegoRisorse] ([idxImpiego], [CodRisorsa], [numIntMtz], [Qta" + - "Risorsa], [CostoUnit]) VALUES (@idxImpiego, @CodRisorsa, @numIntMtz, @QtaRisorsa" + - ", @CostoUnit)"; + this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[ImpiegoRisorse] ([CodRisorsa], [numIntMtz], [QtaRisorsa], [Cos" + + "toUnit], [Note]) VALUES (@CodRisorsa, @numIntMtz, @QtaRisorsa, @CostoUnit, @Note" + + ")"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxImpiego", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxImpiego", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodRisorsa", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodRisorsa", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@numIntMtz", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "numIntMtz", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@QtaRisorsa", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 18, 6, "QtaRisorsa", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CostoUnit", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 18, 6, "CostoUnit", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Note", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Note", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; - this._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[ImpiegoRisorse] SET [idxImpiego] = @idxImpiego, [CodRisorsa] = @Cod" + - "Risorsa, [numIntMtz] = @numIntMtz, [QtaRisorsa] = @QtaRisorsa, [CostoUnit] = @Co" + - "stoUnit WHERE (([idxImpiego] = @Original_idxImpiego))"; + this._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[ImpiegoRisorse] SET [CodRisorsa] = @CodRisorsa, [numIntMtz] = @numI" + + "ntMtz, [QtaRisorsa] = @QtaRisorsa, [CostoUnit] = @CostoUnit, [Note] = @Note WHER" + + "E (([idxImpiego] = @Original_idxImpiego))"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxImpiego", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxImpiego", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodRisorsa", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodRisorsa", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@numIntMtz", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "numIntMtz", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@QtaRisorsa", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 18, 6, "QtaRisorsa", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CostoUnit", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 18, 6, "CostoUnit", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Note", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Note", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxImpiego", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxImpiego", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); } @@ -20989,8 +20985,7 @@ ORDER BY numIntMtz DESC"; 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 idxImpiego, CodRisorsa, numIntMtz, QtaRisorsa, CostoUnit, TotImport FROM d" + - "bo.ImpiegoRisorse"; + this._commandCollection[0].CommandText = "SELECT * FROM dbo.ImpiegoRisorse"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[1].Connection = this.Connection; @@ -21007,6 +21002,7 @@ ORDER BY numIntMtz DESC"; this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@numIntMtz", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@QtaRisorsa", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 6, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CostoUnit", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 6, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Note", global::System.Data.SqlDbType.NVarChar, 2147483647, 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_ImpRis_update"; @@ -21017,6 +21013,7 @@ ORDER BY numIntMtz DESC"; this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@numIntMtz", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@QtaRisorsa", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 6, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CostoUnit", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 6, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Note", global::System.Data.SqlDbType.NVarChar, 2147483647, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -21098,26 +21095,21 @@ ORDER BY numIntMtz DESC"; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.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 idxImpiego, string CodRisorsa, int numIntMtz, global::System.Nullable QtaRisorsa, global::System.Nullable CostoUnit) { - this.Adapter.InsertCommand.Parameters[0].Value = ((int)(idxImpiego)); + public virtual int Insert(string CodRisorsa, int numIntMtz, decimal QtaRisorsa, decimal CostoUnit, string Note) { if ((CodRisorsa == null)) { throw new global::System.ArgumentNullException("CodRisorsa"); } else { - this.Adapter.InsertCommand.Parameters[1].Value = ((string)(CodRisorsa)); + this.Adapter.InsertCommand.Parameters[0].Value = ((string)(CodRisorsa)); } - this.Adapter.InsertCommand.Parameters[2].Value = ((int)(numIntMtz)); - if ((QtaRisorsa.HasValue == true)) { - this.Adapter.InsertCommand.Parameters[3].Value = ((decimal)(QtaRisorsa.Value)); + this.Adapter.InsertCommand.Parameters[1].Value = ((int)(numIntMtz)); + this.Adapter.InsertCommand.Parameters[2].Value = ((decimal)(QtaRisorsa)); + this.Adapter.InsertCommand.Parameters[3].Value = ((decimal)(CostoUnit)); + if ((Note == null)) { + throw new global::System.ArgumentNullException("Note"); } else { - this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value; - } - if ((CostoUnit.HasValue == true)) { - this.Adapter.InsertCommand.Parameters[4].Value = ((decimal)(CostoUnit.Value)); - } - else { - this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value; + this.Adapter.InsertCommand.Parameters[4].Value = ((string)(Note)); } global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) @@ -21139,26 +21131,21 @@ ORDER BY numIntMtz DESC"; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] - public virtual int Update(int idxImpiego, string CodRisorsa, int numIntMtz, global::System.Nullable QtaRisorsa, global::System.Nullable CostoUnit, int Original_idxImpiego) { - this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(idxImpiego)); + public virtual int Update(string CodRisorsa, int numIntMtz, decimal QtaRisorsa, decimal CostoUnit, string Note, int Original_idxImpiego) { if ((CodRisorsa == null)) { throw new global::System.ArgumentNullException("CodRisorsa"); } else { - this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(CodRisorsa)); + this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(CodRisorsa)); } - this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(numIntMtz)); - if ((QtaRisorsa.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[3].Value = ((decimal)(QtaRisorsa.Value)); + this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(numIntMtz)); + this.Adapter.UpdateCommand.Parameters[2].Value = ((decimal)(QtaRisorsa)); + this.Adapter.UpdateCommand.Parameters[3].Value = ((decimal)(CostoUnit)); + if ((Note == null)) { + throw new global::System.ArgumentNullException("Note"); } else { - this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value; - } - if ((CostoUnit.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[4].Value = ((decimal)(CostoUnit.Value)); - } - else { - this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; + this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Note)); } this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_idxImpiego)); global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; @@ -21177,14 +21164,6 @@ ORDER BY numIntMtz DESC"; } } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] - public virtual int Update(string CodRisorsa, int numIntMtz, global::System.Nullable QtaRisorsa, global::System.Nullable CostoUnit, int Original_idxImpiego) { - return this.Update(Original_idxImpiego, CodRisorsa, numIntMtz, QtaRisorsa, CostoUnit, Original_idxImpiego); - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] @@ -21216,7 +21195,7 @@ ORDER BY numIntMtz DESC"; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int insertQuery(string CodRisorsa, global::System.Nullable numIntMtz, global::System.Nullable QtaRisorsa, global::System.Nullable CostoUnit) { + public virtual int insertQuery(string CodRisorsa, global::System.Nullable numIntMtz, global::System.Nullable QtaRisorsa, global::System.Nullable CostoUnit, string Note) { global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[2]; if ((CodRisorsa == null)) { command.Parameters[1].Value = global::System.DBNull.Value; @@ -21242,6 +21221,12 @@ ORDER BY numIntMtz DESC"; else { command.Parameters[4].Value = global::System.DBNull.Value; } + if ((Note == null)) { + command.Parameters[5].Value = global::System.DBNull.Value; + } + else { + command.Parameters[5].Value = ((string)(Note)); + } global::System.Data.ConnectionState previousConnectionState = command.Connection.State; if (((command.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { @@ -21262,7 +21247,7 @@ ORDER BY numIntMtz DESC"; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int updateQuery(global::System.Nullable Original_idxImpiego, string CodRisorsa, global::System.Nullable numIntMtz, global::System.Nullable QtaRisorsa, global::System.Nullable CostoUnit) { + public virtual int updateQuery(global::System.Nullable Original_idxImpiego, string CodRisorsa, global::System.Nullable numIntMtz, global::System.Nullable QtaRisorsa, global::System.Nullable CostoUnit, string Note) { global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[3]; if ((Original_idxImpiego.HasValue == true)) { command.Parameters[1].Value = ((int)(Original_idxImpiego.Value)); @@ -21294,6 +21279,12 @@ ORDER BY numIntMtz DESC"; else { command.Parameters[5].Value = global::System.DBNull.Value; } + if ((Note == null)) { + command.Parameters[6].Value = global::System.DBNull.Value; + } + else { + command.Parameters[6].Value = ((string)(Note)); + } global::System.Data.ConnectionState previousConnectionState = command.Connection.State; if (((command.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { diff --git a/Projects/WebGIM/GIM_data/DS_applicazione.xsd b/Projects/WebGIM/GIM_data/DS_applicazione.xsd index b17f7de..a695789 100644 --- a/Projects/WebGIM/GIM_data/DS_applicazione.xsd +++ b/Projects/WebGIM/GIM_data/DS_applicazione.xsd @@ -1590,31 +1590,31 @@ WHERE (idxCausale = @Original_idxCausale) - INSERT INTO [dbo].[ImpiegoRisorse] ([idxImpiego], [CodRisorsa], [numIntMtz], [QtaRisorsa], [CostoUnit]) VALUES (@idxImpiego, @CodRisorsa, @numIntMtz, @QtaRisorsa, @CostoUnit) + INSERT INTO [dbo].[ImpiegoRisorse] ([CodRisorsa], [numIntMtz], [QtaRisorsa], [CostoUnit], [Note]) VALUES (@CodRisorsa, @numIntMtz, @QtaRisorsa, @CostoUnit, @Note) - - - + + + - - SELECT idxImpiego, CodRisorsa, numIntMtz, QtaRisorsa, CostoUnit, TotImport FROM dbo.ImpiegoRisorse + + SELECT * FROM dbo.ImpiegoRisorse - UPDATE [dbo].[ImpiegoRisorse] SET [idxImpiego] = @idxImpiego, [CodRisorsa] = @CodRisorsa, [numIntMtz] = @numIntMtz, [QtaRisorsa] = @QtaRisorsa, [CostoUnit] = @CostoUnit WHERE (([idxImpiego] = @Original_idxImpiego)) + UPDATE [dbo].[ImpiegoRisorse] SET [CodRisorsa] = @CodRisorsa, [numIntMtz] = @numIntMtz, [QtaRisorsa] = @QtaRisorsa, [CostoUnit] = @CostoUnit, [Note] = @Note WHERE (([idxImpiego] = @Original_idxImpiego)) - - - + + + @@ -1628,6 +1628,7 @@ WHERE (idxCausale = @Original_idxCausale) + @@ -1651,6 +1652,7 @@ WHERE (idxCausale = @Original_idxCausale) + @@ -1666,6 +1668,7 @@ WHERE (idxCausale = @Original_idxCausale) + @@ -2342,9 +2345,16 @@ WHERE (idxCausale = @Original_idxCausale) - - + + + + + + + + + diff --git a/Projects/WebGIM/GIM_data/DS_applicazione.xss b/Projects/WebGIM/GIM_data/DS_applicazione.xss index 9ba77af..65484e0 100644 --- a/Projects/WebGIM/GIM_data/DS_applicazione.xss +++ b/Projects/WebGIM/GIM_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. --> - + @@ -20,15 +20,15 @@ - + - + - - + + @@ -203,11 +203,11 @@ 754 - 712 + 714 793 - 712 + 714 @@ -219,11 +219,11 @@ 121 - 690 + 683 248 - 690 + 683 @@ -235,11 +235,11 @@ 569 - 651 + 644 - 470 - 651 + 493 + 644 diff --git a/Projects/WebGIM/GIM_data/TA_app.cs b/Projects/WebGIM/GIM_data/TA_app.cs index 70a04c4..2574ac4 100644 --- a/Projects/WebGIM/GIM_data/TA_app.cs +++ b/Projects/WebGIM/GIM_data/TA_app.cs @@ -31,6 +31,7 @@ public class TA_app public GIM_data.DS_applicazioneTableAdapters.FiltroStatiTableAdapter taFiltSta; public GIM_data.DS_applicazioneTableAdapters.AnagCausaliTableAdapter taAnagCau; public GIM_data.DS_utilityTableAdapters.v_selOperMtzTableAdapter taSelMatrOp; + public GIM_data.DS_applicazioneTableAdapters.ImpiegoRisorseTableAdapter taImpRis; #endregion @@ -58,6 +59,7 @@ public class TA_app taFiltSta = new GIM_data.DS_applicazioneTableAdapters.FiltroStatiTableAdapter(); taAnagCau = new GIM_data.DS_applicazioneTableAdapters.AnagCausaliTableAdapter(); taSelMatrOp = new GIM_data.DS_utilityTableAdapters.v_selOperMtzTableAdapter(); + taImpRis = new GIM_data.DS_applicazioneTableAdapters.ImpiegoRisorseTableAdapter(); } /// /// Singleton diff --git a/Projects/WebGIM/GIM_data/bin/GIM_data.dll b/Projects/WebGIM/GIM_data/bin/GIM_data.dll index 85407f4..c36c137 100644 Binary files a/Projects/WebGIM/GIM_data/bin/GIM_data.dll and b/Projects/WebGIM/GIM_data/bin/GIM_data.dll differ diff --git a/Projects/WebGIM/GIM_data/bin/SteamWare.dll b/Projects/WebGIM/GIM_data/bin/SteamWare.dll index 19f7e17..fa15e8a 100644 Binary files a/Projects/WebGIM/GIM_data/bin/SteamWare.dll and b/Projects/WebGIM/GIM_data/bin/SteamWare.dll differ diff --git a/Projects/WebGIM/GIM_site/Web.config b/Projects/WebGIM/GIM_site/Web.config index bde2c85..56b9e53 100644 --- a/Projects/WebGIM/GIM_site/Web.config +++ b/Projects/WebGIM/GIM_site/Web.config @@ -161,6 +161,7 @@ + diff --git a/Projects/WebGIM/GIM_site/WebUserControls/mod_dettaglioIntervento.ascx b/Projects/WebGIM/GIM_site/WebUserControls/mod_dettaglioIntervento.ascx index 704bc05..f4e9166 100644 --- a/Projects/WebGIM/GIM_site/WebUserControls/mod_dettaglioIntervento.ascx +++ b/Projects/WebGIM/GIM_site/WebUserControls/mod_dettaglioIntervento.ascx @@ -189,6 +189,9 @@ + + + @@ -410,9 +413,12 @@ Font-Size="X-Small" /> - + + + + + @@ -438,7 +444,7 @@ - + @@ -661,9 +667,12 @@ Font-Size="X-Small" /> - + + + + + @@ -691,7 +700,7 @@ - + diff --git a/Projects/WebGIM/GIM_site/WebUserControls/mod_impiegoRisorse.ascx b/Projects/WebGIM/GIM_site/WebUserControls/mod_impiegoRisorse.ascx index 6415bd8..17d3442 100644 --- a/Projects/WebGIM/GIM_site/WebUserControls/mod_impiegoRisorse.ascx +++ b/Projects/WebGIM/GIM_site/WebUserControls/mod_impiegoRisorse.ascx @@ -1,28 +1,6 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_impiegoRisorse.ascx.cs" Inherits="GIM_site.WebUserControls.mod_impiegoRisorse" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> - -<%-- - - - - - - - - - - - - - --%> - @@ -40,44 +18,55 @@ Visible='<%# isOnEdit %>' /> - + + + + + + + + + + + + + + + - - - - - - - -<%-- + + + + + - - + + - - + + - --%> + + + + + InsertMethod="insertQuery" OnUpdating="ods_Updating"> + @@ -88,5 +77,6 @@ + diff --git a/Projects/WebGIM/GIM_site/WebUserControls/mod_impiegoRisorse.ascx.cs b/Projects/WebGIM/GIM_site/WebUserControls/mod_impiegoRisorse.ascx.cs index b3aa944..9353a21 100644 --- a/Projects/WebGIM/GIM_site/WebUserControls/mod_impiegoRisorse.ascx.cs +++ b/Projects/WebGIM/GIM_site/WebUserControls/mod_impiegoRisorse.ascx.cs @@ -81,26 +81,17 @@ namespace GIM_site.WebUserControls // reset selezione... resetSelezione(); int numIntMtz = memLayer.ML.IntSessionObj("numIntMtz_sel"); - string matr = memLayer.ML.confReadString("defaultMatr"); - TA_app.obj.taIntOpMtz.Insert(numIntMtz, matr, 0); + string CodRis = memLayer.ML.confReadString("CodRis"); + TA_app.obj.taImpRis.insertQuery(CodRis, numIntMtz, 1, 1, "--"); grView.DataBind(); } /// - /// restituisce un booleano se sia abilitato inserimento nuovi valori (solo se NON C'E' GIA' un operatore con amtricola di default...) + /// restituisce un booleano se sia abilitato inserimento nuovi valori /// /// public bool canInsertNew() { - bool answ = false; - int numIntMtz = memLayer.ML.IntSessionObj("numIntMtz_sel"); - string matr = memLayer.ML.confReadString("defaultMatr"); - try - { - answ = (TA_app.obj.taIntOpMtz.getByMatrNumIntMtz(numIntMtz, matr).Rows.Count == 0); - } - catch - { } - return (answ && isOnEdit); + return isOnEdit; } /// /// restituisce true se il controllo è in modalità editing (e non selezione...) @@ -112,21 +103,12 @@ namespace GIM_site.WebUserControls return _vistaModulo == tipoVistaMod.editing; } } - /// - /// traduce matricola in matr + cognome + nome - /// - /// - /// - public string traduciMatrOp(object matr) + + protected void ods_Updating(object sender, ObjectDataSourceMethodEventArgs e) { - string answ = ""; - try - { - answ = TA_app.obj.taSelMatrOp.getByValue(matr.ToString())[0].label; - } - catch - { } - return answ; + e.InputParameters["numIntMtz"] = memLayer.ML.IntSessionObj("numIntMtz_sel").ToString(); + //e.InputParameters["QtaRisorsa"] = Convert.ToDouble(e.InputParameters["QtaRisorsa"].ToString().Replace(".", ",")); + //e.InputParameters["CostoUnit"] = Convert.ToDouble(e.InputParameters["CostoUnit"].ToString().Replace(".", ",")); } } -} +} \ No newline at end of file diff --git a/Projects/WebGIM/GIM_site/bin/GIM_data.dll b/Projects/WebGIM/GIM_site/bin/GIM_data.dll index 85407f4..c36c137 100644 Binary files a/Projects/WebGIM/GIM_site/bin/GIM_data.dll and b/Projects/WebGIM/GIM_site/bin/GIM_data.dll differ diff --git a/Projects/WebGIM/GIM_site/bin/GIM_site.dll b/Projects/WebGIM/GIM_site/bin/GIM_site.dll index c245017..29f8299 100644 Binary files a/Projects/WebGIM/GIM_site/bin/GIM_site.dll and b/Projects/WebGIM/GIM_site/bin/GIM_site.dll differ diff --git a/Projects/WebGIM/GIM_site/bin/SteamWare.dll b/Projects/WebGIM/GIM_site/bin/SteamWare.dll index 19f7e17..fa15e8a 100644 Binary files a/Projects/WebGIM/GIM_site/bin/SteamWare.dll and b/Projects/WebGIM/GIM_site/bin/SteamWare.dll differ