Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c418812ba2 | |||
| 6169d8cfcc | |||
| 75596c61bc | |||
| b51e164c18 | |||
| c35d625c36 | |||
| c893ce4d44 | |||
| c47fb1787c | |||
| aca61c24dc | |||
| 167c9d89d4 | |||
| 2295f12958 |
@@ -54,7 +54,9 @@ namespace MP.AppAuth
|
|||||||
|
|
||||||
#region Public Properties
|
#region Public Properties
|
||||||
|
|
||||||
|
public virtual DbSet<AnagraficaGruppi> DbSetAnagraficaGruppi { get; set; }
|
||||||
public virtual DbSet<AnagraficaOperatori> DbSetAnagOpr { get; set; }
|
public virtual DbSet<AnagraficaOperatori> DbSetAnagOpr { get; set; }
|
||||||
|
public virtual DbSet<Gruppi2Operatori> DbSetGruppi2Oper { get; set; }
|
||||||
public virtual DbSet<UpdMan> DbSetUpdMan { get; set; }
|
public virtual DbSet<UpdMan> DbSetUpdMan { get; set; }
|
||||||
public virtual DbSet<Vocabolario> DbSetVocabolario { get; set; }
|
public virtual DbSet<Vocabolario> DbSetVocabolario { get; set; }
|
||||||
|
|
||||||
@@ -103,6 +105,37 @@ namespace MP.AppAuth
|
|||||||
.HasMaxLength(500);
|
.HasMaxLength(500);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity<AnagraficaGruppi>(entity =>
|
||||||
|
{
|
||||||
|
entity.HasKey(e => e.CodGruppo);
|
||||||
|
|
||||||
|
entity.ToTable("AnagraficaGruppi");
|
||||||
|
|
||||||
|
entity.Property(e => e.CodGruppo).HasMaxLength(50);
|
||||||
|
|
||||||
|
entity.Property(e => e.DescrGruppo)
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(250)
|
||||||
|
.HasDefaultValueSql("('')");
|
||||||
|
|
||||||
|
entity.Property(e => e.SelEnabled).HasComment("Indica se sia selezionabile a livello di tendina x inserimento BCode");
|
||||||
|
|
||||||
|
entity.Property(e => e.TipoGruppo)
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(50)
|
||||||
|
.HasDefaultValueSql("('REPARTO')")
|
||||||
|
.HasComment("tipo gruppo: reparto (es x gestione operatori assegnati), GRUPPO FASE (es macchien che fanno lo stesso tipo di lavoro), ...");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity<Gruppi2Operatori>(entity =>
|
||||||
|
{
|
||||||
|
entity.HasKey(e => new { e.MatrOpr, e.CodGruppo });
|
||||||
|
|
||||||
|
entity.ToTable("Gruppi2Operatori");
|
||||||
|
|
||||||
|
entity.Property(e => e.CodGruppo).HasMaxLength(50);
|
||||||
|
});
|
||||||
|
|
||||||
//
|
//
|
||||||
modelBuilder.Seed();
|
modelBuilder.Seed();
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,38 @@ namespace MP.AppAuth.Controllers
|
|||||||
|
|
||||||
#region Public Methods
|
#region Public Methods
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Elenco Record x Gruppi
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public List<Models.AnagraficaGruppi> AnagGruppiFilt(string codTipo)
|
||||||
|
{
|
||||||
|
List<Models.AnagraficaGruppi> dbResult = new List<Models.AnagraficaGruppi>();
|
||||||
|
using (AppAuthContext localDbCtx = new AppAuthContext(_configuration))
|
||||||
|
{
|
||||||
|
dbResult = localDbCtx
|
||||||
|
.DbSetAnagraficaGruppi
|
||||||
|
.Where(x => x.TipoGruppo == codTipo || x.SelEnabled)
|
||||||
|
.ToList();
|
||||||
|
}
|
||||||
|
return dbResult;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Elenco Record x Gruppi
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public List<Models.AnagraficaGruppi> AnagGruppiGetAll()
|
||||||
|
{
|
||||||
|
List<Models.AnagraficaGruppi> dbResult = new List<Models.AnagraficaGruppi>();
|
||||||
|
using (AppAuthContext localDbCtx = new AppAuthContext(_configuration))
|
||||||
|
{
|
||||||
|
dbResult = localDbCtx
|
||||||
|
.DbSetAnagraficaGruppi
|
||||||
|
.ToList();
|
||||||
|
}
|
||||||
|
return dbResult;
|
||||||
|
}
|
||||||
|
|
||||||
public List<Models.AnagraficaOperatori> AnagOpGetAll(string searchVal)
|
public List<Models.AnagraficaOperatori> AnagOpGetAll(string searchVal)
|
||||||
{
|
{
|
||||||
List<Models.AnagraficaOperatori> dbResult = new List<Models.AnagraficaOperatori>();
|
List<Models.AnagraficaOperatori> dbResult = new List<Models.AnagraficaOperatori>();
|
||||||
@@ -53,6 +85,41 @@ namespace MP.AppAuth.Controllers
|
|||||||
// ritorno
|
// ritorno
|
||||||
return dbResult;
|
return dbResult;
|
||||||
}
|
}
|
||||||
|
public List<Models.AnagraficaOperatori> AnagOpByGruppoGetFilt(string codGruppo, string searchVal)
|
||||||
|
{
|
||||||
|
List<Models.AnagraficaOperatori> dbResult = new List<Models.AnagraficaOperatori>();
|
||||||
|
using (AppAuthContext localDbCtx = new AppAuthContext(_configuration))
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(searchVal))
|
||||||
|
{
|
||||||
|
dbResult = localDbCtx
|
||||||
|
.DbSetGruppi2Oper
|
||||||
|
.Where(x => x.CodGruppo == codGruppo || string.IsNullOrEmpty(codGruppo))
|
||||||
|
.Join(
|
||||||
|
localDbCtx.DbSetAnagOpr.Where(x => x.Cognome.Contains(searchVal) || x.Nome.Contains(searchVal)),
|
||||||
|
gruppo => gruppo.MatrOpr,
|
||||||
|
operatore => operatore.MatrOpr,
|
||||||
|
(gruppo, operatore) => operatore
|
||||||
|
)
|
||||||
|
.ToList();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dbResult = localDbCtx
|
||||||
|
.DbSetGruppi2Oper
|
||||||
|
.Where(x => x.CodGruppo == codGruppo || string.IsNullOrEmpty(codGruppo))
|
||||||
|
.Join(
|
||||||
|
localDbCtx.DbSetAnagOpr,
|
||||||
|
gruppo => gruppo.MatrOpr,
|
||||||
|
operatore => operatore.MatrOpr,
|
||||||
|
(gruppo, operatore) => operatore
|
||||||
|
)
|
||||||
|
.ToList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// ritorno
|
||||||
|
return dbResult;
|
||||||
|
}
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,22 +2,17 @@
|
|||||||
using NLog;
|
using NLog;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace MP.AppAuth.Controllers
|
namespace MP.AppAuth.Controllers
|
||||||
{
|
{
|
||||||
public class MPController : IDisposable
|
public class MPController : IDisposable
|
||||||
{
|
{
|
||||||
#region Private Fields
|
#region Public Fields
|
||||||
|
|
||||||
private static IConfiguration _configuration;
|
|
||||||
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
|
|
||||||
public static AppAuth.Controllers.MPController dbController;
|
public static AppAuth.Controllers.MPController dbController;
|
||||||
|
|
||||||
#endregion Private Fields
|
#endregion Public Fields
|
||||||
|
|
||||||
#region Public Constructors
|
#region Public Constructors
|
||||||
|
|
||||||
@@ -31,12 +26,6 @@ namespace MP.AppAuth.Controllers
|
|||||||
|
|
||||||
#region Public Methods
|
#region Public Methods
|
||||||
|
|
||||||
public void Dispose()
|
|
||||||
{
|
|
||||||
// Clear database controller
|
|
||||||
dbController.Dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Elenco Record x AnagKeyValue
|
/// Elenco Record x AnagKeyValue
|
||||||
@@ -54,7 +43,19 @@ namespace MP.AppAuth.Controllers
|
|||||||
return dbResult;
|
return dbResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
// Clear database controller
|
||||||
|
dbController.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
#endregion Public Methods
|
#endregion Public Methods
|
||||||
|
|
||||||
|
#region Private Fields
|
||||||
|
|
||||||
|
private static IConfiguration _configuration;
|
||||||
|
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
|
||||||
|
|
||||||
|
#endregion Private Fields
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace MP.AppAuth.Models
|
||||||
|
{
|
||||||
|
public partial class AnagraficaGruppi
|
||||||
|
{
|
||||||
|
public string CodGruppo { get; set; }
|
||||||
|
public string TipoGruppo { get; set; }
|
||||||
|
public string DescrGruppo { get; set; }
|
||||||
|
public bool SelEnabled { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace MP.AppAuth.Models
|
||||||
|
{
|
||||||
|
public partial class Gruppi2Operatori
|
||||||
|
{
|
||||||
|
public int MatrOpr { get; set; }
|
||||||
|
public string CodGruppo { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -71,7 +71,7 @@ namespace MP.AppAuth
|
|||||||
public virtual DbSet<ListValue> ListValues { get; set; }
|
public virtual DbSet<ListValue> ListValues { get; set; }
|
||||||
public virtual DbSet<Macchine> Macchines { get; set; }
|
public virtual DbSet<Macchine> Macchines { get; set; }
|
||||||
public virtual DbSet<UpdMan> UpdMan { get; set; }
|
public virtual DbSet<UpdMan> UpdMan { get; set; }
|
||||||
public virtual DbSet<Vocabolario> Vocabolario { get; set; }
|
public virtual DbSet<Vocabolario> DbSetVocabolario { get; set; }
|
||||||
|
|
||||||
#endregion Public Properties
|
#endregion Public Properties
|
||||||
|
|
||||||
@@ -503,6 +503,8 @@ namespace MP.AppAuth
|
|||||||
.HasMaxLength(500);
|
.HasMaxLength(500);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OnModelCreatingPartial(modelBuilder);
|
OnModelCreatingPartial(modelBuilder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-6">
|
||||||
|
Gruppi
|
||||||
|
</div>
|
||||||
|
<div class="col-6 text-right">
|
||||||
|
<select @bind="@groupName" class="form-control form-control-sm">
|
||||||
|
<option value="">--- Tutti ---</option>
|
||||||
|
@if (ListGroups != null)
|
||||||
|
{
|
||||||
|
@foreach (var item in ListGroups)
|
||||||
|
{
|
||||||
|
<option value="@item.CodGruppo">@item.DescrGruppo</option>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
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.Models;
|
||||||
|
using MP.Land.Data;
|
||||||
|
|
||||||
|
namespace MP.Land.Components
|
||||||
|
{
|
||||||
|
public partial class CmpGroupFilt
|
||||||
|
{
|
||||||
|
|
||||||
|
[Inject]
|
||||||
|
protected MessageService AppMService { get; set; }
|
||||||
|
|
||||||
|
[Inject]
|
||||||
|
protected AppAuthService DataService { get; set; }
|
||||||
|
|
||||||
|
private List<AnagraficaGruppi> ListGroups;
|
||||||
|
private string groupName
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return AppMService.CodGruppo;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
AppMService.CodGruppo = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override async Task OnInitializedAsync()
|
||||||
|
{
|
||||||
|
await ReloadData();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task ReloadData()
|
||||||
|
{
|
||||||
|
// carico i gruppi
|
||||||
|
ListGroups = await DataService.AnagGruppiFilt("REPARTO");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -42,9 +42,9 @@
|
|||||||
{
|
{
|
||||||
<div class="input-group input-group-sm">
|
<div class="input-group input-group-sm">
|
||||||
<select @bind="@PageSize" class="form-control form-control-sm">
|
<select @bind="@PageSize" class="form-control form-control-sm">
|
||||||
<option value="2">2</option>
|
<option value="3">3</option>
|
||||||
<option value="4">4</option>
|
<option value="6">6</option>
|
||||||
<option value="10">10</option>
|
<option value="9">9</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ namespace MP.Land.Components
|
|||||||
|
|
||||||
protected int _numPage { get; set; } = 1;
|
protected int _numPage { get; set; } = 1;
|
||||||
|
|
||||||
protected int _numRecord { get; set; } = 4;
|
protected int _numRecord { get; set; } = 6;
|
||||||
|
|
||||||
protected int percLoading { get; set; } = 0;
|
protected int percLoading { get; set; } = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||||
{
|
{
|
||||||
if (!firstRender)
|
if (firstRender)
|
||||||
{
|
{
|
||||||
await JSRuntime.InvokeVoidAsync("clearContent", $"qrCodeImg_{CurrItem.MatrOpr}");
|
await JSRuntime.InvokeVoidAsync("clearContent", $"qrCodeImg_{CurrItem.MatrOpr}");
|
||||||
await JSRuntime.InvokeVoidAsync("displayQr", $"qrCodeImg_{CurrItem.MatrOpr}", rawCode);
|
await JSRuntime.InvokeVoidAsync("displayQr", $"qrCodeImg_{CurrItem.MatrOpr}", rawCode);
|
||||||
|
|||||||
@@ -129,6 +129,46 @@ namespace MP.Land.Data
|
|||||||
|
|
||||||
#region Public Methods
|
#region Public Methods
|
||||||
|
|
||||||
|
public async Task<List<AppAuth.Models.AnagraficaGruppi>> AnagGruppiAll()
|
||||||
|
{
|
||||||
|
List<AppAuth.Models.AnagraficaGruppi> dbResult = new List<AppAuth.Models.AnagraficaGruppi>();
|
||||||
|
Stopwatch stopWatch = new Stopwatch();
|
||||||
|
stopWatch.Start();
|
||||||
|
dbResult = dbController.AnagGruppiGetAll();
|
||||||
|
stopWatch.Stop();
|
||||||
|
TimeSpan ts = stopWatch.Elapsed;
|
||||||
|
Log.Trace($"Effettuata lettura da DB per AnagGruppiAll: {ts.TotalMilliseconds} ms");
|
||||||
|
return await Task.FromResult(dbResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<List<AppAuth.Models.AnagraficaGruppi>> AnagGruppiFilt(string codTipo)
|
||||||
|
{
|
||||||
|
List<AppAuth.Models.AnagraficaGruppi> dbResult = new List<AppAuth.Models.AnagraficaGruppi>();
|
||||||
|
Stopwatch stopWatch = new Stopwatch();
|
||||||
|
stopWatch.Start();
|
||||||
|
dbResult = dbController.AnagGruppiFilt(codTipo);
|
||||||
|
stopWatch.Stop();
|
||||||
|
TimeSpan ts = stopWatch.Elapsed;
|
||||||
|
Log.Trace($"Effettuata lettura da DB per AnagGruppiFilt: {ts.TotalMilliseconds} ms");
|
||||||
|
return await Task.FromResult(dbResult);
|
||||||
|
}
|
||||||
|
public async Task<List<AppAuth.Models.AnagraficaOperatori>> AnagOperByGroupList(string codGruppo, string searchVal)
|
||||||
|
{
|
||||||
|
List<AppAuth.Models.AnagraficaOperatori> dbResult = new List<AppAuth.Models.AnagraficaOperatori>();
|
||||||
|
Stopwatch stopWatch = new Stopwatch();
|
||||||
|
stopWatch.Start();
|
||||||
|
var rawData = dbController
|
||||||
|
.AnagOpByGruppoGetFilt(codGruppo, searchVal);
|
||||||
|
dbResult = rawData
|
||||||
|
.GroupBy(user => user.MatrOpr)
|
||||||
|
.Select(grp => grp.First())
|
||||||
|
.ToList();
|
||||||
|
stopWatch.Stop();
|
||||||
|
TimeSpan ts = stopWatch.Elapsed;
|
||||||
|
Log.Trace($"Effettuata lettura da DB per AnagOperByGroupList: {ts.TotalMilliseconds} ms");
|
||||||
|
return await Task.FromResult(dbResult);
|
||||||
|
}
|
||||||
|
|
||||||
public async Task<List<AppAuth.Models.AnagraficaOperatori>> AnagOperList(string searchVal)
|
public async Task<List<AppAuth.Models.AnagraficaOperatori>> AnagOperList(string searchVal)
|
||||||
{
|
{
|
||||||
List<AppAuth.Models.AnagraficaOperatori> dbResult = new List<AppAuth.Models.AnagraficaOperatori>();
|
List<AppAuth.Models.AnagraficaOperatori> dbResult = new List<AppAuth.Models.AnagraficaOperatori>();
|
||||||
|
|||||||
@@ -106,6 +106,21 @@ namespace MP.Land.Data
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected string _groupName { get; set; } = "";
|
||||||
|
public string CodGruppo
|
||||||
|
{
|
||||||
|
get => _groupName;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (_groupName != value)
|
||||||
|
{
|
||||||
|
_groupName = value;
|
||||||
|
ReportFilter();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#endregion Public Properties
|
#endregion Public Properties
|
||||||
|
|
||||||
#region Private Methods
|
#region Private Methods
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ namespace MP.Land.Data
|
|||||||
public bool OnlyMod { get; set; } = false;
|
public bool OnlyMod { get; set; } = false;
|
||||||
public bool OnlyNoTag { get; set; } = false;
|
public bool OnlyNoTag { get; set; } = false;
|
||||||
public int PageNum { get; set; } = 1;
|
public int PageNum { get; set; } = 1;
|
||||||
public int PageSize { get; set; } = 4;
|
public int PageSize { get; set; } = 6;
|
||||||
public string SearchVal { get; set; } = "";
|
public string SearchVal { get; set; } = "";
|
||||||
public string Tag { get; set; } = "";
|
public string Tag { get; set; } = "";
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<RootNamespace>MP.Land</RootNamespace>
|
<RootNamespace>MP.Land</RootNamespace>
|
||||||
<Version>6.15.2204.2612</Version>
|
<Version>6.15.2207.0419</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
<CmpGroupFilt></CmpGroupFilt>
|
||||||
@if (ListRecords == null)
|
@if (ListRecords == null)
|
||||||
{
|
{
|
||||||
<LoadingData></LoadingData>
|
<LoadingData></LoadingData>
|
||||||
@@ -15,6 +16,7 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@foreach (var item in ListRecords)
|
@foreach (var item in ListRecords)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,12 +11,14 @@ namespace MP.Land.Pages
|
|||||||
{
|
{
|
||||||
public partial class UserQr : IDisposable
|
public partial class UserQr : IDisposable
|
||||||
{
|
{
|
||||||
#region Private Fields
|
#region Public Methods
|
||||||
|
|
||||||
private List<AnagraficaOperatori> ListRecords;
|
public void Dispose()
|
||||||
private List<AnagraficaOperatori> SearchRecords;
|
{
|
||||||
|
AppMService.EA_SearchUpdated -= OnSeachUpdated;
|
||||||
|
}
|
||||||
|
|
||||||
#endregion Private Fields
|
#endregion Public Methods
|
||||||
|
|
||||||
#region Protected Fields
|
#region Protected Fields
|
||||||
|
|
||||||
@@ -25,39 +27,6 @@ namespace MP.Land.Pages
|
|||||||
|
|
||||||
#endregion Protected Fields
|
#endregion Protected Fields
|
||||||
|
|
||||||
#region Private Properties
|
|
||||||
|
|
||||||
[Inject]
|
|
||||||
private IConfiguration Configuration { get; set; }
|
|
||||||
|
|
||||||
private int currPage
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return AppMService.SelFilter.PageNum;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
AppMService.SelFilter.PageNum = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool isLoading { get; set; } = false;
|
|
||||||
|
|
||||||
private int numRecord
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return AppMService.SelFilter.PageSize;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
AppMService.SelFilter.PageSize = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion Private Properties
|
|
||||||
|
|
||||||
#region Protected Properties
|
#region Protected Properties
|
||||||
|
|
||||||
[Inject]
|
[Inject]
|
||||||
@@ -78,18 +47,6 @@ namespace MP.Land.Pages
|
|||||||
|
|
||||||
#endregion Protected Properties
|
#endregion Protected Properties
|
||||||
|
|
||||||
#region Private Methods
|
|
||||||
|
|
||||||
private async void OnSeachUpdated()
|
|
||||||
{
|
|
||||||
ListRecords = null;
|
|
||||||
currPage = 1;
|
|
||||||
await Task.Delay(1);
|
|
||||||
await ReloadData();
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion Private Methods
|
|
||||||
|
|
||||||
#region Protected Methods
|
#region Protected Methods
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
@@ -99,6 +56,7 @@ namespace MP.Land.Pages
|
|||||||
AppMService.PageIcon = "fas fa-qrcode pr-2";
|
AppMService.PageIcon = "fas fa-qrcode pr-2";
|
||||||
await ReloadData();
|
await ReloadData();
|
||||||
AppMService.EA_SearchUpdated += OnSeachUpdated;
|
AppMService.EA_SearchUpdated += OnSeachUpdated;
|
||||||
|
AppMService.EA_FilterUpdated += OnFilterUpdated;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async Task PagerReloadNum(int newNum)
|
protected async Task PagerReloadNum(int newNum)
|
||||||
@@ -117,19 +75,6 @@ namespace MP.Land.Pages
|
|||||||
isLoading = false;
|
isLoading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async Task ReloadData()
|
|
||||||
{
|
|
||||||
isLoading = true;
|
|
||||||
// importante altrimenti NON mostra update UI
|
|
||||||
await Task.Delay(1);
|
|
||||||
SearchRecords = await DataService.AnagOperList(AppMService.SearchVal);
|
|
||||||
ListRecords = SearchRecords.Skip((currPage - 1) * numRecord).Take(numRecord).ToList();
|
|
||||||
totalCount = SearchRecords.Count();
|
|
||||||
await Task.Delay(1);
|
|
||||||
isLoading = false;
|
|
||||||
StateHasChanged();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected MarkupString traduci(string lemma)
|
protected MarkupString traduci(string lemma)
|
||||||
{
|
{
|
||||||
MarkupString answ;
|
MarkupString answ;
|
||||||
@@ -142,13 +87,95 @@ namespace MP.Land.Pages
|
|||||||
|
|
||||||
#endregion Protected Methods
|
#endregion Protected Methods
|
||||||
|
|
||||||
#region Public Methods
|
#region Private Fields
|
||||||
|
|
||||||
public void Dispose()
|
private List<AnagraficaOperatori> ListRecords;
|
||||||
|
|
||||||
|
private List<AnagraficaOperatori> SearchRecords;
|
||||||
|
|
||||||
|
#endregion Private Fields
|
||||||
|
|
||||||
|
#region Private Properties
|
||||||
|
|
||||||
|
[Inject]
|
||||||
|
private IConfiguration Configuration { get; set; }
|
||||||
|
|
||||||
|
private int currPage
|
||||||
{
|
{
|
||||||
AppMService.EA_SearchUpdated -= OnSeachUpdated;
|
get
|
||||||
|
{
|
||||||
|
return AppMService.SelFilter.PageNum;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
AppMService.SelFilter.PageNum = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Public Methods
|
private string groupName
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return AppMService.CodGruppo;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool isLoading { get; set; } = false;
|
||||||
|
|
||||||
|
private int numRecord
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return AppMService.SelFilter.PageSize;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
AppMService.SelFilter.PageSize = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion Private Properties
|
||||||
|
|
||||||
|
#region Private Methods
|
||||||
|
|
||||||
|
private async void OnFilterUpdated()
|
||||||
|
{
|
||||||
|
ListRecords = null;
|
||||||
|
currPage = 1;
|
||||||
|
await Task.Delay(1);
|
||||||
|
await ReloadData();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void OnSeachUpdated()
|
||||||
|
{
|
||||||
|
ListRecords = null;
|
||||||
|
currPage = 1;
|
||||||
|
await Task.Delay(1);
|
||||||
|
await ReloadData();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task ReloadData()
|
||||||
|
{
|
||||||
|
isLoading = true;
|
||||||
|
// importante altrimenti NON mostra update UI
|
||||||
|
await Task.Delay(1);
|
||||||
|
// se ho selezionato qualcosa cerco x gruppo
|
||||||
|
//if (groupName != "")
|
||||||
|
//{
|
||||||
|
SearchRecords = await DataService.AnagOperByGroupList(groupName, AppMService.SearchVal);
|
||||||
|
//}
|
||||||
|
//else
|
||||||
|
//{
|
||||||
|
// //altrimenti TUTTI
|
||||||
|
// SearchRecords = await DataService.AnagOperList(AppMService.SearchVal);
|
||||||
|
//}
|
||||||
|
ListRecords = SearchRecords.Skip((currPage - 1) * numRecord).Take(numRecord).ToList();
|
||||||
|
totalCount = SearchRecords.Count();
|
||||||
|
await Task.Delay(1);
|
||||||
|
isLoading = false;
|
||||||
|
StateHasChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion Private Methods
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -50,33 +50,8 @@
|
|||||||
|
|
||||||
<script src="font-awesome/js/all.min.js"></script>
|
<script src="font-awesome/js/all.min.js"></script>
|
||||||
<script src="_framework/blazor.server.js"></script>
|
<script src="_framework/blazor.server.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript" src="~/lib/qrcode.js"></script>
|
<script type="text/javascript" src="~/lib/qrcode.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript" src="~/lib/qrHelper.js"></script>
|
||||||
function clearContent(elementID) {
|
|
||||||
console.log(elementID);
|
|
||||||
document.getElementById(elementID).innerHTML = "";
|
|
||||||
}
|
|
||||||
// gestione qrcode... da https://docs.microsoft.com/en-us/aspnet/core/security/authentication/identity-enable-qrcodes?view=aspnetcore-5.0
|
|
||||||
//var qrcode = new QRCode("qrCodeImg");
|
|
||||||
function displayQr(elementName, rawData) {
|
|
||||||
console.log(elementName);
|
|
||||||
try {
|
|
||||||
if (elementName != "" && rawData != "") {
|
|
||||||
qrcode = new QRCode(document.getElementById(elementName),
|
|
||||||
{
|
|
||||||
text: rawData,
|
|
||||||
width: 200,
|
|
||||||
height: 200
|
|
||||||
});
|
|
||||||
//qrcode = new QRCode(document.getElementById(elementName));
|
|
||||||
//qrcode.clear();
|
|
||||||
//qrcode.makeCode(rawData);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{ }
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<body>
|
<body>
|
||||||
<i>Modulo gestione Programmi MAPO</i>
|
<i>Modulo gestione Programmi MAPO</i>
|
||||||
<h4>Versione: 6.15.2204.2612</h4>
|
<h4>Versione: 6.15.2207.0419</h4>
|
||||||
<br />
|
<br />
|
||||||
Note di rilascio:
|
Note di rilascio:
|
||||||
<ul>
|
<ul>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
6.15.2204.2612
|
6.15.2207.0419
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<item>
|
<item>
|
||||||
<version>6.15.2204.2612</version>
|
<version>6.15.2207.0419</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>
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
function clearContent(elementID) {
|
||||||
|
//console.log("Remove " + elementID);
|
||||||
|
document.getElementById(elementID).innerHTML = "";
|
||||||
|
}
|
||||||
|
// gestione qrcode... da https://docs.microsoft.com/en-us/aspnet/core/security/authentication/identity-enable-qrcodes?view=aspnetcore-5.0
|
||||||
|
//var qrcode = new QRCode("qrCodeImg");
|
||||||
|
function displayQr(elementName, rawData) {
|
||||||
|
//console.log("Add " + elementName);
|
||||||
|
try {
|
||||||
|
if (elementName != "" && rawData != "") {
|
||||||
|
qrcode = new QRCode(document.getElementById(elementName),
|
||||||
|
{
|
||||||
|
text: rawData,
|
||||||
|
width: 200,
|
||||||
|
height: 200
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{ }
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user