diff --git a/C2P/C2P.csproj b/C2P/C2P.csproj index 7abdf48..9ff24da 100644 --- a/C2P/C2P.csproj +++ b/C2P/C2P.csproj @@ -279,6 +279,7 @@ + @@ -495,6 +496,13 @@ Report.aspx + + RevisionHistory.aspx + ASPXCodeBehind + + + RevisionHistory.aspx + True True diff --git a/C2P/OffersArchive.aspx.cs b/C2P/OffersArchive.aspx.cs index 74dd54a..3f88b64 100644 --- a/C2P/OffersArchive.aspx.cs +++ b/C2P/OffersArchive.aspx.cs @@ -8,20 +8,11 @@ using SteamWare; namespace C2P { - public partial class OffersArchive : System.Web.UI.Page + public partial class OffersArchive : SteamWare.UserPage { protected void Page_Load(object sender, EventArgs e) { } - /// - /// wrapper traduzione - /// - /// - /// - public string traduci(object lemma) - { - return user_std.UtSn.Traduci(lemma.ToString()); - } } } \ No newline at end of file diff --git a/C2P/RepOffers.aspx b/C2P/RepOffers.aspx index 1bc8b60..d138396 100644 --- a/C2P/RepOffers.aspx +++ b/C2P/RepOffers.aspx @@ -8,6 +8,6 @@
- +
diff --git a/C2P/RevisionHistory.aspx b/C2P/RevisionHistory.aspx new file mode 100644 index 0000000..a707b8e --- /dev/null +++ b/C2P/RevisionHistory.aspx @@ -0,0 +1,103 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/FullPage.master" AutoEventWireup="true" CodeBehind="RevisionHistory.aspx.cs" Inherits="C2P.RevisionHistory" %> + + + + + + +
+
+
+
+

<%: traduci("RevisionHistory") %>

+
+
+
+
+ <%:traduci("Open") %> +
+
+ <%:traduci("Duplicate") %> +
+
+ <%:traduci("Simulate") %> +
+
+ <%:traduci("Print") %> +
+
+
+
+ + + <%# traduci("NoRecords") %> + + + + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%: numRecords %> + + + + + + + + + + <%-- + --%> +
+
+
+
+
+
+
diff --git a/C2P/RevisionHistory.aspx.cs b/C2P/RevisionHistory.aspx.cs new file mode 100644 index 0000000..d0337c4 --- /dev/null +++ b/C2P/RevisionHistory.aspx.cs @@ -0,0 +1,322 @@ +using C2P_Data; +using SteamWare; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace C2P +{ + public partial class RevisionHistory : SteamWare.UserPage + { + /// + /// richiesta caricamento tabella (da filtro configurato) + /// + public event EventHandler eh_loadReq; + /// + /// sistema visibilità button... + /// + private void setBtnVisib() + { + string baseCss = "btn btn-"; + if (numSel == 0) + { + baseCss = "btn disabled btn-"; + lbOpen.CssClass = baseCss + "success"; + lbDuplicate.CssClass = baseCss + "warning"; + lbSimulate.CssClass = baseCss + "danger"; + lbPrint.CssClass = baseCss + "info"; + } + else if (numSel == 1) + { + lbOpen.CssClass = baseCss + "success"; + lbDuplicate.CssClass = baseCss + "warning"; + lbSimulate.CssClass = baseCss + "danger"; + lbPrint.CssClass = baseCss + "info"; + + // cerco riga selezionata... + CheckBox chkBox; + for (int i = 0; i < grView.Rows.Count; i++) + { + grView.SelectedIndex = i; + chkBox = ((CheckBox)grView.SelectedRow.FindControl("chkSelect")); + if (chkBox.Checked) + { + QuoteType = grView.SelectedDataKey["QuoteType"].ToString(); + CodQuote = grView.SelectedDataKey["CodQuote"].ToString(); + QuoteRev = grView.SelectedDataKey["QuoteRev"].ToString(); + } + } + } + else + { + lbPrint.CssClass = baseCss + "info"; + baseCss = "btn disabled btn-"; + lbOpen.CssClass = baseCss + "success"; + lbDuplicate.CssClass = baseCss + "warning"; + lbSimulate.CssClass = baseCss + "danger"; + } + } + /// + /// numero offerte selezionate + /// + protected int numSel + { + get + { + return memLayer.ML.IntSessionObj("numOffSel"); + } + set + { + memLayer.ML.setSessionVal("numOffSel", value); + } + } + /// + /// Tipo Quote + /// + protected string QuoteType + { + get + { + return memLayer.ML.StringSessionObj("LastQuoteType"); + } + set + { + memLayer.ML.setSessionVal("LastQuoteType", value); + } + } + /// + /// Codice Quote + /// + protected string CodQuote + { + get + { + return memLayer.ML.StringSessionObj("LastCodQuote"); + } + set + { + memLayer.ML.setSessionVal("LastCodQuote", value); + } + } + /// + /// Revisione + /// + protected string QuoteRev + { + get + { + return memLayer.ML.StringSessionObj("LastQuoteRev"); + } + set + { + memLayer.ML.setSessionVal("LastQuoteRev", value); + } + } + protected void Page_Load(object sender, EventArgs e) + { + + } + /// + /// Calcola css dato valore prezzo offerto vs importi full cost e min price + /// + /// + /// + /// + /// + public string priceVsCost(object _FullCost, object _MinPrice, object _PriceOff) + { + string answ = ""; + double FullCost = 0; + double MinPrice = 0; + double PriceOff = 0; + try + { + FullCost = Convert.ToDouble(_FullCost); + MinPrice = Convert.ToDouble(_MinPrice); + PriceOff = Convert.ToDouble(_PriceOff); + } + catch + { } + if (PriceOff > MinPrice) + { + answ = "allOk"; + } + else if (PriceOff > FullCost) + { + answ = "warnOrange"; + } + else + { + answ = "warnRed"; + } + return answ; + } + /// + /// stringa formattata del numero di record mostrati + /// + public string numRecords + { + get + { + return string.Format("{0} ({1})", grView.Rows.Count, grView.PageSize * (grView.PageCount - 1) + grView.Rows.Count); + } + } + /// + /// seleziona/deseleziona le righe indicate... + /// + /// + /// + protected void btnSelAll_Click(object sender, EventArgs e) + { + // seleziono tutti i valori visibili nel datagrid + CheckBox chkbox = ((CheckBox)sender); + bool isChecked = chkbox.Checked; + if (!isChecked) + { + chkbox.ToolTip = traduci("btnSelAll"); + numSel = 0; + } + else + { + chkbox.ToolTip = traduci("btnDeselAll"); + numSel = grView.Rows.Count; + } + foreach (GridViewRow riga in grView.Rows) + { + ((CheckBox)riga.FindControl("chkSelect")).Checked = isChecked; + } + setBtnVisib(); + } + /// + /// gestione singolo click + /// + /// + /// + protected void btnSel_Click(object sender, EventArgs e) + { + CheckBox chkbox = ((CheckBox)sender); + bool isChecked = chkbox.Checked; + if (isChecked) + { + numSel++; + } + else + { + numSel--; + } + //grView.SelectedIndex = -1; + // fix visibilità buttons + setBtnVisib(); + } /// + /// Apre offerta selezionata! + /// + /// + /// + protected void lbOpen_Click(object sender, EventArgs e) + { + // apro con link nuova offerta! + Response.Redirect(string.Format("Quote?QuoteType={0}&CodQuote={1}&QuoteRev={2}", QuoteType, CodQuote, QuoteRev)); + } + /// + /// duplica offerta selezionata + /// + /// + /// + protected void lbDuplicate_Click(object sender, EventArgs e) + { + // duplica offerta! + DS_Quotes.QuoteListDataTable tab = DtProxy.man.taQL.clone(QuoteType, Convert.ToInt32(CodQuote), Convert.ToInt32(QuoteRev)); + if (tab.Rows.Count > 0) + { + // seleziona l'offerta duplicata! + Response.Redirect(string.Format("Quote?QuoteType={0}&CodQuote={1}&QuoteRev={2}", tab[0].QuoteType, tab[0].CodQuote, tab[0].QuoteRev)); + } + } + /// + /// crea nuova simulazioen da offerta selezionata + /// + /// + /// + protected void lbSimulate_Click(object sender, EventArgs e) + { + + } + /// + /// stampa offerta(e) selezionata(e) + /// + /// + /// + protected void lbPrint_Click(object sender, EventArgs e) + { + // genero un nuovo ticket x la richiesta di stampa... + int ticket = 0; + try + { + ticket = DtProxy.man.taRPT.reserveTicket("SchedaCosto", user_std.UtSn.userNameAD)[0].Ticket; + } + catch + { + ticket = 0; + } + bool togliSegnaposto = true; + if (ticket > 0) + { + //DS_Quotes.QuoteFull_QRow rigaQuote; + // salvo i valori selezionati con il ticket corrente (eliminando reservation...) + foreach (GridViewRow riga in grView.Rows) + { + if (((CheckBox)riga.FindControl("chkSelect")).Checked) + { + grView.SelectedIndex = riga.DataItemIndex; + // ricavo dati della riga x inserire in elenco richieste stampa... + DtProxy.man.taRPT.insertNew(ticket, "SchedaCosto", string.Format("QuoteType={0}&CodQuote={1}&QuoteRev={2}", grView.SelectedDataKey["QuoteType"], grView.SelectedDataKey["CodQuote"], grView.SelectedDataKey["QuoteRev"]), user_std.UtSn.userNameAD, DateTime.Now, togliSegnaposto); + togliSegnaposto = false; + } + } + // rimando a pagina di stampa reports... + Response.Redirect(string.Format("RepOffers?ticket={0}", ticket)); + } + } + /// + /// salvo e vado a dettaglio! + /// + /// + /// + protected void grView_SelectedIndexChanged(object sender, EventArgs e) + { + // verifico parametri riga scelta + QuoteType = grView.SelectedDataKey["QuoteType"].ToString(); + CodQuote = grView.SelectedDataKey["CodQuote"].ToString(); + QuoteRev = grView.SelectedDataKey["QuoteRev"].ToString(); + // verifico tipo di caricamento... + string _comando = ""; + if (SteamWare.memLayer.ML.isInSessionObject("nextObjCommand")) + { + _comando = SteamWare.memLayer.ML.StringSessionObj("nextObjCommand"); + SteamWare.memLayer.ML.emptySessionVal("nextObjCommand"); + } + switch (_comando) + { + case "load": + memLayer.ML.setSessionVal("QuoteType", QuoteType); + memLayer.ML.setSessionVal("CodQuote", CodQuote); + memLayer.ML.setSessionVal("QuoteRev", QuoteRev); + // sollevo evento + if (eh_loadReq != null) + { + eh_loadReq(this, new EventArgs()); + } + break; + case "toDetail": + // rimando a dettaglio! + Response.Redirect(string.Format("QuoteDet?QuoteType={0}&CodQuote={1}&QuoteRev={2}", QuoteType, CodQuote, QuoteRev)); + break; + default: + break; + } + } + } +} \ No newline at end of file diff --git a/C2P/RevisionHistory.aspx.designer.cs b/C2P/RevisionHistory.aspx.designer.cs new file mode 100644 index 0000000..fb7ddbc --- /dev/null +++ b/C2P/RevisionHistory.aspx.designer.cs @@ -0,0 +1,78 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace C2P { + + + public partial class RevisionHistory { + + /// + /// lbOpen control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton lbOpen; + + /// + /// lbDuplicate control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton lbDuplicate; + + /// + /// lbSimulate control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton lbSimulate; + + /// + /// lbPrint control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton lbPrint; + + /// + /// grView control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.GridView grView; + + /// + /// lblResults control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblResults; + + /// + /// odsQuotes control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource odsQuotes; + } +} diff --git a/C2P/bin/C2P.dll b/C2P/bin/C2P.dll index c917bcf..e0468d3 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 788955f..e9432e9 100644 Binary files a/C2P/bin/C2P_Data.dll and b/C2P/bin/C2P_Data.dll differ diff --git a/C2P/bin/SteamWare.dll b/C2P/bin/SteamWare.dll index 8f9bdd1..8f034bf 100644 Binary files a/C2P/bin/SteamWare.dll and b/C2P/bin/SteamWare.dll differ diff --git a/C2P_Data/DS_Quotes.Designer.cs b/C2P_Data/DS_Quotes.Designer.cs index 1402fb6..29cd89d 100644 --- a/C2P_Data/DS_Quotes.Designer.cs +++ b/C2P_Data/DS_Quotes.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.34011 +// Runtime Version:4.0.30319.34014 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -12271,7 +12271,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[11]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[12]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "dbo.stp_QL_fullDataAll"; @@ -12310,67 +12310,74 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DateMax", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, 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_Insert"; + this._commandCollection[5].CommandText = "dbo.stp_QLF_revHist"; 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("@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("@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("@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] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[6].Connection = this.Connection; - this._commandCollection[6].CommandText = "dbo.stp_QuoteFull_Q_update"; + this._commandCollection[6].CommandText = "dbo.stp_QLF_Insert"; 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("@PriceOff", global::System.Data.SqlDbType.Decimal, 5, global::System.Data.ParameterDirection.Input, 9, 6, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6].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[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_prt_dsQuoteFull_Q_Data"; + this._commandCollection[7].CommandText = "dbo.stp_QuoteFull_Q_update"; 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("@Ticket", 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("@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("@PriceOff", global::System.Data.SqlDbType.Decimal, 5, global::System.Data.ParameterDirection.Input, 9, 6, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[8] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[8].Connection = this.Connection; - this._commandCollection[8].CommandText = "dbo.stp_QLF_UpdCosts"; + this._commandCollection[8].CommandText = "dbo.stp_prt_dsQuoteFull_Q_Data"; this._commandCollection[8].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[8].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[8].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[8].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[8].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[8].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[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Ticket", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[9] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[9].Connection = this.Connection; - this._commandCollection[9].CommandText = "dbo.stp_QLF_UpdHead"; + this._commandCollection[9].CommandText = "dbo.stp_QLF_UpdCosts"; this._commandCollection[9].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[9].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[9].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[9].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[9].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[9].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[9].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[9].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[9].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[9].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[9].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[9].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[9].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[9].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[10] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[10].Connection = this.Connection; - this._commandCollection[10].CommandText = "dbo.stp_QLF_UpdQState"; + this._commandCollection[10].CommandText = "dbo.stp_QLF_UpdHead"; this._commandCollection[10].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[10].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[10].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[10].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[10].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[10].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[10].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[10].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[10].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[10].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[10].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[10].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[10].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[10].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[11] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[11].Connection = this.Connection; + this._commandCollection[11].CommandText = "dbo.stp_QLF_UpdQState"; + this._commandCollection[11].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[11].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[11].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[11].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[11].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[11].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()] @@ -12511,7 +12518,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")] [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) { + public virtual DS_Quotes.QuoteFull_QDataTable getRevHist(string QuoteType, global::System.Nullable CodQuote) { this.Adapter.SelectCommand = this.CommandCollection[5]; if ((QuoteType == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; @@ -12519,6 +12526,29 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas else { this.Adapter.SelectCommand.Parameters[1].Value = ((string)(QuoteType)); } + if ((CodQuote.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[2].Value = ((long)(CodQuote.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; + } + 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 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[6]; + 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; } @@ -12577,7 +12607,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 repOffersByTicket(global::System.Nullable Ticket) { - this.Adapter.SelectCommand = this.CommandCollection[7]; + this.Adapter.SelectCommand = this.CommandCollection[8]; if ((Ticket.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(Ticket.Value)); } @@ -12594,7 +12624,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 updateCosts(string Original_QuoteType, global::System.Nullable Original_CodQuote, global::System.Nullable Original_QuoteRev, global::System.Nullable PriceOff) { - this.Adapter.SelectCommand = this.CommandCollection[8]; + this.Adapter.SelectCommand = this.CommandCollection[9]; if ((Original_QuoteType == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } @@ -12629,7 +12659,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[9]; + this.Adapter.SelectCommand = this.CommandCollection[10]; if ((Original_QuoteType == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } @@ -12706,7 +12736,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[10]; + this.Adapter.SelectCommand = this.CommandCollection[11]; if ((Original_QuoteType == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } @@ -12740,7 +12770,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[6]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[7]; 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 363e1ee..5ad769d 100644 --- a/C2P_Data/DS_Quotes.xsd +++ b/C2P_Data/DS_Quotes.xsd @@ -900,6 +900,18 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas + + + + dbo.stp_QLF_revHist + + + + + + + + @@ -1003,7 +1015,7 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas - + @@ -1087,7 +1099,7 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas - + @@ -1123,7 +1135,7 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas - + @@ -1148,7 +1160,7 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas - + @@ -1228,7 +1240,7 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas - + @@ -1265,7 +1277,7 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas - + @@ -1335,7 +1347,7 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas - + @@ -1612,11 +1624,11 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas - - - - - + + + + + \ No newline at end of file diff --git a/VersGen/C2P.cs b/VersGen/C2P.cs index 680ede3..87ac705 100644 --- a/VersGen/C2P.cs +++ b/VersGen/C2P.cs @@ -5,7 +5,7 @@ using System.Reflection; -[assembly: AssemblyVersion("0.6.56.149")] -[assembly: AssemblyFileVersion("0.6.56.149")] +[assembly: AssemblyVersion("0.6.57.149")] +[assembly: AssemblyFileVersion("0.6.57.149")] [assembly: AssemblyCopyright("Proxima & Steamware © 2013-2014")] [assembly: AssemblyCompany("Steamware")] diff --git a/VersGen/C2P.tt b/VersGen/C2P.tt index 1abe4e4..fb68ebc 100644 --- a/VersGen/C2P.tt +++ b/VersGen/C2P.tt @@ -6,8 +6,8 @@ using System.Reflection; -[assembly: AssemblyVersion("0.6.56.<#= this.RevisionNumber #>")] -[assembly: AssemblyFileVersion("0.6.56.<#= this.RevisionNumber #>")] +[assembly: AssemblyVersion("0.6.57.<#= this.RevisionNumber #>")] +[assembly: AssemblyFileVersion("0.6.57.<#= this.RevisionNumber #>")] [assembly: AssemblyCopyright("Proxima & Steamware © 2013-<#= DateTime.Now.Year #>")] [assembly: AssemblyCompany("Steamware")] <#+