diff --git a/C2P/Properties/AssemblyInfo.cs b/C2P/Properties/AssemblyInfo.cs index f7b10df..d81984a 100644 --- a/C2P/Properties/AssemblyInfo.cs +++ b/C2P/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.5.30.0")] -[assembly: AssemblyFileVersion("0.5.30.0")] +[assembly: AssemblyVersion("0.5.32.0")] +[assembly: AssemblyFileVersion("0.5.32.0")] diff --git a/C2P/WebUserControls/mod_newQuote.ascx.cs b/C2P/WebUserControls/mod_newQuote.ascx.cs index e5084bb..0aab655 100644 --- a/C2P/WebUserControls/mod_newQuote.ascx.cs +++ b/C2P/WebUserControls/mod_newQuote.ascx.cs @@ -97,6 +97,40 @@ namespace C2P.WebUserControls } } /// + /// costo materia prima... + /// + protected decimal RawMatCost + { + get + { + decimal answ = 0; + try + { + answ += Convert.ToDecimal(txtBaseAl.Text.Replace(".", ",")); // !!!FARE verifica con gestione da internationalization + } + catch + { } + return answ; + } + } + /// + /// totale base extra inserito... + /// + protected decimal RawMatExtraCost + { + get + { + decimal answ = 0; + try + { + answ += Convert.ToDecimal(txtExtraLega.Text.Replace(".", ",")); // !!!FARE verifica con gestione da internationalization + } + catch + { } + return answ; + } + } + /// /// totale base lega + extra inserito... /// protected decimal totale @@ -106,13 +140,7 @@ namespace C2P.WebUserControls decimal answ = 0; try { - answ += Convert.ToDecimal(txtBaseAl.Text.Replace(".", ",")); // !!!FARE verifica con gestioen da internationalization - } - catch - { } - try - { - answ += Convert.ToDecimal(txtExtraLega.Text.Replace(".", ",")); // !!!FARE verifica con gestioen da internationalization + answ = RawMatCost + RawMatExtraCost; } catch { } @@ -163,28 +191,28 @@ namespace C2P.WebUserControls protected void btnNew_Click(object sender, EventArgs e) { // se ho tutti i dati creo nuovo record! - decimal RawMatCost = 0; - decimal RawMatExtraCost = 0; int batchQty = 0; try - { - RawMatCost = Convert.ToDecimal(txtBaseAl.Text.Trim()); - } - catch - { } - try - { - RawMatExtraCost = Convert.ToDecimal(txtExtraLega.Text.Trim()); - } - catch - { } - try { batchQty = Convert.ToInt32(txtLotto.Text.Trim()); } catch { } - C2P_Data.DtProxy.man.taQL.stp_QL_insNew("Q", acCliente.valore, acArticolo.valore, ddlLega.SelectedValue, RawMatCost, RawMatExtraCost, batchQty, ddlConsegna.SelectedValue, txtNote.Text.Trim()); + // tento insert! + try + { + DS_Quotes.QuoteListDataTable tabRes = DtProxy.man.taQL.insNew("Q", acCliente.valore, acArticolo.valore, ddlLega.SelectedValue, RawMatCost, RawMatExtraCost, batchQty, ddlConsegna.SelectedValue, txtNote.Text.Trim()); + } + catch (Exception exc) + { + logger.lg.scriviLog(String.Format("Errore in creazione nuova quote: {0}{1}", Environment.NewLine, exc)); + } + // sollevo evento + if (eh_newQuote != null) + { + eh_newQuote(this, new EventArgs()); + } + } protected void txtLotto_TextChanged(object sender, EventArgs e) @@ -246,6 +274,13 @@ namespace C2P.WebUserControls /// /// protected void btnReset_Click(object sender, EventArgs e) + { + fullReset(); + } + /// + /// resetta in toto l'offerta + /// + private void fullReset() { acCliente.selezione = ""; acCliente.valore = ""; diff --git a/C2P/bin/C2P.dll b/C2P/bin/C2P.dll index 88d3be5..f0079df 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 5a729d6..e448adc 100644 Binary files a/C2P/bin/C2P_Data.dll and b/C2P/bin/C2P_Data.dll differ diff --git a/C2P/bin/C2P_Data.pdb b/C2P/bin/C2P_Data.pdb index a7b1b7a..8929ea9 100644 Binary files a/C2P/bin/C2P_Data.pdb and b/C2P/bin/C2P_Data.pdb differ diff --git a/C2P/bin/SteamWare.dll b/C2P/bin/SteamWare.dll index ba4dabe..fda5839 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 56a7c14..3e73b5d 100644 --- a/C2P_Data/DS_Quotes.Designer.cs +++ b/C2P_Data/DS_Quotes.Designer.cs @@ -8390,6 +8390,71 @@ SELECT QuoteType, CodQuote, QuoteRev, CodClient, CodItem, CodItemGroup, RawMat, 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.QuoteListDataTable insNew(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[2]; + 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.QuoteListDataTable dataTable = new DS_Quotes.QuoteListDataTable(); + 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")] @@ -8866,82 +8931,6 @@ SELECT QuoteType, CodQuote, QuoteRev, CodClient, CodItem, CodItemGroup, RawMat, return this.Update(Original_QuoteType, Original_CodQuote, Original_QuoteRev, CodClient, CodItem, CodItemGroup, RawMat, UnitWeight, BatchQty, CodInco, Note, PriceOff, OrdDate, OrdNum, OrdRow, OrdPrice, Original_QuoteType, Original_CodQuote, Original_QuoteRev, Original_CodClient, Original_CodItem, Original_CodItemGroup, Original_RawMat, Original_UnitWeight, Original_BatchQty, Original_CodInco, Original_KeyAM, Original_Note, Original_PriceOff, Original_OrdDate, Original_OrdNum, Original_OrdRow, Original_OrdPrice); } - [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 stp_QL_insNew(string QuoteType, string CodClient, string CodItem, string RawMat, global::System.Nullable RawMatCost, global::System.Nullable RawMatExtraCost, global::System.Nullable BatchQty, string CodInco, string Note) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[2]; - if ((QuoteType == null)) { - command.Parameters[1].Value = global::System.DBNull.Value; - } - else { - command.Parameters[1].Value = ((string)(QuoteType)); - } - if ((CodClient == null)) { - command.Parameters[2].Value = global::System.DBNull.Value; - } - else { - command.Parameters[2].Value = ((string)(CodClient)); - } - if ((CodItem == null)) { - command.Parameters[3].Value = global::System.DBNull.Value; - } - else { - command.Parameters[3].Value = ((string)(CodItem)); - } - if ((RawMat == null)) { - command.Parameters[4].Value = global::System.DBNull.Value; - } - else { - command.Parameters[4].Value = ((string)(RawMat)); - } - if ((RawMatCost.HasValue == true)) { - command.Parameters[5].Value = ((decimal)(RawMatCost.Value)); - } - else { - command.Parameters[5].Value = global::System.DBNull.Value; - } - if ((RawMatExtraCost.HasValue == true)) { - command.Parameters[6].Value = ((decimal)(RawMatExtraCost.Value)); - } - else { - command.Parameters[6].Value = global::System.DBNull.Value; - } - if ((BatchQty.HasValue == true)) { - command.Parameters[7].Value = ((int)(BatchQty.Value)); - } - else { - command.Parameters[7].Value = global::System.DBNull.Value; - } - if ((CodInco == null)) { - command.Parameters[8].Value = global::System.DBNull.Value; - } - else { - command.Parameters[8].Value = ((string)(CodInco)); - } - if ((Note == null)) { - command.Parameters[9].Value = global::System.DBNull.Value; - } - else { - command.Parameters[9].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)) { - command.Connection.Open(); - } - int returnValue; - try { - returnValue = command.ExecuteNonQuery(); - } - finally { - if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { - command.Connection.Close(); - } - } - return returnValue; - } - [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")] diff --git a/C2P_Data/DS_Quotes.xsd b/C2P_Data/DS_Quotes.xsd index 9e472b7..09f9d96 100644 --- a/C2P_Data/DS_Quotes.xsd +++ b/C2P_Data/DS_Quotes.xsd @@ -142,7 +142,7 @@ SELECT QuoteType, CodQuote, QuoteRev, CodClient, CodItem, CodItemGroup, RawMat, - + dbo.stp_QL_insNew @@ -868,7 +868,7 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas - + @@ -951,7 +951,7 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas - + @@ -987,7 +987,7 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas - + @@ -1012,7 +1012,7 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas - + @@ -1092,7 +1092,7 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas - + @@ -1129,7 +1129,7 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas - + @@ -1199,7 +1199,7 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas - + @@ -1475,11 +1475,11 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas - - - - - + + + + + \ No newline at end of file diff --git a/C2P_Data/DS_Quotes.xss b/C2P_Data/DS_Quotes.xss index c8b9c41..96f81f3 100644 --- a/C2P_Data/DS_Quotes.xss +++ b/C2P_Data/DS_Quotes.xss @@ -6,7 +6,7 @@ --> - +