From 8fb6aa40e754ca0953ffbcb2db419a348679842c Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 16 Feb 2022 11:35:31 +0100 Subject: [PATCH] Fix x procedura insert nuovo dipendente (codHW + data assuzione), update query insert --- .../WebUserControls/mod_adminDipendenti.ascx | 1 + GPW_Data/DS_Applicazione.Designer.cs | 85 ++++++++++++------- GPW_Data/DS_Applicazione.xsd | 35 ++++---- 3 files changed, 73 insertions(+), 48 deletions(-) diff --git a/GPW_Admin/WebUserControls/mod_adminDipendenti.ascx b/GPW_Admin/WebUserControls/mod_adminDipendenti.ascx index 443e487..9db66d5 100644 --- a/GPW_Admin/WebUserControls/mod_adminDipendenti.ascx +++ b/GPW_Admin/WebUserControls/mod_adminDipendenti.ascx @@ -311,6 +311,7 @@ + diff --git a/GPW_Data/DS_Applicazione.Designer.cs b/GPW_Data/DS_Applicazione.Designer.cs index 7fa975a..a0309cd 100644 --- a/GPW_Data/DS_Applicazione.Designer.cs +++ b/GPW_Data/DS_Applicazione.Designer.cs @@ -22880,6 +22880,7 @@ SELECT idxDipendente, matricola, CF, Cognome, Nome, dataNascita, luogoNascita, p this._commandCollection[8].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[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@matricola", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CF", global::System.Data.SqlDbType.NVarChar, 16, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodHw", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Cognome", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Nome", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@dataNascita", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); @@ -24066,7 +24067,23 @@ SELECT idxDipendente, matricola, CF, Cognome, Nome, dataNascita, luogoNascita, p [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, false)] - public virtual int insertQuery(string matricola, string CF, string Cognome, string Nome, global::System.Nullable dataNascita, string luogoNascita, string provNascita, string nazNascita, string email, string dominio, string utente, string codOrario, string gruppo, string authKey, global::System.Nullable attivo) { + public virtual int insertQuery( + string matricola, + string CF, + string CodHw, + string Cognome, + string Nome, + global::System.Nullable dataNascita, + string luogoNascita, + string provNascita, + string nazNascita, + string email, + string dominio, + string utente, + string codOrario, + string gruppo, + string authKey, + global::System.Nullable attivo) { global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[8]; if ((matricola == null)) { command.Parameters[1].Value = global::System.DBNull.Value; @@ -24080,83 +24097,89 @@ SELECT idxDipendente, matricola, CF, Cognome, Nome, dataNascita, luogoNascita, p else { command.Parameters[2].Value = ((string)(CF)); } - if ((Cognome == null)) { + if ((CodHw == null)) { command.Parameters[3].Value = global::System.DBNull.Value; } else { - command.Parameters[3].Value = ((string)(Cognome)); + command.Parameters[3].Value = ((string)(CodHw)); } - if ((Nome == null)) { + if ((Cognome == null)) { command.Parameters[4].Value = global::System.DBNull.Value; } else { - command.Parameters[4].Value = ((string)(Nome)); + command.Parameters[4].Value = ((string)(Cognome)); } - if ((dataNascita.HasValue == true)) { - command.Parameters[5].Value = ((System.DateTime)(dataNascita.Value)); - } - else { + if ((Nome == null)) { command.Parameters[5].Value = global::System.DBNull.Value; } - if ((luogoNascita == null)) { - command.Parameters[6].Value = global::System.DBNull.Value; + else { + command.Parameters[5].Value = ((string)(Nome)); + } + if ((dataNascita.HasValue == true)) { + command.Parameters[6].Value = ((System.DateTime)(dataNascita.Value)); } else { - command.Parameters[6].Value = ((string)(luogoNascita)); + command.Parameters[6].Value = global::System.DBNull.Value; } - if ((provNascita == null)) { + if ((luogoNascita == null)) { command.Parameters[7].Value = global::System.DBNull.Value; } else { - command.Parameters[7].Value = ((string)(provNascita)); + command.Parameters[7].Value = ((string)(luogoNascita)); } - if ((nazNascita == null)) { + if ((provNascita == null)) { command.Parameters[8].Value = global::System.DBNull.Value; } else { - command.Parameters[8].Value = ((string)(nazNascita)); + command.Parameters[8].Value = ((string)(provNascita)); } - if ((email == null)) { + if ((nazNascita == null)) { command.Parameters[9].Value = global::System.DBNull.Value; } else { - command.Parameters[9].Value = ((string)(email)); + command.Parameters[9].Value = ((string)(nazNascita)); } - if ((dominio == null)) { + if ((email == null)) { command.Parameters[10].Value = global::System.DBNull.Value; } else { - command.Parameters[10].Value = ((string)(dominio)); + command.Parameters[10].Value = ((string)(email)); } - if ((utente == null)) { + if ((dominio == null)) { command.Parameters[11].Value = global::System.DBNull.Value; } else { - command.Parameters[11].Value = ((string)(utente)); + command.Parameters[11].Value = ((string)(dominio)); } - if ((codOrario == null)) { + if ((utente == null)) { command.Parameters[12].Value = global::System.DBNull.Value; } else { - command.Parameters[12].Value = ((string)(codOrario)); + command.Parameters[12].Value = ((string)(utente)); } - if ((gruppo == null)) { + if ((codOrario == null)) { command.Parameters[13].Value = global::System.DBNull.Value; } else { - command.Parameters[13].Value = ((string)(gruppo)); + command.Parameters[13].Value = ((string)(codOrario)); } - if ((authKey == null)) { + if ((gruppo == null)) { command.Parameters[14].Value = global::System.DBNull.Value; } else { - command.Parameters[14].Value = ((string)(authKey)); + command.Parameters[14].Value = ((string)(gruppo)); } - if ((attivo.HasValue == true)) { - command.Parameters[15].Value = ((bool)(attivo.Value)); + if ((authKey == null)) { + command.Parameters[15].Value = global::System.DBNull.Value; } else { - command.Parameters[15].Value = global::System.DBNull.Value; + command.Parameters[15].Value = ((string)(authKey)); + } + if ((attivo.HasValue == true)) { + command.Parameters[16].Value = ((bool)(attivo.Value)); + } + else { + command.Parameters[16].Value = global::System.DBNull.Value; } global::System.Data.ConnectionState previousConnectionState = command.Connection.State; if (((command.Connection.State & global::System.Data.ConnectionState.Open) diff --git a/GPW_Data/DS_Applicazione.xsd b/GPW_Data/DS_Applicazione.xsd index 608c9bc..7ff3250 100644 --- a/GPW_Data/DS_Applicazione.xsd +++ b/GPW_Data/DS_Applicazione.xsd @@ -5,7 +5,7 @@ - + @@ -1018,6 +1018,7 @@ SELECT idxDipendente, matricola, CF, Cognome, Nome, dataNascita, luogoNascita, p + @@ -4134,45 +4135,45 @@ SELECT idxDipendente, gruppo FROM Dipendenti2Gruppi WHERE (gruppo = @gruppo) AND - + - + - + - + - + - + - + - + @@ -4285,14 +4286,14 @@ SELECT idxDipendente, gruppo FROM Dipendenti2Gruppi WHERE (gruppo = @gruppo) AND - - - - - - - - + + + + + + + + \ No newline at end of file