diff --git a/GMW.suo b/GMW.suo index 6ffd6f3a..341fad42 100644 Binary files a/GMW.suo and b/GMW.suo differ diff --git a/GMW/WebUserControls/mod_anime.ascx.cs b/GMW/WebUserControls/mod_anime.ascx.cs index 7cd21055..69412bce 100644 --- a/GMW/WebUserControls/mod_anime.ascx.cs +++ b/GMW/WebUserControls/mod_anime.ascx.cs @@ -410,20 +410,25 @@ namespace GMW.WebUserControls if (codSogg != "" && particolare != "") { // genero cartellino liquidi + DateTime adesso = DateTime.Now; try { // creo nuovo UDC del trattamento liquidi - newUdcChild = MagClass.magazzino.creaUdc("AN", "", particolare, "", "", "", "", "", 0, memLayer.ML.confReadString("CodImballoAnime"), "U", codSogg, qta, 0, 0, DateTime.Now, 0, "Anim", memLayer.ML.confReadInt("IdxPosizioneAnime"), "IdxPosizioneAnime", "UDC_ANIMA", noteTrim, "", DateTime.Now.Year, Request.UserHostName); // !!! "AN" e "Anim" HARD CODED x indicare flusso ANIME + newUdcChild = MagClass.magazzino.creaUdc("AN", "", particolare, "", "", "", "", "", 0, memLayer.ML.confReadString("CodImballoAnime"), "U", codSogg, qta, 0, 0, adesso, 0, "Anim", memLayer.ML.confReadInt("IdxPosizioneAnime"), "IdxPosizioneAnime", "UDC_ANIMA", noteTrim, "", adesso.Year, Request.UserHostName); // !!! "AN" e "Anim" HARD CODED x indicare flusso ANIME + // registro creazione nuovo UDC + MagClass.magazzino.taSAO.insertQuery(adesso, codSogg, postazione_name, postazione_IP, newUdcChild, particolare, "creaUDC", "Creato nuovo UDC Anime"); } catch (Exception exc) { httpLog(string.Format("Errore creazione UDC: {0}", exc), tipoLog.EXCEPTION); } - // se ho cart liquidi genero (se non ci sono) cart trattamenti + // se ho cart stampo! if (newUdcChild != "") { // ora stampo il nuovo cartellino!!! MagClass.magazzino.stampaUdc(newUdcChild, postazione_printer, tipoCartellino.cartAnime, Request.UserHostName); + // registro stampa nuovo UDC + MagClass.magazzino.taSAO.insertQuery(adesso, codSogg, postazione_name, postazione_IP, newUdcChild, particolare, "stampaUDC", "Stampato UDC Anime"); } } else diff --git a/GMW/WebUserControls/mod_animeMult.ascx.cs b/GMW/WebUserControls/mod_animeMult.ascx.cs index 8e4bc49f..3786f78d 100644 --- a/GMW/WebUserControls/mod_animeMult.ascx.cs +++ b/GMW/WebUserControls/mod_animeMult.ascx.cs @@ -451,10 +451,13 @@ namespace GMW.WebUserControls for (int i = 0; i < numUDC; i++) { // genero cartellino liquidi + DateTime adesso = DateTime.Now; try { // creo nuovo UDC del trattamento liquidi - newUdcChild = MagClass.magazzino.creaUdc("AN", "", currParticolare, "", "", "", "", "", 0, memLayer.ML.confReadString("CodImballoAnime"), "U", MagClass.magazzino.CodSoggCurrUser, qta, 0, 0, DateTime.Now, 0, "AnimExt", memLayer.ML.confReadInt("IdxPosizioneAnimeExt"), "IdxPosizioneAnimeExt", "UDC_ANIMA", noteTrim, "", DateTime.Now.Year, Request.UserHostName); // !!! "AN" e "AnimExt" HARD CODED x indicare flusso ANIME + newUdcChild = MagClass.magazzino.creaUdc("AN", "", currParticolare, "", "", "", "", "", 0, memLayer.ML.confReadString("CodImballoAnime"), "U", MagClass.magazzino.CodSoggCurrUser, qta, 0, 0, adesso, 0, "AnimExt", memLayer.ML.confReadInt("IdxPosizioneAnimeExt"), "IdxPosizioneAnimeExt", "UDC_ANIMA", noteTrim, "", adesso.Year, Request.UserHostName); // !!! "AN" e "AnimExt" HARD CODED x indicare flusso ANIME + // registro creazione nuovo UDC + MagClass.magazzino.taSAO.insertQuery(adesso, codSogg, postazione_name, postazione_IP, newUdcChild, particolare, "creaUDC", "Creato nuovo UDC Anime EXT"); } catch (Exception exc) { @@ -479,9 +482,14 @@ namespace GMW.WebUserControls if (idxCellaTo != 0) { MagClass.magazzino.spostaUDC(memLayer.ML.StringSessionObj("CodCS"), newUdcChild, idxCellaTo, memLayer.ML.confReadBool("spostaUdcResettaLdp"), Request.UserHostName); + // registro creazione nuovo UDC + MagClass.magazzino.taSAO.insertQuery(adesso, codSogg, postazione_name, postazione_IP, newUdcChild, particolare, "spostaUDC", "Sposta UDC Anime EXT in Int"); + } // ora stampo il nuovo cartellino!!! MagClass.magazzino.stampaUdc(newUdcChild, postazione_printer, tipoCartellino.cartAnime, Request.UserHostName); + // registro stampa nuovo UDC + MagClass.magazzino.taSAO.insertQuery(adesso, codSogg, postazione_name, postazione_IP, newUdcChild, particolare, "stampaUDC", "Stampato UDC Anime EXT"); } } // resetto diff --git a/GMW_data/DS_magazzino.Designer.cs b/GMW_data/DS_magazzino.Designer.cs index e5ed5372..ccfd98ed 100644 --- a/GMW_data/DS_magazzino.Designer.cs +++ b/GMW_data/DS_magazzino.Designer.cs @@ -10729,6 +10729,8 @@ namespace GMW_data { private global::System.Data.DataColumn columndescrizione; + private global::System.Data.DataColumn columnclientIP; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public StoricoAzioniOperatoreDataTable() { @@ -10826,6 +10828,14 @@ namespace GMW_data { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn clientIPColumn { + get { + return this.columnclientIP; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Browsable(false)] @@ -10863,7 +10873,7 @@ namespace GMW_data { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public StoricoAzioniOperatoreRow AddStoricoAzioniOperatoreRow(System.DateTime DataOra, string CodSoggetto, string codPostazione, string UDC, string Particolare, string codAzione, string descrizione) { + public StoricoAzioniOperatoreRow AddStoricoAzioniOperatoreRow(System.DateTime DataOra, string CodSoggetto, string codPostazione, string UDC, string Particolare, string codAzione, string descrizione, string clientIP) { StoricoAzioniOperatoreRow rowStoricoAzioniOperatoreRow = ((StoricoAzioniOperatoreRow)(this.NewRow())); object[] columnValuesArray = new object[] { null, @@ -10873,7 +10883,8 @@ namespace GMW_data { UDC, Particolare, codAzione, - descrizione}; + descrizione, + clientIP}; rowStoricoAzioniOperatoreRow.ItemArray = columnValuesArray; this.Rows.Add(rowStoricoAzioniOperatoreRow); return rowStoricoAzioniOperatoreRow; @@ -10911,6 +10922,7 @@ namespace GMW_data { this.columnParticolare = base.Columns["Particolare"]; this.columncodAzione = base.Columns["codAzione"]; this.columndescrizione = base.Columns["descrizione"]; + this.columnclientIP = base.Columns["clientIP"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -10932,6 +10944,8 @@ namespace GMW_data { base.Columns.Add(this.columncodAzione); this.columndescrizione = new global::System.Data.DataColumn("descrizione", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columndescrizione); + this.columnclientIP = new global::System.Data.DataColumn("clientIP", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnclientIP); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnidxEvento}, true)); this.columnidxEvento.AutoIncrement = true; @@ -10948,6 +10962,7 @@ namespace GMW_data { this.columnParticolare.MaxLength = 15; this.columncodAzione.MaxLength = 10; this.columndescrizione.MaxLength = 50; + this.columnclientIP.MaxLength = 250; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -16273,6 +16288,22 @@ namespace GMW_data { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public string clientIP { + get { + try { + return ((string)(this[this.tableStoricoAzioniOperatore.clientIPColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'clientIP\' in table \'StoricoAzioniOperatore\' is DBNull.", e); + } + } + set { + this[this.tableStoricoAzioniOperatore.clientIPColumn] = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public bool IscodPostazioneNull() { @@ -16332,6 +16363,18 @@ namespace GMW_data { public void SetdescrizioneNull() { this[this.tableStoricoAzioniOperatore.descrizioneColumn] = global::System.Convert.DBNull; } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsclientIPNull() { + return this.IsNull(this.tableStoricoAzioniOperatore.clientIPColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetclientIPNull() { + this[this.tableStoricoAzioniOperatore.clientIPColumn] = global::System.Convert.DBNull; + } } /// @@ -30376,16 +30419,19 @@ SELECT CodLega, DescLega, DescLega2 FROM RilPro.AnagLeghe WHERE (CodLega = @CodL tableMapping.ColumnMappings.Add("Particolare", "Particolare"); tableMapping.ColumnMappings.Add("codAzione", "codAzione"); tableMapping.ColumnMappings.Add("descrizione", "descrizione"); + tableMapping.ColumnMappings.Add("clientIP", "clientIP"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; - this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[StoricoAzioniOperatore] WHERE (([idxEvento] = @Original_idxEvento) AND ([DataOra] = @Original_DataOra) AND ([CodSoggetto] = @Original_CodSoggetto) AND ((@IsNull_codPostazione = 1 AND [codPostazione] IS NULL) OR ([codPostazione] = @Original_codPostazione)) AND ((@IsNull_UDC = 1 AND [UDC] IS NULL) OR ([UDC] = @Original_UDC)) AND ((@IsNull_Particolare = 1 AND [Particolare] IS NULL) OR ([Particolare] = @Original_Particolare)) AND ((@IsNull_codAzione = 1 AND [codAzione] IS NULL) OR ([codAzione] = @Original_codAzione)) AND ((@IsNull_descrizione = 1 AND [descrizione] IS NULL) OR ([descrizione] = @Original_descrizione)))"; + this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[StoricoAzioniOperatore] WHERE (([idxEvento] = @Original_idxEvento) AND ([DataOra] = @Original_DataOra) AND ([CodSoggetto] = @Original_CodSoggetto) AND ((@IsNull_codPostazione = 1 AND [codPostazione] IS NULL) OR ([codPostazione] = @Original_codPostazione)) AND ((@IsNull_clientIP = 1 AND [clientIP] IS NULL) OR ([clientIP] = @Original_clientIP)) AND ((@IsNull_UDC = 1 AND [UDC] IS NULL) OR ([UDC] = @Original_UDC)) AND ((@IsNull_Particolare = 1 AND [Particolare] IS NULL) OR ([Particolare] = @Original_Particolare)) AND ((@IsNull_codAzione = 1 AND [codAzione] IS NULL) OR ([codAzione] = @Original_codAzione)) AND ((@IsNull_descrizione = 1 AND [descrizione] IS NULL) OR ([descrizione] = @Original_descrizione)))"; this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxEvento", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxEvento", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DataOra", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DataOra", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodSoggetto", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodSoggetto", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_codPostazione", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "codPostazione", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_codPostazione", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "codPostazione", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_clientIP", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "clientIP", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_clientIP", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "clientIP", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_UDC", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UDC", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_UDC", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UDC", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Particolare", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Particolare", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); @@ -30396,24 +30442,26 @@ SELECT CodLega, DescLega, DescLega2 FROM RilPro.AnagLeghe WHERE (CodLega = @CodL this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_descrizione", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "descrizione", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; - this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[StoricoAzioniOperatore] ([DataOra], [CodSoggetto], [codPostazione], [UDC], [Particolare], [codAzione], [descrizione]) VALUES (@DataOra, @CodSoggetto, @codPostazione, @UDC, @Particolare, @codAzione, @descrizione); -SELECT idxEvento, DataOra, CodSoggetto, codPostazione, UDC, Particolare, codAzione, descrizione FROM StoricoAzioniOperatore WHERE (idxEvento = SCOPE_IDENTITY())"; + this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[StoricoAzioniOperatore] ([DataOra], [CodSoggetto], [codPostazione], [clientIP], [UDC], [Particolare], [codAzione], [descrizione]) VALUES (@DataOra, @CodSoggetto, @codPostazione, @clientIP, @UDC, @Particolare, @codAzione, @descrizione); +SELECT idxEvento, DataOra, CodSoggetto, codPostazione, clientIP, UDC, Particolare, codAzione, descrizione FROM StoricoAzioniOperatore WHERE (idxEvento = SCOPE_IDENTITY())"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataOra", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DataOra", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodSoggetto", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodSoggetto", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@codPostazione", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "codPostazione", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@clientIP", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "clientIP", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UDC", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Particolare", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Particolare", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@codAzione", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "codAzione", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@descrizione", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "descrizione", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; - this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[StoricoAzioniOperatore] SET [DataOra] = @DataOra, [CodSoggetto] = @CodSoggetto, [codPostazione] = @codPostazione, [UDC] = @UDC, [Particolare] = @Particolare, [codAzione] = @codAzione, [descrizione] = @descrizione WHERE (([idxEvento] = @Original_idxEvento) AND ([DataOra] = @Original_DataOra) AND ([CodSoggetto] = @Original_CodSoggetto) AND ((@IsNull_codPostazione = 1 AND [codPostazione] IS NULL) OR ([codPostazione] = @Original_codPostazione)) AND ((@IsNull_UDC = 1 AND [UDC] IS NULL) OR ([UDC] = @Original_UDC)) AND ((@IsNull_Particolare = 1 AND [Particolare] IS NULL) OR ([Particolare] = @Original_Particolare)) AND ((@IsNull_codAzione = 1 AND [codAzione] IS NULL) OR ([codAzione] = @Original_codAzione)) AND ((@IsNull_descrizione = 1 AND [descrizione] IS NULL) OR ([descrizione] = @Original_descrizione))); -SELECT idxEvento, DataOra, CodSoggetto, codPostazione, UDC, Particolare, codAzione, descrizione FROM StoricoAzioniOperatore WHERE (idxEvento = @idxEvento)"; + this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[StoricoAzioniOperatore] SET [DataOra] = @DataOra, [CodSoggetto] = @CodSoggetto, [codPostazione] = @codPostazione, [clientIP] = @clientIP, [UDC] = @UDC, [Particolare] = @Particolare, [codAzione] = @codAzione, [descrizione] = @descrizione WHERE (([idxEvento] = @Original_idxEvento) AND ([DataOra] = @Original_DataOra) AND ([CodSoggetto] = @Original_CodSoggetto) AND ((@IsNull_codPostazione = 1 AND [codPostazione] IS NULL) OR ([codPostazione] = @Original_codPostazione)) AND ((@IsNull_clientIP = 1 AND [clientIP] IS NULL) OR ([clientIP] = @Original_clientIP)) AND ((@IsNull_UDC = 1 AND [UDC] IS NULL) OR ([UDC] = @Original_UDC)) AND ((@IsNull_Particolare = 1 AND [Particolare] IS NULL) OR ([Particolare] = @Original_Particolare)) AND ((@IsNull_codAzione = 1 AND [codAzione] IS NULL) OR ([codAzione] = @Original_codAzione)) AND ((@IsNull_descrizione = 1 AND [descrizione] IS NULL) OR ([descrizione] = @Original_descrizione))); +SELECT idxEvento, DataOra, CodSoggetto, codPostazione, clientIP, UDC, Particolare, codAzione, descrizione FROM StoricoAzioniOperatore WHERE (idxEvento = @idxEvento)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataOra", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DataOra", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodSoggetto", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodSoggetto", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@codPostazione", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "codPostazione", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@clientIP", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "clientIP", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UDC", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Particolare", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Particolare", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@codAzione", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "codAzione", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); @@ -30423,6 +30471,8 @@ SELECT idxEvento, DataOra, CodSoggetto, codPostazione, UDC, Particolare, codAzio this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodSoggetto", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodSoggetto", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_codPostazione", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "codPostazione", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_codPostazione", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "codPostazione", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_clientIP", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "clientIP", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_clientIP", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "clientIP", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_UDC", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UDC", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_UDC", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UDC", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Particolare", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Particolare", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); @@ -30447,8 +30497,7 @@ SELECT idxEvento, DataOra, CodSoggetto, codPostazione, UDC, Particolare, codAzio 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 idxEvento, DataOra, CodSoggetto, codPostazione, UDC, Particolare, codAzion" + - "e, descrizione FROM dbo.StoricoAzioniOperatore"; + this._commandCollection[0].CommandText = "SELECT *\r\nFROM dbo.StoricoAzioniOperatore"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[1].Connection = this.Connection; @@ -30459,6 +30508,7 @@ SELECT idxEvento, DataOra, CodSoggetto, codPostazione, UDC, Particolare, codAzio this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataOraTo", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodSoggetto", global::System.Data.SqlDbType.NVarChar, 17, 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("@codPostazione", global::System.Data.SqlDbType.NVarChar, 250, 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("@clientIp", global::System.Data.SqlDbType.NVarChar, 250, 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("@UDC", 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("@Particolare", global::System.Data.SqlDbType.NVarChar, 15, 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("@codAzione", global::System.Data.SqlDbType.NVarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); @@ -30470,6 +30520,7 @@ SELECT idxEvento, DataOra, CodSoggetto, codPostazione, UDC, Particolare, codAzio this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataOra", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodSoggetto", global::System.Data.SqlDbType.NVarChar, 17, 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("@codPostazione", global::System.Data.SqlDbType.NVarChar, 250, 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("@clientIp", global::System.Data.SqlDbType.NVarChar, 250, 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("@UDC", global::System.Data.SqlDbType.NVarChar, 50, 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("@Particolare", global::System.Data.SqlDbType.NVarChar, 15, 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("@codAzione", global::System.Data.SqlDbType.NVarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); @@ -30504,7 +30555,7 @@ SELECT idxEvento, DataOra, CodSoggetto, codPostazione, UDC, Particolare, codAzio [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_magazzino.StoricoAzioniOperatoreDataTable getBySearch(global::System.Nullable DataOraFrom, global::System.Nullable DataOraTo, string CodSoggetto, string codPostazione, string UDC, string Particolare, string codAzione) { + public virtual DS_magazzino.StoricoAzioniOperatoreDataTable getBySearch(global::System.Nullable DataOraFrom, global::System.Nullable DataOraTo, string CodSoggetto, string codPostazione, string clientIp, string UDC, string Particolare, string codAzione) { this.Adapter.SelectCommand = this.CommandCollection[1]; if ((DataOraFrom.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((System.DateTime)(DataOraFrom.Value)); @@ -30530,23 +30581,29 @@ SELECT idxEvento, DataOra, CodSoggetto, codPostazione, UDC, Particolare, codAzio else { this.Adapter.SelectCommand.Parameters[4].Value = ((string)(codPostazione)); } - if ((UDC == null)) { + if ((clientIp == null)) { this.Adapter.SelectCommand.Parameters[5].Value = global::System.DBNull.Value; } else { - this.Adapter.SelectCommand.Parameters[5].Value = ((string)(UDC)); + this.Adapter.SelectCommand.Parameters[5].Value = ((string)(clientIp)); } - if ((Particolare == null)) { + if ((UDC == null)) { this.Adapter.SelectCommand.Parameters[6].Value = global::System.DBNull.Value; } else { - this.Adapter.SelectCommand.Parameters[6].Value = ((string)(Particolare)); + this.Adapter.SelectCommand.Parameters[6].Value = ((string)(UDC)); } - if ((codAzione == null)) { + if ((Particolare == null)) { this.Adapter.SelectCommand.Parameters[7].Value = global::System.DBNull.Value; } else { - this.Adapter.SelectCommand.Parameters[7].Value = ((string)(codAzione)); + this.Adapter.SelectCommand.Parameters[7].Value = ((string)(Particolare)); + } + if ((codAzione == null)) { + this.Adapter.SelectCommand.Parameters[8].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[8].Value = ((string)(codAzione)); } DS_magazzino.StoricoAzioniOperatoreDataTable dataTable = new DS_magazzino.StoricoAzioniOperatoreDataTable(); this.Adapter.Fill(dataTable); @@ -30586,7 +30643,7 @@ SELECT idxEvento, DataOra, CodSoggetto, codPostazione, UDC, Particolare, codAzio [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.Delete, true)] - public virtual int Delete(int Original_idxEvento, System.DateTime Original_DataOra, string Original_CodSoggetto, string Original_codPostazione, string Original_UDC, string Original_Particolare, string Original_codAzione, string Original_descrizione) { + public virtual int Delete(int Original_idxEvento, System.DateTime Original_DataOra, string Original_CodSoggetto, string Original_codPostazione, string Original_clientIP, string Original_UDC, string Original_Particolare, string Original_codAzione, string Original_descrizione) { this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_idxEvento)); this.Adapter.DeleteCommand.Parameters[1].Value = ((System.DateTime)(Original_DataOra)); if ((Original_CodSoggetto == null)) { @@ -30603,37 +30660,45 @@ SELECT idxEvento, DataOra, CodSoggetto, codPostazione, UDC, Particolare, codAzio this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_codPostazione)); } - if ((Original_UDC == null)) { + if ((Original_clientIP == null)) { this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[6].Value = global::System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[6].Value = ((string)(Original_UDC)); + this.Adapter.DeleteCommand.Parameters[6].Value = ((string)(Original_clientIP)); } - if ((Original_Particolare == null)) { + if ((Original_UDC == null)) { this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[8].Value = global::System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[8].Value = ((string)(Original_Particolare)); + this.Adapter.DeleteCommand.Parameters[8].Value = ((string)(Original_UDC)); } - if ((Original_codAzione == null)) { + if ((Original_Particolare == null)) { this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[10].Value = global::System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[10].Value = ((string)(Original_codAzione)); + this.Adapter.DeleteCommand.Parameters[10].Value = ((string)(Original_Particolare)); } - if ((Original_descrizione == null)) { + if ((Original_codAzione == null)) { this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[12].Value = global::System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[12].Value = ((string)(Original_descrizione)); + this.Adapter.DeleteCommand.Parameters[12].Value = ((string)(Original_codAzione)); + } + if ((Original_descrizione == null)) { + this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[14].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[14].Value = ((string)(Original_descrizione)); } global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) @@ -30655,7 +30720,7 @@ SELECT idxEvento, DataOra, CodSoggetto, codPostazione, UDC, Particolare, codAzio [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.Insert, true)] - public virtual int Insert(System.DateTime DataOra, string CodSoggetto, string codPostazione, string UDC, string Particolare, string codAzione, string descrizione) { + public virtual int Insert(System.DateTime DataOra, string CodSoggetto, string codPostazione, string clientIP, string UDC, string Particolare, string codAzione, string descrizione) { this.Adapter.InsertCommand.Parameters[0].Value = ((System.DateTime)(DataOra)); if ((CodSoggetto == null)) { throw new global::System.ArgumentNullException("CodSoggetto"); @@ -30669,29 +30734,35 @@ SELECT idxEvento, DataOra, CodSoggetto, codPostazione, UDC, Particolare, codAzio else { this.Adapter.InsertCommand.Parameters[2].Value = ((string)(codPostazione)); } - if ((UDC == null)) { + if ((clientIP == null)) { this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value; } else { - this.Adapter.InsertCommand.Parameters[3].Value = ((string)(UDC)); + this.Adapter.InsertCommand.Parameters[3].Value = ((string)(clientIP)); } - if ((Particolare == null)) { + if ((UDC == null)) { this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value; } else { - this.Adapter.InsertCommand.Parameters[4].Value = ((string)(Particolare)); + this.Adapter.InsertCommand.Parameters[4].Value = ((string)(UDC)); } - if ((codAzione == null)) { + if ((Particolare == null)) { this.Adapter.InsertCommand.Parameters[5].Value = global::System.DBNull.Value; } else { - this.Adapter.InsertCommand.Parameters[5].Value = ((string)(codAzione)); + this.Adapter.InsertCommand.Parameters[5].Value = ((string)(Particolare)); } - if ((descrizione == null)) { + if ((codAzione == null)) { this.Adapter.InsertCommand.Parameters[6].Value = global::System.DBNull.Value; } else { - this.Adapter.InsertCommand.Parameters[6].Value = ((string)(descrizione)); + this.Adapter.InsertCommand.Parameters[6].Value = ((string)(codAzione)); + } + if ((descrizione == null)) { + this.Adapter.InsertCommand.Parameters[7].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[7].Value = ((string)(descrizione)); } global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) @@ -30717,6 +30788,7 @@ SELECT idxEvento, DataOra, CodSoggetto, codPostazione, UDC, Particolare, codAzio System.DateTime DataOra, string CodSoggetto, string codPostazione, + string clientIP, string UDC, string Particolare, string codAzione, @@ -30725,6 +30797,7 @@ SELECT idxEvento, DataOra, CodSoggetto, codPostazione, UDC, Particolare, codAzio System.DateTime Original_DataOra, string Original_CodSoggetto, string Original_codPostazione, + string Original_clientIP, string Original_UDC, string Original_Particolare, string Original_codAzione, @@ -30743,79 +30816,93 @@ SELECT idxEvento, DataOra, CodSoggetto, codPostazione, UDC, Particolare, codAzio else { this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(codPostazione)); } - if ((UDC == null)) { + if ((clientIP == null)) { this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value; } else { - this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(UDC)); + this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(clientIP)); } - if ((Particolare == null)) { + if ((UDC == null)) { this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; } else { - this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Particolare)); + this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(UDC)); } - if ((codAzione == null)) { + if ((Particolare == null)) { this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value; } else { - this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(codAzione)); + this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(Particolare)); } - if ((descrizione == null)) { + if ((codAzione == null)) { this.Adapter.UpdateCommand.Parameters[6].Value = global::System.DBNull.Value; } else { - this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(descrizione)); + this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(codAzione)); } - this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Original_idxEvento)); - this.Adapter.UpdateCommand.Parameters[8].Value = ((System.DateTime)(Original_DataOra)); + if ((descrizione == null)) { + this.Adapter.UpdateCommand.Parameters[7].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(descrizione)); + } + this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(Original_idxEvento)); + this.Adapter.UpdateCommand.Parameters[9].Value = ((System.DateTime)(Original_DataOra)); if ((Original_CodSoggetto == null)) { throw new global::System.ArgumentNullException("Original_CodSoggetto"); } else { - this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(Original_CodSoggetto)); + this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(Original_CodSoggetto)); } if ((Original_codPostazione == null)) { - this.Adapter.UpdateCommand.Parameters[10].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[11].Value = global::System.DBNull.Value; + this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[12].Value = global::System.DBNull.Value; } else { - this.Adapter.UpdateCommand.Parameters[10].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(Original_codPostazione)); + this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[12].Value = ((string)(Original_codPostazione)); + } + if ((Original_clientIP == null)) { + this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[14].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[14].Value = ((string)(Original_clientIP)); } if ((Original_UDC == null)) { - this.Adapter.UpdateCommand.Parameters[12].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[13].Value = global::System.DBNull.Value; + this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[16].Value = global::System.DBNull.Value; } else { - this.Adapter.UpdateCommand.Parameters[12].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[13].Value = ((string)(Original_UDC)); + this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[16].Value = ((string)(Original_UDC)); } if ((Original_Particolare == null)) { - this.Adapter.UpdateCommand.Parameters[14].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[15].Value = global::System.DBNull.Value; + this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[18].Value = global::System.DBNull.Value; } else { - this.Adapter.UpdateCommand.Parameters[14].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[15].Value = ((string)(Original_Particolare)); + this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[18].Value = ((string)(Original_Particolare)); } if ((Original_codAzione == null)) { - this.Adapter.UpdateCommand.Parameters[16].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[17].Value = global::System.DBNull.Value; + this.Adapter.UpdateCommand.Parameters[19].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[20].Value = global::System.DBNull.Value; } else { - this.Adapter.UpdateCommand.Parameters[16].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[17].Value = ((string)(Original_codAzione)); + this.Adapter.UpdateCommand.Parameters[19].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[20].Value = ((string)(Original_codAzione)); } if ((Original_descrizione == null)) { - this.Adapter.UpdateCommand.Parameters[18].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[19].Value = global::System.DBNull.Value; + this.Adapter.UpdateCommand.Parameters[21].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[22].Value = global::System.DBNull.Value; } else { - this.Adapter.UpdateCommand.Parameters[18].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[19].Value = ((string)(Original_descrizione)); + this.Adapter.UpdateCommand.Parameters[21].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[22].Value = ((string)(Original_descrizione)); } - this.Adapter.UpdateCommand.Parameters[20].Value = ((int)(idxEvento)); + this.Adapter.UpdateCommand.Parameters[23].Value = ((int)(idxEvento)); global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { @@ -30836,14 +30923,31 @@ SELECT idxEvento, DataOra, CodSoggetto, codPostazione, UDC, Particolare, codAzio [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, true)] - public virtual int Update(System.DateTime DataOra, string CodSoggetto, string codPostazione, string UDC, string Particolare, string codAzione, string descrizione, int Original_idxEvento, System.DateTime Original_DataOra, string Original_CodSoggetto, string Original_codPostazione, string Original_UDC, string Original_Particolare, string Original_codAzione, string Original_descrizione) { - return this.Update(DataOra, CodSoggetto, codPostazione, UDC, Particolare, codAzione, descrizione, Original_idxEvento, Original_DataOra, Original_CodSoggetto, Original_codPostazione, Original_UDC, Original_Particolare, Original_codAzione, Original_descrizione, Original_idxEvento); + public virtual int Update( + System.DateTime DataOra, + string CodSoggetto, + string codPostazione, + string clientIP, + string UDC, + string Particolare, + string codAzione, + string descrizione, + int Original_idxEvento, + System.DateTime Original_DataOra, + string Original_CodSoggetto, + string Original_codPostazione, + string Original_clientIP, + string Original_UDC, + string Original_Particolare, + string Original_codAzione, + string Original_descrizione) { + return this.Update(DataOra, CodSoggetto, codPostazione, clientIP, UDC, Particolare, codAzione, descrizione, Original_idxEvento, Original_DataOra, Original_CodSoggetto, Original_codPostazione, Original_clientIP, Original_UDC, Original_Particolare, Original_codAzione, Original_descrizione, Original_idxEvento); } [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 insertQuery(global::System.Nullable DataOra, string CodSoggetto, string codPostazione, string UDC, string Particolare, string codAzione, string descrizione) { + public virtual int insertQuery(global::System.Nullable DataOra, string CodSoggetto, string codPostazione, string clientIp, string UDC, string Particolare, string codAzione, string descrizione) { global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[2]; if ((DataOra.HasValue == true)) { command.Parameters[1].Value = ((System.DateTime)(DataOra.Value)); @@ -30863,29 +30967,35 @@ SELECT idxEvento, DataOra, CodSoggetto, codPostazione, UDC, Particolare, codAzio else { command.Parameters[3].Value = ((string)(codPostazione)); } - if ((UDC == null)) { + if ((clientIp == null)) { command.Parameters[4].Value = global::System.DBNull.Value; } else { - command.Parameters[4].Value = ((string)(UDC)); + command.Parameters[4].Value = ((string)(clientIp)); } - if ((Particolare == null)) { + if ((UDC == null)) { command.Parameters[5].Value = global::System.DBNull.Value; } else { - command.Parameters[5].Value = ((string)(Particolare)); + command.Parameters[5].Value = ((string)(UDC)); } - if ((codAzione == null)) { + if ((Particolare == null)) { command.Parameters[6].Value = global::System.DBNull.Value; } else { - command.Parameters[6].Value = ((string)(codAzione)); + command.Parameters[6].Value = ((string)(Particolare)); } - if ((descrizione == null)) { + if ((codAzione == null)) { command.Parameters[7].Value = global::System.DBNull.Value; } else { - command.Parameters[7].Value = ((string)(descrizione)); + command.Parameters[7].Value = ((string)(codAzione)); + } + if ((descrizione == null)) { + command.Parameters[8].Value = global::System.DBNull.Value; + } + else { + command.Parameters[8].Value = ((string)(descrizione)); } global::System.Data.ConnectionState previousConnectionState = command.Connection.State; if (((command.Connection.State & global::System.Data.ConnectionState.Open) diff --git a/GMW_data/DS_magazzino.xsd b/GMW_data/DS_magazzino.xsd index 66b4e76f..e52de38a 100644 --- a/GMW_data/DS_magazzino.xsd +++ b/GMW_data/DS_magazzino.xsd @@ -2834,13 +2834,15 @@ SELECT CodLega, DescLega, DescLega2 FROM RilPro.AnagLeghe WHERE (CodLega = @CodL - DELETE FROM [dbo].[StoricoAzioniOperatore] WHERE (([idxEvento] = @Original_idxEvento) AND ([DataOra] = @Original_DataOra) AND ([CodSoggetto] = @Original_CodSoggetto) AND ((@IsNull_codPostazione = 1 AND [codPostazione] IS NULL) OR ([codPostazione] = @Original_codPostazione)) AND ((@IsNull_UDC = 1 AND [UDC] IS NULL) OR ([UDC] = @Original_UDC)) AND ((@IsNull_Particolare = 1 AND [Particolare] IS NULL) OR ([Particolare] = @Original_Particolare)) AND ((@IsNull_codAzione = 1 AND [codAzione] IS NULL) OR ([codAzione] = @Original_codAzione)) AND ((@IsNull_descrizione = 1 AND [descrizione] IS NULL) OR ([descrizione] = @Original_descrizione))) + DELETE FROM [dbo].[StoricoAzioniOperatore] WHERE (([idxEvento] = @Original_idxEvento) AND ([DataOra] = @Original_DataOra) AND ([CodSoggetto] = @Original_CodSoggetto) AND ((@IsNull_codPostazione = 1 AND [codPostazione] IS NULL) OR ([codPostazione] = @Original_codPostazione)) AND ((@IsNull_clientIP = 1 AND [clientIP] IS NULL) OR ([clientIP] = @Original_clientIP)) AND ((@IsNull_UDC = 1 AND [UDC] IS NULL) OR ([UDC] = @Original_UDC)) AND ((@IsNull_Particolare = 1 AND [Particolare] IS NULL) OR ([Particolare] = @Original_Particolare)) AND ((@IsNull_codAzione = 1 AND [codAzione] IS NULL) OR ([codAzione] = @Original_codAzione)) AND ((@IsNull_descrizione = 1 AND [descrizione] IS NULL) OR ([descrizione] = @Original_descrizione))) + + @@ -2854,12 +2856,13 @@ SELECT CodLega, DescLega, DescLega2 FROM RilPro.AnagLeghe WHERE (CodLega = @CodL - INSERT INTO [dbo].[StoricoAzioniOperatore] ([DataOra], [CodSoggetto], [codPostazione], [UDC], [Particolare], [codAzione], [descrizione]) VALUES (@DataOra, @CodSoggetto, @codPostazione, @UDC, @Particolare, @codAzione, @descrizione); -SELECT idxEvento, DataOra, CodSoggetto, codPostazione, UDC, Particolare, codAzione, descrizione FROM StoricoAzioniOperatore WHERE (idxEvento = SCOPE_IDENTITY()) + INSERT INTO [dbo].[StoricoAzioniOperatore] ([DataOra], [CodSoggetto], [codPostazione], [clientIP], [UDC], [Particolare], [codAzione], [descrizione]) VALUES (@DataOra, @CodSoggetto, @codPostazione, @clientIP, @UDC, @Particolare, @codAzione, @descrizione); +SELECT idxEvento, DataOra, CodSoggetto, codPostazione, clientIP, UDC, Particolare, codAzione, descrizione FROM StoricoAzioniOperatore WHERE (idxEvento = SCOPE_IDENTITY()) + @@ -2868,19 +2871,21 @@ SELECT idxEvento, DataOra, CodSoggetto, codPostazione, UDC, Particolare, codAzio - - SELECT idxEvento, DataOra, CodSoggetto, codPostazione, UDC, Particolare, codAzione, descrizione FROM dbo.StoricoAzioniOperatore + + SELECT * +FROM dbo.StoricoAzioniOperatore - UPDATE [dbo].[StoricoAzioniOperatore] SET [DataOra] = @DataOra, [CodSoggetto] = @CodSoggetto, [codPostazione] = @codPostazione, [UDC] = @UDC, [Particolare] = @Particolare, [codAzione] = @codAzione, [descrizione] = @descrizione WHERE (([idxEvento] = @Original_idxEvento) AND ([DataOra] = @Original_DataOra) AND ([CodSoggetto] = @Original_CodSoggetto) AND ((@IsNull_codPostazione = 1 AND [codPostazione] IS NULL) OR ([codPostazione] = @Original_codPostazione)) AND ((@IsNull_UDC = 1 AND [UDC] IS NULL) OR ([UDC] = @Original_UDC)) AND ((@IsNull_Particolare = 1 AND [Particolare] IS NULL) OR ([Particolare] = @Original_Particolare)) AND ((@IsNull_codAzione = 1 AND [codAzione] IS NULL) OR ([codAzione] = @Original_codAzione)) AND ((@IsNull_descrizione = 1 AND [descrizione] IS NULL) OR ([descrizione] = @Original_descrizione))); -SELECT idxEvento, DataOra, CodSoggetto, codPostazione, UDC, Particolare, codAzione, descrizione FROM StoricoAzioniOperatore WHERE (idxEvento = @idxEvento) + UPDATE [dbo].[StoricoAzioniOperatore] SET [DataOra] = @DataOra, [CodSoggetto] = @CodSoggetto, [codPostazione] = @codPostazione, [clientIP] = @clientIP, [UDC] = @UDC, [Particolare] = @Particolare, [codAzione] = @codAzione, [descrizione] = @descrizione WHERE (([idxEvento] = @Original_idxEvento) AND ([DataOra] = @Original_DataOra) AND ([CodSoggetto] = @Original_CodSoggetto) AND ((@IsNull_codPostazione = 1 AND [codPostazione] IS NULL) OR ([codPostazione] = @Original_codPostazione)) AND ((@IsNull_clientIP = 1 AND [clientIP] IS NULL) OR ([clientIP] = @Original_clientIP)) AND ((@IsNull_UDC = 1 AND [UDC] IS NULL) OR ([UDC] = @Original_UDC)) AND ((@IsNull_Particolare = 1 AND [Particolare] IS NULL) OR ([Particolare] = @Original_Particolare)) AND ((@IsNull_codAzione = 1 AND [codAzione] IS NULL) OR ([codAzione] = @Original_codAzione)) AND ((@IsNull_descrizione = 1 AND [descrizione] IS NULL) OR ([descrizione] = @Original_descrizione))); +SELECT idxEvento, DataOra, CodSoggetto, codPostazione, clientIP, UDC, Particolare, codAzione, descrizione FROM StoricoAzioniOperatore WHERE (idxEvento = @idxEvento) + @@ -2890,6 +2895,8 @@ SELECT idxEvento, DataOra, CodSoggetto, codPostazione, UDC, Particolare, codAzio + + @@ -2898,7 +2905,7 @@ SELECT idxEvento, DataOra, CodSoggetto, codPostazione, UDC, Particolare, codAzio - + @@ -2913,6 +2920,7 @@ SELECT idxEvento, DataOra, CodSoggetto, codPostazione, UDC, Particolare, codAzio + @@ -2925,6 +2933,7 @@ SELECT idxEvento, DataOra, CodSoggetto, codPostazione, UDC, Particolare, codAzio + @@ -2941,6 +2950,7 @@ SELECT idxEvento, DataOra, CodSoggetto, codPostazione, UDC, Particolare, codAzio + @@ -4099,6 +4109,13 @@ SELECT idxEvento, DataOra, CodSoggetto, codPostazione, UDC, Particolare, codAzio + + + + + + + diff --git a/GMW_data/DS_magazzino.xss b/GMW_data/DS_magazzino.xss index d4350f51..c8de35a8 100644 --- a/GMW_data/DS_magazzino.xss +++ b/GMW_data/DS_magazzino.xss @@ -4,7 +4,7 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + @@ -31,7 +31,7 @@ - + diff --git a/GMW_data/SqlScripts/V2.1/GMW_00495.sql b/GMW_data/SqlScripts/V2.1/GMW_00495.sql index 1dc4f94c..0a909146 100644 --- a/GMW_data/SqlScripts/V2.1/GMW_00495.sql +++ b/GMW_data/SqlScripts/V2.1/GMW_00495.sql @@ -130,6 +130,118 @@ commit; go +set xact_abort on; +go + +begin transaction; +go + +drop table StoricoAzioniOperatore; +go + +create table StoricoAzioniOperatore( + idxEvento int not null identity constraint PK_StoricoAzioniOperatore primary key, + DataOra datetime not null, + CodSoggetto nchar(17) not null, + codPostazione nvarchar(250), + clientIP nvarchar(250), + UDC nvarchar(50), + Particolare nvarchar(15), + codAzione nvarchar(10), + descrizione nvarchar(50) +); +go + +alter table StoricoAzioniOperatore add + constraint FK_StoricoAzioniOperatore_AnagAzioniUtente foreign key(codAzione) references AnagAzioniUtente(codAzione) on update cascade; +go + +commit; +go + + +set xact_abort on; +go + +begin transaction; +go + +set ANSI_NULLS on; +go + +/*************************************** +* STORED stp_SAO_insert +* +* effettua ricerca nello Storico Azioni Operatore +* Steamware, S.E.L. +* mod: 2012.09.25 +* +****************************************/ +alter PROCEDURE stp_SAO_getBySearch +( + @DataOraFrom DATETIME, + @DataOraTo DATETIME, + @CodSoggetto NVARCHAR(17)='', + @codPostazione NVARCHAR(250)='', + @clientIp NVARCHAR(250)='', + @UDC NVARCHAR(50)='', + @Particolare NVARCHAR(15)='', + @codAzione NVARCHAR(10)='' +) +AS + + SELECT * + FROM StoricoAzioni + WHERE DataOra BETWEEN @DataOraFrom AND @DataOraTo + AND CodSoggetto = CASE WHEN @CodSoggetto = '' THEN CodSoggetto ELSE @CodSoggetto END + AND codPostazione = CASE WHEN @codPostazione = '' THEN codPostazione ELSE @codPostazione END + AND clientIp = CASE WHEN @clientIp = '' THEN clientIp ELSE @clientIp END + AND UDC = CASE WHEN @UDC = '' THEN UDC ELSE @UDC END + AND Particolare = CASE WHEN @Particolare = '' THEN Particolare ELSE @Particolare END + AND codAzione = CASE WHEN @codAzione = '' THEN codAzione ELSE @codAzione END + +COMMIT tran + +RETURN +go + +/*************************************** +* STORED stp_SAO_insert +* +* inserisce nuova riga nello Storico Azioni Operatore +* +* Steamware, S.E.L. +* mod: 2012.09.25 +* +****************************************/ +alter PROCEDURE stp_SAO_insert +( + @DataOra DATETIME, + @CodSoggetto NVARCHAR(17), + @codPostazione NVARCHAR(250), + @clientIp NVARCHAR(250)='', + @UDC NVARCHAR(50), + @Particolare NVARCHAR(15), + @codAzione NVARCHAR(10), + @descrizione NVARCHAR(50) +) +AS + +BEGIN tran + + -- inserisco nuovo record storico azioni operatore + INSERT INTO StoricoAzioni(DataOra, CodSoggetto, codPostazione, clientIp, UDC, Particolare, codAzione, descrizione) + VALUES (@DataOra, @CodSoggetto, @codPostazione, @clientIp, @UDC, @Particolare, @codAzione, @descrizione) + +COMMIT tran + +RETURN +go + +commit; +go + + diff --git a/GMW_data/obj/Debug/TempPE/DS_magazzino.Designer.cs.dll b/GMW_data/obj/Debug/TempPE/DS_magazzino.Designer.cs.dll index cc278dc2..00a431ed 100644 Binary files a/GMW_data/obj/Debug/TempPE/DS_magazzino.Designer.cs.dll and b/GMW_data/obj/Debug/TempPE/DS_magazzino.Designer.cs.dll differ