diff --git a/Projects/WebGIM/GIM_data/DS_applicazione.Designer.cs b/Projects/WebGIM/GIM_data/DS_applicazione.Designer.cs index 710c9dc..3e32b34 100644 --- a/Projects/WebGIM/GIM_data/DS_applicazione.Designer.cs +++ b/Projects/WebGIM/GIM_data/DS_applicazione.Designer.cs @@ -13524,6 +13524,7 @@ ORDER BY numIntMtz DESC"; this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxMacchina", 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.VarChar, 500, 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("@idxCausale", 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("@scheduled", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@numIntMtz", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.InputOutput, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[7] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[7].Connection = this.Connection; @@ -13652,7 +13653,7 @@ ORDER BY numIntMtz DESC"; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual object sp_insRichiesta(global::System.Nullable richiesta, global::System.Nullable dataLav, global::System.Nullable turnoLav, string matr, global::System.Nullable guasto, global::System.Nullable idxAmbito, global::System.Nullable idxPriorita, global::System.Nullable isFermo, global::System.Nullable idxTipo, global::System.Nullable idxImpianto, global::System.Nullable idxMacchina, string descrizione, global::System.Nullable idxCausale, ref global::System.Nullable numIntMtz) { + public virtual object sp_insRichiesta(global::System.Nullable richiesta, global::System.Nullable dataLav, global::System.Nullable turnoLav, string matr, global::System.Nullable guasto, global::System.Nullable idxAmbito, global::System.Nullable idxPriorita, global::System.Nullable isFermo, global::System.Nullable idxTipo, global::System.Nullable idxImpianto, global::System.Nullable idxMacchina, string descrizione, global::System.Nullable idxCausale, global::System.Nullable scheduled, ref global::System.Nullable numIntMtz) { global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[6]; if ((richiesta.HasValue == true)) { command.Parameters[1].Value = ((System.DateTime)(richiesta.Value)); @@ -13732,12 +13733,18 @@ ORDER BY numIntMtz DESC"; else { command.Parameters[13].Value = global::System.DBNull.Value; } - if ((numIntMtz.HasValue == true)) { - command.Parameters[14].Value = ((int)(numIntMtz.Value)); + if ((scheduled.HasValue == true)) { + command.Parameters[14].Value = ((bool)(scheduled.Value)); } else { command.Parameters[14].Value = global::System.DBNull.Value; } + if ((numIntMtz.HasValue == true)) { + command.Parameters[15].Value = ((int)(numIntMtz.Value)); + } + else { + command.Parameters[15].Value = global::System.DBNull.Value; + } global::System.Data.ConnectionState previousConnectionState = command.Connection.State; if (((command.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { @@ -13752,12 +13759,12 @@ ORDER BY numIntMtz DESC"; command.Connection.Close(); } } - if (((command.Parameters[14].Value == null) - || (command.Parameters[14].Value.GetType() == typeof(global::System.DBNull)))) { + if (((command.Parameters[15].Value == null) + || (command.Parameters[15].Value.GetType() == typeof(global::System.DBNull)))) { numIntMtz = new global::System.Nullable(); } else { - numIntMtz = new global::System.Nullable(((int)(command.Parameters[14].Value))); + numIntMtz = new global::System.Nullable(((int)(command.Parameters[15].Value))); } if (((returnValue == null) || (returnValue.GetType() == typeof(global::System.DBNull)))) { diff --git a/Projects/WebGIM/GIM_data/DS_applicazione.xsc b/Projects/WebGIM/GIM_data/DS_applicazione.xsc index 5f28270..551fc56 100644 --- a/Projects/WebGIM/GIM_data/DS_applicazione.xsc +++ b/Projects/WebGIM/GIM_data/DS_applicazione.xsc @@ -1 +1,9 @@ - \ No newline at end of file + + + + + \ No newline at end of file diff --git a/Projects/WebGIM/GIM_data/DS_applicazione.xsd b/Projects/WebGIM/GIM_data/DS_applicazione.xsd index 81d4c2a..5999e9c 100644 --- a/Projects/WebGIM/GIM_data/DS_applicazione.xsd +++ b/Projects/WebGIM/GIM_data/DS_applicazione.xsd @@ -678,6 +678,7 @@ ORDER BY numIntMtz DESC + @@ -1564,16 +1565,16 @@ WHERE (idxCausale = @Original_idxCausale) - - + + - - + + @@ -1586,186 +1587,7 @@ WHERE (idxCausale = @Original_idxCausale) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -1773,83 +1595,6 @@ WHERE (idxCausale = @Original_idxCausale) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1860,45 +1605,41 @@ WHERE (idxCausale = @Original_idxCausale) - + - - + + - + - + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - + + @@ -1909,24 +1650,186 @@ WHERE (idxCausale = @Original_idxCausale) - + - + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1937,27 +1840,43 @@ WHERE (idxCausale = @Original_idxCausale) - + - - - - - + + - + + + + + + + + - - - - + + + + + + + + + + + + + + + + @@ -1981,14 +1900,96 @@ WHERE (idxCausale = @Original_idxCausale) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + @@ -2001,47 +2002,19 @@ WHERE (idxCausale = @Original_idxCausale) - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -2051,44 +2024,72 @@ WHERE (idxCausale = @Original_idxCausale) - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - + - + - + - + diff --git a/Projects/WebGIM/GIM_data/DS_applicazione.xss b/Projects/WebGIM/GIM_data/DS_applicazione.xss index 234901d..f610f2c 100644 --- a/Projects/WebGIM/GIM_data/DS_applicazione.xss +++ b/Projects/WebGIM/GIM_data/DS_applicazione.xss @@ -4,29 +4,29 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - + - - + + - - - - - - - - - - - + + + + + + + + + + + @@ -113,23 +113,23 @@ - + 631 - 560 + 629 631 - 599 + 637 793 - 599 + 637 - + 1141 @@ -141,7 +141,7 @@ - + 1017 @@ -157,7 +157,7 @@ - + 1362 @@ -173,7 +173,7 @@ - + 922 @@ -185,7 +185,7 @@ - + 1328 @@ -197,7 +197,7 @@ - + 754 diff --git a/Projects/WebGIM/GIM_data/GIM_data.csproj b/Projects/WebGIM/GIM_data/GIM_data.csproj index 950b398..0e5597c 100644 --- a/Projects/WebGIM/GIM_data/GIM_data.csproj +++ b/Projects/WebGIM/GIM_data/GIM_data.csproj @@ -99,6 +99,13 @@ DS_utility.xsd + + + + + + + diff --git a/Projects/WebGIM/GIM_data/GIM_data.csproj.user b/Projects/WebGIM/GIM_data/GIM_data.csproj.user index ded0e13..473ba2c 100644 --- a/Projects/WebGIM/GIM_data/GIM_data.csproj.user +++ b/Projects/WebGIM/GIM_data/GIM_data.csproj.user @@ -1,7 +1,7 @@  - + diff --git a/Projects/WebGIM/GIM_data/Web.config b/Projects/WebGIM/GIM_data/Web.config index 3902980..42ef0ec 100644 --- a/Projects/WebGIM/GIM_data/Web.config +++ b/Projects/WebGIM/GIM_data/Web.config @@ -3,48 +3,51 @@ - - - -
- -
-
-
-
- + + + +
+ +
+
+
+
- + + - - - - - - - + - - - - - - + + + + + + - - - - - - - - - - + + + + + + - - - - - - - - - + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/Projects/WebGIM/GIM_data/bin/GIM_data.dll b/Projects/WebGIM/GIM_data/bin/GIM_data.dll index c604eee..dfa6ea0 100644 Binary files a/Projects/WebGIM/GIM_data/bin/GIM_data.dll and b/Projects/WebGIM/GIM_data/bin/GIM_data.dll differ diff --git a/Projects/WebGIM/GIM_data/bin/SteamWare.dll b/Projects/WebGIM/GIM_data/bin/SteamWare.dll index 7da3b75..909b257 100644 Binary files a/Projects/WebGIM/GIM_data/bin/SteamWare.dll and b/Projects/WebGIM/GIM_data/bin/SteamWare.dll differ diff --git a/Projects/WebGIM/GIM_data/mtzProgr.cs b/Projects/WebGIM/GIM_data/mtzProgr.cs index d341b7d..c6fbb0d 100644 --- a/Projects/WebGIM/GIM_data/mtzProgr.cs +++ b/Projects/WebGIM/GIM_data/mtzProgr.cs @@ -166,7 +166,7 @@ public class mtzProgr logger.lg.scriviLog(string.Format("Errore nel recuperare impianto relativo alla macchina {0}, eccezione {1}", riga.idxMacchina, e), tipoLog.EXCEPTION); } // inserisco - TA_app.obj.taInterventiMtz.sp_insRichiesta(adesso, adesso.AddHours(-shift + 1), turno, "PROG", riga.data, idxAmbito, riga.idxPriorita, riga.isFermo, riga.idxTipo, idxImpianto, riga.idxMacchina, riga.descrizione, idxCausale, ref answ); + TA_app.obj.taInterventiMtz.sp_insRichiesta(adesso, adesso.AddHours(-shift + 1), turno, "PROG", riga.data, idxAmbito, riga.idxPriorita, riga.isFermo, riga.idxTipo, idxImpianto, riga.idxMacchina, riga.descrizione, idxCausale, true, ref answ); return (int)answ; } } diff --git a/Projects/WebGIM/GIM_site/sql/GIM_0000.sql b/Projects/WebGIM/GIM_data/sql/GIM_0000.sql similarity index 100% rename from Projects/WebGIM/GIM_site/sql/GIM_0000.sql rename to Projects/WebGIM/GIM_data/sql/GIM_0000.sql diff --git a/Projects/WebGIM/GIM_site/sql/GIM_0001.sql b/Projects/WebGIM/GIM_data/sql/GIM_0001.sql similarity index 100% rename from Projects/WebGIM/GIM_site/sql/GIM_0001.sql rename to Projects/WebGIM/GIM_data/sql/GIM_0001.sql diff --git a/Projects/WebGIM/GIM_site/sql/GIM_0002.sql b/Projects/WebGIM/GIM_data/sql/GIM_0002.sql similarity index 100% rename from Projects/WebGIM/GIM_site/sql/GIM_0002.sql rename to Projects/WebGIM/GIM_data/sql/GIM_0002.sql diff --git a/Projects/WebGIM/GIM_site/sql/GIM_0003.sql b/Projects/WebGIM/GIM_data/sql/GIM_0003.sql similarity index 100% rename from Projects/WebGIM/GIM_site/sql/GIM_0003.sql rename to Projects/WebGIM/GIM_data/sql/GIM_0003.sql diff --git a/Projects/WebGIM/GIM_site/sql/GIM_0004.sql b/Projects/WebGIM/GIM_data/sql/GIM_0004.sql similarity index 100% rename from Projects/WebGIM/GIM_site/sql/GIM_0004.sql rename to Projects/WebGIM/GIM_data/sql/GIM_0004.sql diff --git a/Projects/WebGIM/GIM_site/sql/GIM_0005.sql b/Projects/WebGIM/GIM_data/sql/GIM_0005.sql similarity index 100% rename from Projects/WebGIM/GIM_site/sql/GIM_0005.sql rename to Projects/WebGIM/GIM_data/sql/GIM_0005.sql diff --git a/Projects/WebGIM/GIM_data/sql/GIM_0006.sql b/Projects/WebGIM/GIM_data/sql/GIM_0006.sql new file mode 100644 index 0000000..2b71ef4 --- /dev/null +++ b/Projects/WebGIM/GIM_data/sql/GIM_0006.sql @@ -0,0 +1,84 @@ +/* modifiche per gestione corretta reportistica x mtz preventiva o meno... */ + +set xact_abort on +go + +begin transaction +go + +alter table InterventiMtz add + scheduled bit constraint DF_InterventiMtz_scheduled default (0) +go + +exec sp_addextendedproperty 'MS_Description', 'indica se l''intervento sia stato generato da manutenzione programmata/preventiva', 'USER', 'dbo', 'TABLE', 'InterventiMtz', 'COLUMN', 'scheduled' +go + +update InterventiMtz set scheduled=0 +go + +commit +go + +set xact_abort on +go + +begin transaction +go + +set ANSI_NULLS on +go + +/************************************* +* STORED PROCEDURE sp_insRichiesta +* Inserisce nuova richiesta di intervento +* +* modif.: S.E.L. - 2009.02.20 +**************************************/ +alter PROCEDURE sp_insRichiesta +( + @richiesta datetime, + @dataLav datetime, + @turnoLav int, + @matr varchar(10), + @guasto datetime, + @idxAmbito int, + @idxPriorita int, + @isFermo bit, + @idxTipo int, + @idxImpianto int, + @idxMacchina int, + @descrizione varchar(500), + @idxCausale int, + @scheduled bit, + @numIntMtz int output +) +AS + +BEGIN tran + + INSERT INTO InterventiMtz + (richiesta, dataLav, turnoLav, matr, guasto, idxAmbito, idxPriorita, isFermo, idxTipo, idxImpianto, idxMacchina, descrizione, idxStato, idxCausale, scheduled) + VALUES (@richiesta,@dataLav,@turnoLav,@matr,@guasto,@idxAmbito,@idxPriorita,@isFermo,@idxTipo,@idxImpianto,@idxMacchina,@descrizione, + 1,@idxCausale,@scheduled) + + /************************************* + * salvo idx del nuovo record + **************************************/ + SET @numIntMtz = SCOPE_IDENTITY() + +COMMIT tran + +RETURN (@numIntMtz) +go + +commit +go + + + + + + +-- registro versione... +INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(6, GETDATE()) +GO diff --git a/Projects/WebGIM/GIM_site/GIM_site.csproj b/Projects/WebGIM/GIM_site/GIM_site.csproj index 2343b70..1eef726 100644 --- a/Projects/WebGIM/GIM_site/GIM_site.csproj +++ b/Projects/WebGIM/GIM_site/GIM_site.csproj @@ -1008,12 +1008,6 @@ - - - - - - diff --git a/Projects/WebGIM/GIM_site/WebUserControls/mod_insertRichiesta.ascx.cs b/Projects/WebGIM/GIM_site/WebUserControls/mod_insertRichiesta.ascx.cs index a4cda81..1105cff 100644 --- a/Projects/WebGIM/GIM_site/WebUserControls/mod_insertRichiesta.ascx.cs +++ b/Projects/WebGIM/GIM_site/WebUserControls/mod_insertRichiesta.ascx.cs @@ -149,7 +149,7 @@ public partial class mod_insertRichiesta : System.Web.UI.UserControl catch { } // stored inserimento! - TA_app.obj.taInterventiMtz.sp_insRichiesta(richiesta, dataLav, turno, matr, inizioGuasto, idxAmbito, idxPrior, isFermo, idxTipo, idxImpianto, idxMacchina, descrizione, idxCausale, ref numReq); + TA_app.obj.taInterventiMtz.sp_insRichiesta(richiesta, dataLav, turno, matr, inizioGuasto, idxAmbito, idxPrior, isFermo, idxTipo, idxImpianto, idxMacchina, descrizione, idxCausale, false, ref numReq); } catch (Exception exc) { diff --git a/Projects/WebGIM/GIM_site/bin/GIM_data.dll b/Projects/WebGIM/GIM_site/bin/GIM_data.dll index c604eee..dfa6ea0 100644 Binary files a/Projects/WebGIM/GIM_site/bin/GIM_data.dll and b/Projects/WebGIM/GIM_site/bin/GIM_data.dll differ diff --git a/Projects/WebGIM/GIM_site/bin/SteamWare.dll b/Projects/WebGIM/GIM_site/bin/SteamWare.dll index 7da3b75..909b257 100644 Binary files a/Projects/WebGIM/GIM_site/bin/SteamWare.dll and b/Projects/WebGIM/GIM_site/bin/SteamWare.dll differ diff --git a/Projects/WebGIM/GIM_site/obj/Debug/ResolveAssemblyReference.cache b/Projects/WebGIM/GIM_site/obj/Debug/ResolveAssemblyReference.cache index 78e994b..f7b68c1 100644 Binary files a/Projects/WebGIM/GIM_site/obj/Debug/ResolveAssemblyReference.cache and b/Projects/WebGIM/GIM_site/obj/Debug/ResolveAssemblyReference.cache differ