diff --git a/GPW_Data/DS_Applicazione.Designer.cs b/GPW_Data/DS_Applicazione.Designer.cs index 9928e1b..796fc80 100644 --- a/GPW_Data/DS_Applicazione.Designer.cs +++ b/GPW_Data/DS_Applicazione.Designer.cs @@ -21139,6 +21139,7 @@ SELECT idxDipendente, matricola, CF, Cognome, Nome, dataNascita, luogoNascita, p this._commandCollection[2].CommandText = "dbo.stp_Dip_getAttivi"; this._commandCollection[2].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[2].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[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@showAll", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[3].Connection = this.Connection; this._commandCollection[3].CommandText = "dbo.stp_Dip_getByAuthKey"; @@ -21253,8 +21254,14 @@ SELECT idxDipendente, matricola, CF, Cognome, Nome, dataNascita, luogoNascita, p [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] - public virtual DS_Applicazione.DipendentiDataTable getAttivi() { + public virtual DS_Applicazione.DipendentiDataTable getAttivi(global::System.Nullable showAll) { this.Adapter.SelectCommand = this.CommandCollection[2]; + if ((showAll.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((bool)(showAll.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } DS_Applicazione.DipendentiDataTable dataTable = new DS_Applicazione.DipendentiDataTable(); this.Adapter.Fill(dataTable); return dataTable; @@ -24031,6 +24038,7 @@ SELECT idxCliente, RagSociale, indirizzo, CAP, citta, prov, tel, url, email, pIv this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxDipendente", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@dataFrom", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@dataTo", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@gruppo", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxCliente", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@showPrjArch", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@showPrjZeroH", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); @@ -24098,7 +24106,7 @@ SELECT idxCliente, RagSociale, indirizzo, CAP, citta, prov, tel, url, email, pIv [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] - public virtual int Fill(DS_Applicazione.AnagProgettiDataTable dataTable, global::System.Nullable idxDipendente, global::System.Nullable dataFrom, global::System.Nullable dataTo, global::System.Nullable idxCliente, global::System.Nullable showPrjArch, global::System.Nullable showPrjZeroH, global::System.Nullable showPrjStar) { + public virtual int Fill(DS_Applicazione.AnagProgettiDataTable dataTable, global::System.Nullable idxDipendente, global::System.Nullable dataFrom, global::System.Nullable dataTo, string gruppo, global::System.Nullable idxCliente, global::System.Nullable showPrjArch, global::System.Nullable showPrjZeroH, global::System.Nullable showPrjStar) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((idxDipendente.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(idxDipendente.Value)); @@ -24118,30 +24126,36 @@ SELECT idxCliente, RagSociale, indirizzo, CAP, citta, prov, tel, url, email, pIv else { this.Adapter.SelectCommand.Parameters[3].Value = global::System.DBNull.Value; } - if ((idxCliente.HasValue == true)) { - this.Adapter.SelectCommand.Parameters[4].Value = ((int)(idxCliente.Value)); - } - else { + if ((gruppo == null)) { this.Adapter.SelectCommand.Parameters[4].Value = global::System.DBNull.Value; } - if ((showPrjArch.HasValue == true)) { - this.Adapter.SelectCommand.Parameters[5].Value = ((bool)(showPrjArch.Value)); + else { + this.Adapter.SelectCommand.Parameters[4].Value = ((string)(gruppo)); + } + if ((idxCliente.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[5].Value = ((int)(idxCliente.Value)); } else { this.Adapter.SelectCommand.Parameters[5].Value = global::System.DBNull.Value; } - if ((showPrjZeroH.HasValue == true)) { - this.Adapter.SelectCommand.Parameters[6].Value = ((bool)(showPrjZeroH.Value)); + if ((showPrjArch.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[6].Value = ((bool)(showPrjArch.Value)); } else { this.Adapter.SelectCommand.Parameters[6].Value = global::System.DBNull.Value; } - if ((showPrjStar.HasValue == true)) { - this.Adapter.SelectCommand.Parameters[7].Value = ((bool)(showPrjStar.Value)); + if ((showPrjZeroH.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[7].Value = ((bool)(showPrjZeroH.Value)); } else { this.Adapter.SelectCommand.Parameters[7].Value = global::System.DBNull.Value; } + if ((showPrjStar.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[8].Value = ((bool)(showPrjStar.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[8].Value = global::System.DBNull.Value; + } if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } @@ -24153,7 +24167,7 @@ SELECT idxCliente, RagSociale, indirizzo, CAP, citta, prov, tel, url, email, pIv [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] - public virtual DS_Applicazione.AnagProgettiDataTable GetData(global::System.Nullable idxDipendente, global::System.Nullable dataFrom, global::System.Nullable dataTo, global::System.Nullable idxCliente, global::System.Nullable showPrjArch, global::System.Nullable showPrjZeroH, global::System.Nullable showPrjStar) { + public virtual DS_Applicazione.AnagProgettiDataTable GetData(global::System.Nullable idxDipendente, global::System.Nullable dataFrom, global::System.Nullable dataTo, string gruppo, global::System.Nullable idxCliente, global::System.Nullable showPrjArch, global::System.Nullable showPrjZeroH, global::System.Nullable showPrjStar) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((idxDipendente.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(idxDipendente.Value)); @@ -24173,30 +24187,36 @@ SELECT idxCliente, RagSociale, indirizzo, CAP, citta, prov, tel, url, email, pIv else { this.Adapter.SelectCommand.Parameters[3].Value = global::System.DBNull.Value; } - if ((idxCliente.HasValue == true)) { - this.Adapter.SelectCommand.Parameters[4].Value = ((int)(idxCliente.Value)); - } - else { + if ((gruppo == null)) { this.Adapter.SelectCommand.Parameters[4].Value = global::System.DBNull.Value; } - if ((showPrjArch.HasValue == true)) { - this.Adapter.SelectCommand.Parameters[5].Value = ((bool)(showPrjArch.Value)); + else { + this.Adapter.SelectCommand.Parameters[4].Value = ((string)(gruppo)); + } + if ((idxCliente.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[5].Value = ((int)(idxCliente.Value)); } else { this.Adapter.SelectCommand.Parameters[5].Value = global::System.DBNull.Value; } - if ((showPrjZeroH.HasValue == true)) { - this.Adapter.SelectCommand.Parameters[6].Value = ((bool)(showPrjZeroH.Value)); + if ((showPrjArch.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[6].Value = ((bool)(showPrjArch.Value)); } else { this.Adapter.SelectCommand.Parameters[6].Value = global::System.DBNull.Value; } - if ((showPrjStar.HasValue == true)) { - this.Adapter.SelectCommand.Parameters[7].Value = ((bool)(showPrjStar.Value)); + if ((showPrjZeroH.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[7].Value = ((bool)(showPrjZeroH.Value)); } else { this.Adapter.SelectCommand.Parameters[7].Value = global::System.DBNull.Value; } + if ((showPrjStar.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[8].Value = ((bool)(showPrjStar.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[8].Value = global::System.DBNull.Value; + } DS_Applicazione.AnagProgettiDataTable dataTable = new DS_Applicazione.AnagProgettiDataTable(); this.Adapter.Fill(dataTable); return dataTable; @@ -30000,6 +30020,7 @@ SELECT dataLav, idxDipendente, codGiust, minuti FROM Giustificativi WHERE (codGi this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxDipendente", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@dataFrom", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@dataTo", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@showInattivi", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@showWE", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@maxErrMin", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@maxErrPlus", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); @@ -30009,7 +30030,7 @@ SELECT dataLav, idxDipendente, codGiust, minuti FROM Giustificativi WHERE (codGi [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] - public virtual int Fill(DS_Applicazione.TE_RA_ExplDataTable dataTable, global::System.Nullable idxDipendente, global::System.Nullable dataFrom, global::System.Nullable dataTo, global::System.Nullable showWE, global::System.Nullable maxErrMin, global::System.Nullable maxErrPlus) { + public virtual int Fill(DS_Applicazione.TE_RA_ExplDataTable dataTable, global::System.Nullable idxDipendente, global::System.Nullable dataFrom, global::System.Nullable dataTo, global::System.Nullable showInattivi, global::System.Nullable showWE, global::System.Nullable maxErrMin, global::System.Nullable maxErrPlus) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((idxDipendente.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(idxDipendente.Value)); @@ -30029,24 +30050,30 @@ SELECT dataLav, idxDipendente, codGiust, minuti FROM Giustificativi WHERE (codGi else { this.Adapter.SelectCommand.Parameters[3].Value = global::System.DBNull.Value; } - if ((showWE.HasValue == true)) { - this.Adapter.SelectCommand.Parameters[4].Value = ((bool)(showWE.Value)); + if ((showInattivi.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[4].Value = ((bool)(showInattivi.Value)); } else { this.Adapter.SelectCommand.Parameters[4].Value = global::System.DBNull.Value; } - if ((maxErrMin.HasValue == true)) { - this.Adapter.SelectCommand.Parameters[5].Value = ((int)(maxErrMin.Value)); + if ((showWE.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[5].Value = ((bool)(showWE.Value)); } else { this.Adapter.SelectCommand.Parameters[5].Value = global::System.DBNull.Value; } - if ((maxErrPlus.HasValue == true)) { - this.Adapter.SelectCommand.Parameters[6].Value = ((int)(maxErrPlus.Value)); + if ((maxErrMin.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[6].Value = ((int)(maxErrMin.Value)); } else { this.Adapter.SelectCommand.Parameters[6].Value = global::System.DBNull.Value; } + if ((maxErrPlus.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[7].Value = ((int)(maxErrPlus.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[7].Value = global::System.DBNull.Value; + } if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } @@ -30058,7 +30085,7 @@ SELECT dataLav, idxDipendente, codGiust, minuti FROM Giustificativi WHERE (codGi [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] - public virtual DS_Applicazione.TE_RA_ExplDataTable GetData(global::System.Nullable idxDipendente, global::System.Nullable dataFrom, global::System.Nullable dataTo, global::System.Nullable showWE, global::System.Nullable maxErrMin, global::System.Nullable maxErrPlus) { + public virtual DS_Applicazione.TE_RA_ExplDataTable GetData(global::System.Nullable idxDipendente, global::System.Nullable dataFrom, global::System.Nullable dataTo, global::System.Nullable showInattivi, global::System.Nullable showWE, global::System.Nullable maxErrMin, global::System.Nullable maxErrPlus) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((idxDipendente.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(idxDipendente.Value)); @@ -30078,24 +30105,30 @@ SELECT dataLav, idxDipendente, codGiust, minuti FROM Giustificativi WHERE (codGi else { this.Adapter.SelectCommand.Parameters[3].Value = global::System.DBNull.Value; } - if ((showWE.HasValue == true)) { - this.Adapter.SelectCommand.Parameters[4].Value = ((bool)(showWE.Value)); + if ((showInattivi.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[4].Value = ((bool)(showInattivi.Value)); } else { this.Adapter.SelectCommand.Parameters[4].Value = global::System.DBNull.Value; } - if ((maxErrMin.HasValue == true)) { - this.Adapter.SelectCommand.Parameters[5].Value = ((int)(maxErrMin.Value)); + if ((showWE.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[5].Value = ((bool)(showWE.Value)); } else { this.Adapter.SelectCommand.Parameters[5].Value = global::System.DBNull.Value; } - if ((maxErrPlus.HasValue == true)) { - this.Adapter.SelectCommand.Parameters[6].Value = ((int)(maxErrPlus.Value)); + if ((maxErrMin.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[6].Value = ((int)(maxErrMin.Value)); } else { this.Adapter.SelectCommand.Parameters[6].Value = global::System.DBNull.Value; } + if ((maxErrPlus.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[7].Value = ((int)(maxErrPlus.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[7].Value = global::System.DBNull.Value; + } DS_Applicazione.TE_RA_ExplDataTable dataTable = new DS_Applicazione.TE_RA_ExplDataTable(); this.Adapter.Fill(dataTable); return dataTable; diff --git a/GPW_Data/DS_Applicazione.xsd b/GPW_Data/DS_Applicazione.xsd index 91bddbc..f451ffe 100644 --- a/GPW_Data/DS_Applicazione.xsd +++ b/GPW_Data/DS_Applicazione.xsd @@ -948,6 +948,7 @@ SELECT idxDipendente, matricola, CF, Cognome, Nome, dataNascita, luogoNascita, p dbo.stp_Dip_getAttivi + @@ -1343,6 +1344,7 @@ SELECT idxCliente, RagSociale, indirizzo, CAP, citta, prov, tel, url, email, pIv + @@ -2538,6 +2540,7 @@ SELECT dataLav, idxDipendente, codGiust, minuti FROM Giustificativi WHERE (codGi + @@ -3555,7 +3558,7 @@ SELECT idxDipendente, dtRilievo, tempRil FROM RilievoTemp WHERE (dtRilievo = @dt - + diff --git a/GPW_Data/DS_Applicazione.xss b/GPW_Data/DS_Applicazione.xss index 701ce94..666fb58 100644 --- a/GPW_Data/DS_Applicazione.xss +++ b/GPW_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. --> - + - + - - - + + + - - - - - + + + + + - + - - + + - - - + + + @@ -101,7 +101,7 @@ - + 279 diff --git a/GPW_Data/DS_Utility.Designer.cs b/GPW_Data/DS_Utility.Designer.cs index b5f3413..45d8efb 100644 --- a/GPW_Data/DS_Utility.Designer.cs +++ b/GPW_Data/DS_Utility.Designer.cs @@ -913,6 +913,8 @@ namespace GPW_data { private global::System.Data.DataColumn columnlabel; + private global::System.Data.DataColumn columnconditio; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public v_selDipendentiDataTable() { @@ -962,6 +964,14 @@ namespace GPW_data { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn conditioColumn { + get { + return this.columnconditio; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Browsable(false)] @@ -999,11 +1009,12 @@ namespace GPW_data { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public v_selDipendentiRow Addv_selDipendentiRow(string label) { + public v_selDipendentiRow Addv_selDipendentiRow(string label, int conditio) { v_selDipendentiRow rowv_selDipendentiRow = ((v_selDipendentiRow)(this.NewRow())); object[] columnValuesArray = new object[] { null, - label}; + label, + conditio}; rowv_selDipendentiRow.ItemArray = columnValuesArray; this.Rows.Add(rowv_selDipendentiRow); return rowv_selDipendentiRow; @@ -1035,6 +1046,7 @@ namespace GPW_data { internal void InitVars() { this.columnvalue = base.Columns["value"]; this.columnlabel = base.Columns["label"]; + this.columnconditio = base.Columns["conditio"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -1044,6 +1056,8 @@ namespace GPW_data { base.Columns.Add(this.columnvalue); this.columnlabel = new global::System.Data.DataColumn("label", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnlabel); + this.columnconditio = new global::System.Data.DataColumn("conditio", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnconditio); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnvalue}, true)); this.columnvalue.AutoIncrement = true; @@ -2042,7 +2056,7 @@ namespace GPW_data { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public v_selProgettiRow Addv_selProgettiRow(int value, string label, int conditio, bool Attivo) { + public v_selProgettiRow Addv_selProgettiRow(int value, string label, long conditio, bool Attivo) { v_selProgettiRow rowv_selProgettiRow = ((v_selProgettiRow)(this.NewRow())); object[] columnValuesArray = new object[] { value, @@ -2091,7 +2105,7 @@ namespace GPW_data { base.Columns.Add(this.columnvalue); this.columnlabel = new global::System.Data.DataColumn("label", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnlabel); - this.columnconditio = new global::System.Data.DataColumn("conditio", typeof(int), null, global::System.Data.MappingType.Element); + this.columnconditio = new global::System.Data.DataColumn("conditio", typeof(long), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnconditio); this.columnAttivo = new global::System.Data.DataColumn("Attivo", typeof(bool), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnAttivo); @@ -6339,6 +6353,22 @@ namespace GPW_data { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int conditio { + get { + try { + return ((int)(this[this.tablev_selDipendenti.conditioColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'conditio\' nella tabella \'v_selDipendenti\' è DBNull.", e); + } + } + set { + this[this.tablev_selDipendenti.conditioColumn] = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool IslabelNull() { @@ -6350,6 +6380,18 @@ namespace GPW_data { public void SetlabelNull() { this[this.tablev_selDipendenti.labelColumn] = global::System.Convert.DBNull; } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsconditioNull() { + return this.IsNull(this.tablev_selDipendenti.conditioColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetconditioNull() { + this[this.tablev_selDipendenti.conditioColumn] = global::System.Convert.DBNull; + } } /// @@ -6524,9 +6566,9 @@ namespace GPW_data { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public int conditio { + public long conditio { get { - return ((int)(this[this.tablev_selProgetti.conditioColumn])); + return ((long)(this[this.tablev_selProgetti.conditioColumn])); } set { this[this.tablev_selProgetti.conditioColumn] = value; @@ -8664,6 +8706,7 @@ namespace GPW_data.DS_UtilityTableAdapters { tableMapping.DataSetTable = "v_selDipendenti"; tableMapping.ColumnMappings.Add("value", "value"); tableMapping.ColumnMappings.Add("label", "label"); + tableMapping.ColumnMappings.Add("conditio", "conditio"); this._adapter.TableMappings.Add(tableMapping); } @@ -8680,13 +8723,14 @@ namespace GPW_data.DS_UtilityTableAdapters { this._commandCollection = new global::System.Data.SqlClient.SqlCommand[2]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; - this._commandCollection[0].CommandText = "SELECT value, label\r\nFROM v_selDipendenti\r\nORDER BY label"; + this._commandCollection[0].CommandText = "SELECT *\r\nFROM v_selDipendenti\r\nORDER BY label"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[1].Connection = this.Connection; - this._commandCollection[1].CommandText = "SELECT value, label\r\nFROM v_selDipendentiAttivi\r\nORDER BY label" + - ""; - this._commandCollection[1].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[1].CommandText = "dbo.stp_VSDip_getByConditio"; + this._commandCollection[1].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[1].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[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Conditio", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -8717,8 +8761,14 @@ namespace GPW_data.DS_UtilityTableAdapters { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] - public virtual DS_Utility.v_selDipendentiDataTable getAttivi() { + public virtual DS_Utility.v_selDipendentiDataTable getByConditio(global::System.Nullable Conditio) { this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((Conditio.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((bool)(Conditio.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } DS_Utility.v_selDipendentiDataTable dataTable = new DS_Utility.v_selDipendentiDataTable(); this.Adapter.Fill(dataTable); return dataTable; diff --git a/GPW_Data/DS_Utility.xsd b/GPW_Data/DS_Utility.xsd index 1a7d00e..8777031 100644 --- a/GPW_Data/DS_Utility.xsd +++ b/GPW_Data/DS_Utility.xsd @@ -12,7 +12,7 @@ - SELECT value, label + SELECT * FROM v_selDipendenti ORDER BY label @@ -23,15 +23,17 @@ ORDER BY label + - + - - SELECT value, label -FROM v_selDipendentiAttivi -ORDER BY label - + + dbo.stp_VSDip_getByConditio + + + + @@ -552,6 +554,7 @@ ORDER BY ordinal + @@ -593,7 +596,7 @@ ORDER BY ordinal - + diff --git a/GPW_Data/licenzeGPW.cs b/GPW_Data/licenzeGPW.cs index 58801ea..33d7f1e 100644 --- a/GPW_Data/licenzeGPW.cs +++ b/GPW_Data/licenzeGPW.cs @@ -3,157 +3,168 @@ using System; namespace GPW_data { - public class licenzeGPW - { - /// - /// numero di utenti attivi - /// - public static int utentiAttivi + public class licenzeGPW { - get - { - int answ = DataProxy.DP.taDipendenti.getAttivi().Count; - return answ; - } - } - /// - /// numero di licenze attive sul sw (SE CONFORMI A CHIAVE) altrimenti da dll steamware - /// - public static int licenzeAttive - { - get - { - int answ = 0; - int licenzeMax = SteamWare.licenseMan.getLicenseNum(installazione, applicazione); - // verifico dato su DB sia valido... expiry date con quel numero sia > della data odierna!!! - if (scadenzaLicenza >= DateTime.Today) - { - answ = licenzeDb; - } - else - { - answ = licenzeMax; - } - return answ; - } - } - /// - /// numero di licenze attive su DB (NON verificate!) - /// - public static int licenzeDb - { - get - { - int answ = 0; - // controllo su db... - try - { - answ = DataProxy.DP.taAKV.getByKey(installazione)[0].valInt; - } - catch - { } - return answ; - } - } - /// - /// chaive licenza - /// - public static string authKey - { - get - { - string answ = ""; - // controllo su db... - try - { - answ = DataProxy.DP.taAKV.getByKey(installazione)[0].valString; - } - catch - { } - return answ; - } - } - /// - /// nome installazione sw - /// - public static string installazione - { - get - { - string answ = ""; - try - { - answ = DataProxy.DP.taAKV.getByKey("installazione")[0].valString; - } - catch (Exception exc) - { - logger.lg.scriviLog(string.Format("Errore recupero chiave installazione da AKV: {0}", exc), tipoLog.EXCEPTION); - } - return answ; - } - } - /// - /// modalità applicazione (pagina test.aspx) - /// - public static string modApp - { - get - { - string answ = ""; - try - { - answ = DataProxy.DP.taAKV.getByKey("appMode")[0].valString; - } - catch (Exception exc) - { - logger.lg.scriviLog(string.Format("Errore recupero chiave appMode da AKV: {0}", exc), tipoLog.EXCEPTION); - } - return answ; - } - } - /// - /// nome applicazione sw - /// - public static string applicazione - { - get - { - string answ = memLayer.ML.confReadString("appName"); - return answ; - } - } - /// - /// verifica se numero licenze copre utenti attivi... - /// - public static bool checkLicenze - { - get - { - bool answ = false; - try - { - answ = utentiAttivi <= licenzeAttive; - if (!answ && memLayer.ML.confReadInt("_logLevel") > 5) - { - logger.lg.scriviLog(string.Format("WARNING licenze: utenti attivi {0} / licenziati {1}", utentiAttivi, licenzeAttive), tipoLog.WARNING); - } - } - catch - { } - return answ; - } - } - /// - /// scadenza licenze x applicativo - /// - public static DateTime scadenzaLicenza - { - get - { - DateTime answ = licenseMan.expiryDateByAuthKey(installazione, applicazione, DataProxy.DP.taAKV.getByKey(installazione)[0].valInt, DataProxy.DP.taAKV.getByKey(installazione)[0].valString); - return answ; - } - } + #region Public Properties - } -} + /// + /// nome applicazione sw + /// + public static string applicazione + { + get + { + string answ = memLayer.ML.confReadString("appName"); + return answ; + } + } + + /// + /// chaive licenza + /// + public static string authKey + { + get + { + string answ = ""; + // controllo su db... + try + { + answ = DataProxy.DP.taAKV.getByKey(installazione)[0].valString; + } + catch + { } + return answ; + } + } + + /// + /// verifica se numero licenze copre utenti attivi... + /// + public static bool checkLicenze + { + get + { + bool answ = false; + try + { + answ = utentiAttivi <= licenzeAttive; + if (!answ && memLayer.ML.confReadInt("_logLevel") > 5) + { + logger.lg.scriviLog(string.Format("WARNING licenze: utenti attivi {0} / licenziati {1}", utentiAttivi, licenzeAttive), tipoLog.WARNING); + } + } + catch + { } + return answ; + } + } + + /// + /// nome installazione sw + /// + public static string installazione + { + get + { + string answ = ""; + try + { + answ = DataProxy.DP.taAKV.getByKey("installazione")[0].valString; + } + catch (Exception exc) + { + logger.lg.scriviLog(string.Format("Errore recupero chiave installazione da AKV: {0}", exc), tipoLog.EXCEPTION); + } + return answ; + } + } + + /// + /// numero di licenze attive sul sw (SE CONFORMI A CHIAVE) altrimenti da dll steamware + /// + public static int licenzeAttive + { + get + { + int answ = 0; + int licenzeMax = SteamWare.licenseMan.getLicenseNum(installazione, applicazione); + // verifico dato su DB sia valido... expiry date con quel numero sia > della data odierna!!! + if (scadenzaLicenza >= DateTime.Today) + { + answ = licenzeDb; + } + else + { + answ = licenzeMax; + } + return answ; + } + } + + /// + /// numero di licenze attive su DB (NON verificate!) + /// + public static int licenzeDb + { + get + { + int answ = 0; + // controllo su db... + try + { + answ = DataProxy.DP.taAKV.getByKey(installazione)[0].valInt; + } + catch + { } + return answ; + } + } + + /// + /// modalità applicazione (pagina test.aspx) + /// + public static string modApp + { + get + { + string answ = ""; + try + { + answ = DataProxy.DP.taAKV.getByKey("appMode")[0].valString; + } + catch (Exception exc) + { + logger.lg.scriviLog(string.Format("Errore recupero chiave appMode da AKV: {0}", exc), tipoLog.EXCEPTION); + } + return answ; + } + } + + /// + /// scadenza licenze x applicativo + /// + public static DateTime scadenzaLicenza + { + get + { + DateTime answ = licenseMan.expiryDateByAuthKey(installazione, applicazione, DataProxy.DP.taAKV.getByKey(installazione)[0].valInt, DataProxy.DP.taAKV.getByKey(installazione)[0].valString); + return answ; + } + } + + /// + /// numero di utenti attivi + /// + public static int utentiAttivi + { + get + { + int answ = DataProxy.DP.taDipendenti.getAttivi(false).Count; + return answ; + } + } + + #endregion Public Properties + } +} \ No newline at end of file diff --git a/GPW_Data/utils.cs b/GPW_Data/utils.cs index d25d75e..1f5a901 100644 --- a/GPW_Data/utils.cs +++ b/GPW_Data/utils.cs @@ -9,30 +9,28 @@ namespace GPW_data { public class utils { + #region Public Fields + + /// + /// singleton accesso metodo + /// + public static utils mng = new utils(); + + #endregion Public Fields + + #region Protected Constructors + /// /// avvio oggetti utils /// protected utils() { } - /// - /// restituisce elenco clienti trasformato in dictionary - /// - /// - protected Dictionary ricaricaElencoClienti() - { - Dictionary answ = new Dictionary(); - // recupero elenco clienti da dataproxy - foreach (DS_Applicazione.AnagClientiRow riga in DataProxy.DP.taAnCli.GetData()) - { - answ.Add(riga.idxCliente.ToString(), riga.RagSociale); - } - return answ; - } - /// - /// singleton accesso metodo - /// - public static utils mng = new utils(); + + #endregion Protected Constructors + + #region Public Properties + /// /// dim pagina gridView in sessione /// @@ -55,6 +53,7 @@ namespace GPW_data SteamWare.memLayer.ML.setSessionVal("pageSize", value); } } + /// /// oggetto elenco clienti organizzato come dizionario con chiave idxCliente e valore la ragione sociale /// @@ -88,6 +87,40 @@ namespace GPW_data return answ; } } + + #endregion Public Properties + + #region Protected Methods + + /// + /// restituisce elenco clienti trasformato in dictionary + /// + /// + protected Dictionary ricaricaElencoClienti() + { + Dictionary answ = new Dictionary(); + // recupero elenco clienti da dataproxy + foreach (DS_Applicazione.AnagClientiRow riga in DataProxy.DP.taAnCli.GetData()) + { + answ.Add(riga.idxCliente.ToString(), riga.RagSociale); + } + return answ; + } + + #endregion Protected Methods + + #region Public Methods + + /// + /// formatta le ore in ore:minuti + /// + /// ore centesimali (0,00) + /// + public static string formOreMin(decimal oreCent) + { + return string.Format("{0}:{1:00}", Math.Floor(oreCent), Math.Round((oreCent - Math.Floor(oreCent)) * 60)); + } + /// /// Effettua un insieme di controlli sulle anomalie delel timbrature/orari e invia le relative eventuali email /// @@ -101,16 +134,16 @@ namespace GPW_data logger.lg.scriviLog("Richiesto controllo anomalie!", tipoLog.INFO); /******************************************************* * controllo le varie anomalie delle timbrature: - * + * * (A) mancate approvazioni --> admin * (B) entrate <> uscite --> admin, user * (C) mancata copertura orario --> admin - * + * * (D) mancata copertura commesse (2 be done) - * - * recupero elenco dip interessati x le varie anomalie con stp_DipendentiAndAnomalie + * + * recupero elenco dip interessati x le varie anomalie con stp_DipendentiAndAnomalie * e poi da timbrExpl recupero le singole istanze di record errori - * + * *******************************************************/ // setup valori base @@ -186,7 +219,7 @@ namespace GPW_data corpoEmail += SteamwareStrings.charLine('-', 80); gestEmail.geAuth.mandaEmail(fromEmail, adminEmail, oggettoEmail, corpoEmail); - // re richiesto invio email utenti x warning entrate/uscrite + // re richiesto invio email utenti x warning entrate/uscrite if (memLayer.ML.confReadBool("sendEmailToUser")) { // mando singole email ai dipendenti SE C'è EMAIL!!!! @@ -253,7 +286,7 @@ namespace GPW_data // (D) recupero errori copertura ore lavorate / ore caricate a commessa... if (memLayer.ML.confReadBool("checkAnomOreLavComm")) { - tabTimbRegAtt = DataProxy.DP.taTimbRegAtt.GetData(0, adesso.AddDays(-gg2ChkOreCaricate), adesso.AddHours(1), true, memLayer.ML.confReadInt("maxErrMin"), memLayer.ML.confReadInt("maxErrPlus")); + tabTimbRegAtt = DataProxy.DP.taTimbRegAtt.GetData(0, adesso.AddDays(-gg2ChkOreCaricate), adesso.AddHours(1), false, true, memLayer.ML.confReadInt("maxErrMin"), memLayer.ML.confReadInt("maxErrPlus")); // sulla tabella seleziono SE NON E' OK colonna okLavCom if (((DS_Applicazione.TE_RA_ExplRow[])tabTimbRegAtt.Select(" okLavCom = 0 ")).Length > 0) { @@ -318,6 +351,7 @@ namespace GPW_data DataProxy.DP.taRE.Insert(DateTime.Now, "checkAnomalie", "-"); return answ; } + /// /// Verifica ed eventualmente esegue gli script quotidiani tra cui il check anomalie /// @@ -344,15 +378,7 @@ namespace GPW_data } return answ; } - /// - /// formatta le ore in ore:minuti - /// - /// ore centesimali (0,00) - /// - public static string formOreMin(decimal oreCent) - { - return string.Format("{0}:{1:00}", Math.Floor(oreCent), Math.Round((oreCent - Math.Floor(oreCent)) * 60)); - } - } -} + #endregion Public Methods + } +} \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile index df8358c..e7979ce 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,7 +10,7 @@ pipeline { steps { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=4138']) { + withEnv(['NEXT_BUILD_NUMBER=4140']) { // env.versionNumber = VersionNumber(versionNumberString : '2.7.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '2.7.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.APP_NAME = 'GPW'