diff --git a/C2P.sln b/C2P.sln
index da921b8..d0260e5 100644
--- a/C2P.sln
+++ b/C2P.sln
@@ -14,7 +14,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "C2P_Data", "C2P_Data\C2P_Da
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SteamWare", "..\SteamWareLibrary\SteamWare\SteamWare.csproj", "{2872DCFE-8B46-43B2-BAA0-842A816A2DD5}"
EndProject
-Project("{00D1A9C2-B5F0-4AF3-8072-F6C62B433612}") = "C2P_Project", "C2P_Project\C2P_Project.sqlproj", "{84DB66E4-9663-47F7-9DD1-3CB562629FF5}"
+Project("{00D1A9C2-B5F0-4AF3-8072-F6C62B433612}") = "C2P_DB", "C2P_Project\C2P_DB.sqlproj", "{84DB66E4-9663-47F7-9DD1-3CB562629FF5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
diff --git a/C2P/WebUserControls/mod_newQuote.ascx.cs b/C2P/WebUserControls/mod_newQuote.ascx.cs
index a125657..9344eb3 100644
--- a/C2P/WebUserControls/mod_newQuote.ascx.cs
+++ b/C2P/WebUserControls/mod_newQuote.ascx.cs
@@ -161,7 +161,29 @@ namespace C2P.WebUserControls
///
protected void btnNew_Click(object sender, EventArgs e)
{
- checkBtnNew();
+ // 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());
}
protected void txtLotto_TextChanged(object sender, EventArgs e)
diff --git a/C2P/bin/C2P.dll b/C2P/bin/C2P.dll
index a70eb9d..95f51c2 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 b033ea5..150809f 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 03fdcc6..d67db79 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 1f2b21b..eb0b2bf 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 b9a824b..ca1be0a 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.34003
+// Runtime Version:4.0.30319.34011
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -8108,7 +8108,7 @@ SELECT QuoteType, CodQuote, QuoteRev, CodClient, CodItem, CodItemGroup, RawMat,
[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[2];
+ this._commandCollection = new global::System.Data.SqlClient.SqlCommand[3];
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[0].Connection = this.Connection;
this._commandCollection[0].CommandText = "SELECT QuoteType, CodQuote, QuoteRev, CodClient, CodItem, CodItemGroup, RawMat, U" +
@@ -8116,12 +8116,26 @@ SELECT QuoteType, CodQuote, QuoteRev, CodClient, CodItem, CodItemGroup, RawMat,
this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[1].Connection = this.Connection;
- this._commandCollection[1].CommandText = "dbo.stp_QL_update";
+ this._commandCollection[1].CommandText = "dbo.stp_QL_insNew";
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("@QuoteType", global::System.Data.SqlDbType.Char, 1, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._commandCollection[1].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[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@QuoteRev", 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("@CodClient", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[1].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[1].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[1].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[1].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[1].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[1].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[1].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[2] = new global::System.Data.SqlClient.SqlCommand();
+ this._commandCollection[2].Connection = this.Connection;
+ this._commandCollection[2].CommandText = "dbo.stp_QL_update";
+ this._commandCollection[2].CommandType = global::System.Data.CommandType.StoredProcedure;
+ this._commandCollection[2].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[2].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[2].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[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@QuoteRev", 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()]
@@ -8490,7 +8504,7 @@ SELECT QuoteType, CodQuote, QuoteRev, CodClient, CodItem, CodItemGroup, RawMat,
[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_update(string QuoteType, global::System.Nullable CodQuote, global::System.Nullable QuoteRev) {
+ 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[1];
if ((QuoteType == null)) {
command.Parameters[1].Value = global::System.DBNull.Value;
@@ -8498,6 +8512,82 @@ SELECT QuoteType, CodQuote, QuoteRev, CodClient, CodItem, CodItemGroup, RawMat,
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")]
+ public virtual int stp_QL_update(string QuoteType, global::System.Nullable CodQuote, global::System.Nullable QuoteRev) {
+ 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 ((CodQuote.HasValue == true)) {
command.Parameters[2].Value = ((long)(CodQuote.Value));
}
diff --git a/C2P_Data/DS_Quotes.xsd b/C2P_Data/DS_Quotes.xsd
index 9eaab66..09449b1 100644
--- a/C2P_Data/DS_Quotes.xsd
+++ b/C2P_Data/DS_Quotes.xsd
@@ -102,7 +102,26 @@ SELECT QuoteType, CodQuote, QuoteRev, CodClient, CodItem, CodItemGroup, RawMat,
-
+
+
+
+ dbo.stp_QL_insNew
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
dbo.stp_QL_update
diff --git a/C2P_Data/DS_Quotes.xss b/C2P_Data/DS_Quotes.xss
index 4d698f5..07b596b 100644
--- a/C2P_Data/DS_Quotes.xss
+++ b/C2P_Data/DS_Quotes.xss
@@ -4,18 +4,18 @@
Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated.
-->
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
462
@@ -27,7 +27,7 @@
-
+
462
@@ -39,7 +39,7 @@
-
+
645
@@ -55,11 +55,11 @@
-
+
562
- 491
+ 510
562
@@ -67,7 +67,7 @@
-