diff --git a/CMS-SC-Data/DS_Applicazione.Designer.cs b/CMS-SC-Data/DS_Applicazione.Designer.cs index 3dd0e3b..f96ae56 100644 --- a/CMS-SC-Data/DS_Applicazione.Designer.cs +++ b/CMS-SC-Data/DS_Applicazione.Designer.cs @@ -7021,7 +7021,7 @@ SELECT CodScheda, Vers, CodMisura, NomeMisura, TipoValMisura, NomePar FROM DettS [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[5]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[6]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT CodScheda, Vers, CodMisura, NomeMisura, TipoValMisura, NomePar FROM DettSc" + @@ -7050,16 +7050,25 @@ SELECT CodScheda, Vers, CodMisura, NomeMisura, TipoValMisura, NomePar FROM DettS this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NomeMisura", global::System.Data.SqlDbType.NVarChar, 50, 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_DS_updateQuery"; + this._commandCollection[4].CommandText = "dbo.stp_DS_moveUpDown"; 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("@MovType", global::System.Data.SqlDbType.NVarChar, 50, 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("@CodScheda", global::System.Data.SqlDbType.NVarChar, 50, 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("@Vers", 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("@CodMisura", global::System.Data.SqlDbType.NVarChar, 50, 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("@NomeMisura", global::System.Data.SqlDbType.NVarChar, 50, 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("@TipoValMisura", global::System.Data.SqlDbType.NVarChar, 50, 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("@NomePar", global::System.Data.SqlDbType.NVarChar, 50, 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_CodScheda", global::System.Data.SqlDbType.NVarChar, 50, 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_Vers", 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("@Original_CodMisura", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 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_DS_updateQuery"; + 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("@CodMisura", 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("@NomeMisura", 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("@TipoValMisura", 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("@NomePar", 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_CodScheda", 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_Vers", 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("@Original_CodMisura", 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()] @@ -7402,12 +7411,58 @@ SELECT CodScheda, Vers, CodMisura, NomeMisura, TipoValMisura, NomePar FROM DettS 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 moveUpDown(string MovType, string CodScheda, global::System.Nullable Vers, string CodMisura) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[4]; + if ((MovType == null)) { + command.Parameters[1].Value = global::System.DBNull.Value; + } + else { + command.Parameters[1].Value = ((string)(MovType)); + } + if ((CodScheda == null)) { + command.Parameters[2].Value = global::System.DBNull.Value; + } + else { + command.Parameters[2].Value = ((string)(CodScheda)); + } + if ((Vers.HasValue == true)) { + command.Parameters[3].Value = ((int)(Vers.Value)); + } + else { + command.Parameters[3].Value = global::System.DBNull.Value; + } + if ((CodMisura == null)) { + command.Parameters[4].Value = global::System.DBNull.Value; + } + else { + command.Parameters[4].Value = ((string)(CodMisura)); + } + 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")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, false)] public virtual int updateQuery(string CodMisura, string NomeMisura, string TipoValMisura, string NomePar, string Original_CodScheda, global::System.Nullable Original_Vers, string Original_CodMisura) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[4]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[5]; if ((CodMisura == null)) { command.Parameters[1].Value = global::System.DBNull.Value; } diff --git a/CMS-SC-Data/DS_Applicazione.xsd b/CMS-SC-Data/DS_Applicazione.xsd index e43edc3..9892805 100644 --- a/CMS-SC-Data/DS_Applicazione.xsd +++ b/CMS-SC-Data/DS_Applicazione.xsd @@ -468,7 +468,7 @@ SELECT CodScheda, Vers, CodMisura, NomeMisura, TipoValMisura, NomePar FROM DettS - + dbo.stp_DS_insertNew @@ -480,7 +480,21 @@ SELECT CodScheda, Vers, CodMisura, NomeMisura, TipoValMisura, NomePar FROM DettS - + + + + dbo.stp_DS_moveUpDown + + + + + + + + + + + dbo.stp_DS_updateQuery @@ -853,7 +867,7 @@ SELECT CodScheda, Vers, CodMisura, MinPar, MaxPar, LIVal, LSVal FROM ValidVal WH - + @@ -873,7 +887,7 @@ SELECT CodScheda, Vers, CodMisura, MinPar, MaxPar, LIVal, LSVal FROM ValidVal WH - + @@ -907,7 +921,7 @@ SELECT CodScheda, Vers, CodMisura, MinPar, MaxPar, LIVal, LSVal FROM ValidVal WH - + @@ -927,7 +941,7 @@ SELECT CodScheda, Vers, CodMisura, MinPar, MaxPar, LIVal, LSVal FROM ValidVal WH - + @@ -955,7 +969,7 @@ SELECT CodScheda, Vers, CodMisura, MinPar, MaxPar, LIVal, LSVal FROM ValidVal WH - + @@ -997,7 +1011,7 @@ SELECT CodScheda, Vers, CodMisura, MinPar, MaxPar, LIVal, LSVal FROM ValidVal WH - + @@ -1026,7 +1040,7 @@ SELECT CodScheda, Vers, CodMisura, MinPar, MaxPar, LIVal, LSVal FROM ValidVal WH - + @@ -1055,7 +1069,7 @@ SELECT CodScheda, Vers, CodMisura, MinPar, MaxPar, LIVal, LSVal FROM ValidVal WH - + @@ -1115,7 +1129,7 @@ SELECT CodScheda, Vers, CodMisura, MinPar, MaxPar, LIVal, LSVal FROM ValidVal WH - + @@ -1204,15 +1218,15 @@ SELECT CodScheda, Vers, CodMisura, MinPar, MaxPar, LIVal, LSVal FROM ValidVal WH - - - - - - - - - + + + + + + + + + \ No newline at end of file diff --git a/CMS-SC-Data/DS_Applicazione.xss b/CMS-SC-Data/DS_Applicazione.xss index b4139ff..7612bb8 100644 --- a/CMS-SC-Data/DS_Applicazione.xss +++ b/CMS-SC-Data/DS_Applicazione.xss @@ -4,12 +4,130 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - - - - + + + + + + + + + - + + + + + 398 + 450 + + + 398 + 515 + + + + + + + 436 + 240 + + + 436 + 177 + + + + + + + 602 + 70 + + + 515 + 70 + + + + + + + 902 + 78 + + + 961 + 78 + + + + + + + 1247 + 203 + + + 1247 + 322 + + + 1221 + 322 + + + + + + + 561 + 314 + + + 1063 + 314 + + + + + + + 1050 + 647 + + + 1078 + 647 + + + + + + + 1139 + 410 + + + 1139 + 491 + + + + + + + 319 + 697 + + + 190 + 697 + + + + \ No newline at end of file diff --git a/CMS-SC-Data/bin/Debug/CMS-SC-Data.dll b/CMS-SC-Data/bin/Debug/CMS-SC-Data.dll index 84d6faa..f9c3b6b 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 a94839b..2d90de5 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 84d6faa..f9c3b6b 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 5984dac..bd5f98c 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/WebUserControls/mod_DettScheda.ascx b/CMS_SC/WebUserControls/mod_DettScheda.ascx index 9c50572..9849f6c 100644 --- a/CMS_SC/WebUserControls/mod_DettScheda.ascx +++ b/CMS_SC/WebUserControls/mod_DettScheda.ascx @@ -2,13 +2,13 @@ - + - - <%: traduci("Reset") %> - + + <%: traduci("Reset") %> +   @@ -19,9 +19,24 @@ - - + <%-- + --%> + + + <%# traduci("moveMis") %> + + + + +
+ +
+
+ +
+
+
@@ -71,4 +86,4 @@ - \ No newline at end of file + diff --git a/CMS_SC/WebUserControls/mod_DettScheda.ascx.cs b/CMS_SC/WebUserControls/mod_DettScheda.ascx.cs index 816536c..8b6c4f5 100644 --- a/CMS_SC/WebUserControls/mod_DettScheda.ascx.cs +++ b/CMS_SC/WebUserControls/mod_DettScheda.ascx.cs @@ -89,6 +89,40 @@ namespace CMS_SC.WebUserControls return user_std.UtSn.Traduci(lemma); } /// + /// Scheda selezionata + /// + public string CodSchedaSel + { + get + { + string answ = ""; + try + { + answ = grView.SelectedDataKey["CodScheda"].ToString(); + } + catch + { } + return answ; + } + } + /// + /// Versione selezionata + /// + public int VersSel + { + get + { + int answ = -1; + try + { + answ = Convert.ToInt32(grView.SelectedDataKey["Vers"].ToString()); + } + catch + { } + return answ; + } + } + /// /// Misura selezionata /// public string CodMisuraSel @@ -106,12 +140,34 @@ namespace CMS_SC.WebUserControls } } /// + /// salvo in session il prox comando + /// + /// + /// + protected void lbUpDown_Click(object sender, EventArgs e) + { + SteamWare.memLayer.ML.setSessionVal("nextObjCommand", ((LinkButton)sender).CommandArgument); + } + /// /// selezionato valore /// /// /// protected void grView_SelectedIndexChanged(object sender, EventArgs e) { + // verifico se ho un argomento di tipo moveUp / moveDown... quale comando? + string _comando = ""; + if (SteamWare.memLayer.ML.isInSessionObject("nextObjCommand")) + { + _comando = SteamWare.memLayer.ML.StringSessionObj("nextObjCommand"); + SteamWare.memLayer.ML.emptySessionVal("nextObjCommand"); + } + // SE c'era comando eseguo move... + if(_comando!="") + { + DtProxy.man.taDS.moveUpDown(_comando, CodSchedaSel, VersSel, CodMisuraSel); + grView.DataBind(); + } raiseEvent(); } protected void btnReset_Click(object sender, EventArgs e) @@ -120,6 +176,37 @@ namespace CMS_SC.WebUserControls grView.DataBind(); raiseEvent(); } - + /// + /// determina visibilità frecce spostamento + /// + /// direzione: UP / DOWN + /// CodMisura da verificare + /// + public bool arrowVisible(object _direction, object _CodMisura) + { + bool answ = false; + string direction = _direction.ToString(); + string CodMisura = _CodMisura.ToString(); + if (memLayer.ML.QSS("CodSchedaVers") != "") + { + // recupero TUTTE le righe della scheda dett corrente + DS_Applicazione.DettSchedaDataTable tab = DtProxy.man.taDS.getByScheda(memLayer.ML.QSS("CodSchedaVers")); + // a seconda della direzione CERCO se ci siano misure prima/dopo... + string where = ""; + switch (direction) + { + case "UP": + where = string.Format("CodMisura < '{0}'", CodMisura); + break; + case "DOWN": + where = string.Format("CodMisura > '{0}'", CodMisura); + break; + default: + break; + } + answ = tab.Select(where).Length > 0; + } + return answ; + } } } \ 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 84d6faa..f9c3b6b 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 914c8dc..080561b 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 a94839b..2d90de5 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 2b6f548..c2d92a3 100644 --- a/VersGen/CMS_SC.cs +++ b/VersGen/CMS_SC.cs @@ -5,7 +5,7 @@ using System.Reflection; -[assembly: AssemblyVersion("1.2.021.335")] -[assembly: AssemblyFileVersion("1.2.021.335")] +[assembly: AssemblyVersion("1.2.023.335")] +[assembly: AssemblyFileVersion("1.2.023.335")] [assembly: AssemblyCopyright("Steamware © 2009-2015")] [assembly: AssemblyCompany("Steamware")] diff --git a/VersGen/CMS_SC.tt b/VersGen/CMS_SC.tt index 108861d..0737387 100644 --- a/VersGen/CMS_SC.tt +++ b/VersGen/CMS_SC.tt @@ -6,8 +6,8 @@ using System.Reflection; -[assembly: AssemblyVersion("1.2.021.<#= this.RevisionNumber #>")] -[assembly: AssemblyFileVersion("1.2.021.<#= this.RevisionNumber #>")] +[assembly: AssemblyVersion("1.2.023.<#= this.RevisionNumber #>")] +[assembly: AssemblyFileVersion("1.2.023.<#= 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 ae15a8d..9e3b437 100644 Binary files a/VersGen/bin/Debug/VersGen.dll and b/VersGen/bin/Debug/VersGen.dll differ