diff --git a/C2P/Quote.aspx b/C2P/Quote.aspx index 8b41f16..98f9643 100644 --- a/C2P/Quote.aspx +++ b/C2P/Quote.aspx @@ -1,9 +1,5 @@ <%@ Page Title="" Language="C#" MasterPageFile="~/FullPage.Master" AutoEventWireup="true" CodeBehind="Quote.aspx.cs" Inherits="C2P.Quote" %> - - <%@ Register Src="~/WebUserControls/mod_QuoteDet.ascx" TagName="mod_QuoteDet" TagPrefix="uc1" %> - - diff --git a/C2P/WebUserControls/mod_Q_Header.ascx b/C2P/WebUserControls/mod_Q_Header.ascx index e1aa001..567f647 100644 --- a/C2P/WebUserControls/mod_Q_Header.ascx +++ b/C2P/WebUserControls/mod_Q_Header.ascx @@ -104,8 +104,79 @@ + +
+
+ + + <%----%> +
+
+ + + <%----%> +
+
+
+
+ + + <%----%> +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ + + <%----%> +
+
+ + +
+
+
+
+ + +
+
+
+
+
+  <%: traduci("Insert") %> +
+
+  <%: traduci("Cancel") %> +
+
+
+
- + + + + + + + + + + + + diff --git a/C2P/WebUserControls/mod_Q_Header.ascx.cs b/C2P/WebUserControls/mod_Q_Header.ascx.cs index 1a8a6b1..760d32f 100644 --- a/C2P/WebUserControls/mod_Q_Header.ascx.cs +++ b/C2P/WebUserControls/mod_Q_Header.ascx.cs @@ -28,6 +28,13 @@ namespace C2P.WebUserControls frmView.ChangeMode(FormViewMode.ReadOnly); } } + /// + /// imposta modalità insert... + /// + public void setInsertMode() + { + frmView.ChangeMode(FormViewMode.Insert); + } protected void odsQuotes_Updated(object sender, ObjectDataSourceStatusEventArgs e) { diff --git a/C2P/WebUserControls/mod_QuoteDet.ascx b/C2P/WebUserControls/mod_QuoteDet.ascx index b78a209..fbdbb3a 100644 --- a/C2P/WebUserControls/mod_QuoteDet.ascx +++ b/C2P/WebUserControls/mod_QuoteDet.ascx @@ -8,8 +8,6 @@ { %> <%} %> - -
diff --git a/C2P/WebUserControls/mod_QuoteDet.ascx.cs b/C2P/WebUserControls/mod_QuoteDet.ascx.cs index ac8b4cf..80cd4b7 100644 --- a/C2P/WebUserControls/mod_QuoteDet.ascx.cs +++ b/C2P/WebUserControls/mod_QuoteDet.ascx.cs @@ -95,6 +95,11 @@ namespace C2P.WebUserControls memLayer.ML.setSessionVal("prevReqQD", value); } } + /// + /// procedura caricamento apgina... + /// + /// + /// protected void Page_Load(object sender, EventArgs e) { // recupero valori della chaive della quote da URL... @@ -207,58 +212,85 @@ namespace C2P.WebUserControls /// private void setModVisibility(string req) { - switch (req) - { - case "Costs": - mod_Q_Costs1.Visible = true; - mod_Q_ExtrPar1.Visible = false; - mod_Q_Header1.Visible = false; - mod_Q_PackPar1.Visible = false; - break; - case "ExtrPar": - mod_Q_Costs1.Visible = false; - mod_Q_ExtrPar1.Visible = true; - mod_Q_Header1.Visible = false; - mod_Q_PackPar1.Visible = false; - break; - case "Header": - if (prevReq == req) mod_Q_Header1.toggleMode(); - mod_Q_Costs1.Visible = false; - mod_Q_ExtrPar1.Visible = false; - mod_Q_Header1.Visible = true; - mod_Q_PackPar1.Visible = false; - break; - case "PackPar": - mod_Q_Costs1.Visible = false; - mod_Q_ExtrPar1.Visible = false; - mod_Q_Header1.Visible = false; - mod_Q_PackPar1.Visible = true; - break; - case "Quote": - if (prevReq == req) mod_Q_Quot1.toggleMode(); - break; - default: - mod_Q_Costs1.Visible = false; - mod_Q_ExtrPar1.Visible = false; - mod_Q_Header1.Visible = true; - mod_Q_PackPar1.Visible = false; - break; - } - prevReq = req; - // controllo SE sia visibile il pulsante crea offerta (netMargin > 0... DA VERIFICARE) bool okCreate = false; - DS_Quotes.QuoteFull_QRow riga; - try + bool showEdit = false; + if (QuoteType == "" || CodQuote == "" || QuoteRev == "") + // se NON HO dati x una richiesta specifica vado in modalità INSERT.. { - riga = DtProxy.man.taQFQ.getByKey(QuoteType, Convert.ToInt32(CodQuote), Convert.ToInt32(QuoteRev), "N")[0]; - if (riga.NetMar > 0 || riga.PriceOff > 0) - { - okCreate = true; - } + // mostro solo controllo header in modalità INSERT + mod_Q_Header1.setInsertMode(); + mod_Q_Costs1.Visible = false; + mod_Q_ExtrPar1.Visible = false; + mod_Q_Header1.Visible = true; + mod_Q_PackPar1.Visible = false; } - catch - { } + else + // altrimenti gestione ordinaria di editing + { + switch (req) + { + case "Costs": + mod_Q_Costs1.Visible = true; + mod_Q_ExtrPar1.Visible = false; + mod_Q_Header1.Visible = false; + mod_Q_PackPar1.Visible = false; + break; + case "ExtrPar": + mod_Q_Costs1.Visible = false; + mod_Q_ExtrPar1.Visible = true; + mod_Q_Header1.Visible = false; + mod_Q_PackPar1.Visible = false; + break; + case "Header": + if (prevReq == req) mod_Q_Header1.toggleMode(); + mod_Q_Costs1.Visible = false; + mod_Q_ExtrPar1.Visible = false; + mod_Q_Header1.Visible = true; + mod_Q_PackPar1.Visible = false; + break; + case "PackPar": + mod_Q_Costs1.Visible = false; + mod_Q_ExtrPar1.Visible = false; + mod_Q_Header1.Visible = false; + mod_Q_PackPar1.Visible = true; + break; + case "Quote": + if (prevReq == req) mod_Q_Quot1.toggleMode(); + break; + default: + mod_Q_Costs1.Visible = false; + mod_Q_ExtrPar1.Visible = false; + mod_Q_Header1.Visible = true; + mod_Q_PackPar1.Visible = false; + break; + } + prevReq = req; + // controllo SE sia visibile il pulsante crea offerta (netMargin > 0... DA VERIFICARE) + DS_Quotes.QuoteFull_QRow riga; + try + { + riga = DtProxy.man.taQFQ.getByKey(QuoteType, Convert.ToInt32(CodQuote), Convert.ToInt32(QuoteRev), "N")[0]; + if (riga.NetMar > 0 || riga.PriceOff > 0) + { + okCreate = true; + } + } + catch + { } + showEdit = true; + } + // fix visibilità button creazione offerta lbCreateOffer.Visible = okCreate; + // fix altri button x edit.. + lbChkStandard.Visible = showEdit; + if (!showEdit) + { + lbCosts.CssClass = "btn btn-default disabled"; + lbExtrPar.CssClass = "btn btn-default disabled"; + lbHeader.CssClass = "btn btn-default disabled"; + lbPackPar.CssClass = "btn btn-default disabled"; + lbQuotation.CssClass = "btn btn-default disabled"; + } } /// /// sistema visibilità buttons x cambio stato @@ -293,6 +325,10 @@ namespace C2P.WebUserControls btnGetPdf.Visible = true; break; default: + divStato00.Visible = false; + divStato10.Visible = false; + divStato20.Visible = false; + btnGetPdf.Visible = false; break; } } @@ -366,5 +402,6 @@ namespace C2P.WebUserControls return answ; } } + } } \ No newline at end of file diff --git a/C2P/bin/C2P.dll b/C2P/bin/C2P.dll index 1ba0651..db715a6 100644 Binary files a/C2P/bin/C2P.dll and b/C2P/bin/C2P.dll differ diff --git a/C2P/bin/C2P_Data.dll b/C2P/bin/C2P_Data.dll index f668abb..b704a2f 100644 Binary files a/C2P/bin/C2P_Data.dll and b/C2P/bin/C2P_Data.dll differ diff --git a/C2P_Data/DS_Quotes.Designer.cs b/C2P_Data/DS_Quotes.Designer.cs index 7afad30..365469c 100644 --- a/C2P_Data/DS_Quotes.Designer.cs +++ b/C2P_Data/DS_Quotes.Designer.cs @@ -12197,7 +12197,7 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[7]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[8]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "dbo.stp_QL_fullDataAll"; @@ -12224,47 +12224,61 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataMax", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, 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_QuoteFull_Q_update"; + this._commandCollection[3].CommandText = "dbo.stp_QLF_Insert"; 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("@Original_QuoteType", global::System.Data.SqlDbType.Char, 1, 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_CodQuote", global::System.Data.SqlDbType.BigInt, 8, global::System.Data.ParameterDirection.Input, 19, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_QuoteRev", 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("@PriceOff", global::System.Data.SqlDbType.Decimal, 5, global::System.Data.ParameterDirection.Input, 9, 6, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@QuoteType", global::System.Data.SqlDbType.Char, 1, 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("@CodClient", 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("@CodItem", 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("@RawMat", 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("@RawMatCost", 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("@RawMatExtraCost", 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("@BatchQty", 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("@CodInco", global::System.Data.SqlDbType.NVarChar, 5, 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("@Note", global::System.Data.SqlDbType.NVarChar, 2500, global::System.Data.ParameterDirection.Input, 0, 0, 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_QLF_UpdCosts"; + this._commandCollection[4].CommandText = "dbo.stp_QuoteFull_Q_update"; this._commandCollection[4].CommandType = global::System.Data.CommandType.StoredProcedure; 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("@Original_QuoteType", global::System.Data.SqlDbType.Char, 1, 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("@Original_CodQuote", global::System.Data.SqlDbType.BigInt, 8, global::System.Data.ParameterDirection.Input, 19, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_QuoteRev", 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("@PriceOff", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 6, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PriceOff", global::System.Data.SqlDbType.Decimal, 5, global::System.Data.ParameterDirection.Input, 9, 6, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[5] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[5].Connection = this.Connection; - this._commandCollection[5].CommandText = "dbo.stp_QLF_UpdHead"; + this._commandCollection[5].CommandText = "dbo.stp_QLF_UpdCosts"; this._commandCollection[5].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[5].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[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_QuoteType", global::System.Data.SqlDbType.Char, 1, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodQuote", global::System.Data.SqlDbType.BigInt, 8, global::System.Data.ParameterDirection.Input, 19, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_QuoteRev", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodClient", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodItem", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RawMat", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RawMatCost", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 6, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RawMatExtraCost", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 6, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BatchQty", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodInco", global::System.Data.SqlDbType.NVarChar, 5, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Note", global::System.Data.SqlDbType.NVarChar, 2500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PriceOff", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 6, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[6] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[6].Connection = this.Connection; - this._commandCollection[6].CommandText = "dbo.stp_QLF_UpdQState"; + this._commandCollection[6].CommandText = "dbo.stp_QLF_UpdHead"; this._commandCollection[6].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[6].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[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_QuoteType", global::System.Data.SqlDbType.Char, 1, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodQuote", global::System.Data.SqlDbType.BigInt, 8, global::System.Data.ParameterDirection.Input, 19, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_QuoteRev", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxQState", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodClient", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodItem", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RawMat", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RawMatCost", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 6, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RawMatExtraCost", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 6, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BatchQty", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodInco", global::System.Data.SqlDbType.NVarChar, 5, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Note", global::System.Data.SqlDbType.NVarChar, 2500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[7].Connection = this.Connection; + this._commandCollection[7].CommandText = "dbo.stp_QLF_UpdQState"; + this._commandCollection[7].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[7].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[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_QuoteType", global::System.Data.SqlDbType.Char, 1, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodQuote", global::System.Data.SqlDbType.BigInt, 8, global::System.Data.ParameterDirection.Input, 19, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_QuoteRev", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxQState", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -12367,12 +12381,77 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas return dataTable; } + [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.Select, false)] + public virtual DS_Quotes.QuoteFull_QDataTable insertNew(string QuoteType, string CodClient, string CodItem, string RawMat, global::System.Nullable RawMatCost, global::System.Nullable RawMatExtraCost, global::System.Nullable BatchQty, string CodInco, string Note) { + this.Adapter.SelectCommand = this.CommandCollection[3]; + if ((QuoteType == null)) { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(QuoteType)); + } + if ((CodClient == null)) { + this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[2].Value = ((string)(CodClient)); + } + if ((CodItem == null)) { + this.Adapter.SelectCommand.Parameters[3].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[3].Value = ((string)(CodItem)); + } + if ((RawMat == null)) { + this.Adapter.SelectCommand.Parameters[4].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[4].Value = ((string)(RawMat)); + } + if ((RawMatCost.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[5].Value = ((decimal)(RawMatCost.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[5].Value = global::System.DBNull.Value; + } + if ((RawMatExtraCost.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[6].Value = ((decimal)(RawMatExtraCost.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[6].Value = global::System.DBNull.Value; + } + if ((BatchQty.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[7].Value = ((int)(BatchQty.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[7].Value = global::System.DBNull.Value; + } + if ((CodInco == null)) { + this.Adapter.SelectCommand.Parameters[8].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[8].Value = ((string)(CodInco)); + } + if ((Note == null)) { + this.Adapter.SelectCommand.Parameters[9].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[9].Value = ((string)(Note)); + } + DS_Quotes.QuoteFull_QDataTable dataTable = new DS_Quotes.QuoteFull_QDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + [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.Select, false)] public virtual DS_Quotes.QuoteFull_QDataTable updateCosts(string Original_QuoteType, global::System.Nullable Original_CodQuote, global::System.Nullable Original_QuoteRev, global::System.Nullable PriceOff) { - this.Adapter.SelectCommand = this.CommandCollection[4]; + this.Adapter.SelectCommand = this.CommandCollection[5]; if ((Original_QuoteType == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } @@ -12407,7 +12486,7 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual DS_Quotes.QuoteFull_QDataTable updateHeaders(string Original_QuoteType, global::System.Nullable Original_CodQuote, global::System.Nullable Original_QuoteRev, string CodClient, string CodItem, string RawMat, global::System.Nullable RawMatCost, global::System.Nullable RawMatExtraCost, global::System.Nullable BatchQty, string CodInco, string Note) { - this.Adapter.SelectCommand = this.CommandCollection[5]; + this.Adapter.SelectCommand = this.CommandCollection[6]; if ((Original_QuoteType == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } @@ -12484,7 +12563,7 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual DS_Quotes.QuoteFull_QDataTable updateQState(string Original_QuoteType, global::System.Nullable Original_CodQuote, global::System.Nullable Original_QuoteRev, global::System.Nullable IdxQState) { - this.Adapter.SelectCommand = this.CommandCollection[6]; + this.Adapter.SelectCommand = this.CommandCollection[7]; if ((Original_QuoteType == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } @@ -12518,7 +12597,7 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int QuoteFull_Q_update(string Original_QuoteType, global::System.Nullable Original_CodQuote, global::System.Nullable Original_QuoteRev, global::System.Nullable PriceOff) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[3]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[4]; if ((Original_QuoteType == null)) { command.Parameters[1].Value = global::System.DBNull.Value; } diff --git a/C2P_Data/DS_Quotes.xsd b/C2P_Data/DS_Quotes.xsd index 076a8f5..234959c 100644 --- a/C2P_Data/DS_Quotes.xsd +++ b/C2P_Data/DS_Quotes.xsd @@ -852,6 +852,25 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas + + + + dbo.stp_QLF_Insert + + + + + + + + + + + + + + + @@ -925,7 +944,7 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas - + @@ -1009,7 +1028,7 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas - + @@ -1045,7 +1064,7 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas - + @@ -1070,7 +1089,7 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas - + @@ -1150,7 +1169,7 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas - + @@ -1187,7 +1206,7 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas - + @@ -1257,7 +1276,7 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas - + @@ -1534,11 +1553,11 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas - - - - - + + + + + \ No newline at end of file diff --git a/C2P_Data/bin/Release/C2P_Data.dll b/C2P_Data/bin/Release/C2P_Data.dll index f668abb..b704a2f 100644 Binary files a/C2P_Data/bin/Release/C2P_Data.dll and b/C2P_Data/bin/Release/C2P_Data.dll differ diff --git a/VersGen/C2P.cs b/VersGen/C2P.cs index 6678f34..b360b59 100644 --- a/VersGen/C2P.cs +++ b/VersGen/C2P.cs @@ -5,7 +5,7 @@ using System.Reflection; -[assembly: AssemblyVersion("0.6.46.136")] -[assembly: AssemblyFileVersion("0.6.46.136")] +[assembly: AssemblyVersion("0.6.47.136")] +[assembly: AssemblyFileVersion("0.6.47.136")] [assembly: AssemblyCopyright("Proxima & Steamware © 2013-2014")] [assembly: AssemblyCompany("Steamware")] diff --git a/VersGen/C2P.tt b/VersGen/C2P.tt index 127e823..82dabda 100644 --- a/VersGen/C2P.tt +++ b/VersGen/C2P.tt @@ -6,8 +6,8 @@ using System.Reflection; -[assembly: AssemblyVersion("0.6.46.<#= this.RevisionNumber #>")] -[assembly: AssemblyFileVersion("0.6.46.<#= this.RevisionNumber #>")] +[assembly: AssemblyVersion("0.6.47.<#= this.RevisionNumber #>")] +[assembly: AssemblyFileVersion("0.6.47.<#= this.RevisionNumber #>")] [assembly: AssemblyCopyright("Proxima & Steamware © 2013-<#= DateTime.Now.Year #>")] [assembly: AssemblyCompany("Steamware")] <#+