diff --git a/ETS_Data/DataProxy_ProjEts.cs b/ETS_Data/DataProxy_ProjEts.cs index 90dbd48..51bc2db 100644 --- a/ETS_Data/DataProxy_ProjEts.cs +++ b/ETS_Data/DataProxy_ProjEts.cs @@ -18,6 +18,7 @@ namespace ETS_Data public Ds_ProjEtsTableAdapters.DatiCommessaTableAdapter taDC; public Ds_ProjEtsTableAdapters.DatiCommFornTableAdapter taDCF; public Ds_ProjEtsTableAdapters.DatiCommIntegTableAdapter taDCI; + public Ds_ProjEtsTableAdapters.BdgtRisorseFasiTableAdapter taBRF; /* DS_utilsProjEts */ public DS_utilsProjEtsTableAdapters.v_selClientiTableAdapter taSelCli; public DS_utilsProjEtsTableAdapters.v_selProgettiTableAdapter taSelPro; @@ -33,6 +34,7 @@ namespace ETS_Data taDC = new Ds_ProjEtsTableAdapters.DatiCommessaTableAdapter(); taDCF = new Ds_ProjEtsTableAdapters.DatiCommFornTableAdapter(); taDCI = new Ds_ProjEtsTableAdapters.DatiCommIntegTableAdapter(); + taBRF = new Ds_ProjEtsTableAdapters.BdgtRisorseFasiTableAdapter(); taSelCli = new DS_utilsProjEtsTableAdapters.v_selClientiTableAdapter(); taSelPro = new DS_utilsProjEtsTableAdapters.v_selProgettiTableAdapter(); taSelCom = new DS_utilsProjEtsTableAdapters.v_selCommesseTableAdapter(); @@ -48,6 +50,7 @@ namespace ETS_Data taDC.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); taDCF.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); taDCI.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); + taBRF.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); taSelCli.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); taSelPro.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); taSelCom.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); diff --git a/ETS_Data/Ds_ProjEts.Designer.cs b/ETS_Data/Ds_ProjEts.Designer.cs index d1c186f..928b4da 100644 --- a/ETS_Data/Ds_ProjEts.Designer.cs +++ b/ETS_Data/Ds_ProjEts.Designer.cs @@ -11412,6 +11412,7 @@ SELECT idxFase, CodTipoRisorsa, OreBdgt, CostoBdgt, DataRif FROM BdgtRisorseFasi 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_idxFase", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodTipoRisorsa", 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_BRF_getByFase"; @@ -11426,7 +11427,6 @@ SELECT idxFase, CodTipoRisorsa, OreBdgt, CostoBdgt, DataRif FROM BdgtRisorseFasi this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxFase", 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("@CodTipoRisorsa", 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("@OreBdgt", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 2, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataRif", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[4] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[4].Connection = this.Connection; this._commandCollection[4].CommandText = "dbo.stp_BRF_UpdateQuery"; @@ -11434,8 +11434,8 @@ SELECT idxFase, CodTipoRisorsa, OreBdgt, CostoBdgt, DataRif FROM BdgtRisorseFasi this._commandCollection[4].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[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodTipoRisorsa", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@OreBdgt", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 2, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataRif", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxFase", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodTipoRisorsa", 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()] @@ -11695,7 +11695,7 @@ SELECT idxFase, CodTipoRisorsa, OreBdgt, CostoBdgt, DataRif FROM BdgtRisorseFasi [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.Delete, false)] - public virtual int DeleteQuery(global::System.Nullable Original_idxFase) { + public virtual int DeleteQuery(global::System.Nullable Original_idxFase, string Original_CodTipoRisorsa) { global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[1]; if ((Original_idxFase.HasValue == true)) { command.Parameters[1].Value = ((int)(Original_idxFase.Value)); @@ -11703,6 +11703,12 @@ SELECT idxFase, CodTipoRisorsa, OreBdgt, CostoBdgt, DataRif FROM BdgtRisorseFasi else { command.Parameters[1].Value = global::System.DBNull.Value; } + if ((Original_CodTipoRisorsa == null)) { + command.Parameters[2].Value = global::System.DBNull.Value; + } + else { + command.Parameters[2].Value = ((string)(Original_CodTipoRisorsa)); + } global::System.Data.ConnectionState previousConnectionState = command.Connection.State; if (((command.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { @@ -11724,7 +11730,7 @@ SELECT idxFase, CodTipoRisorsa, OreBdgt, CostoBdgt, DataRif FROM BdgtRisorseFasi [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, false)] - public virtual int InsertQuery(global::System.Nullable idxFase, string CodTipoRisorsa, global::System.Nullable OreBdgt, global::System.Nullable DataRif) { + public virtual int InsertQuery(global::System.Nullable idxFase, string CodTipoRisorsa, global::System.Nullable OreBdgt) { global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[3]; if ((idxFase.HasValue == true)) { command.Parameters[1].Value = ((int)(idxFase.Value)); @@ -11744,12 +11750,6 @@ SELECT idxFase, CodTipoRisorsa, OreBdgt, CostoBdgt, DataRif FROM BdgtRisorseFasi else { command.Parameters[3].Value = global::System.DBNull.Value; } - if ((DataRif.HasValue == true)) { - command.Parameters[4].Value = ((System.DateTime)(DataRif.Value)); - } - else { - command.Parameters[4].Value = global::System.DBNull.Value; - } global::System.Data.ConnectionState previousConnectionState = command.Connection.State; if (((command.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { @@ -11771,7 +11771,7 @@ SELECT idxFase, CodTipoRisorsa, OreBdgt, CostoBdgt, DataRif FROM BdgtRisorseFasi [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, false)] - public virtual int UpdateQuery(string CodTipoRisorsa, global::System.Nullable OreBdgt, global::System.Nullable DataRif, global::System.Nullable Original_idxFase) { + public virtual int UpdateQuery(string CodTipoRisorsa, global::System.Nullable OreBdgt, global::System.Nullable Original_idxFase, string Original_CodTipoRisorsa) { global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[4]; if ((CodTipoRisorsa == null)) { command.Parameters[1].Value = global::System.DBNull.Value; @@ -11785,17 +11785,17 @@ SELECT idxFase, CodTipoRisorsa, OreBdgt, CostoBdgt, DataRif FROM BdgtRisorseFasi else { command.Parameters[2].Value = global::System.DBNull.Value; } - if ((DataRif.HasValue == true)) { - command.Parameters[3].Value = ((System.DateTime)(DataRif.Value)); + if ((Original_idxFase.HasValue == true)) { + command.Parameters[3].Value = ((int)(Original_idxFase.Value)); } else { command.Parameters[3].Value = global::System.DBNull.Value; } - if ((Original_idxFase.HasValue == true)) { - command.Parameters[4].Value = ((int)(Original_idxFase.Value)); + if ((Original_CodTipoRisorsa == null)) { + command.Parameters[4].Value = global::System.DBNull.Value; } else { - command.Parameters[4].Value = global::System.DBNull.Value; + command.Parameters[4].Value = ((string)(Original_CodTipoRisorsa)); } global::System.Data.ConnectionState previousConnectionState = command.Connection.State; if (((command.Connection.State & global::System.Data.ConnectionState.Open) diff --git a/ETS_Data/Ds_ProjEts.xsd b/ETS_Data/Ds_ProjEts.xsd index 825b11f..8312d19 100644 --- a/ETS_Data/Ds_ProjEts.xsd +++ b/ETS_Data/Ds_ProjEts.xsd @@ -817,6 +817,7 @@ SELECT idxFase, CodTipoRisorsa, OreBdgt, CostoBdgt, DataRif FROM BdgtRisorseFasi + @@ -841,7 +842,6 @@ SELECT idxFase, CodTipoRisorsa, OreBdgt, CostoBdgt, DataRif FROM BdgtRisorseFasi - @@ -854,8 +854,8 @@ SELECT idxFase, CodTipoRisorsa, OreBdgt, CostoBdgt, DataRif FROM BdgtRisorseFasi - + diff --git a/PROJ-ETS/PROJ-ETS/Web.config b/PROJ-ETS/PROJ-ETS/Web.config index 578b44d..8de55de 100644 --- a/PROJ-ETS/PROJ-ETS/Web.config +++ b/PROJ-ETS/PROJ-ETS/Web.config @@ -26,7 +26,7 @@ - + @@ -44,6 +44,9 @@ + + + diff --git a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_fasi.ascx b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_fasi.ascx index a84b70f..933b2c4 100644 --- a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_fasi.ascx +++ b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_fasi.ascx @@ -177,75 +177,81 @@ - NOME FASE... - - + + + + + + + + + + + - Nessuna risorsa, aggiungi... + + + + + + + +
+ +
+ + <%----%> + + +
- + - + - + - + - + - - - - - - - - - +
- + - - - - - + - - - - -
diff --git a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_fasi.ascx.cs b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_fasi.ascx.cs index c4462d8..8d3be91 100644 --- a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_fasi.ascx.cs +++ b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_fasi.ascx.cs @@ -10,6 +10,11 @@ namespace PROJ_ETS.WebUserControls { public partial class mod_fasi : System.Web.UI.UserControl { + /// + /// caricamento pagina + /// + /// + /// protected void Page_Load(object sender, EventArgs e) { } @@ -83,5 +88,37 @@ namespace PROJ_ETS.WebUserControls // update doUpdate(); } + + /// + /// gestione evento richiesta nuovo valore QUANDO NON CI SIANO RECORDS x budget risorse + /// + /// + /// + protected void btnNewBdgtEmpty_Click(object sender, EventArgs e) + { + int idxFase = utils.obj.IntSessionObj("idxFaseDet_sel"); + DataProxy_ProjEts.DP.taBRF.InsertQuery(idxFase, utils.obj.confReadString("codTipoRisorsaStd"), utils.obj.confReadInt("oreBdgtStd") ); + grViewBdgt.DataBind(); + grViewFasi.DataBind(); + } + /// + /// post evento delete + /// + /// + /// + protected void odsBgdt_Deleted(object sender, ObjectDataSourceStatusEventArgs e) + { + doUpdate(); + } + /// + /// post evento update + /// + /// + /// + protected void odsBgdt_Updated(object sender, ObjectDataSourceStatusEventArgs e) + { + doUpdate(); + } + } } \ No newline at end of file diff --git a/PROJ-ETS/PROJ-ETS/bin/ETS_Data.dll b/PROJ-ETS/PROJ-ETS/bin/ETS_Data.dll index f15ee62..44ef0c1 100644 Binary files a/PROJ-ETS/PROJ-ETS/bin/ETS_Data.dll and b/PROJ-ETS/PROJ-ETS/bin/ETS_Data.dll differ diff --git a/PROJ-ETS/PROJ-ETS/bin/PROJ-ETS.dll b/PROJ-ETS/PROJ-ETS/bin/PROJ-ETS.dll index 1eb306a..f2c5be8 100644 Binary files a/PROJ-ETS/PROJ-ETS/bin/PROJ-ETS.dll and b/PROJ-ETS/PROJ-ETS/bin/PROJ-ETS.dll differ