Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bd14fc0502 | |||
| 6525d7e803 | |||
| 140566d81b | |||
| af0624b9c4 | |||
| 74856d9831 | |||
| bf654f54e6 | |||
| 8fbfea1f62 | |||
| b8dc7dffc4 | |||
| 2c3feaa4f3 | |||
| dbb4fbf9e2 | |||
| d13a1b7833 | |||
| 76c49d1eea | |||
| 3f1a3aa2ce | |||
| bbec081cae | |||
| 29fd417499 | |||
| 5380c996ac | |||
| 4e61028323 | |||
| 4f7ac21f41 | |||
| 55187eda96 | |||
| d6f7a55a05 | |||
| c71d7291a2 | |||
| 79c73db726 | |||
| 2608395e5b |
@@ -110,7 +110,7 @@ namespace MP.Data.Controllers
|
|||||||
dbResult = dbCtx
|
dbResult = dbCtx
|
||||||
.DbSetDossiers
|
.DbSetDossiers
|
||||||
.AsNoTracking()
|
.AsNoTracking()
|
||||||
.Select(i => i.OdlNav.CodArticolo)
|
.Select(i => i.CodArticolo)
|
||||||
.Distinct()
|
.Distinct()
|
||||||
.ToList();
|
.ToList();
|
||||||
}
|
}
|
||||||
@@ -302,7 +302,7 @@ namespace MP.Data.Controllers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="currRec">record dossier da eliminare</param>
|
/// <param name="currRec">record dossier da eliminare</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<bool> DossiersDeleteRecord(Dossiers currRec)
|
public async Task<bool> DossiersDeleteRecord(DossierModel currRec)
|
||||||
{
|
{
|
||||||
bool answ = false;
|
bool answ = false;
|
||||||
using (var dbCtx = new MoonProContext(_configuration))
|
using (var dbCtx = new MoonProContext(_configuration))
|
||||||
@@ -336,18 +336,18 @@ namespace MP.Data.Controllers
|
|||||||
/// <param name="DtStart">Data minima per estrazione records</param>
|
/// <param name="DtStart">Data minima per estrazione records</param>
|
||||||
/// <param name="DtEnd">Data Massima per estrazione records</param>
|
/// <param name="DtEnd">Data Massima per estrazione records</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public List<Dossiers> DossiersGetLastFilt(string IdxMacchina, string CodArticolo, DateTime DtStart, DateTime DtEnd)
|
public List<DossierModel> DossiersGetLastFilt(string IdxMacchina, string CodArticolo, DateTime DtStart, DateTime DtEnd)
|
||||||
{
|
{
|
||||||
List<Dossiers> dbResult = new List<Dossiers>();
|
List<DossierModel> dbResult = new List<DossierModel>();
|
||||||
using (var dbCtx = new MoonProContext(_configuration))
|
using (var dbCtx = new MoonProContext(_configuration))
|
||||||
{
|
{
|
||||||
dbResult = dbCtx
|
dbResult = dbCtx
|
||||||
.DbSetDossiers
|
.DbSetDossiers
|
||||||
.AsNoTracking()
|
.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(m => m.MachineNav)
|
||||||
.Include(o => o.OdlNav)
|
//.Include(o => o.OdlNav)
|
||||||
.Include(a => a.OdlNav.ArticoloNav)
|
.Include(a => a.ArticoloNav)
|
||||||
.OrderByDescending(x => x.DtRif)
|
.OrderByDescending(x => x.DtRif)
|
||||||
.ToList();
|
.ToList();
|
||||||
}
|
}
|
||||||
@@ -359,7 +359,7 @@ namespace MP.Data.Controllers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="editRec">record dossier da modificare</param>
|
/// <param name="editRec">record dossier da modificare</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<bool> DossiersInsert(Dossiers newRec)
|
public async Task<bool> DossiersInsert(DossierModel newRec)
|
||||||
{
|
{
|
||||||
bool fatto = false;
|
bool fatto = false;
|
||||||
using (var dbCtx = new MoonProContext(_configuration))
|
using (var dbCtx = new MoonProContext(_configuration))
|
||||||
@@ -431,7 +431,7 @@ namespace MP.Data.Controllers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="editRec">record dossier da modificare</param>
|
/// <param name="editRec">record dossier da modificare</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<bool> DossiersUpdateValore(Dossiers editRec)
|
public async Task<bool> DossiersUpdateValore(DossierModel editRec)
|
||||||
{
|
{
|
||||||
bool fatto = false;
|
bool fatto = false;
|
||||||
using (var dbCtx = new MoonProContext(_configuration))
|
using (var dbCtx = new MoonProContext(_configuration))
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ using System.ComponentModel.DataAnnotations.Schema;
|
|||||||
namespace MP.Data.DatabaseModels
|
namespace MP.Data.DatabaseModels
|
||||||
{
|
{
|
||||||
[Table("Dossiers")]
|
[Table("Dossiers")]
|
||||||
public partial class Dossiers
|
public partial class DossierModel
|
||||||
{
|
{
|
||||||
#region Public Properties
|
#region Public Properties
|
||||||
|
|
||||||
@@ -31,7 +31,8 @@ namespace MP.Data.DatabaseModels
|
|||||||
|
|
||||||
public string Valore { get; set; } = "";
|
public string Valore { get; set; } = "";
|
||||||
|
|
||||||
|
[MaxLength(50)]
|
||||||
|
public string KeyRichiesta { get; set; } = "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Navigazione oggetto Machine
|
/// Navigazione oggetto Machine
|
||||||
@@ -45,6 +46,12 @@ namespace MP.Data.DatabaseModels
|
|||||||
[ForeignKey("IdxODL")]
|
[ForeignKey("IdxODL")]
|
||||||
public virtual ODLModel OdlNav { get; set; } = null!;
|
public virtual ODLModel OdlNav { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Navigazione oggetto Articolo
|
||||||
|
/// </summary>
|
||||||
|
[ForeignKey("CodArticolo")]
|
||||||
|
public virtual AnagArticoli ArticoloNav { get; set; } = null!;
|
||||||
|
|
||||||
#endregion Public Properties
|
#endregion Public Properties
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
@@ -8,14 +10,22 @@ using System.Collections.Generic;
|
|||||||
// </Auto-Generated>
|
// </Auto-Generated>
|
||||||
namespace MP.Data.DatabaseModels
|
namespace MP.Data.DatabaseModels
|
||||||
{
|
{
|
||||||
|
[Table("Macchine")]
|
||||||
public partial class Macchine
|
public partial class Macchine
|
||||||
{
|
{
|
||||||
#region Public Properties
|
#region Public Properties
|
||||||
|
|
||||||
public string CodMacchina { get; set; }
|
[Key]
|
||||||
public string Descrizione { get; set; }
|
|
||||||
public string IdxMacchina { get; set; }
|
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
|
#endregion Public Properties
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ namespace MP.Data
|
|||||||
public virtual DbSet<ODLModel> DbSetODL { get; set; }
|
public virtual DbSet<ODLModel> DbSetODL { get; set; }
|
||||||
public virtual DbSet<PODLModel> DbSetPODL { get; set; }
|
public virtual DbSet<PODLModel> DbSetPODL { get; set; }
|
||||||
public virtual DbSet<FluxLog> DbSetFluxLog { get; set; }
|
public virtual DbSet<FluxLog> DbSetFluxLog { get; set; }
|
||||||
public virtual DbSet<Dossiers> DbSetDossiers { get; set; }
|
public virtual DbSet<DossierModel> DbSetDossiers { get; set; }
|
||||||
public virtual DbSet<StatODLModel> DbSetStatOdl { get; set; }
|
public virtual DbSet<StatODLModel> DbSetStatOdl { get; set; }
|
||||||
public virtual DbSet<StatoProdModel> DbSetStatoProd { get; set; }
|
public virtual DbSet<StatoProdModel> DbSetStatoProd { get; set; }
|
||||||
public virtual DbSet<EventListModel> DbSetEvList { get; set; }
|
public virtual DbSet<EventListModel> DbSetEvList { get; set; }
|
||||||
|
|||||||
@@ -22,62 +22,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@code {
|
|
||||||
|
|
||||||
//[CascadingParameter]
|
|
||||||
//private Task<AuthenticationState> 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:
|
@* // 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
|
// 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
|
||||||
|
|||||||
@@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -53,79 +53,3 @@ else // disegno box non cliccabile e licenza mancante
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
@code {
|
|
||||||
|
|
||||||
[Parameter]
|
|
||||||
public UpdMan CurrItem { get; set; }
|
|
||||||
|
|
||||||
protected List<AnagKeyValueModel> 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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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<AnagKeyValueModel> 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
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -372,7 +372,35 @@ namespace MP.Land.Data
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_logger.LogInformation($"Record non trovato per {authKey}");
|
_logger.LogInformation($"checkLicenseActive | Record non trovato per {authKey}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return answ;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Verifica scadenza licenza
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="authKey"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
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;
|
return answ;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<RootNamespace>MP.Land</RootNamespace>
|
<RootNamespace>MP.Land</RootNamespace>
|
||||||
<Version>6.16.2210.2110</Version>
|
<Version>6.16.2211.0416</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -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 NLog;
|
||||||
|
using System;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace MP.Land.Pages
|
namespace MP.Land.Pages
|
||||||
{
|
{
|
||||||
public partial class About
|
public partial class About
|
||||||
{
|
{
|
||||||
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
|
#region Protected Methods
|
||||||
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";
|
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
@@ -43,9 +15,31 @@ namespace MP.Land.Pages
|
|||||||
await reloadLicenseData();
|
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()
|
private async Task reloadLicenseData()
|
||||||
{
|
{
|
||||||
int cDelay = 5;
|
int cDelay = 10;
|
||||||
// recupero dati
|
// recupero dati
|
||||||
await Task.Delay(cDelay);
|
await Task.Delay(cDelay);
|
||||||
try
|
try
|
||||||
@@ -56,13 +50,14 @@ namespace MP.Land.Pages
|
|||||||
Installazione = LicServ.Installazione;
|
Installazione = LicServ.Installazione;
|
||||||
Applicazione = LicServ.Applicazione;
|
Applicazione = LicServ.Applicazione;
|
||||||
MastKey = LicServ.MasterKey;
|
MastKey = LicServ.MasterKey;
|
||||||
|
Scadenza = LicServ.getLicenseExpiry(LicServ.MasterKey);
|
||||||
await Task.Delay(cDelay);
|
await Task.Delay(cDelay);
|
||||||
var fatto = await LicServ.RefreshLicense();
|
var fatto = await LicServ.RefreshLicense();
|
||||||
await Task.Delay(cDelay);
|
await Task.Delay(cDelay);
|
||||||
Licenze = $"{LicServ.NumLicDb}/{LicServ.NumLicRemote}";
|
Licenze = $"{LicServ.NumLicDb}/{LicServ.NumLicRemote}";
|
||||||
licenseCss = "";
|
licenseCss = "";
|
||||||
}
|
}
|
||||||
catch(Exception exc)
|
catch (Exception exc)
|
||||||
{
|
{
|
||||||
licenseCss = "bg-dark text-warning";
|
licenseCss = "bg-dark text-warning";
|
||||||
Log.Error($"Eccezione in reloadLicenseData:{Environment.NewLine}{exc}");
|
Log.Error($"Eccezione in reloadLicenseData:{Environment.NewLine}{exc}");
|
||||||
@@ -86,5 +81,7 @@ namespace MP.Land.Pages
|
|||||||
AppMService.PageName = "About";
|
AppMService.PageName = "About";
|
||||||
AppMService.PageIcon = "fas fa-info-circle pr-2";
|
AppMService.PageIcon = "fas fa-info-circle pr-2";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion Private Methods
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -69,17 +69,3 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@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";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,22 +1,23 @@
|
|||||||
using System;
|
using Microsoft.AspNetCore.Components;
|
||||||
|
using MP.Land.Data;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
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
|
namespace MP.Land.Pages
|
||||||
{
|
{
|
||||||
public partial class Index
|
public partial class Index : IDisposable
|
||||||
{
|
{
|
||||||
#region Private Fields
|
#region Public Methods
|
||||||
|
|
||||||
private List<MP.AppAuth.Models.UpdMan> ListRecords;
|
public void Dispose()
|
||||||
|
{
|
||||||
|
ListRecords = null;
|
||||||
|
GC.Collect();
|
||||||
|
}
|
||||||
|
|
||||||
#endregion Private Fields
|
#endregion Public Methods
|
||||||
|
|
||||||
#region Protected Fields
|
#region Protected Fields
|
||||||
|
|
||||||
@@ -63,5 +64,11 @@ namespace MP.Land.Pages
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion Protected Methods
|
#endregion Protected Methods
|
||||||
|
|
||||||
|
#region Private Fields
|
||||||
|
|
||||||
|
private List<MP.AppAuth.Models.UpdMan> ListRecords;
|
||||||
|
|
||||||
|
#endregion Private Fields
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -42,25 +42,25 @@
|
|||||||
<div class="list-group">
|
<div class="list-group">
|
||||||
<div class="list-group-item">
|
<div class="list-group-item">
|
||||||
<div class="d-flex w-100 justify-content-between">
|
<div class="d-flex w-100 justify-content-between">
|
||||||
<h5 class="mb-1">Environment</h5>
|
<b class="mb-1">Environment</b>
|
||||||
</div>
|
</div>
|
||||||
<p class="mb-1">@Environment</p>
|
<p class="mb-1">@Environment</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="list-group-item">
|
<div class="list-group-item">
|
||||||
<div class="d-flex w-100 justify-content-between">
|
<div class="d-flex w-100 justify-content-between">
|
||||||
<h5 class="mb-1">Main DB Conf</h5>
|
<b class="mb-1">Main DB Conf</b>
|
||||||
</div>
|
</div>
|
||||||
<p class="mb-1">@DbNameExample</p>
|
<p class="mb-1">@DbNameExample</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="list-group-item">
|
<div class="list-group-item">
|
||||||
<div class="d-flex w-100 justify-content-between">
|
<div class="d-flex w-100 justify-content-between">
|
||||||
<h5 class="mb-1">.net framework</h5>
|
<b class="mb-1">.net framework</b>
|
||||||
</div>
|
</div>
|
||||||
<p class="mb-1">@currHwSwInfo.runtimeImg</p>
|
<p class="mb-1">@currHwSwInfo.runtimeImg</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="list-group-item">
|
<div class="list-group-item">
|
||||||
<div class="d-flex w-100 justify-content-between">
|
<div class="d-flex w-100 justify-content-between">
|
||||||
<h5 class="mb-1">Main Assembly</h5>
|
<b class="mb-1">Main Assembly</b>
|
||||||
</div>
|
</div>
|
||||||
<p class="mb-1">@currHwSwInfo.mainAssembly</p>
|
<p class="mb-1">@currHwSwInfo.mainAssembly</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
<div class="list-group">
|
<div class="list-group">
|
||||||
<div class="list-group-item">
|
<div class="list-group-item">
|
||||||
<div class="d-flex w-100 justify-content-between">
|
<div class="d-flex w-100 justify-content-between">
|
||||||
<h5 class="mb-1">Server Stats</h5>
|
<b class="mb-1">Server Stats</b>
|
||||||
</div>
|
</div>
|
||||||
<p class="mb-1">
|
<p class="mb-1">
|
||||||
<pre>@currHwSwInfo.ServerStats</pre>
|
<pre>@currHwSwInfo.ServerStats</pre>
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="list-group-item">
|
<div class="list-group-item">
|
||||||
<div class="d-flex w-100 justify-content-between">
|
<div class="d-flex w-100 justify-content-between">
|
||||||
<h5 class="mb-1">IIS Stats</h5>
|
<b class="mb-1">IIS Stats</b>
|
||||||
</div>
|
</div>
|
||||||
<p class="mb-1">
|
<p class="mb-1">
|
||||||
<pre>@currHwSwInfo.IISStats</pre>
|
<pre>@currHwSwInfo.IISStats</pre>
|
||||||
@@ -112,7 +112,7 @@
|
|||||||
<div class="list-group">
|
<div class="list-group">
|
||||||
<div class="list-group-item">
|
<div class="list-group-item">
|
||||||
<div class="d-flex w-100 justify-content-between">
|
<div class="d-flex w-100 justify-content-between">
|
||||||
<h5 class="mb-1">Elenco librerie</h5>
|
<b class="mb-1">Elenco librerie</b>
|
||||||
<span>@currHwSwInfo.numLibraries</span>
|
<span>@currHwSwInfo.numLibraries</span>
|
||||||
</div>
|
</div>
|
||||||
<p class="mb-1">
|
<p class="mb-1">
|
||||||
@@ -133,51 +133,3 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,22 +10,24 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace MP.Land.Pages
|
namespace MP.Land.Pages
|
||||||
{
|
{
|
||||||
public partial class UpdateManager
|
public partial class UpdateManager : IDisposable
|
||||||
{
|
{
|
||||||
#region Private Fields
|
#region Public Methods
|
||||||
|
|
||||||
private List<MP.AppAuth.Models.UpdMan> ListRecords;
|
public void Dispose()
|
||||||
|
{
|
||||||
|
ListRecords = null;
|
||||||
|
GC.Collect();
|
||||||
|
}
|
||||||
|
|
||||||
#endregion Private Fields
|
#endregion Public Methods
|
||||||
|
|
||||||
#region Protected Fields
|
#region Protected Fields
|
||||||
|
|
||||||
protected int numDone = 0;
|
protected int numDone = 0;
|
||||||
protected int numTot = 0;
|
protected int numTot = 0;
|
||||||
protected int totalCount = 0;
|
protected int totalCount = 0;
|
||||||
|
|
||||||
protected double TotalMb = 0;
|
protected double TotalMb = 0;
|
||||||
|
|
||||||
protected UpdateMan updateManAuth = new UpdateMan("SWDownloader", "viaD@nte16");
|
protected UpdateMan updateManAuth = new UpdateMan("SWDownloader", "viaD@nte16");
|
||||||
|
|
||||||
#endregion Protected Fields
|
#endregion Protected Fields
|
||||||
@@ -42,34 +44,12 @@ namespace MP.Land.Pages
|
|||||||
protected AppAuthService DataService { get; set; }
|
protected AppAuthService DataService { get; set; }
|
||||||
|
|
||||||
protected string outMessages { get; set; } = "";
|
protected string outMessages { get; set; } = "";
|
||||||
|
|
||||||
protected int percLoading { get; set; } = 0;
|
protected int percLoading { get; set; } = 0;
|
||||||
|
|
||||||
protected bool showProgress { get; set; } = false;
|
protected bool showProgress { get; set; } = false;
|
||||||
protected bool showUpdate { get; set; } = false;
|
protected bool showUpdate { get; set; } = false;
|
||||||
|
|
||||||
#endregion Protected Properties
|
#endregion Protected Properties
|
||||||
|
|
||||||
#region Private Methods
|
|
||||||
|
|
||||||
private async Task<long> 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
|
#region Protected Methods
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -151,5 +131,31 @@ namespace MP.Land.Pages
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion Protected Methods
|
#endregion Protected Methods
|
||||||
|
|
||||||
|
#region Private Fields
|
||||||
|
|
||||||
|
private List<MP.AppAuth.Models.UpdMan> ListRecords;
|
||||||
|
|
||||||
|
#endregion Private Fields
|
||||||
|
|
||||||
|
#region Private Methods
|
||||||
|
|
||||||
|
private async Task<long> 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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -16,6 +16,9 @@ namespace MP.Land.Pages
|
|||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
AppMService.EA_SearchUpdated -= OnSeachUpdated;
|
AppMService.EA_SearchUpdated -= OnSeachUpdated;
|
||||||
|
AppMService.EA_FilterUpdated -= OnFilterUpdated;
|
||||||
|
ListRecords = null;
|
||||||
|
GC.Collect();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Public Methods
|
#endregion Public Methods
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<body>
|
<body>
|
||||||
<i>Modulo gestione Programmi MAPO</i>
|
<i>Modulo gestione Programmi MAPO</i>
|
||||||
<h4>Versione: 6.16.2210.2110</h4>
|
<h4>Versione: 6.16.2211.0416</h4>
|
||||||
<br />
|
<br />
|
||||||
Note di rilascio:
|
Note di rilascio:
|
||||||
<ul>
|
<ul>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
6.16.2210.2110
|
6.16.2211.0416
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<item>
|
<item>
|
||||||
<version>6.16.2210.2110</version>
|
<version>6.16.2211.0416</version>
|
||||||
<url>https://nexus.steamware.net/repository/SWS/MP-LAND/stable/LAST/MP.Land.zip</url>
|
<url>https://nexus.steamware.net/repository/SWS/MP-LAND/stable/LAST/MP.Land.zip</url>
|
||||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-LAND/stable/LAST/ChangeLog.html</changelog>
|
<changelog>https://nexus.steamware.net/repository/SWS/MP-LAND/stable/LAST/ChangeLog.html</changelog>
|
||||||
<mandatory>false</mandatory>
|
<mandatory>false</mandatory>
|
||||||
|
|||||||
@@ -26,35 +26,3 @@
|
|||||||
</CascadingValue>
|
</CascadingValue>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -24,63 +24,4 @@
|
|||||||
</div>*@
|
</div>*@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@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<bool>("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!;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -14,6 +14,7 @@ else if (totalCount == 0)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
<!-- INIZIO: MODIFICA FLUSSO -->
|
||||||
@if (currFluxLogDto != null)
|
@if (currFluxLogDto != null)
|
||||||
{
|
{
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -78,13 +79,137 @@ else
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<!-- FINE: MODIFICA FLUSSO -->
|
||||||
|
<!-- INIZIO: NUOVO DOSSIER -->
|
||||||
|
@if (currRecordClone != null)
|
||||||
|
{
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card mb-5">
|
||||||
|
<div class="card-header bg-primary text-light d-flex justify-content-between">
|
||||||
|
<div>
|
||||||
|
Nuovo Dossier
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<!--INIZIO PRIMA RIGA-->
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-4 pe-0">
|
||||||
|
<div class="input-group input-group-sm">
|
||||||
|
<span class="input-group-text" id="inputGroup-sizing-sm">MACCHINA</span>
|
||||||
|
<select @bind="@currRecordClone.IdxMacchina" class="form-select" id="macchina" title="Selezionare la macchina" @onclick="()=> enableEditing()">
|
||||||
|
@if (ListMacchine != null)
|
||||||
|
{
|
||||||
|
foreach (var item in ListMacchine)
|
||||||
|
{
|
||||||
|
@if (item.IdxMacchina == currRecordClone.IdxMacchina)
|
||||||
|
{
|
||||||
|
|
||||||
|
<option value="@item.IdxMacchina" selected>@item.IdxMacchina | @item.Descrizione</option>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<option value="@item.IdxMacchina">@item.IdxMacchina | @item.Descrizione</option>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-4 pe-0">
|
||||||
|
<div class="input-group input-group-sm">
|
||||||
|
<span class="input-group-text" id="inputGroup-sizing-sm">FASE</span>
|
||||||
|
<select class="form-select" @bind="@currRecordClone.KeyRichiesta" @onclick="()=> enableEditing()" title="Selezionare la fase">
|
||||||
|
@if (ListStati != null)
|
||||||
|
{
|
||||||
|
foreach (var item in ListStati)
|
||||||
|
{
|
||||||
|
@if (item.value == currRecordClone.KeyRichiesta)
|
||||||
|
{
|
||||||
|
<option value="@item.value" selected>@item.label</option>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<option value="@item.value">@item.label</option>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-4 pe-0">
|
||||||
|
<div class="input-group input-group-sm">
|
||||||
|
<span class="input-group-text" id="inputGroup-sizing-sm" @onclick="()=> enableEditing()">ARTICOLI</span>
|
||||||
|
|
||||||
|
<select @bind="@currRecordClone.CodArticolo" class="form-select" id="macchina" title="Selezionare l'articolo">
|
||||||
|
@if (ListArticoli != null)
|
||||||
|
{
|
||||||
|
foreach (var item in ListArticoli)
|
||||||
|
{
|
||||||
|
@if (item.CodArticolo == currRecordClone.CodArticolo)
|
||||||
|
{
|
||||||
|
<option value="@item.CodArticolo" selected>@item.CodArticolo | @item.DescArticolo</option>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<option value="@item.CodArticolo">@item.CodArticolo | @item.DescArticolo</option>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--FINE PRIMA RIGA-->
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row pt-4">
|
||||||
|
<div class="col-3 pe-0">
|
||||||
|
</div>
|
||||||
|
<div class="col-3 pe-0">
|
||||||
|
</div>
|
||||||
|
<div class="col-3 pe-0">
|
||||||
|
<div class="d-grid gap-2">
|
||||||
|
<button @onclick="() => cancelNewDoss()" class="btn btn-warning">Annulla <i class="bi bi-x-circle"></i></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-3 pe-0">
|
||||||
|
<div class="d-grid gap-2">
|
||||||
|
<button @onclick="() => newDossier(currRecordClone)" class="btn btn-success">Save <i class="bi bi-save"></i></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
<!-- FINE: NUOVO DOSSIER -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="d-flex justify justify-content-between">
|
<div class="d-flex justify justify-content-between">
|
||||||
<table class="table table-sm table-striped small">
|
<table class="table table-sm table-striped small">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>
|
||||||
<button @onclick="() => closeTableFlux()" class="btn btn-primary btn-sm"><i class="bi bi-arrow-counterclockwise"></i></button>
|
<div class="text-nowrap">
|
||||||
|
|
||||||
|
@if (currRecord != null)
|
||||||
|
{
|
||||||
|
<button @onclick="() => closeTableFlux()" class="btn btn-primary btn-sm"><i class="bi bi-arrow-counterclockwise"></i></button>
|
||||||
|
<button @onclick="()=> cloneRecord(currRecord)" class="btn btn-info btn-sm" title="Duplica Record"><i class="bi bi-clipboard-check"></i></button>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<th><i class="fa-solid fa-file"></i> Articolo</th>
|
<th><i class="fa-solid fa-file"></i> Articolo</th>
|
||||||
<th><i class="fa-solid fa-screwdriver-wrench"></i> Fase</th>
|
<th><i class="fa-solid fa-screwdriver-wrench"></i> Fase</th>
|
||||||
@@ -101,8 +226,10 @@ else
|
|||||||
<td>
|
<td>
|
||||||
@if (isEditing == false)
|
@if (isEditing == false)
|
||||||
{
|
{
|
||||||
|
<!--SEL RECORD PER VISUALIZZAZIONE FLUSSI-->
|
||||||
<button class="btn btn-primary btn-sm" @onclick="() => selRecord(record)"><i class="fa-solid fa-magnifying-glass"></i></button>
|
<button class="btn btn-primary btn-sm" @onclick="() => selRecord(record)"><i class="fa-solid fa-magnifying-glass"></i></button>
|
||||||
|
<!--SEL RECORD PER CLONA DOSSIER-->
|
||||||
|
@*<button @onclick="()=> cloneRecord(record)" class="btn btn-info btn-sm" title="Duplica Record"><i class="bi bi-clipboard-check"></i></button>*@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -110,15 +237,15 @@ else
|
|||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@record.OdlNav.CodArticolo
|
@record.CodArticolo
|
||||||
<div class="small textConsensed text-secondary">@record.OdlNav.ArticoloNav.DescArticolo</div>
|
<div class="small textConsensed text-secondary">@record.ArticoloNav.DescArticolo</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@tradFase(record.OdlNav.KeyRichiesta)
|
@tradFase(record.KeyRichiesta)
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@record.IdxMacchina
|
@record.IdxMacchina
|
||||||
<div class="small textConsensed text-secondary">@record.MachineNav.Descrizione</div>
|
@*<div class="small textConsensed text-secondary">@record.MachineNav.Descrizione</div>*@
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@record.DtRif
|
@record.DtRif
|
||||||
@@ -180,8 +307,8 @@ else
|
|||||||
@record.dtEvento
|
@record.dtEvento
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@record.CodFlux
|
@traduci(record.CodFlux)
|
||||||
<div class="small text-dark" title="Valore Registrato"><i>@traduci(record.CodFlux)</i></div>
|
<div class="small textConsensed text-secondary" title="Valore Registrato">@record.CodFlux</div>
|
||||||
</td>
|
</td>
|
||||||
<td style="text-align: right;">
|
<td style="text-align: right;">
|
||||||
@if (record.ValoreEdit != record.Valore)
|
@if (record.ValoreEdit != record.Valore)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Microsoft.AspNetCore.DataProtection;
|
using Microsoft.EntityFrameworkCore.Query.Internal;
|
||||||
using Microsoft.JSInterop;
|
using Microsoft.JSInterop;
|
||||||
using MP.Data.DatabaseModels;
|
using MP.Data.DatabaseModels;
|
||||||
using MP.Data.DTO;
|
using MP.Data.DTO;
|
||||||
@@ -13,7 +13,7 @@ namespace MP.SPEC.Components
|
|||||||
#region Public Properties
|
#region Public Properties
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public EventCallback<Dossiers> RecordSel { get; set; }
|
public EventCallback<DossierModel> RecordSel { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public EventCallback<FluxLogDTO> RecordSelFlux { get; set; }
|
public EventCallback<FluxLogDTO> RecordSelFlux { get; set; }
|
||||||
@@ -28,9 +28,44 @@ namespace MP.SPEC.Components
|
|||||||
|
|
||||||
#region Public Methods
|
#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)
|
public string checkSelPar(FluxLogDTO recordSel)
|
||||||
{
|
{
|
||||||
string answ = "";
|
string answ = "";
|
||||||
@@ -46,21 +81,6 @@ namespace MP.SPEC.Components
|
|||||||
return answ;
|
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()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
currRecord = null;
|
currRecord = null;
|
||||||
@@ -68,40 +88,73 @@ namespace MP.SPEC.Components
|
|||||||
ListRecords = null;
|
ListRecords = null;
|
||||||
GC.Collect();
|
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
|
#endregion Public Methods
|
||||||
|
|
||||||
#region Protected Properties
|
#region Protected Properties
|
||||||
|
|
||||||
private string traduci(string lemma)
|
|
||||||
{
|
|
||||||
var answ = MDService.Traduci(lemma, "IT");
|
|
||||||
return answ;
|
|
||||||
}
|
|
||||||
|
|
||||||
[Inject]
|
[Inject]
|
||||||
protected IJSRuntime JSRuntime { get; set; } = null!;
|
protected IJSRuntime JSRuntime { get; set; } = null!;
|
||||||
|
|
||||||
[Inject]
|
[Inject]
|
||||||
protected MpDataService MDService { get; set; } = null!;
|
protected MpDataService MDService { get; set; } = null!;
|
||||||
|
|
||||||
#endregion Protected Properties
|
#endregion Protected Properties
|
||||||
|
|
||||||
#region Protected Methods
|
#region Protected Methods
|
||||||
|
|
||||||
|
protected async Task cancel()
|
||||||
|
{
|
||||||
|
var alert = await JSRuntime.InvokeAsync<bool>("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<bool>("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);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Eliminazione record selezionato (previa conferma)
|
/// Eliminazione record selezionato (previa conferma)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="selRec"></param>
|
/// <param name="selRec"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
protected async Task deleteRecord(Dossiers selRec)
|
protected async Task deleteRecord(DossierModel selRec)
|
||||||
{
|
{
|
||||||
if (!await JSRuntime.InvokeAsync<bool>("confirm", "Eliminazione Dossier: sei sicuro di voler procedere?"))
|
if (!await JSRuntime.InvokeAsync<bool>("confirm", "Eliminazione Dossier: sei sicuro di voler procedere?"))
|
||||||
return;
|
return;
|
||||||
@@ -120,25 +173,98 @@ namespace MP.SPEC.Components
|
|||||||
await RecordSelFlux.InvokeAsync(selRec);
|
await RecordSelFlux.InvokeAsync(selRec);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void enableEditing()
|
protected async Task newDossier(DossierModel selRec)
|
||||||
{
|
{
|
||||||
isEditing = true;
|
var alert = await JSRuntime.InvokeAsync<bool>("confirm", "Confermi di voler creare un nuovo Dossier per l'impianto/articolo selezioanto?");
|
||||||
}
|
|
||||||
|
|
||||||
protected async Task cancel()
|
|
||||||
{
|
|
||||||
var alert = await JSRuntime.InvokeAsync<bool>("confirm", "Confermi di voler annullare TUTTE le modifiche? i dati saranno ricaricati.");
|
|
||||||
if (alert)
|
if (alert)
|
||||||
{
|
{
|
||||||
currFluxLogDto = null;
|
|
||||||
isEditing = false;
|
|
||||||
await Task.Delay(1);
|
await Task.Delay(1);
|
||||||
if (currRecord != null)
|
if (currRecordClone != null)
|
||||||
{
|
{
|
||||||
listaFlux = MDService.getFluxLog(currRecord.Valore);
|
// serializzo valore x flux log...
|
||||||
|
|
||||||
|
DossierFluxLogDTO? valoreDeserializzato = JsonConvert.DeserializeObject<DossierFluxLogDTO>(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)
|
protected async Task update(FluxLogDTO selRec)
|
||||||
@@ -147,7 +273,6 @@ namespace MP.SPEC.Components
|
|||||||
|
|
||||||
if (alert)
|
if (alert)
|
||||||
{
|
{
|
||||||
|
|
||||||
await Task.Delay(1);
|
await Task.Delay(1);
|
||||||
if (currRecord != null)
|
if (currRecord != null)
|
||||||
{
|
{
|
||||||
@@ -168,33 +293,9 @@ namespace MP.SPEC.Components
|
|||||||
{
|
{
|
||||||
currFluxLogDto = null;
|
currFluxLogDto = null;
|
||||||
await Task.Delay(1);
|
await Task.Delay(1);
|
||||||
await JSRuntime.InvokeAsync<bool>("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()
|
protected async Task UpdateData()
|
||||||
@@ -202,19 +303,6 @@ namespace MP.SPEC.Components
|
|||||||
currRecord = null;
|
currRecord = null;
|
||||||
await reloadData(true);
|
await reloadData(true);
|
||||||
}
|
}
|
||||||
private string css()
|
|
||||||
{
|
|
||||||
string answ = "";
|
|
||||||
if (isEditing)
|
|
||||||
{
|
|
||||||
answ = "visible";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
answ = "hidden";
|
|
||||||
}
|
|
||||||
return answ;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion Protected Methods
|
#endregion Protected Methods
|
||||||
|
|
||||||
@@ -222,12 +310,23 @@ namespace MP.SPEC.Components
|
|||||||
|
|
||||||
private int _totalCount = 0;
|
private int _totalCount = 0;
|
||||||
|
|
||||||
private Dossiers? currRecord = null;
|
private FluxLogDTO? currFluxLogDto = null;
|
||||||
|
|
||||||
|
private DossierModel? currRecord = null;
|
||||||
|
|
||||||
|
private DossierModel? currRecordClone = null;
|
||||||
|
|
||||||
|
private List<AnagGruppi>? ListGruppiFase;
|
||||||
|
|
||||||
|
private List<DossierModel>? ListRecords;
|
||||||
|
|
||||||
private List<Dossiers>? ListRecords;
|
|
||||||
private List<ListValues>? ListStati;
|
private List<ListValues>? ListStati;
|
||||||
|
|
||||||
private List<Dossiers>? SearchRecords;
|
private List<DossierModel>? SearchRecords;
|
||||||
|
|
||||||
|
private List<Macchine>? ListMacchine;
|
||||||
|
|
||||||
|
private List<AnagArticoli>? ListArticoli;
|
||||||
|
|
||||||
#endregion Private Fields
|
#endregion Private Fields
|
||||||
|
|
||||||
@@ -247,6 +346,8 @@ namespace MP.SPEC.Components
|
|||||||
|
|
||||||
private bool isLoading { get; set; } = false;
|
private bool isLoading { get; set; } = false;
|
||||||
|
|
||||||
|
private SelectDossierParams lastFilter { get; set; } = new SelectDossierParams() { CurrPage = -1 };
|
||||||
|
|
||||||
private List<FluxLogDTO>? listaFlux { get; set; } = null;
|
private List<FluxLogDTO>? listaFlux { get; set; } = null;
|
||||||
|
|
||||||
private int MaxRecord
|
private int MaxRecord
|
||||||
@@ -254,6 +355,9 @@ namespace MP.SPEC.Components
|
|||||||
get => SelFilter.MaxRecord;
|
get => SelFilter.MaxRecord;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Inject]
|
||||||
|
private NavigationManager NavManager { get; set; } = null!;
|
||||||
|
|
||||||
private int numRecord
|
private int numRecord
|
||||||
{
|
{
|
||||||
get => SelFilter.NumRec;
|
get => SelFilter.NumRec;
|
||||||
@@ -269,6 +373,7 @@ namespace MP.SPEC.Components
|
|||||||
{
|
{
|
||||||
get => SelFilter.DtEnd;
|
get => SelFilter.DtEnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
private DateTime SelDtStart
|
private DateTime SelDtStart
|
||||||
{
|
{
|
||||||
get => SelFilter.DtStart;
|
get => SelFilter.DtStart;
|
||||||
@@ -298,6 +403,43 @@ namespace MP.SPEC.Components
|
|||||||
|
|
||||||
#region Private Methods
|
#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)
|
private async Task reloadData(bool setChanged)
|
||||||
{
|
{
|
||||||
isLoading = true;
|
isLoading = true;
|
||||||
@@ -332,14 +474,10 @@ namespace MP.SPEC.Components
|
|||||||
return answ;
|
return answ;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task closeTableFlux()
|
private string traduci(string lemma)
|
||||||
{
|
{
|
||||||
currFluxLogDto = null;
|
var answ = MDService.Traduci(lemma, "IT");
|
||||||
currRecord = null;
|
return answ;
|
||||||
visualizzaFlux = true;
|
|
||||||
isEditing = false;
|
|
||||||
await RecordSelFlux.InvokeAsync(currFluxLogDto);
|
|
||||||
await Task.Delay(1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Private Methods
|
#endregion Private Methods
|
||||||
|
|||||||
@@ -31,7 +31,10 @@ else
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>
|
||||||
<button @onclick="() => resetSel()" class="btn btn-primary btn-sm"><i class="bi bi-arrow-counterclockwise"></i></button>
|
@if (currRecord != null)
|
||||||
|
{
|
||||||
|
<button @onclick="() => resetSel()" class="btn btn-primary btn-sm"><i class="bi bi-arrow-counterclockwise"></i></button>
|
||||||
|
}
|
||||||
</th>
|
</th>
|
||||||
<th><i class="fa-solid fa-file"></i> Articolo</th>
|
<th><i class="fa-solid fa-file"></i> Articolo</th>
|
||||||
<th><i class="fa-solid fa-screwdriver-wrench"></i> Fase</th>
|
<th><i class="fa-solid fa-screwdriver-wrench"></i> Fase</th>
|
||||||
|
|||||||
@@ -17,7 +17,10 @@ else
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>
|
||||||
<button @onclick="() => resetSel()" class="btn btn-primary btn-sm"><i class="bi bi-arrow-counterclockwise"></i></button>
|
@if (currRecord != null)
|
||||||
|
{
|
||||||
|
<button @onclick="() => resetSel()" class="btn btn-primary btn-sm"><i class="bi bi-arrow-counterclockwise"></i></button>
|
||||||
|
}
|
||||||
</th>
|
</th>
|
||||||
<th><i class="fa-regular fa-calendar-days"></i> Data</th>
|
<th><i class="fa-regular fa-calendar-days"></i> Data</th>
|
||||||
<th><i class="fa-solid fa-hard-drive"></i> Macchina</th>
|
<th><i class="fa-solid fa-hard-drive"></i> Macchina</th>
|
||||||
|
|||||||
@@ -17,7 +17,10 @@ else
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>
|
||||||
<button @onclick="() => resetSel()" class="btn btn-primary btn-sm"><i class="bi bi-arrow-counterclockwise"></i></button>
|
@if (currRecord != null)
|
||||||
|
{
|
||||||
|
<button @onclick="() => resetSel()" class="btn btn-primary btn-sm"><i class="bi bi-arrow-counterclockwise"></i></button>
|
||||||
|
}
|
||||||
</th>
|
</th>
|
||||||
<th><i class="fa-solid fa-file"></i> Articolo</th>
|
<th><i class="fa-solid fa-file"></i> Articolo</th>
|
||||||
<th><i class="fa-solid fa-screwdriver-wrench"></i> Fase</th>
|
<th><i class="fa-solid fa-screwdriver-wrench"></i> Fase</th>
|
||||||
@@ -45,7 +48,8 @@ else
|
|||||||
{
|
{
|
||||||
<button class="btn btn-secondary btn-sm disabled mx-1" title="ODL ancora in corso">
|
<button class="btn btn-secondary btn-sm disabled mx-1" title="ODL ancora in corso">
|
||||||
<i class="far fa-play-circle"></i>
|
<i class="far fa-play-circle"></i>
|
||||||
</button>}
|
</button>
|
||||||
|
}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@record.CodArticolo
|
@record.CodArticolo
|
||||||
|
|||||||
@@ -338,7 +338,7 @@ namespace MP.SPEC.Data
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="selRecord">record dossier da eliminare</param>
|
/// <param name="selRecord">record dossier da eliminare</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<bool> DossiersDeleteRecord(Dossiers selRecord)
|
public async Task<bool> DossiersDeleteRecord(DossierModel selRecord)
|
||||||
{
|
{
|
||||||
bool result = false;
|
bool result = false;
|
||||||
Stopwatch stopWatch = new Stopwatch();
|
Stopwatch stopWatch = new Stopwatch();
|
||||||
@@ -361,9 +361,9 @@ namespace MP.SPEC.Data
|
|||||||
/// <param name="DtStart">Data minima per estrazione records</param>
|
/// <param name="DtStart">Data minima per estrazione records</param>
|
||||||
/// <param name="DtEnd">Data Massima per estrazione records</param>
|
/// <param name="DtEnd">Data Massima per estrazione records</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<List<Dossiers>> DossiersGetLastFilt(string IdxMacchina, string CodArticolo, DateTime DtStart, DateTime DtEnd)
|
public async Task<List<DossierModel>> DossiersGetLastFilt(string IdxMacchina, string CodArticolo, DateTime DtStart, DateTime DtEnd)
|
||||||
{
|
{
|
||||||
List<Dossiers>? result = new List<Dossiers>();
|
List<DossierModel>? result = new List<DossierModel>();
|
||||||
Stopwatch stopWatch = new Stopwatch();
|
Stopwatch stopWatch = new Stopwatch();
|
||||||
stopWatch.Start();
|
stopWatch.Start();
|
||||||
string readType = "DB";
|
string readType = "DB";
|
||||||
@@ -372,7 +372,7 @@ namespace MP.SPEC.Data
|
|||||||
RedisValue rawData = redisDb.StringGet(currKey);
|
RedisValue rawData = redisDb.StringGet(currKey);
|
||||||
if (rawData.HasValue)
|
if (rawData.HasValue)
|
||||||
{
|
{
|
||||||
result = JsonConvert.DeserializeObject<List<Dossiers>>($"{rawData}");
|
result = JsonConvert.DeserializeObject<List<DossierModel>>($"{rawData}");
|
||||||
readType = "REDIS";
|
readType = "REDIS";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -384,7 +384,7 @@ namespace MP.SPEC.Data
|
|||||||
}
|
}
|
||||||
if (result == null)
|
if (result == null)
|
||||||
{
|
{
|
||||||
result = new List<Dossiers>();
|
result = new List<DossierModel>();
|
||||||
}
|
}
|
||||||
stopWatch.Stop();
|
stopWatch.Stop();
|
||||||
TimeSpan ts = stopWatch.Elapsed;
|
TimeSpan ts = stopWatch.Elapsed;
|
||||||
@@ -397,10 +397,10 @@ namespace MP.SPEC.Data
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="currDoss"></param>
|
/// <param name="currDoss"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<bool> DossiersInsert(Dossiers currDoss)
|
public async Task<bool> DossiersInsert(DossierModel currDoss)
|
||||||
{
|
{
|
||||||
// aggiorno record sul DB
|
// aggiorno record sul DB
|
||||||
bool answ = await dbController.DossiersUpdateValore(currDoss);
|
bool answ = await dbController.DossiersInsert(currDoss);
|
||||||
|
|
||||||
return answ;
|
return answ;
|
||||||
}
|
}
|
||||||
@@ -451,7 +451,7 @@ namespace MP.SPEC.Data
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="currDoss"></param>
|
/// <param name="currDoss"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<bool> DossiersUpdateValore(Dossiers currDoss)
|
public async Task<bool> DossiersUpdateValore(DossierModel currDoss)
|
||||||
{
|
{
|
||||||
// aggiorno record sul DB
|
// aggiorno record sul DB
|
||||||
bool answ = await dbController.DossiersUpdateValore(currDoss);
|
bool answ = await dbController.DossiersUpdateValore(currDoss);
|
||||||
@@ -910,7 +910,7 @@ namespace MP.SPEC.Data
|
|||||||
return answ;
|
return answ;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<bool> updateDossierValue(Dossiers currDoss, FluxLogDTO editFL)
|
public async Task<bool> updateDossierValue(DossierModel currDoss, FluxLogDTO editFL)
|
||||||
{
|
{
|
||||||
bool answ = false;
|
bool answ = false;
|
||||||
// recupero intero set valori dossier deserializzando...
|
// recupero intero set valori dossier deserializzando...
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<RootNamespace>MP.SPEC</RootNamespace>
|
<RootNamespace>MP.SPEC</RootNamespace>
|
||||||
<Version>6.16.2211.312</Version>
|
<Version>6.16.2211.416</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -40,33 +40,21 @@
|
|||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-4">
|
<div class="col-3">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-text">Codice</span>
|
<span class="input-group-text">Codice</span>
|
||||||
<input type="text" class="form-control" placeholder="Articolo" @bind-value="@currRecord.CodArticolo">
|
<input type="text" class="form-control" placeholder="Articolo" @bind-value="@currRecord.CodArticolo">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4">
|
<div class="col-5">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-text">Disegno</span>
|
<span class="input-group-text">Disegno</span>
|
||||||
<input type="text" class="form-control" placeholder="Disegno" @bind-value="@currRecord.Disegno">
|
<input type="text" class="form-control" placeholder="Disegno" @bind-value="@currRecord.Disegno">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-1">
|
<div class="col-4">
|
||||||
<div class="input-group" title="Tipo">
|
|
||||||
<select @bind="@currRecord.Tipo" class="form-select text-end">
|
|
||||||
@if (ListTipoArt != null)
|
|
||||||
{
|
|
||||||
foreach (var item in ListTipoArt)
|
|
||||||
{
|
|
||||||
<option value="@item.value">@item.label</option>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-3">
|
|
||||||
<div class="input-group" title="Azienda">
|
<div class="input-group" title="Azienda">
|
||||||
|
<span class="input-group-text">Azienda</span>
|
||||||
<select @bind="@currRecord.Azienda" class="form-select text-end">
|
<select @bind="@currRecord.Azienda" class="form-select text-end">
|
||||||
@if (ListAziende != null)
|
@if (ListAziende != null)
|
||||||
{
|
{
|
||||||
@@ -81,8 +69,25 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mt-2">
|
<div class="row mt-2">
|
||||||
<div class="col-8">
|
<div class="col-3">
|
||||||
<input type="text" class="form-control" placeholder="Descrizione Articolo" @bind-value="@currRecord.DescArticolo">
|
<div class="input-group" title="Tipo">
|
||||||
|
<span class="input-group-text">Tipo</span>
|
||||||
|
<select @bind="@currRecord.Tipo" class="form-select text-end">
|
||||||
|
@if (ListTipoArt != null)
|
||||||
|
{
|
||||||
|
foreach (var item in ListTipoArt)
|
||||||
|
{
|
||||||
|
<option value="@item.value">@item.label</option>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-5">
|
||||||
|
<div class="input-group">
|
||||||
|
<span class="input-group-text">Descrizione</span>
|
||||||
|
<input type="text" class="form-control" placeholder="Descrizione Articolo" @bind-value="@currRecord.DescArticolo">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-2">
|
<div class="col-2">
|
||||||
<div class="d-grid gap-2">
|
<div class="d-grid gap-2">
|
||||||
@@ -120,7 +125,10 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>
|
||||||
<button @onclick="() => resetSel()" class="btn btn-primary btn-sm"><i class="bi bi-arrow-counterclockwise"></i></button>
|
@if (currRecord != null)
|
||||||
|
{
|
||||||
|
<button @onclick="() => resetSel()" class="btn btn-primary btn-sm"><i class="bi bi-arrow-counterclockwise"></i></button>
|
||||||
|
}
|
||||||
</th>
|
</th>
|
||||||
<th><i class="fa-solid fa-file"></i> Articolo</th>
|
<th><i class="fa-solid fa-file"></i> Articolo</th>
|
||||||
<th><i class="fa-solid fa-compass-drafting"></i> Disegno</th>
|
<th><i class="fa-solid fa-compass-drafting"></i> Disegno</th>
|
||||||
@@ -136,7 +144,7 @@
|
|||||||
<tr class="@checkSelect(@record.CodArticolo)">
|
<tr class="@checkSelect(@record.CodArticolo)">
|
||||||
<td>
|
<td>
|
||||||
<button @onclick="() => selRecord(record)" class="btn btn-primary btn-sm" title="Modifica Record"><i class="bi bi-pencil-square"></i></button>
|
<button @onclick="() => selRecord(record)" class="btn btn-primary btn-sm" title="Modifica Record"><i class="bi bi-pencil-square"></i></button>
|
||||||
<button @onclick="() => cloneRecord(record)" class="btn btn-info btn-sm" title="Duplica Record"><i class="bi bi-clipboard-check"></i></button>
|
<button @onclick="() => cloneRecord(record)" class="btn btn-info btn-sm" title="Duplica Record"><i class="bi bi-clipboard-check"></i></button>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div>@record.CodArticolo</div>
|
<div>@record.CodArticolo</div>
|
||||||
|
|||||||
@@ -0,0 +1,71 @@
|
|||||||
|
@page "/Contacts"
|
||||||
|
@using MP.SPEC.Data
|
||||||
|
|
||||||
|
@inject MessageService AppMService
|
||||||
|
|
||||||
|
<div class="row mx-2">
|
||||||
|
<div class="col-12 col-lg-8 offset-lg-2">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header text-center">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-4"></div>
|
||||||
|
<div class="col-4">
|
||||||
|
<h2>@Titolo</h2>
|
||||||
|
</div>
|
||||||
|
<div class="col-4">
|
||||||
|
<div class="badge rounded-pill bg-dark px-4 py-2">
|
||||||
|
<div class="px-1">
|
||||||
|
<a class="btn text-light text-decoration-none" href="https://www.egalware.com/" target="_blank">powered by EgalWare <img width="24" class="img-fluid" src="images/LogoEgw.png" /></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-3"></div>
|
||||||
|
<div class="col-12 col-lg-6 py-3">
|
||||||
|
<img src="images/LogoMapoFull.png" class="img-fluid" />
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-3"></div>
|
||||||
|
<div class="col-12">
|
||||||
|
<h4 class="card-title">@Messaggio</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-4">
|
||||||
|
<h4>Sede Operativa</h4>
|
||||||
|
<address>
|
||||||
|
<strong>EgalWare s.r.l.</strong><br />
|
||||||
|
via Nazionale, 93<br />
|
||||||
|
24068 Seriate - BG<br />
|
||||||
|
<abbr title="Phone">P:</abbr>
|
||||||
|
035.290178<br />
|
||||||
|
<abbr title="Phone">P:</abbr>
|
||||||
|
035.460560
|
||||||
|
</address>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-4">
|
||||||
|
<h4>Sede Legale</h4>
|
||||||
|
<address>
|
||||||
|
<strong>EgalWare s.r.l.</strong><br />
|
||||||
|
via Nazionale, 93<br />
|
||||||
|
24068 Seriate - BG<br />
|
||||||
|
<br />
|
||||||
|
<abbr title="P.Iva">VAT:</abbr>03985390164
|
||||||
|
</address>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-4">
|
||||||
|
<h4>Supporto</h4>
|
||||||
|
<address>
|
||||||
|
<strong>Web:</strong><br />
|
||||||
|
Accedi al supporto dal <a href="https://support.egalware.com/" target="_blank">nostro sito web</a><br />
|
||||||
|
<br />
|
||||||
|
<strong>Email:</strong><br />
|
||||||
|
Scrivi un email a <a href="mailto:info@egalware.com">info at egalware.com</a>
|
||||||
|
</address>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
@@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -50,7 +50,7 @@ namespace MP.SPEC.Pages
|
|||||||
isFiltering = false;
|
isFiltering = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async Task selRecordDoss(Dossiers selDoss)
|
protected async Task selRecordDoss(DossierModel selDoss)
|
||||||
{
|
{
|
||||||
currRecordDoss = selDoss;
|
currRecordDoss = selDoss;
|
||||||
await Task.Delay(1);
|
await Task.Delay(1);
|
||||||
@@ -78,7 +78,7 @@ namespace MP.SPEC.Pages
|
|||||||
set => currFilter.CurrPage = value;
|
set => currFilter.CurrPage = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Dossiers? currRecordDoss { get; set; } = null;
|
private DossierModel? currRecordDoss { get; set; } = null;
|
||||||
|
|
||||||
private bool isEditing
|
private bool isEditing
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<div class="p-2 align-content-center fs-1">
|
<div class="p-2 align-content-center fs-1">
|
||||||
<b>MAPO SPEC</b>
|
<b>MAPO SPEC</b>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-2 bg-light">
|
<div class="p-2">
|
||||||
<img src="images/LogoEgw.png" class="image-fluid" height="64" />
|
<img src="images/LogoEgw.png" class="image-fluid" height="64" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<body>
|
<body>
|
||||||
<i>Modulo MAPOSPEC </i>
|
<i>Modulo MAPOSPEC </i>
|
||||||
<h4>Versione: 6.16.2211.312</h4>
|
<h4>Versione: 6.16.2211.416</h4>
|
||||||
<br /> Note di rilascio:
|
<br /> Note di rilascio:
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
6.16.2211.312
|
6.16.2211.416
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<item>
|
<item>
|
||||||
<version>6.16.2211.312</version>
|
<version>6.16.2211.416</version>
|
||||||
<url>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip</url>
|
<url>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip</url>
|
||||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html</changelog>
|
<changelog>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html</changelog>
|
||||||
<mandatory>false</mandatory>
|
<mandatory>false</mandatory>
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 85 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 154 KiB |
Reference in New Issue
Block a user