77 lines
2.0 KiB
C#
77 lines
2.0 KiB
C#
using Microsoft.AspNetCore.Components;
|
|
using MP.Data.Services;
|
|
using NLog;
|
|
|
|
namespace MP_TAB3.Pages
|
|
{
|
|
public partial class MachineDetail
|
|
{
|
|
#region Protected Properties
|
|
|
|
#if false
|
|
[Inject]
|
|
protected TabDataService TabServ { get; set; } = null!;
|
|
#endif
|
|
|
|
#endregion Protected Properties
|
|
|
|
#region Protected Methods
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
await base.OnInitializedAsync();
|
|
// recupero parametri configurazione...
|
|
await setupConf();
|
|
if (enableSchedaTecnica)
|
|
{
|
|
checkLottiOdl();
|
|
}
|
|
}
|
|
|
|
#endregion Protected Methods
|
|
|
|
#region Private Fields
|
|
|
|
private static Logger Log = LogManager.GetCurrentClassLogger();
|
|
private bool enableMagLotti = false;
|
|
private bool enableSchedaTecnica = false;
|
|
private DateTime lastSave = DateTime.Now;
|
|
|
|
#endregion Private Fields
|
|
|
|
#region Private Methods
|
|
|
|
private void checkLottiOdl()
|
|
{
|
|
#if false
|
|
// controlla se abilitato check LOTTI MAG
|
|
if (enableMagLotti)
|
|
{
|
|
if (idxOdl > 0)
|
|
{
|
|
// controlla se ci sia lotto x ODL
|
|
if (DataLayerObj.taMagELotti.getByODL(idxOdl).Rows.Count == 0)
|
|
{
|
|
try
|
|
{
|
|
// se non c'� chiama stored x rigenerare
|
|
DataLayerObj.taMagELotti.UpsertByOdl(idxOdl, true);
|
|
}
|
|
catch
|
|
{ }
|
|
}
|
|
}
|
|
}
|
|
#endif
|
|
}
|
|
|
|
private async Task setupConf()
|
|
{
|
|
enableSchedaTecnica = MStor.GetConfBool("enableSchedaTecnica");
|
|
enableMagLotti = MStor.GetConfBool("enableMagLotti");
|
|
await Task.Delay(1);
|
|
}
|
|
|
|
#endregion Private Methods
|
|
}
|
|
} |