diff --git a/CMS-SC-Data/DS_Applicazione.Designer.cs b/CMS-SC-Data/DS_Applicazione.Designer.cs index 8f73d30..9c339c6 100644 --- a/CMS-SC-Data/DS_Applicazione.Designer.cs +++ b/CMS-SC-Data/DS_Applicazione.Designer.cs @@ -9346,7 +9346,7 @@ SELECT CodScheda, Vers, CodMisura, MinPar, MaxPar, LIVal, LSVal FROM ValidVal WH [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[6]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[7]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT * FROM v_SchemaCollFamMacc"; @@ -9381,15 +9381,22 @@ SELECT CodScheda, Vers, CodMisura, MinPar, MaxPar, LIVal, LSVal FROM ValidVal WH this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@filtByFamMac", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 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_SCFM_updateQuery"; + this._commandCollection[5].CommandText = "dbo.stp_SCFM_insertQuery"; 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("@CodSchedaVers", global::System.Data.SqlDbType.NVarChar, 100, 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("@CodFam", 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("@NumSchede", 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("@Descrizione", 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("@Original_CodSchedaVers", global::System.Data.SqlDbType.NVarChar, 100, 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_CodFam", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 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_SCFM_updateQuery"; + 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("@CodSchedaVers", global::System.Data.SqlDbType.NVarChar, 100, 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("@CodFam", 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("@NumSchede", 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("@Descrizione", 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("@Original_CodSchedaVers", global::System.Data.SqlDbType.NVarChar, 100, 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_CodFam", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -9522,7 +9529,7 @@ SELECT CodScheda, Vers, CodMisura, MinPar, MaxPar, LIVal, LSVal FROM ValidVal WH [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 updateQuery(string CodSchedaVers, string CodFam, global::System.Nullable NumSchede, string Descrizione, string Original_CodSchedaVers, string Original_CodFam) { + public virtual int insertQuery(string CodSchedaVers, string CodFam) { global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[5]; if ((CodSchedaVers == null)) { command.Parameters[1].Value = global::System.DBNull.Value; @@ -9536,6 +9543,40 @@ SELECT CodScheda, Vers, CodMisura, MinPar, MaxPar, LIVal, LSVal FROM ValidVal WH else { command.Parameters[2].Value = ((string)(CodFam)); } + 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 updateQuery(string CodSchedaVers, string CodFam, global::System.Nullable NumSchede, string Descrizione, string Original_CodSchedaVers, string Original_CodFam) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[6]; + if ((CodSchedaVers == null)) { + command.Parameters[1].Value = global::System.DBNull.Value; + } + else { + command.Parameters[1].Value = ((string)(CodSchedaVers)); + } + if ((CodFam == null)) { + command.Parameters[2].Value = global::System.DBNull.Value; + } + else { + command.Parameters[2].Value = ((string)(CodFam)); + } if ((NumSchede.HasValue == true)) { command.Parameters[3].Value = ((int)(NumSchede.Value)); } diff --git a/CMS-SC-Data/DS_Applicazione.xsd b/CMS-SC-Data/DS_Applicazione.xsd index fa8e235..2366dba 100644 --- a/CMS-SC-Data/DS_Applicazione.xsd +++ b/CMS-SC-Data/DS_Applicazione.xsd @@ -889,6 +889,18 @@ SELECT CodScheda, Vers, CodMisura, MinPar, MaxPar, LIVal, LSVal FROM ValidVal WH + + + + dbo.stp_SCFM_insertQuery + + + + + + + + diff --git a/CMS-SC-Data/DtProxy.cs b/CMS-SC-Data/DtProxy.cs index 9d9c155..f800a9b 100644 --- a/CMS-SC-Data/DtProxy.cs +++ b/CMS-SC-Data/DtProxy.cs @@ -28,6 +28,7 @@ namespace CMS_SC_Data taDS = new DS_ApplicazioneTableAdapters.DettSchedaTableAdapter(); taEFM = new DS_ApplicazioneTableAdapters.ElencoFamMaccTableAdapter(); taEM = new DS_ApplicazioneTableAdapters.ElencoMacchineCNTableAdapter(); + taSCFM = new DS_ApplicazioneTableAdapters.SchemaCollFamMaccTableAdapter(); taVV = new DS_ApplicazioneTableAdapters.ValidValTableAdapter(); //taFile = new DS_UtilityTableAdapters.tblFilesTableAdapter(); } @@ -44,6 +45,7 @@ namespace CMS_SC_Data taDS.Connection.ConnectionString = connStr; taEFM.Connection.ConnectionString = connStr; taEM.Connection.ConnectionString = connStr; + taSCFM.Connection.ConnectionString = connStr; taVV.Connection.ConnectionString = connStr; //taFile.Connection.ConnectionString = connStrFiles; } @@ -57,6 +59,7 @@ namespace CMS_SC_Data public DS_ApplicazioneTableAdapters.DettSchedaTableAdapter taDS; public DS_ApplicazioneTableAdapters.ElencoFamMaccTableAdapter taEFM; public DS_ApplicazioneTableAdapters.ElencoMacchineCNTableAdapter taEM; + public DS_ApplicazioneTableAdapters.SchemaCollFamMaccTableAdapter taSCFM; public DS_ApplicazioneTableAdapters.ValidValTableAdapter taVV; //public DS_UtilityTableAdapters.tblFilesTableAdapter taFile; diff --git a/CMS-SC-Data/bin/Debug/CMS-SC-Data.dll b/CMS-SC-Data/bin/Debug/CMS-SC-Data.dll index 923562a..deff625 100644 Binary files a/CMS-SC-Data/bin/Debug/CMS-SC-Data.dll and b/CMS-SC-Data/bin/Debug/CMS-SC-Data.dll differ diff --git a/CMS-SC-Data/bin/Debug/SteamWare.dll b/CMS-SC-Data/bin/Debug/SteamWare.dll index 2a5e32f..6dca924 100644 Binary files a/CMS-SC-Data/bin/Debug/SteamWare.dll and b/CMS-SC-Data/bin/Debug/SteamWare.dll differ diff --git a/CMS-SC-Data/obj/Debug/CMS-SC-Data.dll b/CMS-SC-Data/obj/Debug/CMS-SC-Data.dll index 923562a..deff625 100644 Binary files a/CMS-SC-Data/obj/Debug/CMS-SC-Data.dll and b/CMS-SC-Data/obj/Debug/CMS-SC-Data.dll differ diff --git a/CMS-SC-Data/obj/Debug/TempPE/DS_Applicazione.Designer.cs.dll b/CMS-SC-Data/obj/Debug/TempPE/DS_Applicazione.Designer.cs.dll index d990039..c8249d7 100644 Binary files a/CMS-SC-Data/obj/Debug/TempPE/DS_Applicazione.Designer.cs.dll and b/CMS-SC-Data/obj/Debug/TempPE/DS_Applicazione.Designer.cs.dll differ diff --git a/CMS_SC/SchemaCollFamMacc.aspx b/CMS_SC/SchemaCollFamMacc.aspx index b45a88b..6173fff 100644 --- a/CMS_SC/SchemaCollFamMacc.aspx +++ b/CMS_SC/SchemaCollFamMacc.aspx @@ -12,19 +12,22 @@
-
-
- - -
-
+
+
+
+ + +
+
+ +
- +
diff --git a/CMS_SC/SchemaCollFamMacc.aspx.cs b/CMS_SC/SchemaCollFamMacc.aspx.cs index 6127c6a..61f5554 100644 --- a/CMS_SC/SchemaCollFamMacc.aspx.cs +++ b/CMS_SC/SchemaCollFamMacc.aspx.cs @@ -19,6 +19,7 @@ namespace CMS_SC mod_SchemaCollFamMacc.pageSize = mod_righePag.numRowPag; presetChk(); fixChkFilt(); + btnAddNew.DataBind(); } mod_righePag.eh_newNum += mod_righePag_eh_newNum; } @@ -63,6 +64,7 @@ namespace CMS_SC memLayer.ML.setSessionVal("filtByScheda", chkFiltCodSchedaVers.Checked); mod_selFamMaccUrl.Visible = chkFilFamMacc.Checked; mod_selSchedaUrl.Visible = chkFiltCodSchedaVers.Checked; + btnAddNew.Visible = addNewEnabled; mod_SchemaCollFamMacc.doUpdate(); } @@ -80,5 +82,27 @@ namespace CMS_SC { fixChkFilt(); } + /// + /// verifica se si possano aggiungere nuovi record ovvero se selezionata famiglia e scheda... + /// + public bool addNewEnabled + { + get + { + bool answ = false; + try + { + answ = (memLayer.ML.QSS("CodSchedaVers") != "") && (memLayer.ML.QSS("CodFam") != "") && memLayer.ML.BoolSessionObj("filtByFamMac") && memLayer.ML.BoolSessionObj("filtByScheda"); + } + catch + { } + return answ; + } + } + + protected void btnAddNew_Click(object sender, EventArgs e) + { + mod_SchemaCollFamMacc.addNewFromSel(memLayer.ML.QSS("CodSchedaVers"), memLayer.ML.QSS("CodFam")); + } } } \ No newline at end of file diff --git a/CMS_SC/SchemaCollFamMacc.aspx.designer.cs b/CMS_SC/SchemaCollFamMacc.aspx.designer.cs index 0990886..bd4caaa 100644 --- a/CMS_SC/SchemaCollFamMacc.aspx.designer.cs +++ b/CMS_SC/SchemaCollFamMacc.aspx.designer.cs @@ -12,24 +12,6 @@ namespace CMS_SC { public partial class SchemaCollFamMacc { - /// - /// chkFiltCodSchedaVers control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.CheckBox chkFiltCodSchedaVers; - - /// - /// mod_selSchedaUrl control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::CMS_SC.WebUserControls.mod_selSchedaUrl mod_selSchedaUrl; - /// /// chkFilFamMacc control. /// @@ -48,6 +30,33 @@ namespace CMS_SC { /// protected global::CMS_SC.WebUserControls.mod_selFamMaccUrl mod_selFamMaccUrl; + /// + /// chkFiltCodSchedaVers control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox chkFiltCodSchedaVers; + + /// + /// mod_selSchedaUrl control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::CMS_SC.WebUserControls.mod_selSchedaUrl mod_selSchedaUrl; + + /// + /// btnAddNew control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnAddNew; + /// /// mod_SchemaCollFamMacc control. /// diff --git a/CMS_SC/WebUserControls/mod_SchemaCollFamMacc.ascx b/CMS_SC/WebUserControls/mod_SchemaCollFamMacc.ascx index 0a71dfb..4600c32 100644 --- a/CMS_SC/WebUserControls/mod_SchemaCollFamMacc.ascx +++ b/CMS_SC/WebUserControls/mod_SchemaCollFamMacc.ascx @@ -1,7 +1,11 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_SchemaCollFamMacc.ascx.cs" Inherits="CMS_SC.WebUserControls.mod_SchemaCollFamMacc" %> + + + <%: traduci("NoRecords") %> + @@ -42,7 +46,7 @@ - + <%----%> diff --git a/CMS_SC/WebUserControls/mod_SchemaCollFamMacc.ascx.cs b/CMS_SC/WebUserControls/mod_SchemaCollFamMacc.ascx.cs index de8eab1..7136f3f 100644 --- a/CMS_SC/WebUserControls/mod_SchemaCollFamMacc.ascx.cs +++ b/CMS_SC/WebUserControls/mod_SchemaCollFamMacc.ascx.cs @@ -5,6 +5,7 @@ using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using CMS_SC_Data; +using SteamWare; namespace CMS_SC.WebUserControls { @@ -12,7 +13,6 @@ namespace CMS_SC.WebUserControls { protected void Page_Load(object sender, EventArgs e) { - } /// /// dimensione pagina grid view @@ -29,14 +29,14 @@ namespace CMS_SC.WebUserControls } } /// - /// richiesta di aggiunta record, tutto a zero! + /// inserimento nuovo record x chiave indicata /// - /// - /// - protected void lbAddNew_Click(object sender, EventArgs e) + /// + /// + public void addNewFromSel(string CodSchedaVers, string codFam) { - //// inserisco nuovo record - //DtProxy.man.taAF.insertQuery("000000", "000000 Nuova Fase"); + // inserisco nuovo record + DtProxy.man.taSCFM.insertQuery(CodSchedaVers, codFam); // update! grView.DataBind(); } @@ -48,8 +48,15 @@ namespace CMS_SC.WebUserControls protected void ods_Updating(object sender, ObjectDataSourceMethodEventArgs e) { - // verifico campi... - //e.InputParameters + } + /// + /// wrapper traduzione + /// + /// + /// + public string traduci(string lemma) + { + return user_std.UtSn.Traduci(lemma); } } } \ No newline at end of file diff --git a/CMS_SC/bin/CMS-SC-Data.dll b/CMS_SC/bin/CMS-SC-Data.dll index 923562a..deff625 100644 Binary files a/CMS_SC/bin/CMS-SC-Data.dll and b/CMS_SC/bin/CMS-SC-Data.dll differ diff --git a/CMS_SC/bin/CMS_SC.dll b/CMS_SC/bin/CMS_SC.dll index 8298d6f..1985d5a 100644 Binary files a/CMS_SC/bin/CMS_SC.dll and b/CMS_SC/bin/CMS_SC.dll differ diff --git a/CMS_SC/bin/SteamWare.dll b/CMS_SC/bin/SteamWare.dll index 2a5e32f..6dca924 100644 Binary files a/CMS_SC/bin/SteamWare.dll and b/CMS_SC/bin/SteamWare.dll differ diff --git a/VersGen/CMS_SC.cs b/VersGen/CMS_SC.cs index b0eb167..eac1e29 100644 --- a/VersGen/CMS_SC.cs +++ b/VersGen/CMS_SC.cs @@ -5,7 +5,7 @@ using System.Reflection; -[assembly: AssemblyVersion("1.3.031.336")] -[assembly: AssemblyFileVersion("1.3.031.336")] +[assembly: AssemblyVersion("1.3.033.336")] +[assembly: AssemblyFileVersion("1.3.033.336")] [assembly: AssemblyCopyright("Steamware © 2009-2015")] [assembly: AssemblyCompany("Steamware")] diff --git a/VersGen/CMS_SC.tt b/VersGen/CMS_SC.tt index 9f56c06..f19e200 100644 --- a/VersGen/CMS_SC.tt +++ b/VersGen/CMS_SC.tt @@ -6,8 +6,8 @@ using System.Reflection; -[assembly: AssemblyVersion("1.3.031.<#= this.RevisionNumber #>")] -[assembly: AssemblyFileVersion("1.3.031.<#= this.RevisionNumber #>")] +[assembly: AssemblyVersion("1.3.033.<#= this.RevisionNumber #>")] +[assembly: AssemblyFileVersion("1.3.033.<#= this.RevisionNumber #>")] [assembly: AssemblyCopyright("Steamware © 2009-<#= DateTime.Now.Year #>")] [assembly: AssemblyCompany("Steamware")] <#+ diff --git a/VersGen/bin/Debug/VersGen.dll b/VersGen/bin/Debug/VersGen.dll index 60397ed..5c81836 100644 Binary files a/VersGen/bin/Debug/VersGen.dll and b/VersGen/bin/Debug/VersGen.dll differ