diff --git a/MP.Data/Conf/IobTags.cs b/MP.Data/Conf/IobTags.cs
index 500a9684..8cd57341 100644
--- a/MP.Data/Conf/IobTags.cs
+++ b/MP.Data/Conf/IobTags.cs
@@ -1,8 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using System.Collections.Generic;
namespace MP.Data.Conf
{
@@ -11,9 +7,13 @@ namespace MP.Data.Conf
///
public class IobTags
{
+ #region Public Fields
+
///
/// Oggetto dizionario di configurazione x IOB
///
public Dictionary> IobSetup = new Dictionary>();
+
+ #endregion Public Fields
}
-}
+}
\ No newline at end of file
diff --git a/MP.Data/Conf/TagData.cs b/MP.Data/Conf/TagData.cs
index 54f16d40..0042948d 100644
--- a/MP.Data/Conf/TagData.cs
+++ b/MP.Data/Conf/TagData.cs
@@ -1,37 +1,41 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace MP.Data.Conf
+namespace MP.Data.Conf
{
///
/// Item da mostrare nei blocchi MON degli impianti come override ai dati MSE
///
public class TagData
{
+ #region Public Properties
+
///
/// Indice della colonna (ordine) del dato
///
public int ColNum { get; set; } = 0;
+
///
/// Indice della riga del dato
///
public int RowNum { get; set; } = 0;
+
///
/// Override CSS (es fontSmall)
///
public string TagCss { get; set; } = "";
- ///
- /// Etichetta da mostrare
- ///
- public string TagName { get; set; } = "";
+
///
/// Indicazione della chiave REDIS dove recuperare il tag indicato (già in formato string)
///
public string TagLocation { get; set; } = "";
+ ///
+ /// Etichetta da mostrare
+ ///
+ public string TagName { get; set; } = "";
+
+ #endregion Public Properties
+
+ #region Public Methods
+
///
/// Clone dell'oggetto
///
@@ -40,5 +44,7 @@ namespace MP.Data.Conf
{
return (TagData)this.MemberwiseClone();
}
+
+ #endregion Public Methods
}
-}
+}
\ No newline at end of file
diff --git a/MP.Data/Constants.cs b/MP.Data/Constants.cs
index 10d0028c..8308ead4 100644
--- a/MP.Data/Constants.cs
+++ b/MP.Data/Constants.cs
@@ -1,21 +1,19 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace MP.Data
+namespace MP.Data
{
- public class Constants
+ public class Constants
{
+ #region Public Fields
+
+ public static readonly string ACT_BLINK_KEY = $"{BASE_HASH}:Current:Blink";
+
+ public static readonly string ACT_MSE_DATA_KEY = $"{BASE_HASH}:Current:MSE";
// dati conf REDIS Cache
public static readonly string BASE_HASH = "MAPO";
// REDIS KEY Dati correnti
public static readonly string CONF_MON_KEY = $"{BASE_HASH}:Conf:MonDispData";
- public static readonly string ACT_MSE_DATA_KEY = $"{BASE_HASH}:Current:MSE";
- public static readonly string ACT_BLINK_KEY = $"{BASE_HASH}:Current:Blink";
-
+
+ #endregion Public Fields
}
-}
+}
\ No newline at end of file
diff --git a/MP.Data/Controllers/MpStatsController.cs b/MP.Data/Controllers/MpStatsController.cs
index e070696e..8f41290e 100644
--- a/MP.Data/Controllers/MpStatsController.cs
+++ b/MP.Data/Controllers/MpStatsController.cs
@@ -10,14 +10,6 @@ namespace MP.Data.Controllers
{
public class MpStatsController : IDisposable
{
- #region Private Fields
-
- private static IConfiguration _configuration;
-
- private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
-
- #endregion Private Fields
-
#region Public Constructors
public MpStatsController(IConfiguration configuration)
@@ -326,5 +318,13 @@ namespace MP.Data.Controllers
}
#endregion Public Methods
+
+ #region Private Fields
+
+ private static IConfiguration _configuration;
+
+ private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
+
+ #endregion Private Fields
}
}
\ No newline at end of file
diff --git a/MP.Data/DTO/DossierFluxLogDTO.cs b/MP.Data/DTO/DossierFluxLogDTO.cs
index 37cc8819..67cecb73 100644
--- a/MP.Data/DTO/DossierFluxLogDTO.cs
+++ b/MP.Data/DTO/DossierFluxLogDTO.cs
@@ -5,6 +5,10 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
+#nullable disable
+//
+// This is here so CodeMaid doesn't reorganize this document
+//
namespace MP.Data.DTO
{
public class DossierFluxLogDTO
diff --git a/MP.Data/DatabaseModels/AnagArticoli.cs b/MP.Data/DatabaseModels/AnagArticoli.cs
index a3e6bddd..8b889c73 100644
--- a/MP.Data/DatabaseModels/AnagArticoli.cs
+++ b/MP.Data/DatabaseModels/AnagArticoli.cs
@@ -3,7 +3,9 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
#nullable disable
-
+//
+// This is here so CodeMaid doesn't reorganize this document
+//
namespace MP.Data.DatabaseModels
{
[Table("AnagArticoli")]
diff --git a/MP.Data/DatabaseModels/AnagGruppi.cs b/MP.Data/DatabaseModels/AnagGruppi.cs
index bab7168a..ccaff018 100644
--- a/MP.Data/DatabaseModels/AnagGruppi.cs
+++ b/MP.Data/DatabaseModels/AnagGruppi.cs
@@ -4,7 +4,9 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
#nullable disable
-
+//
+// This is here so CodeMaid doesn't reorganize this document
+//
namespace MP.Data.DatabaseModels
{
[Table("AnagraficaGruppi")]
diff --git a/MP.Data/DatabaseModels/AzioniUL.cs b/MP.Data/DatabaseModels/AzioniUL.cs
index ce81115b..38b0b372 100644
--- a/MP.Data/DatabaseModels/AzioniUL.cs
+++ b/MP.Data/DatabaseModels/AzioniUL.cs
@@ -2,7 +2,9 @@
using System.Collections.Generic;
#nullable disable
-
+//
+// This is here so CodeMaid doesn't reorganize this document
+//
namespace MP.Data.DatabaseModels
{
public partial class AzioniUL
diff --git a/MP.Data/DatabaseModels/ConfigModel.cs b/MP.Data/DatabaseModels/ConfigModel.cs
index eb4a1ac3..e053dc25 100644
--- a/MP.Data/DatabaseModels/ConfigModel.cs
+++ b/MP.Data/DatabaseModels/ConfigModel.cs
@@ -2,6 +2,10 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
+#nullable disable
+//
+// This is here so CodeMaid doesn't reorganize this document
+//
namespace MP.Data.DatabaseModels
{
[Table("Config")]
diff --git a/MP.Data/DatabaseModels/DdbTurni.cs b/MP.Data/DatabaseModels/DdbTurni.cs
index acdec7e2..14cd5104 100644
--- a/MP.Data/DatabaseModels/DdbTurni.cs
+++ b/MP.Data/DatabaseModels/DdbTurni.cs
@@ -4,6 +4,9 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
#nullable disable
+//
+// This is here so CodeMaid doesn't reorganize this document
+//
namespace MP.Data.DatabaseModels
{
diff --git a/MP.Data/DatabaseModels/Dossiers.cs b/MP.Data/DatabaseModels/Dossiers.cs
index 23edff12..a44a47bf 100644
--- a/MP.Data/DatabaseModels/Dossiers.cs
+++ b/MP.Data/DatabaseModels/Dossiers.cs
@@ -2,8 +2,11 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-#nullable disable
+#nullable disable
+//
+// This is here so CodeMaid doesn't reorganize this document
+//
namespace MP.Data.DatabaseModels
{
[Table("Dossiers")]
@@ -12,15 +15,14 @@ namespace MP.Data.DatabaseModels
#region Public Properties
[MaxLength(50)]
- public string IdxMacchina { get; set; }
+ public string DataType { get; set; }
public DateTime DtRif { get; set; }
- public int IdxODL { get; set; }
-
[MaxLength(50)]
- public string DataType { get; set; }
+ public string IdxMacchina { get; set; }
+ public int IdxODL { get; set; }
public string Valore { get; set; }
#endregion Public Properties
diff --git a/MP.Data/DatabaseModels/FluxLog.cs b/MP.Data/DatabaseModels/FluxLog.cs
index 52ee8133..42e8426d 100644
--- a/MP.Data/DatabaseModels/FluxLog.cs
+++ b/MP.Data/DatabaseModels/FluxLog.cs
@@ -2,8 +2,11 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-#nullable disable
+#nullable disable
+//
+// This is here so CodeMaid doesn't reorganize this document
+//
namespace MP.Data.DatabaseModels
{
[Table("FluxLog")]
diff --git a/MP.Data/DatabaseModels/LinkMenuJQM.cs b/MP.Data/DatabaseModels/LinkMenuJQM.cs
index 6f885057..f17daf93 100644
--- a/MP.Data/DatabaseModels/LinkMenuJQM.cs
+++ b/MP.Data/DatabaseModels/LinkMenuJQM.cs
@@ -3,8 +3,11 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-#nullable disable
+#nullable disable
+//
+// This is here so CodeMaid doesn't reorganize this document
+//
namespace MP.Data.DatabaseModels
{
[Table("LinkMenuJQM")]
diff --git a/MP.Data/DatabaseModels/ListValues.cs b/MP.Data/DatabaseModels/ListValues.cs
index 75a6f12c..7aa9edfd 100644
--- a/MP.Data/DatabaseModels/ListValues.cs
+++ b/MP.Data/DatabaseModels/ListValues.cs
@@ -1,8 +1,11 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-#nullable disable
+#nullable disable
+//
+// This is here so CodeMaid doesn't reorganize this document
+//
namespace MP.Data.DatabaseModels
{
[Table("ListValues")]
diff --git a/MP.Data/DatabaseModels/Macchine.cs b/MP.Data/DatabaseModels/Macchine.cs
index f9469bb1..80660970 100644
--- a/MP.Data/DatabaseModels/Macchine.cs
+++ b/MP.Data/DatabaseModels/Macchine.cs
@@ -1,8 +1,11 @@
using System;
using System.Collections.Generic;
-#nullable disable
+#nullable disable
+//
+// This is here so CodeMaid doesn't reorganize this document
+//
namespace MP.Data.DatabaseModels
{
public partial class Macchine
diff --git a/MP.Data/DatabaseModels/MappaStatoExpl.cs b/MP.Data/DatabaseModels/MappaStatoExpl.cs
index 5ec09875..09149dd4 100644
--- a/MP.Data/DatabaseModels/MappaStatoExpl.cs
+++ b/MP.Data/DatabaseModels/MappaStatoExpl.cs
@@ -1,6 +1,10 @@
using System;
using System.Collections.Generic;
+#nullable disable
+//
+// This is here so CodeMaid doesn't reorganize this document
+//
namespace MP.Data.DatabaseModels
{
public partial class MappaStatoExpl
diff --git a/MP.Data/DatabaseModels/ODLModel.cs b/MP.Data/DatabaseModels/ODLModel.cs
index 6e411485..2f31ead6 100644
--- a/MP.Data/DatabaseModels/ODLModel.cs
+++ b/MP.Data/DatabaseModels/ODLModel.cs
@@ -3,8 +3,11 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-#nullable disable
+#nullable disable
+//
+// This is here so CodeMaid doesn't reorganize this document
+//
namespace MP.Data.DatabaseModels
{
[Table("ODL")]
diff --git a/MP.Data/DatabaseModels/PODLModel.cs b/MP.Data/DatabaseModels/PODLModel.cs
index 3f0dd58b..73b5b19d 100644
--- a/MP.Data/DatabaseModels/PODLModel.cs
+++ b/MP.Data/DatabaseModels/PODLModel.cs
@@ -3,8 +3,11 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-#nullable disable
+#nullable disable
+//
+// This is here so CodeMaid doesn't reorganize this document
+//
namespace MP.Data.DatabaseModels
{
[Table("PromesseODL")]
diff --git a/MP.Data/DatabaseModels/ResControlli.cs b/MP.Data/DatabaseModels/ResControlli.cs
index a4d96e77..762ab3d6 100644
--- a/MP.Data/DatabaseModels/ResControlli.cs
+++ b/MP.Data/DatabaseModels/ResControlli.cs
@@ -1,8 +1,11 @@
using System;
using System.Collections.Generic;
-#nullable disable
+#nullable disable
+//
+// This is here so CodeMaid doesn't reorganize this document
+//
namespace MP.Data.DatabaseModels
{
public partial class ResControlli
diff --git a/MP.Data/DatabaseModels/ResScarti.cs b/MP.Data/DatabaseModels/ResScarti.cs
index 093e00f8..eeb0ac62 100644
--- a/MP.Data/DatabaseModels/ResScarti.cs
+++ b/MP.Data/DatabaseModels/ResScarti.cs
@@ -1,8 +1,11 @@
using System;
using System.Collections.Generic;
-#nullable disable
+#nullable disable
+//
+// This is here so CodeMaid doesn't reorganize this document
+//
namespace MP.Data.DatabaseModels
{
public partial class ResScarti
diff --git a/MP.Data/DatabaseModels/StatsAnagArticoli.cs b/MP.Data/DatabaseModels/StatsAnagArticoli.cs
index 02b6ad12..a7d7dbc6 100644
--- a/MP.Data/DatabaseModels/StatsAnagArticoli.cs
+++ b/MP.Data/DatabaseModels/StatsAnagArticoli.cs
@@ -1,8 +1,11 @@
using System;
using System.Collections.Generic;
-#nullable disable
+#nullable disable
+//
+// This is here so CodeMaid doesn't reorganize this document
+//
namespace MP.Data.DatabaseModels
{
public partial class StatsAnagArticoli
diff --git a/MP.Data/DatabaseModels/StatsODL.cs b/MP.Data/DatabaseModels/StatsODL.cs
index b84a6a98..5fa494ed 100644
--- a/MP.Data/DatabaseModels/StatsODL.cs
+++ b/MP.Data/DatabaseModels/StatsODL.cs
@@ -1,8 +1,11 @@
using System;
using System.Collections.Generic;
-#nullable disable
+#nullable disable
+//
+// This is here so CodeMaid doesn't reorganize this document
+//
namespace MP.Data.DatabaseModels
{
public partial class StatsODL
diff --git a/MP.Data/DatabaseModels/TurniOee.cs b/MP.Data/DatabaseModels/TurniOee.cs
index 0c0279f8..cd54c135 100644
--- a/MP.Data/DatabaseModels/TurniOee.cs
+++ b/MP.Data/DatabaseModels/TurniOee.cs
@@ -3,8 +3,11 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-#nullable disable
+#nullable disable
+//
+// This is here so CodeMaid doesn't reorganize this document
+//
namespace MP.Data.DatabaseModels
{
public partial class TurniOee
diff --git a/MP.Data/DatabaseModels/UserActionLog.cs b/MP.Data/DatabaseModels/UserActionLog.cs
index d6357f43..28fff76c 100644
--- a/MP.Data/DatabaseModels/UserActionLog.cs
+++ b/MP.Data/DatabaseModels/UserActionLog.cs
@@ -1,8 +1,11 @@
using System;
using System.Collections.Generic;
-#nullable disable
+#nullable disable
+//
+// This is here so CodeMaid doesn't reorganize this document
+//
namespace MP.Data.DatabaseModels
{
public partial class UserActionLog
diff --git a/MP.Data/MessagePipe.cs b/MP.Data/MessagePipe.cs
index 44988e21..098cdc4e 100644
--- a/MP.Data/MessagePipe.cs
+++ b/MP.Data/MessagePipe.cs
@@ -1,29 +1,11 @@
using NLog;
using StackExchange.Redis;
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace MP.Data
{
public class MessagePipe
{
- #region Private Fields
-
- private bool enableLog = false;
- private IConnectionMultiplexer redis;
- private IDatabase? redisDb;
-
- #endregion Private Fields
-
- #region Protected Fields
-
- protected static Logger Log = LogManager.GetCurrentClassLogger();
-
- #endregion Protected Fields
-
#region Public Constructors
public MessagePipe(IConnectionMultiplexer redisConn, string channelName, bool enableLog = false)
@@ -44,37 +26,6 @@ namespace MP.Data
#endregion Public Events
- #region Private Properties
-
- ///
- /// Canale associato al gestore pipeline messaggi
- ///
- private string _channel { get; set; } = "";
-
- #endregion Private Properties
-
- #region Private Methods
-
- private void setupSubscriber()
- {
- ISubscriber sub = redis.GetSubscriber();
- //Subscribe to the channel named messages
- sub.Subscribe(_channel, (channel, message) =>
- {
- Log.Trace($"ch {channel} | {message}");
- // messaggio
- PubSubEventArgs mea = new PubSubEventArgs(message);
- // se qualcuno ascolta sollevo evento nuovo valore...
- if (EA_NewMessage != null)
- {
- EA_NewMessage(this, mea);
- }
- });
- Log.Info($"Subscribed {_channel}");
- }
-
- #endregion Private Methods
-
#region Public Methods
public bool saveAndSendMessage(string memKey, string message)
@@ -108,6 +59,51 @@ namespace MP.Data
#endregion Public Methods
+ #region Protected Fields
+
+ protected static Logger Log = LogManager.GetCurrentClassLogger();
+
+ #endregion Protected Fields
+
+ #region Private Fields
+
+ private bool enableLog = false;
+ private IConnectionMultiplexer redis;
+ private IDatabase? redisDb;
+
+ #endregion Private Fields
+
+ #region Private Properties
+
+ ///
+ /// Canale associato al gestore pipeline messaggi
+ ///
+ private string _channel { get; set; } = "";
+
+ #endregion Private Properties
+
+ #region Private Methods
+
+ private void setupSubscriber()
+ {
+ ISubscriber sub = redis.GetSubscriber();
+ //Subscribe to the channel named messages
+ sub.Subscribe(_channel, (channel, message) =>
+ {
+ Log.Trace($"ch {channel} | {message}");
+ // messaggio
+ PubSubEventArgs mea = new PubSubEventArgs(message);
+ // se qualcuno ascolta sollevo evento nuovo valore...
+ if (EA_NewMessage != null)
+ {
+ EA_NewMessage(this, mea);
+ }
+ });
+ Log.Info($"Subscribed {_channel}");
+ }
+
+ #endregion Private Methods
+
///
/// Invio messaggio sul canale + salvataggio in cache REDIS
///
@@ -132,4 +128,4 @@ namespace MP.Data
#endregion Public Properties
}
-}
+}
\ No newline at end of file
diff --git a/MP.Data/MoonProContext.cs b/MP.Data/MoonProContext.cs
index 168c3c66..221d765b 100644
--- a/MP.Data/MoonProContext.cs
+++ b/MP.Data/MoonProContext.cs
@@ -6,7 +6,9 @@ using MP.Data.DatabaseModels;
using NLog;
#nullable disable
-
+//
+// This is here so CodeMaid doesn't reorganize this document
+//
namespace MP.Data
{
public partial class MoonProContext : DbContext
diff --git a/MP.Data/MoonPro_STATSContext.cs b/MP.Data/MoonPro_STATSContext.cs
index 3a83c4f8..3dc94775 100644
--- a/MP.Data/MoonPro_STATSContext.cs
+++ b/MP.Data/MoonPro_STATSContext.cs
@@ -6,7 +6,9 @@ using MP.Data.DatabaseModels;
using NLog;
#nullable disable
-
+//
+// This is here so CodeMaid doesn't reorganize this document
+//
namespace MP.Data
{
public partial class MoonPro_STATSContext : DbContext
diff --git a/MP.Data/Utils.cs b/MP.Data/Utils.cs
index 5d70ae78..b1d5b6d0 100644
--- a/MP.Data/Utils.cs
+++ b/MP.Data/Utils.cs
@@ -3,13 +3,26 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
-using System.Text;
using System.Threading.Tasks;
namespace MP.Data
{
public class Utils
{
+ #region Public Properties
+
+ public static string redKeyArtUsed
+ {
+ get => RedHash($"CACHE:CheckArtUsed");
+ }
+
+ public static string redKeyTabCheckArt
+ {
+ get => RedHash($"CACHE:TabCheckArt");
+ }
+
+ #endregion Public Properties
+
#region Public Methods
public static string ConvMinToTime(double minutes)
@@ -28,6 +41,22 @@ namespace MP.Data
return answ;
}
+ ///
+ /// Nome della variabile HASH da utilizzare (dato CodModulo / Server / DB impiegato da
+ /// funzionalita' DbConfig) + keyName richiesto...
+ ///
+ public static string RedHash(string keyName)
+ {
+ string answ = keyName;
+ try
+ {
+ answ = $"MP:Data:{keyName}";
+ }
+ catch
+ { }
+ return answ;
+ }
+
public static async Task SaveToCsv(List reportData, string path)
{
var lines = new List();
@@ -39,30 +68,6 @@ namespace MP.Data
await Task.Run(() => File.WriteAllLines(path, lines.ToArray()));
}
- public static string redKeyArtUsed
- {
- get => RedHash($"CACHE:CheckArtUsed");
- }
- public static string redKeyTabCheckArt
- {
- get => RedHash($"CACHE:TabCheckArt");
- }
-
- ///
- /// Nome della variabile HASH da utilizzare (dato CodModulo / Server / DB impiegato da funzionalita' DbConfig) + keyName richiesto...
- ///
- public static string RedHash(string keyName)
- {
- string answ = keyName;
- try
- {
- answ =$"MP:Data:{keyName}";
- }
- catch
- { }
- return answ;
- }
-
#endregion Public Methods
}
}
\ No newline at end of file
diff --git a/MP.SPEC/Pages/DOSS.razor.cs b/MP.SPEC/Pages/DOSS.razor.cs
index 430be307..65c77aa6 100644
--- a/MP.SPEC/Pages/DOSS.razor.cs
+++ b/MP.SPEC/Pages/DOSS.razor.cs
@@ -20,15 +20,17 @@ namespace MP.SPEC.Pages
#endregion Protected Properties
#region Protected Methods
+
+ protected void ForceReload(int newNum)
+ {
+ numRecord = newNum;
+ }
+
protected void ForceReloadPage(int newNum)
{
currPage = newNum;
StateHasChanged();
}
- protected void ForceReload(int newNum)
- {
- numRecord = newNum;
- }
protected override async Task OnInitializedAsync()
{