diff --git a/MP.Data/Controllers/MpSpecController.cs b/MP.Data/Controllers/MpSpecController.cs index 7e67c870..10e5bf5c 100644 --- a/MP.Data/Controllers/MpSpecController.cs +++ b/MP.Data/Controllers/MpSpecController.cs @@ -110,7 +110,7 @@ namespace MP.Data.Controllers dbResult = dbCtx .DbSetDossiers .AsNoTracking() - .Select(i => i.OdlNav.CodArticolo) + .Select(i => i.CodArticolo) .Distinct() .ToList(); } @@ -302,7 +302,7 @@ namespace MP.Data.Controllers /// /// record dossier da eliminare /// - public async Task DossiersDeleteRecord(Dossiers currRec) + public async Task DossiersDeleteRecord(DossierModel currRec) { bool answ = false; using (var dbCtx = new MoonProContext(_configuration)) @@ -336,18 +336,18 @@ namespace MP.Data.Controllers /// Data minima per estrazione records /// Data Massima per estrazione records /// - public List DossiersGetLastFilt(string IdxMacchina, string CodArticolo, DateTime DtStart, DateTime DtEnd) + public List DossiersGetLastFilt(string IdxMacchina, string CodArticolo, DateTime DtStart, DateTime DtEnd) { - List dbResult = new List(); + List dbResult = new List(); using (var dbCtx = new MoonProContext(_configuration)) { dbResult = dbCtx .DbSetDossiers .AsNoTracking() - .Where(x => (IdxMacchina == "*" || x.IdxMacchina == IdxMacchina) && (CodArticolo == "*" || x.OdlNav.CodArticolo == CodArticolo) && (x.DtRif >= DtStart && x.DtRif <= DtEnd)) + .Where(x => (IdxMacchina == "*" || x.IdxMacchina == IdxMacchina) && (CodArticolo == "*" || x.CodArticolo == CodArticolo) && (x.DtRif >= DtStart && x.DtRif <= DtEnd)) .Include(m => m.MachineNav) - .Include(o => o.OdlNav) - .Include(a => a.OdlNav.ArticoloNav) + //.Include(o => o.OdlNav) + .Include(a => a.ArticoloNav) .OrderByDescending(x => x.DtRif) .ToList(); } @@ -359,7 +359,7 @@ namespace MP.Data.Controllers /// /// record dossier da modificare /// - public async Task DossiersInsert(Dossiers newRec) + public async Task DossiersInsert(DossierModel newRec) { bool fatto = false; using (var dbCtx = new MoonProContext(_configuration)) @@ -431,7 +431,7 @@ namespace MP.Data.Controllers /// /// record dossier da modificare /// - public async Task DossiersUpdateValore(Dossiers editRec) + public async Task DossiersUpdateValore(DossierModel editRec) { bool fatto = false; using (var dbCtx = new MoonProContext(_configuration)) diff --git a/MP.Data/DatabaseModels/Dossiers.cs b/MP.Data/DatabaseModels/DossierModel.cs similarity index 79% rename from MP.Data/DatabaseModels/Dossiers.cs rename to MP.Data/DatabaseModels/DossierModel.cs index 66cc2fe8..5292fe98 100644 --- a/MP.Data/DatabaseModels/Dossiers.cs +++ b/MP.Data/DatabaseModels/DossierModel.cs @@ -10,7 +10,7 @@ using System.ComponentModel.DataAnnotations.Schema; namespace MP.Data.DatabaseModels { [Table("Dossiers")] - public partial class Dossiers + public partial class DossierModel { #region Public Properties @@ -31,7 +31,8 @@ namespace MP.Data.DatabaseModels public string Valore { get; set; } = ""; - + [MaxLength(50)] + public string KeyRichiesta { get; set; } = ""; /// /// Navigazione oggetto Machine @@ -45,6 +46,12 @@ namespace MP.Data.DatabaseModels [ForeignKey("IdxODL")] public virtual ODLModel OdlNav { get; set; } = null!; + /// + /// Navigazione oggetto Articolo + /// + [ForeignKey("CodArticolo")] + public virtual AnagArticoli ArticoloNav { get; set; } = null!; + #endregion Public Properties } } \ No newline at end of file diff --git a/MP.Data/DatabaseModels/Macchine.cs b/MP.Data/DatabaseModels/Macchine.cs index 80660970..4337b5ef 100644 --- a/MP.Data/DatabaseModels/Macchine.cs +++ b/MP.Data/DatabaseModels/Macchine.cs @@ -1,5 +1,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; #nullable disable @@ -8,14 +10,22 @@ using System.Collections.Generic; // namespace MP.Data.DatabaseModels { + [Table("Macchine")] public partial class Macchine { #region Public Properties - public string CodMacchina { get; set; } - public string Descrizione { get; set; } + [Key] public string IdxMacchina { get; set; } - public string Nome { get; set; } + public string CodMacchina { get; set; } = ""; + public string Descrizione { get; set; } = ""; + public string Nome { get; set; } = ""; + public string Note { get; set; } = ""; + public string url { get; set; } = ""; + public string locazione { get; set; } = ""; + public string css { get; set; } = ""; + public int RowNum { get; set; } = 0; + public int ColNum { get; set; } = 0; #endregion Public Properties } diff --git a/MP.Data/MoonProContext.cs b/MP.Data/MoonProContext.cs index 2ed53d5e..5cf650a3 100644 --- a/MP.Data/MoonProContext.cs +++ b/MP.Data/MoonProContext.cs @@ -47,7 +47,7 @@ namespace MP.Data public virtual DbSet DbSetODL { get; set; } public virtual DbSet DbSetPODL { get; set; } public virtual DbSet DbSetFluxLog { get; set; } - public virtual DbSet DbSetDossiers { get; set; } + public virtual DbSet DbSetDossiers { get; set; } public virtual DbSet DbSetStatOdl { get; set; } public virtual DbSet DbSetStatoProd { get; set; } public virtual DbSet DbSetEvList { get; set; } diff --git a/MP.Land/Components/CmpTop.razor b/MP.Land/Components/CmpTop.razor index 4c81ffd1..534995a0 100644 --- a/MP.Land/Components/CmpTop.razor +++ b/MP.Land/Components/CmpTop.razor @@ -22,62 +22,7 @@ -@code { - //[CascadingParameter] - //private Task AuthenticationStateTask { get; set; } - - [CascadingParameter(Name = "ShowSearch")] - private bool ShowSearch { get; set; } - - private string userName = ""; - - private string PageName { get; set; } - private string PageIcon { get; set; } - - protected override async Task OnInitializedAsync() - { - await forceReload(); - } - - protected override void OnInitialized() - { - AppMessages.EA_PageUpdated += OnPageUpdate; - } - public void OnPageUpdate() - { - PageName = AppMessages.PageName; - PageIcon = AppMessages.PageIcon; - InvokeAsync(() => - { - StateHasChanged(); - }); - } - - public void Dispose() - { - AppMessages.EA_PageUpdated -= OnPageUpdate; - } - - private async Task forceReload() - { - userName = "N.A."; - await Task.Delay(1); -#if false -var authState = await AuthenticationStateProvider.GetAuthenticationStateAsync(); -var user = authState.User; - -if (user.Identity.IsAuthenticated) -{ -userName = $"{user.Identity.Name}"; -} -else -{ -userName = "N.A."; -} -#endif - } -} @* // Vedere anche: // https://docs.microsoft.com/en-us/aspnet/core/blazor/security/?view=aspnetcore-5.0#:~:text=Blazor%20uses%20the%20existing%20ASP.NET%20Core%20authentication%20mechanisms,all%20client-side%20code%20can%20be%20modified%20by%20users diff --git a/MP.Land/Components/CmpTop.razor.cs b/MP.Land/Components/CmpTop.razor.cs new file mode 100644 index 00000000..1706938e --- /dev/null +++ b/MP.Land/Components/CmpTop.razor.cs @@ -0,0 +1,83 @@ +using Microsoft.AspNetCore.Components; +using System; +using System.Threading.Tasks; + +namespace MP.Land.Components +{ + public partial class CmpTop + { + #region Public Methods + + public void Dispose() + { + AppMessages.EA_PageUpdated -= OnPageUpdate; + GC.Collect(); + } + + public void OnPageUpdate() + { + PageName = AppMessages.PageName; + PageIcon = AppMessages.PageIcon; + InvokeAsync(() => + { + StateHasChanged(); + }); + } + + #endregion Public Methods + + #region Protected Methods + + protected override void OnInitialized() + { + AppMessages.EA_PageUpdated += OnPageUpdate; + } + + protected override async Task OnInitializedAsync() + { + await forceReload(); + } + + #endregion Protected Methods + + #region Private Fields + + private string userName = ""; + + #endregion Private Fields + + #region Private Properties + + private string PageIcon { get; set; } + + private string PageName { get; set; } + + [CascadingParameter(Name = "ShowSearch")] + private bool ShowSearch { get; set; } + + #endregion Private Properties + + #region Private Methods + + private async Task forceReload() + { + userName = "N.A."; + await Task.Delay(1); +#if false +var authState = await AuthenticationStateProvider.GetAuthenticationStateAsync(); +var user = authState.User; + +if (user.Identity.IsAuthenticated) +{ +userName = $"{user.Identity.Name}"; +} +else +{ +userName = "N.A."; +} +#endif + } + + #endregion Private Methods + } +} \ No newline at end of file diff --git a/MP.Land/Components/HomeLink.razor b/MP.Land/Components/HomeLink.razor index e7eaef7e..c95301c7 100644 --- a/MP.Land/Components/HomeLink.razor +++ b/MP.Land/Components/HomeLink.razor @@ -53,79 +53,3 @@ else // disegno box non cliccabile e licenza mancante } -@code { - - [Parameter] - public UpdMan CurrItem { get; set; } - - protected List AKVList - { - get - { - return LicServ.AKVList; - } - set - { - LicServ.AKVList = value; - } - } - - - protected override async Task OnInitializedAsync() - { - // check init AKV - if (AKVList == null || AKVList.Count == 0) - { - AKVList = await DataService.AnagKeyValList(); - LicServ.InitAkv(); - } - } - - - protected string getAKVString(string nomeVar) - { - string answ = ""; - if (AKVList != null) - { - var currRec = AKVList.FirstOrDefault(x => x.NomeVar == nomeVar); - if (currRec != null) - { - answ = currRec.ValString; - } - } - return answ; - } - - protected AnagKeyValueModel getAKVRec(string nomeVar) - { - AnagKeyValueModel answ = new AnagKeyValueModel(); - if (AKVList != null) - { - answ = AKVList.FirstOrDefault(x => x.NomeVar == nomeVar); - } - return answ; - } - - protected bool authOk() - { - bool allOk = !string.IsNullOrEmpty(CurrItem.LicenseKey); - if (allOk) - { - allOk = LicServ.checkLicenseActive(CurrItem.LicenseKey); - } - return allOk; - } - - protected string fullUrl(string relUrl) - { - return $"{Configuration["ServerConf:BaseUrl"]}{relUrl}"; - } - - protected MarkupString traduci(string lemma) - { - MarkupString answ; - string rawHtml = DataService.Traduci(lemma, "IT"); - answ = new MarkupString(rawHtml); - return answ; - } -} \ No newline at end of file diff --git a/MP.Land/Components/HomeLink.razor.cs b/MP.Land/Components/HomeLink.razor.cs new file mode 100644 index 00000000..fee7c062 --- /dev/null +++ b/MP.Land/Components/HomeLink.razor.cs @@ -0,0 +1,109 @@ +using Microsoft.AspNetCore.Components; +using MP.AppAuth.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace MP.Land.Components +{ + public partial class HomeLink : IDisposable + { + #region Public Properties + + [Parameter] + public UpdMan CurrItem { get; set; } + + #endregion Public Properties + + #region Public Methods + + public void Dispose() + { + GC.Collect(); + } + + #endregion Public Methods + + #region Protected Properties + + protected List AKVList + { + get + { + return LicServ.AKVList; + } + + set + { + LicServ.AKVList = value; + } + } + + #endregion Protected Properties + + #region Protected Methods + + protected bool authOk() + { + bool allOk = !string.IsNullOrEmpty(CurrItem.LicenseKey); + if (allOk) + { + allOk = LicServ.checkLicenseActive(CurrItem.LicenseKey); + } + + return allOk; + } + + protected string fullUrl(string relUrl) + { + return $"{Configuration["ServerConf:BaseUrl"]}{relUrl}"; + } + + protected AnagKeyValueModel getAKVRec(string nomeVar) + { + AnagKeyValueModel answ = new AnagKeyValueModel(); + if (AKVList != null) + { + answ = AKVList.FirstOrDefault(x => x.NomeVar == nomeVar); + } + + return answ; + } + + protected string getAKVString(string nomeVar) + { + string answ = ""; + if (AKVList != null) + { + var currRec = AKVList.FirstOrDefault(x => x.NomeVar == nomeVar); + if (currRec != null) + { + answ = currRec.ValString; + } + } + + return answ; + } + + protected override async Task OnInitializedAsync() + { + // check init AKV + if (AKVList == null || AKVList.Count == 0) + { + AKVList = await DataService.AnagKeyValList(); + LicServ.InitAkv(); + } + } + + protected MarkupString traduci(string lemma) + { + MarkupString answ; + string rawHtml = DataService.Traduci(lemma, "IT"); + answ = new MarkupString(rawHtml); + return answ; + } + + #endregion Protected Methods + } +} \ No newline at end of file diff --git a/MP.Land/Data/LicenseService.cs b/MP.Land/Data/LicenseService.cs index a9919f55..baeb055c 100644 --- a/MP.Land/Data/LicenseService.cs +++ b/MP.Land/Data/LicenseService.cs @@ -372,7 +372,35 @@ namespace MP.Land.Data } else { - _logger.LogInformation($"Record non trovato per {authKey}"); + _logger.LogInformation($"checkLicenseActive | Record non trovato per {authKey}"); + } + } + return answ; + } + /// + /// Verifica scadenza licenza + /// + /// + /// + public DateTime getLicenseExpiry(string authKey) + { + DateTime answ = DateTime.Today.AddDays(-1); + //cerco anche nelle info AKV + if (AKVList != null) + { + var recLic = AKVList.Where(x => x.ValString == authKey).FirstOrDefault(); + int numLic = 0; + //cerco in record + if (recLic != null) + { + numLic = (int)recLic.ValInt; + // verifico scadenza licenza! + DateTime scadenza = licenseManGLS.expiryDateByAuthKey(Installazione, recLic.NomeVar, numLic, authKey); + answ = scadenza; + } + else + { + _logger.LogInformation($"getLicenseExpiry | Record non trovato per {authKey}"); } } return answ; diff --git a/MP.Land/MP.Land.csproj b/MP.Land/MP.Land.csproj index 46488966..e5d244a5 100644 --- a/MP.Land/MP.Land.csproj +++ b/MP.Land/MP.Land.csproj @@ -3,7 +3,7 @@ net6.0 MP.Land - 6.16.2210.2110 + 6.16.2211.0416 diff --git a/MP.Land/Pages/About.razor.cs b/MP.Land/Pages/About.razor.cs index d07f8e45..2f7a0ded 100644 --- a/MP.Land/Pages/About.razor.cs +++ b/MP.Land/Pages/About.razor.cs @@ -1,40 +1,12 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Components; -using System.Net.Http; -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Components.Authorization; -using Microsoft.AspNetCore.Components.Forms; -using Microsoft.AspNetCore.Components.Routing; -using Microsoft.AspNetCore.Components.Web; -using Microsoft.AspNetCore.Components.Web.Virtualization; -using Microsoft.JSInterop; -using MP.Land; -using MP.Land.Shared; -using MP.Land.Data; using NLog; +using System; +using System.Threading.Tasks; namespace MP.Land.Pages { public partial class About { - private static NLog.Logger Log = LogManager.GetCurrentClassLogger(); - private string Titolo = ""; - private string Messaggio = ""; - - private string ServerStatus = "SrvState"; - private string Installazione = "Inst"; - private string Applicazione = "App"; - private string Licenze = "#"; - private DateTime Scadenza = DateTime.Today; - private string MastKey = "########################"; - - private string mainCss = "alert alert-info"; - private string remSrvCss = "bg-warning text-secondary"; - private string expDateCss = "bg-warning text-secondary"; - private string licenseCss = "bg-warning text-secondary"; + #region Protected Methods protected override async Task OnInitializedAsync() { @@ -43,9 +15,31 @@ namespace MP.Land.Pages await reloadLicenseData(); } + #endregion Protected Methods + + #region Private Fields + + private static NLog.Logger Log = LogManager.GetCurrentClassLogger(); + private string Applicazione = "App"; + private string expDateCss = "bg-warning text-secondary"; + private string Installazione = "Inst"; + private string licenseCss = "bg-warning text-secondary"; + private string Licenze = "#"; + private string mainCss = "alert alert-info"; + private string MastKey = "########################"; + private string Messaggio = ""; + private string remSrvCss = "bg-warning text-secondary"; + private DateTime Scadenza = DateTime.Today; + private string ServerStatus = "SrvState"; + private string Titolo = ""; + + #endregion Private Fields + + #region Private Methods + private async Task reloadLicenseData() { - int cDelay = 5; + int cDelay = 10; // recupero dati await Task.Delay(cDelay); try @@ -56,13 +50,14 @@ namespace MP.Land.Pages Installazione = LicServ.Installazione; Applicazione = LicServ.Applicazione; MastKey = LicServ.MasterKey; + Scadenza = LicServ.getLicenseExpiry(LicServ.MasterKey); await Task.Delay(cDelay); var fatto = await LicServ.RefreshLicense(); await Task.Delay(cDelay); Licenze = $"{LicServ.NumLicDb}/{LicServ.NumLicRemote}"; licenseCss = ""; } - catch(Exception exc) + catch (Exception exc) { licenseCss = "bg-dark text-warning"; Log.Error($"Eccezione in reloadLicenseData:{Environment.NewLine}{exc}"); @@ -86,5 +81,7 @@ namespace MP.Land.Pages AppMService.PageName = "About"; AppMService.PageIcon = "fas fa-info-circle pr-2"; } + + #endregion Private Methods } } \ No newline at end of file diff --git a/MP.Land/Pages/Contacts.razor b/MP.Land/Pages/Contacts.razor index 22c72416..d621d0db 100644 --- a/MP.Land/Pages/Contacts.razor +++ b/MP.Land/Pages/Contacts.razor @@ -69,17 +69,3 @@ -@code { - - protected string Titolo = ""; - protected string Messaggio = ""; - - protected override void OnInitialized() - { - Titolo = "Mapo MES"; - Messaggio = "I nostri contattatti e siti di supporto"; - AppMService.ShowSearch = false; - AppMService.PageName = "Contacts"; - AppMService.PageIcon = "fas fa-envelope pr-2"; - } -} \ No newline at end of file diff --git a/MP.Land/Pages/Contacts.razor.cs b/MP.Land/Pages/Contacts.razor.cs new file mode 100644 index 00000000..7820bac8 --- /dev/null +++ b/MP.Land/Pages/Contacts.razor.cs @@ -0,0 +1,36 @@ +using System; + +namespace MP.Land.Pages +{ + public partial class Contacts : IDisposable + { + #region Public Methods + + public void Dispose() + { + GC.Collect(); + } + + #endregion Public Methods + + #region Protected Fields + + protected string Messaggio = ""; + protected string Titolo = ""; + + #endregion Protected Fields + + #region Protected Methods + + protected override void OnInitialized() + { + Titolo = "Mapo MES"; + Messaggio = "I nostri contattatti e siti di supporto"; + AppMService.ShowSearch = false; + AppMService.PageName = "Contacts"; + AppMService.PageIcon = "fas fa-envelope pr-2"; + } + + #endregion Protected Methods + } +} \ No newline at end of file diff --git a/MP.Land/Pages/Index.razor.cs b/MP.Land/Pages/Index.razor.cs index 89eb18b1..a11764f3 100644 --- a/MP.Land/Pages/Index.razor.cs +++ b/MP.Land/Pages/Index.razor.cs @@ -1,22 +1,23 @@ -using System; +using Microsoft.AspNetCore.Components; +using MP.Land.Data; +using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -using MP.Land.Data; -using MP.Land.Components; -using Microsoft.AspNetCore.Components; -using Microsoft.Extensions.Configuration; -using MP.AppAuth.Models; namespace MP.Land.Pages { - public partial class Index + public partial class Index : IDisposable { - #region Private Fields + #region Public Methods - private List ListRecords; + public void Dispose() + { + ListRecords = null; + GC.Collect(); + } - #endregion Private Fields + #endregion Public Methods #region Protected Fields @@ -63,5 +64,11 @@ namespace MP.Land.Pages } #endregion Protected Methods + + #region Private Fields + + private List ListRecords; + + #endregion Private Fields } } \ No newline at end of file diff --git a/MP.Land/Pages/SysInfo.razor b/MP.Land/Pages/SysInfo.razor index d5cfbb5c..f4e8ffe2 100644 --- a/MP.Land/Pages/SysInfo.razor +++ b/MP.Land/Pages/SysInfo.razor @@ -42,25 +42,25 @@
-
Environment
+ Environment

@Environment

-
Main DB Conf
+ Main DB Conf

@DbNameExample

-
.net framework
+ .net framework

@currHwSwInfo.runtimeImg

-
Main Assembly
+ Main Assembly

@currHwSwInfo.mainAssembly

@@ -81,7 +81,7 @@
-
Server Stats
+ Server Stats

@currHwSwInfo.ServerStats
@@ -89,7 +89,7 @@
-
IIS Stats
+ IIS Stats

@currHwSwInfo.IISStats
@@ -112,7 +112,7 @@
-
Elenco librerie
+ Elenco librerie @currHwSwInfo.numLibraries

@@ -133,51 +133,3 @@

-@code { - - // imposto i vari dati da mostrare a video senza indicare come bypassare... - protected string Titolo = "MAPO System Info"; - protected string Messaggio = "HW & SW details"; - protected HwSwInfo currHwSwInfo = HwSwInfo.man(System.Reflection.Assembly.GetExecutingAssembly()); - - protected string masterLic = ""; - - protected override async Task OnInitializedAsync() - { - await ReloadData(); - } - - protected async Task ReloadData() - { - var akvList = await DataService.AnagKeyValList(); - var licRecord = akvList - .Where(x => x.NomeVar == "MAPO") - .FirstOrDefault(); - if (licRecord != null) - { - masterLic = licRecord.ValString; - } - } - - protected string DbNameExample - { - get - { - string answ = Configuration["ConnectionStrings:DefaultConnection"]; - if (answ.IndexOf(";User ID=") > 0) - { - answ = answ.Substring(0, answ.IndexOf(";User ID=")); - } - return answ; - } - } - protected string Environment - { - get - { - string answ = Configuration["Environment"]; - return answ; - } - } - -} \ No newline at end of file diff --git a/MP.Land/Pages/SysInfo.razor.cs b/MP.Land/Pages/SysInfo.razor.cs new file mode 100644 index 00000000..a899e4f4 --- /dev/null +++ b/MP.Land/Pages/SysInfo.razor.cs @@ -0,0 +1,72 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Components; +using System.Net.Http; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Components.Authorization; +using Microsoft.AspNetCore.Components.Forms; +using Microsoft.AspNetCore.Components.Routing; +using Microsoft.AspNetCore.Components.Web; +using Microsoft.AspNetCore.Components.Web.Virtualization; +using Microsoft.JSInterop; +using MP.Land; +using MP.Land.Shared; +using MP.AppAuth; +using MP.Land.Data; +using Microsoft.Extensions.Configuration; + +namespace MP.Land.Pages +{ + public partial class SysInfo : IDisposable + { + public void Dispose() + { + GC.Collect(); + } + + // imposto i vari dati da mostrare a video senza indicare come bypassare... + protected string Titolo = "MAPO System Info"; + protected string Messaggio = "HW & SW details"; + protected HwSwInfo currHwSwInfo = HwSwInfo.man(System.Reflection.Assembly.GetExecutingAssembly()); + protected string masterLic = ""; + protected override async Task OnInitializedAsync() + { + await ReloadData(); + } + + protected async Task ReloadData() + { + var akvList = await DataService.AnagKeyValList(); + var licRecord = akvList.Where(x => x.NomeVar == "MAPO").FirstOrDefault(); + if (licRecord != null) + { + masterLic = licRecord.ValString; + } + } + + protected string DbNameExample + { + get + { + string answ = Configuration["ConnectionStrings:DefaultConnection"]; + if (answ.IndexOf(";User ID=") > 0) + { + answ = answ.Substring(0, answ.IndexOf(";User ID=")); + } + + return answ; + } + } + + protected string Environment + { + get + { + string answ = Configuration["Environment"]; + return answ; + } + } + } +} \ No newline at end of file diff --git a/MP.Land/Pages/UpdateManager.razor.cs b/MP.Land/Pages/UpdateManager.razor.cs index 5833a384..83737913 100644 --- a/MP.Land/Pages/UpdateManager.razor.cs +++ b/MP.Land/Pages/UpdateManager.razor.cs @@ -10,22 +10,24 @@ using System.Threading.Tasks; namespace MP.Land.Pages { - public partial class UpdateManager + public partial class UpdateManager : IDisposable { - #region Private Fields + #region Public Methods - private List ListRecords; + public void Dispose() + { + ListRecords = null; + GC.Collect(); + } - #endregion Private Fields + #endregion Public Methods #region Protected Fields protected int numDone = 0; protected int numTot = 0; protected int totalCount = 0; - protected double TotalMb = 0; - protected UpdateMan updateManAuth = new UpdateMan("SWDownloader", "viaD@nte16"); #endregion Protected Fields @@ -42,34 +44,12 @@ namespace MP.Land.Pages protected AppAuthService DataService { get; set; } protected string outMessages { get; set; } = ""; - protected int percLoading { get; set; } = 0; - protected bool showProgress { get; set; } = false; protected bool showUpdate { get; set; } = false; #endregion Protected Properties - #region Private Methods - - private async Task scaricaSingolo(AppAuth.Models.UpdMan item) - { - long size = 0; - if (item.IsAuth) - { - size = updateManAuth.downloadLatest(item.ManifestUrl, localPath(item.LocalRepo), item.PackName); - } - else - { - size = UpdateMan.obj.downloadLatest(item.ManifestUrl, localPath(item.LocalRepo), item.PackName); - } - numDone++; - percLoading = 100 * numDone / numTot; - return await Task.FromResult(size); - } - - #endregion Private Methods - #region Protected Methods /// @@ -151,5 +131,31 @@ namespace MP.Land.Pages } #endregion Protected Methods + + #region Private Fields + + private List ListRecords; + + #endregion Private Fields + + #region Private Methods + + private async Task scaricaSingolo(AppAuth.Models.UpdMan item) + { + long size = 0; + if (item.IsAuth) + { + size = updateManAuth.downloadLatest(item.ManifestUrl, localPath(item.LocalRepo), item.PackName); + } + else + { + size = UpdateMan.obj.downloadLatest(item.ManifestUrl, localPath(item.LocalRepo), item.PackName); + } + numDone++; + percLoading = 100 * numDone / numTot; + return await Task.FromResult(size); + } + + #endregion Private Methods } } \ No newline at end of file diff --git a/MP.Land/Pages/UserQr.razor.cs b/MP.Land/Pages/UserQr.razor.cs index fc85f926..61b68363 100644 --- a/MP.Land/Pages/UserQr.razor.cs +++ b/MP.Land/Pages/UserQr.razor.cs @@ -16,6 +16,9 @@ namespace MP.Land.Pages public void Dispose() { AppMService.EA_SearchUpdated -= OnSeachUpdated; + AppMService.EA_FilterUpdated -= OnFilterUpdated; + ListRecords = null; + GC.Collect(); } #endregion Public Methods diff --git a/MP.Land/Resources/ChangeLog.html b/MP.Land/Resources/ChangeLog.html index 16b19149..9fbcacb8 100644 --- a/MP.Land/Resources/ChangeLog.html +++ b/MP.Land/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo gestione Programmi MAPO -

Versione: 6.16.2210.2110

+

Versione: 6.16.2211.0416


Note di rilascio:
    diff --git a/MP.Land/Resources/VersNum.txt b/MP.Land/Resources/VersNum.txt index 148d3a17..3af0d134 100644 --- a/MP.Land/Resources/VersNum.txt +++ b/MP.Land/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2210.2110 +6.16.2211.0416 diff --git a/MP.Land/Resources/manifest.xml b/MP.Land/Resources/manifest.xml index 06b6c830..2f81485a 100644 --- a/MP.Land/Resources/manifest.xml +++ b/MP.Land/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2210.2110 + 6.16.2211.0416 https://nexus.steamware.net/repository/SWS/MP-LAND/stable/LAST/MP.Land.zip https://nexus.steamware.net/repository/SWS/MP-LAND/stable/LAST/ChangeLog.html false diff --git a/MP.Land/Shared/MainLayout.razor b/MP.Land/Shared/MainLayout.razor index 8af3c918..e316dc69 100644 --- a/MP.Land/Shared/MainLayout.razor +++ b/MP.Land/Shared/MainLayout.razor @@ -26,35 +26,3 @@
-@code { - bool ShowSearch { get; set; } = false; - - protected override void OnInitialized() - { - AppMService.EA_ShowSearch += OnShowSearch; - AppMService.EA_HideSearch += OnHideSearch; - } - public void OnShowSearch() - { - ShowSearch = true; - InvokeAsync(() => - { - StateHasChanged(); - }); - } - public void OnHideSearch() - { - ShowSearch = false; - InvokeAsync(() => - { - StateHasChanged(); - }); - } - - public void Dispose() - { - AppMService.EA_ShowSearch -= OnShowSearch; - AppMService.EA_ShowSearch -= OnHideSearch; - } - -} \ No newline at end of file diff --git a/MP.Land/Shared/MainLayout.razor.cs b/MP.Land/Shared/MainLayout.razor.cs new file mode 100644 index 00000000..ca9bc211 --- /dev/null +++ b/MP.Land/Shared/MainLayout.razor.cs @@ -0,0 +1,52 @@ +using System; + +namespace MP.Land.Shared +{ + public partial class MainLayout + { + #region Public Methods + + public void Dispose() + { + AppMService.EA_ShowSearch -= OnShowSearch; + AppMService.EA_ShowSearch -= OnHideSearch; + GC.Collect(); + } + + public void OnHideSearch() + { + ShowSearch = false; + InvokeAsync(() => + { + StateHasChanged(); + }); + } + + public void OnShowSearch() + { + ShowSearch = true; + InvokeAsync(() => + { + StateHasChanged(); + }); + } + + #endregion Public Methods + + #region Protected Methods + + protected override void OnInitialized() + { + AppMService.EA_ShowSearch += OnShowSearch; + AppMService.EA_HideSearch += OnHideSearch; + } + + #endregion Protected Methods + + #region Private Properties + + private bool ShowSearch { get; set; } = false; + + #endregion Private Properties + } +} \ No newline at end of file diff --git a/MP.SPEC/Components/CmpTop.razor b/MP.SPEC/Components/CmpTop.razor index 4ac9d6d0..b48edbec 100644 --- a/MP.SPEC/Components/CmpTop.razor +++ b/MP.SPEC/Components/CmpTop.razor @@ -24,63 +24,4 @@
*@ -@code { - protected bool ShowSearch - { - get => MService.ShowSearch; - set => MService.ShowSearch = value; - } - private string userName = ""; - - private string TipoSearch - { - get => MService.TipoSearch; - set => MService.TipoSearch = value; - } - - protected override async Task OnInitializedAsync() - { - MService.EA_ShowSearch += MService_EA_ShowSearch; - await forceReload(); - } - private async void MService_EA_ShowSearch() - { - await Task.Delay(1); - await InvokeAsync(() => StateHasChanged()); - } - - private async Task forceReload() - { - - var authState = await AuthenticationStateProvider.GetAuthenticationStateAsync(); - var user = authState.User; - - if (user.Identity != null&& user.Identity.IsAuthenticated) - { - userName = $"{user.Identity.Name}"; - } - else - { - userName = "N.A."; - } - } - - public async Task flushCache() - { - await Task.Delay(1); - await MDService.FlushRedisCache(); - await JSRuntime.InvokeAsync("location.reload"); - // rimando a home - //NavManager.NavigateTo("", true); - } - - [Inject] - private NavigationManager NavManager { get; set; } = null!; - - [Inject] - protected MpDataService MDService { get; set; } = null!; - - [Inject] - protected IJSRuntime JSRuntime { get; set; } = null!; -} diff --git a/MP.SPEC/Components/CmpTop.razor.cs b/MP.SPEC/Components/CmpTop.razor.cs new file mode 100644 index 00000000..7668ad34 --- /dev/null +++ b/MP.SPEC/Components/CmpTop.razor.cs @@ -0,0 +1,84 @@ +using Microsoft.AspNetCore.Components; +using Microsoft.AspNetCore.Components.Authorization; +using Microsoft.JSInterop; +using MP.SPEC.Data; + +namespace MP.SPEC.Components +{ + public partial class CmpTop + { + #region Public Methods + + public async Task flushCache() + { + await Task.Delay(1); + await MDService.FlushRedisCache(); + await Task.Delay(1); + // rimando a pagina corrente + NavManager.NavigateTo(NavManager.Uri, true); + } + + #endregion Public Methods + + #region Protected Properties + + [Inject] + protected IJSRuntime JSRuntime { get; set; } = null!; + + [Inject] + protected MpDataService MDService { get; set; } = null!; + + protected bool ShowSearch { get => MService.ShowSearch; set => MService.ShowSearch = value; } + + #endregion Protected Properties + + #region Protected Methods + + protected override async Task OnInitializedAsync() + { + MService.EA_ShowSearch += MService_EA_ShowSearch; + await forceReload(); + } + + #endregion Protected Methods + + #region Private Fields + + private string userName = ""; + + #endregion Private Fields + + #region Private Properties + + [Inject] + private NavigationManager NavManager { get; set; } = null!; + + private string TipoSearch { get => MService.TipoSearch; set => MService.TipoSearch = value; } + + #endregion Private Properties + + #region Private Methods + + private async Task forceReload() + { + var authState = await AuthenticationStateProvider.GetAuthenticationStateAsync(); + var user = authState.User; + if (user.Identity != null && user.Identity.IsAuthenticated) + { + userName = $"{user.Identity.Name}"; + } + else + { + userName = "N.A."; + } + } + + private async void MService_EA_ShowSearch() + { + await Task.Delay(1); + await InvokeAsync(() => StateHasChanged()); + } + + #endregion Private Methods + } +} \ No newline at end of file diff --git a/MP.SPEC/Components/ListDossiers.razor b/MP.SPEC/Components/ListDossiers.razor index 5e031017..18a82fc6 100644 --- a/MP.SPEC/Components/ListDossiers.razor +++ b/MP.SPEC/Components/ListDossiers.razor @@ -14,6 +14,7 @@ else if (totalCount == 0) } else { + @if (currFluxLogDto != null) {
@@ -78,13 +79,137 @@ else
} + + + + @if (currRecordClone != null) + { +
+
+
+
+
+ Nuovo Dossier +
+
+
+ +
+
+
+ MACCHINA + +
+
+
+
+ FASE + +
+
+ +
+
+ ARTICOLI + + +
+
+
+ + + +
+
+
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+
+
+
+ } + + + + + + + + + +
@@ -101,8 +226,10 @@ else diff --git a/MP.SPEC/Components/ListPARAMS.razor b/MP.SPEC/Components/ListPARAMS.razor index d49a30f6..70fc3a12 100644 --- a/MP.SPEC/Components/ListPARAMS.razor +++ b/MP.SPEC/Components/ListPARAMS.razor @@ -17,7 +17,10 @@ else diff --git a/MP.SPEC/Components/ListPODL.razor b/MP.SPEC/Components/ListPODL.razor index 4bcc0552..6b87bbb8 100644 --- a/MP.SPEC/Components/ListPODL.razor +++ b/MP.SPEC/Components/ListPODL.razor @@ -17,7 +17,10 @@ else @@ -45,7 +48,8 @@ else { } + + } @@ -136,7 +144,7 @@
- +
+ + @if (currRecord != null) + { + + + } +
Articolo Fase @if (isEditing == false) { - + + + @**@ } else { @@ -110,15 +237,15 @@ else } - @record.OdlNav.CodArticolo -
@record.OdlNav.ArticoloNav.DescArticolo
+ @record.CodArticolo +
@record.ArticoloNav.DescArticolo
- @tradFase(record.OdlNav.KeyRichiesta) + @tradFase(record.KeyRichiesta) @record.IdxMacchina -
@record.MachineNav.Descrizione
+ @*
@record.MachineNav.Descrizione
*@
@record.DtRif @@ -180,8 +307,8 @@ else @record.dtEvento - @record.CodFlux -
@traduci(record.CodFlux)
+ @traduci(record.CodFlux) +
@record.CodFlux
@if (record.ValoreEdit != record.Valore) diff --git a/MP.SPEC/Components/ListDossiers.razor.cs b/MP.SPEC/Components/ListDossiers.razor.cs index 2e88dc72..a7b3c903 100644 --- a/MP.SPEC/Components/ListDossiers.razor.cs +++ b/MP.SPEC/Components/ListDossiers.razor.cs @@ -1,5 +1,5 @@ using Microsoft.AspNetCore.Components; -using Microsoft.AspNetCore.DataProtection; +using Microsoft.EntityFrameworkCore.Query.Internal; using Microsoft.JSInterop; using MP.Data.DatabaseModels; using MP.Data.DTO; @@ -13,7 +13,7 @@ namespace MP.SPEC.Components #region Public Properties [Parameter] - public EventCallback RecordSel { get; set; } + public EventCallback RecordSel { get; set; } [Parameter] public EventCallback RecordSelFlux { get; set; } @@ -28,9 +28,44 @@ namespace MP.SPEC.Components #region Public Methods - private FluxLogDTO? currFluxLogDto = null; - + public string checkSelect(DossierModel recordSel) + { + string answ = ""; + if (currRecord != null) + { + try + { + answ = (currRecord.IdxMacchina == recordSel.IdxMacchina && currRecord.DtRif == recordSel.DtRif) ? "table-info" : ""; + } + catch + { } + } + return answ; + } + private bool selectFirst(string idxMacchina) + { + //string firstMacchina = ""; + bool answ = false; + if (ListMacchine != null) + { + if (idxMacchina == idxMacchina) + { + answ = true; + } + else + { + answ = false; + } + //var rawData = ListMacchine.Select(x => x.IdxMacchina).FirstOrDefault(); + //firstMacchina = rawData != null ? rawData : ""; + } + //if (firstMacchina == idxMacchina) + //{ + // answ = true; + //} + return answ; + } public string checkSelPar(FluxLogDTO recordSel) { string answ = ""; @@ -46,21 +81,6 @@ namespace MP.SPEC.Components return answ; } - public string checkSelect(Dossiers recordSel) - { - string answ = ""; - if (currRecord != null) - { - try - { - answ = (currRecord.IdxMacchina == recordSel.IdxMacchina && currRecord.DtRif == recordSel.DtRif) ? "table-info" : ""; - - } - catch - { } - } - return answ; - } public void Dispose() { currRecord = null; @@ -68,40 +88,73 @@ namespace MP.SPEC.Components ListRecords = null; GC.Collect(); } - private SelectDossierParams lastFilter { get; set; } = new SelectDossierParams() { CurrPage = -1 }; - protected override async Task OnParametersSetAsync() - { - if (!lastFilter.Equals(SelFilter)) - { - lastFilter = SelFilter.clone(); - await reloadData(true); - } - } + #endregion Public Methods #region Protected Properties - private string traduci(string lemma) - { - var answ = MDService.Traduci(lemma, "IT"); - return answ; - } - [Inject] protected IJSRuntime JSRuntime { get; set; } = null!; [Inject] protected MpDataService MDService { get; set; } = null!; + #endregion Protected Properties #region Protected Methods + protected async Task cancel() + { + var alert = await JSRuntime.InvokeAsync("confirm", "Confermi di voler annullare TUTTE le modifiche? i dati saranno ricaricati."); + if (alert) + { + currFluxLogDto = null; + isEditing = false; + await Task.Delay(1); + if (currRecord != null) + { + listaFlux = MDService.getFluxLog(currRecord.Valore); + } + StateHasChanged(); + } + } + + protected async Task cancelNewDoss() + { + var alert = await JSRuntime.InvokeAsync("confirm", "Confermi di voler annullare l'aggiunta di un nuovo dossier? i dati saranno ricaricati."); + if (alert) + { + currRecordClone = null; + isEditing = false; + await Task.Delay(1); + StateHasChanged(); + } + } + + protected async Task cloneRecord(DossierModel selRec) + { + // creo record duplicato... + DossierModel newRec = new DossierModel() + { + //IdxDossier = 0, + DataType = selRec.DataType, + KeyRichiesta = selRec.KeyRichiesta, + DtRif = DateTime.Now, + IdxMacchina = selRec.IdxMacchina, + CodArticolo = selRec.CodArticolo, + IdxODL = 0, + Valore = selRec.Valore, + }; + currRecordClone = newRec; + await Task.Delay(1); + } + /// /// Eliminazione record selezionato (previa conferma) /// /// /// - protected async Task deleteRecord(Dossiers selRec) + protected async Task deleteRecord(DossierModel selRec) { if (!await JSRuntime.InvokeAsync("confirm", "Eliminazione Dossier: sei sicuro di voler procedere?")) return; @@ -120,25 +173,98 @@ namespace MP.SPEC.Components await RecordSelFlux.InvokeAsync(selRec); } - private void enableEditing() + protected async Task newDossier(DossierModel selRec) { - isEditing = true; - } + var alert = await JSRuntime.InvokeAsync("confirm", "Confermi di voler creare un nuovo Dossier per l'impianto/articolo selezioanto?"); - protected async Task cancel() - { - var alert = await JSRuntime.InvokeAsync("confirm", "Confermi di voler annullare TUTTE le modifiche? i dati saranno ricaricati."); if (alert) { - currFluxLogDto = null; - isEditing = false; await Task.Delay(1); - if (currRecord != null) + if (currRecordClone != null) { - listaFlux = MDService.getFluxLog(currRecord.Valore); + // serializzo valore x flux log... + + DossierFluxLogDTO? valoreDeserializzato = JsonConvert.DeserializeObject(selRec.Valore); + if (valoreDeserializzato != null) + { + + listaFlux = valoreDeserializzato + .ODL + .OrderBy(x => x.CodFlux) + .ToList(); + } + + if (listaFlux != null) + { + foreach (var item in listaFlux) + { + item.IdxMacchina = selRec.IdxMacchina; + item.Valore = "0"; + item.dtEvento = DateTime.Now; + } + } + + DossierFluxLogDTO updatedResult = new DossierFluxLogDTO() { ODL = listaFlux }; + string newVal = JsonConvert.SerializeObject(updatedResult); + // preparo x insert + currRecordClone.DtRif = DateTime.Now; + currRecordClone.IdxMacchina = selRec.IdxMacchina; + currRecordClone.CodArticolo = selRec.CodArticolo; + currRecordClone.KeyRichiesta = selRec.KeyRichiesta; + currRecordClone.Valore = newVal; + // METODO PER UPDATE FLUX + await MDService.DossiersInsert(currRecordClone); + //await reloadData(true); + currRecordClone = null; + isEditing = false; + await Task.Delay(1); + StateHasChanged(); + await flushCache(); } - StateHasChanged(); + return; } + else + { + currRecordClone = null; + await Task.Delay(1); + // TOGLIERE!!!!! + NavManager.NavigateTo("DOSS", true); + } + } + + protected override async Task OnInitializedAsync() + { + ListGruppiFase = await MDService.ElencoGruppiFase(); + ListStati = await MDService.AnagStatiComm(); + ListArticoli = await MDService.ArticoliGetSearch(100000, "BAGLIETTO", ""); + ListMacchine = await MDService.MacchineGetAll(); + await reloadData(true); + } + + protected override async Task OnParametersSetAsync() + { + if (!lastFilter.Equals(SelFilter)) + { + lastFilter = SelFilter.clone(); + await reloadData(true); + } + } + + protected async void OnSeachUpdated() + { + await InvokeAsync(() => + { + currPage = 1; + StateHasChanged(); + }); + } + + protected async Task selRecord(DossierModel selRec) + { + currRecord = selRec; + await RecordSel.InvokeAsync(selRec); + listaFlux = MDService.getFluxLog(selRec.Valore); + await toggleTableFlux(); } protected async Task update(FluxLogDTO selRec) @@ -147,7 +273,6 @@ namespace MP.SPEC.Components if (alert) { - await Task.Delay(1); if (currRecord != null) { @@ -168,33 +293,9 @@ namespace MP.SPEC.Components { currFluxLogDto = null; await Task.Delay(1); - await JSRuntime.InvokeAsync("location.reload"); - + // rimando a pagina corrente + NavManager.NavigateTo(NavManager.Uri, true); } - - } - - protected override async Task OnInitializedAsync() - { - ListStati = await MDService.AnagStatiComm(); - await reloadData(true); - } - - protected async void OnSeachUpdated() - { - await InvokeAsync(() => - { - currPage = 1; - StateHasChanged(); - }); - } - - protected async Task selRecord(Dossiers selRec) - { - currRecord = selRec; - await RecordSel.InvokeAsync(selRec); - listaFlux = MDService.getFluxLog(selRec.Valore); - await toggleTableFlux(); } protected async Task UpdateData() @@ -202,19 +303,6 @@ namespace MP.SPEC.Components currRecord = null; await reloadData(true); } - private string css() - { - string answ = ""; - if (isEditing) - { - answ = "visible"; - } - else - { - answ = "hidden"; - } - return answ; - } #endregion Protected Methods @@ -222,12 +310,23 @@ namespace MP.SPEC.Components private int _totalCount = 0; - private Dossiers? currRecord = null; + private FluxLogDTO? currFluxLogDto = null; + + private DossierModel? currRecord = null; + + private DossierModel? currRecordClone = null; + + private List? ListGruppiFase; + + private List? ListRecords; - private List? ListRecords; private List? ListStati; - private List? SearchRecords; + private List? SearchRecords; + + private List? ListMacchine; + + private List? ListArticoli; #endregion Private Fields @@ -247,6 +346,8 @@ namespace MP.SPEC.Components private bool isLoading { get; set; } = false; + private SelectDossierParams lastFilter { get; set; } = new SelectDossierParams() { CurrPage = -1 }; + private List? listaFlux { get; set; } = null; private int MaxRecord @@ -254,6 +355,9 @@ namespace MP.SPEC.Components get => SelFilter.MaxRecord; } + [Inject] + private NavigationManager NavManager { get; set; } = null!; + private int numRecord { get => SelFilter.NumRec; @@ -269,6 +373,7 @@ namespace MP.SPEC.Components { get => SelFilter.DtEnd; } + private DateTime SelDtStart { get => SelFilter.DtStart; @@ -298,6 +403,43 @@ namespace MP.SPEC.Components #region Private Methods + private async Task closeTableFlux() + { + currFluxLogDto = null; + currRecord = null; + currRecordClone = null; + visualizzaFlux = true; + isEditing = false; + await RecordSelFlux.InvokeAsync(currFluxLogDto); + await Task.Delay(1); + } + public async Task flushCache() + { + await Task.Delay(1); + await MDService.FlushRedisCache(); + await Task.Delay(1); + // rimando a pagina corrente + NavManager.NavigateTo(NavManager.Uri, true); + } + private string css() + { + string answ = ""; + if (isEditing) + { + answ = "visible"; + } + else + { + answ = "hidden"; + } + return answ; + } + + private void enableEditing() + { + isEditing = true; + } + private async Task reloadData(bool setChanged) { isLoading = true; @@ -332,14 +474,10 @@ namespace MP.SPEC.Components return answ; } - private async Task closeTableFlux() + private string traduci(string lemma) { - currFluxLogDto = null; - currRecord = null; - visualizzaFlux = true; - isEditing = false; - await RecordSelFlux.InvokeAsync(currFluxLogDto); - await Task.Delay(1); + var answ = MDService.Traduci(lemma, "IT"); + return answ; } #endregion Private Methods diff --git a/MP.SPEC/Components/ListODL.razor b/MP.SPEC/Components/ListODL.razor index 7c66823d..ed2e24d7 100644 --- a/MP.SPEC/Components/ListODL.razor +++ b/MP.SPEC/Components/ListODL.razor @@ -31,7 +31,10 @@ else
- + @if (currRecord != null) + { + + } Articolo Fase
- + @if (currRecord != null) + { + + } Data Macchina
- + @if (currRecord != null) + { + + } Articolo Fase @record.CodArticolo diff --git a/MP.SPEC/Data/MpDataService.cs b/MP.SPEC/Data/MpDataService.cs index b0c3db2e..bdcf0c87 100644 --- a/MP.SPEC/Data/MpDataService.cs +++ b/MP.SPEC/Data/MpDataService.cs @@ -338,7 +338,7 @@ namespace MP.SPEC.Data /// /// record dossier da eliminare /// - public async Task DossiersDeleteRecord(Dossiers selRecord) + public async Task DossiersDeleteRecord(DossierModel selRecord) { bool result = false; Stopwatch stopWatch = new Stopwatch(); @@ -361,9 +361,9 @@ namespace MP.SPEC.Data /// Data minima per estrazione records /// Data Massima per estrazione records /// - public async Task> DossiersGetLastFilt(string IdxMacchina, string CodArticolo, DateTime DtStart, DateTime DtEnd) + public async Task> DossiersGetLastFilt(string IdxMacchina, string CodArticolo, DateTime DtStart, DateTime DtEnd) { - List? result = new List(); + List? result = new List(); Stopwatch stopWatch = new Stopwatch(); stopWatch.Start(); string readType = "DB"; @@ -372,7 +372,7 @@ namespace MP.SPEC.Data RedisValue rawData = redisDb.StringGet(currKey); if (rawData.HasValue) { - result = JsonConvert.DeserializeObject>($"{rawData}"); + result = JsonConvert.DeserializeObject>($"{rawData}"); readType = "REDIS"; } else @@ -384,7 +384,7 @@ namespace MP.SPEC.Data } if (result == null) { - result = new List(); + result = new List(); } stopWatch.Stop(); TimeSpan ts = stopWatch.Elapsed; @@ -397,10 +397,10 @@ namespace MP.SPEC.Data /// /// /// - public async Task DossiersInsert(Dossiers currDoss) + public async Task DossiersInsert(DossierModel currDoss) { // aggiorno record sul DB - bool answ = await dbController.DossiersUpdateValore(currDoss); + bool answ = await dbController.DossiersInsert(currDoss); return answ; } @@ -451,7 +451,7 @@ namespace MP.SPEC.Data /// /// /// - public async Task DossiersUpdateValore(Dossiers currDoss) + public async Task DossiersUpdateValore(DossierModel currDoss) { // aggiorno record sul DB bool answ = await dbController.DossiersUpdateValore(currDoss); @@ -910,7 +910,7 @@ namespace MP.SPEC.Data return answ; } - public async Task updateDossierValue(Dossiers currDoss, FluxLogDTO editFL) + public async Task updateDossierValue(DossierModel currDoss, FluxLogDTO editFL) { bool answ = false; // recupero intero set valori dossier deserializzando... diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj index b31710e7..25febf97 100644 --- a/MP.SPEC/MP.SPEC.csproj +++ b/MP.SPEC/MP.SPEC.csproj @@ -5,7 +5,7 @@ enable enable MP.SPEC - 6.16.2211.312 + 6.16.2211.416 diff --git a/MP.SPEC/Pages/Articoli.razor b/MP.SPEC/Pages/Articoli.razor index 2cc76697..6046f57e 100644 --- a/MP.SPEC/Pages/Articoli.razor +++ b/MP.SPEC/Pages/Articoli.razor @@ -40,33 +40,21 @@
-
+
Codice
-
+
Disegno
-
-
- -
-
-
+
+ Azienda +
+
+ Tipo + +
+
+
+
+ Descrizione + +
@@ -120,7 +125,10 @@
- + @if (currRecord != null) + { + + } Articolo Disegno
- +
@record.CodArticolo
diff --git a/MP.SPEC/Pages/Contacts.razor b/MP.SPEC/Pages/Contacts.razor new file mode 100644 index 00000000..e845ae27 --- /dev/null +++ b/MP.SPEC/Pages/Contacts.razor @@ -0,0 +1,71 @@ +@page "/Contacts" +@using MP.SPEC.Data + +@inject MessageService AppMService + +
+
+
+
+
+
+
+

@Titolo

+
+ +
+
+
+
+
+
+ +
+
+
+

@Messaggio

+
+
+

Sede Operativa

+
+ EgalWare s.r.l.
+ via Nazionale, 93
+ 24068 Seriate - BG
+ P: + 035.290178
+ P: + 035.460560 +
+
+
+

Sede Legale

+
+ EgalWare s.r.l.
+ via Nazionale, 93
+ 24068 Seriate - BG
+
+ VAT:03985390164 +
+
+
+

Supporto

+
+ Web:
+ Accedi al supporto dal nostro sito web
+
+ Email:
+ Scrivi un email a info at egalware.com +
+
+
+
+
+
+
+ diff --git a/MP.SPEC/Pages/Contacts.razor.cs b/MP.SPEC/Pages/Contacts.razor.cs new file mode 100644 index 00000000..8e8a2ef5 --- /dev/null +++ b/MP.SPEC/Pages/Contacts.razor.cs @@ -0,0 +1,32 @@ +namespace MP.SPEC.Pages +{ + public partial class Contacts : IDisposable + { + #region Public Methods + + public void Dispose() + { + GC.Collect(); + } + + #endregion Public Methods + + #region Protected Fields + + protected string Messaggio = ""; + protected string Titolo = ""; + + #endregion Protected Fields + + #region Protected Methods + + protected override void OnInitialized() + { + Titolo = "MP SPEC"; + Messaggio = "I nostri contattatti e siti di supporto"; + AppMService.ShowSearch = false; + } + + #endregion Protected Methods + } +} \ No newline at end of file diff --git a/MP.SPEC/Pages/DOSS.razor.cs b/MP.SPEC/Pages/DOSS.razor.cs index af62c038..db3034d7 100644 --- a/MP.SPEC/Pages/DOSS.razor.cs +++ b/MP.SPEC/Pages/DOSS.razor.cs @@ -50,7 +50,7 @@ namespace MP.SPEC.Pages isFiltering = false; } - protected async Task selRecordDoss(Dossiers selDoss) + protected async Task selRecordDoss(DossierModel selDoss) { currRecordDoss = selDoss; await Task.Delay(1); @@ -78,7 +78,7 @@ namespace MP.SPEC.Pages set => currFilter.CurrPage = value; } - private Dossiers? currRecordDoss { get; set; } = null; + private DossierModel? currRecordDoss { get; set; } = null; private bool isEditing { diff --git a/MP.SPEC/Pages/Index.razor b/MP.SPEC/Pages/Index.razor index 60e3e1f8..6e4daf2d 100644 --- a/MP.SPEC/Pages/Index.razor +++ b/MP.SPEC/Pages/Index.razor @@ -11,7 +11,7 @@
MAPO SPEC
-
+
diff --git a/MP.SPEC/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html index df775592..3d2a01e5 100644 --- a/MP.SPEC/Resources/ChangeLog.html +++ b/MP.SPEC/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

Versione: 6.16.2211.312

+

Versione: 6.16.2211.416


Note di rilascio:
  • diff --git a/MP.SPEC/Resources/VersNum.txt b/MP.SPEC/Resources/VersNum.txt index f4d62064..bb899846 100644 --- a/MP.SPEC/Resources/VersNum.txt +++ b/MP.SPEC/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2211.312 +6.16.2211.416 diff --git a/MP.SPEC/Resources/manifest.xml b/MP.SPEC/Resources/manifest.xml index f915a747..f599228c 100644 --- a/MP.SPEC/Resources/manifest.xml +++ b/MP.SPEC/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2211.312 + 6.16.2211.416 https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html false diff --git a/MP.SPEC/wwwroot/images/LogoBluGreen.png b/MP.SPEC/wwwroot/images/LogoBluGreen.png new file mode 100644 index 00000000..0f58f814 Binary files /dev/null and b/MP.SPEC/wwwroot/images/LogoBluGreen.png differ diff --git a/MP.SPEC/wwwroot/images/LogoMapoFull.png b/MP.SPEC/wwwroot/images/LogoMapoFull.png new file mode 100644 index 00000000..3d766f04 Binary files /dev/null and b/MP.SPEC/wwwroot/images/LogoMapoFull.png differ