Vari fix x recupero dati da DB IS
This commit is contained in:
@@ -40,7 +40,7 @@ namespace MP.Data.Controllers
|
||||
public List<AnagLottiArca> ListLottiEsterni(string codArt, string codLotto, string codMagazzino)
|
||||
{
|
||||
List<AnagLottiArca> dbResult = new List<AnagLottiArca>();
|
||||
using (var dbCtx = new MoonPro_InveContext(_configuration))
|
||||
using (var dbCtx = new MoonPro_ISContext(_configuration))
|
||||
{
|
||||
var DataGiac = new SqlParameter("@DataGiac", DateTime.Now);
|
||||
var CodArt = new SqlParameter("@CodArt", codArt);
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using MP.Data.DatabaseModels;
|
||||
using NLog;
|
||||
|
||||
#nullable disable
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
namespace MP.Data
|
||||
{
|
||||
public partial class MoonPro_ISContext : DbContext
|
||||
{
|
||||
#region Private Fields
|
||||
|
||||
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
private IConfiguration _configuration;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Public Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Indispensabile x prima generazione migrations EFCore
|
||||
/// </summary>
|
||||
|
||||
[Obsolete("This constructor should never be used directly, and is only needed to generate entityframework stuff. Connection string can be adapted as pleased.")]
|
||||
public MoonPro_ISContext()
|
||||
{
|
||||
}
|
||||
|
||||
public MoonPro_ISContext(IConfiguration configuration)
|
||||
{
|
||||
_configuration = configuration;
|
||||
}
|
||||
|
||||
public MoonPro_ISContext(DbContextOptions<MoonPro_InveContext> options) : base(options)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Properties
|
||||
|
||||
#region PER INVE
|
||||
|
||||
public virtual DbSet<AnagLottiArca> DbLottoArca { get; set; }
|
||||
|
||||
#endregion PER INVE
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
if (!optionsBuilder.IsConfigured)
|
||||
{
|
||||
string connString = _configuration.GetConnectionString("Mp.IS");
|
||||
if (!string.IsNullOrEmpty(connString))
|
||||
{
|
||||
optionsBuilder.UseSqlServer(connString);
|
||||
}
|
||||
else
|
||||
{
|
||||
optionsBuilder.UseSqlServer("Server=SQL2016DEV;Database=MoonPro_IS_EdilChim;Trusted_Connection=True;");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder.HasAnnotation("Relational:Collation", "SQL_Latin1_General_CP1_CI_AS");
|
||||
|
||||
OnModelCreatingPartial(modelBuilder);
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
}
|
||||
}
|
||||
@@ -57,7 +57,7 @@
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="btn-group col-12" role="group" aria-label="Basic example">
|
||||
<div class="btn-group col-12" role="group">
|
||||
@if (articoloScan != "" && quantitaScan != 0)
|
||||
{
|
||||
<button type="button" class="btn btn-success col-6" @onclick="()=>insertScan()">Conferma</button>
|
||||
@@ -79,7 +79,7 @@
|
||||
}
|
||||
else if (alreadyScan != null)
|
||||
{
|
||||
<ul class="p-0">
|
||||
<ul class="p-0 mb-1">
|
||||
<li class="list-group-item">
|
||||
Codice Scannerizzato:
|
||||
<div class="input-group input-group-sm">
|
||||
@@ -119,7 +119,7 @@ else if (alreadyScan != null)
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="btn-group col-12" role="group" aria-label="Basic example">
|
||||
<div class="btn-group col-12 mb-1" role="group">
|
||||
@if (!alreadyScan.IsUnique)
|
||||
{
|
||||
<button type="button" class="btn btn-success col-6" @onclick="()=>insertScan()">Conferma</button>
|
||||
@@ -127,9 +127,8 @@ else if (alreadyScan != null)
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="alert bg-warning col-12">Questo oggetto risulta essere univoco perciò non è possibile salvare una nuova scansione</div>
|
||||
<div class="alert bg-warning col-12 p-2 mb-0">Trovato UDC | scansione già effettuata / UDC caricato (impossibile caricare 2 volte)</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
}
|
||||
else
|
||||
@@ -145,7 +144,7 @@ else
|
||||
<li class="list-group-item">
|
||||
Articolo:
|
||||
<div class="input-group input-group-sm">
|
||||
@if (lastScan != null && lastScan != "")
|
||||
@if (!string.IsNullOrEmpty(lastScan))
|
||||
{
|
||||
<input class="form-control " @bind-value="@articoloScan" type="text" />
|
||||
}
|
||||
@@ -159,7 +158,7 @@ else
|
||||
<li class="list-group-item">
|
||||
Quantità:
|
||||
<div class="input-group input-group-sm">
|
||||
@if (lastScan != null && lastScan != "")
|
||||
@if (!string.IsNullOrEmpty(lastScan))
|
||||
{
|
||||
<input class="form-control" @bind-value="@quantitaScan" type="number" />
|
||||
}
|
||||
@@ -172,7 +171,7 @@ else
|
||||
<li class="list-group-item">
|
||||
Note:
|
||||
<div class="input-group input-group-sm">
|
||||
@if (lastScan != null && lastScan != "")
|
||||
@if (!string.IsNullOrEmpty(lastScan))
|
||||
{
|
||||
<input class="form-control " @bind-value="@noteScan" type="text" />
|
||||
}
|
||||
@@ -183,7 +182,7 @@ else
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="btn-group col-12" role="group" aria-label="Basic example">
|
||||
<div class="btn-group col-12" role="group">
|
||||
@if (articoloScan != "" && quantitaScan != 0)
|
||||
{
|
||||
<button type="button" class="btn btn-success col-6" @onclick="()=>insertScan()">Conferma</button>
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace MP.INVE.Components
|
||||
[Inject]
|
||||
private MiDataService MIService { get; set; } = null!;
|
||||
[Parameter]
|
||||
public string lastScan { get; set; } = null!;
|
||||
public string lastScan { get; set; } = "";
|
||||
//[Parameter]
|
||||
//public EventCallback<AnagUdcModel> udcSend { get; set; }
|
||||
[Parameter]
|
||||
@@ -69,71 +69,90 @@ namespace MP.INVE.Components
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
await MIService.ConfigResetCache();
|
||||
var result = await MIService.tryGetConfig("MAG_SmartUdcEdit");
|
||||
elencoScansioni = MIService.ScanList();
|
||||
var exists = elencoScansioni.Select(x => x.ScanValue).Contains(lastScan);
|
||||
var scansioneClone = elencoScansioni.Where(x => x.ScanValue == lastScan).FirstOrDefault();
|
||||
|
||||
if (exists)
|
||||
// se il valore scansionato è != null...
|
||||
if (string.IsNullOrEmpty(lastScan))
|
||||
{
|
||||
if (scansioneClone != null)
|
||||
{
|
||||
isScannedLotto = scansioneClone.ScanValue.StartsWith("M2");
|
||||
isMod = true;
|
||||
if (scansioneClone.IsUnique)
|
||||
{
|
||||
isMod = false;
|
||||
}
|
||||
alreadyScan = elencoScansioni.Where(x => x.ScanValue == lastScan).FirstOrDefault();
|
||||
currUdc = null;
|
||||
currLotto = null;
|
||||
|
||||
}
|
||||
await Task.Delay(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (result != null)
|
||||
{
|
||||
canMod = result;
|
||||
}
|
||||
await Task.Delay(1);
|
||||
searchRecordsUDC = MIService.ElencoUDC();
|
||||
udc = searchRecordsUDC.Where(x => x.UDC == lastScan).FirstOrDefault();
|
||||
await MIService.ConfigResetCache();
|
||||
var result = await MIService.tryGetConfig("MAG_SmartUdcEdit");
|
||||
elencoScansioni = MIService.ScanList();
|
||||
var exists = elencoScansioni.Select(x => x.ScanValue).Contains(lastScan);
|
||||
var scansioneClone = elencoScansioni.Where(x => x.ScanValue == lastScan).FirstOrDefault();
|
||||
|
||||
if (udc != null && !udc.UDC.Contains("MSL"))
|
||||
if (exists)
|
||||
{
|
||||
if (scansioneClone != null)
|
||||
{
|
||||
isScannedLotto = scansioneClone.ScanValue.StartsWith("M2");
|
||||
isMod = true;
|
||||
if (scansioneClone.IsUnique)
|
||||
{
|
||||
isMod = false;
|
||||
}
|
||||
alreadyScan = elencoScansioni.Where(x => x.ScanValue == lastScan).FirstOrDefault();
|
||||
currUdc = null;
|
||||
currLotto = null;
|
||||
|
||||
currUdc = udc;
|
||||
tipo = "UDC";
|
||||
lottoScan = udc.lottoNav.Lotto;
|
||||
articoloScan = udc.lottoNav.CodArt;
|
||||
quantitaScan = udc.Qta;
|
||||
noteScan = udc.Note;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
searchRecordsLottoInterni = MIService.ElencoLotti();
|
||||
lottoInterno = searchRecordsLottoInterni.Where(x => x.Lotto == lastScan).FirstOrDefault();
|
||||
if (lottoInterno != null)
|
||||
if (result != null)
|
||||
{
|
||||
tipo = "LOTTO";
|
||||
currLotto = lottoInterno;
|
||||
lottoScan = lottoInterno.Lotto;
|
||||
articoloScan = lottoInterno.CodArt;
|
||||
quantitaScan = 0;
|
||||
canMod = result;
|
||||
}
|
||||
await Task.Delay(1);
|
||||
searchRecordsUDC = MIService.ElencoUDC();
|
||||
udc = searchRecordsUDC.Where(x => x.UDC == lastScan).FirstOrDefault();
|
||||
|
||||
if (udc != null && !udc.UDC.Contains("MSL"))
|
||||
{
|
||||
|
||||
currUdc = udc;
|
||||
tipo = "UDC";
|
||||
lottoScan = udc.lottoNav.Lotto;
|
||||
articoloScan = udc.lottoNav.CodArt;
|
||||
quantitaScan = udc.Qta;
|
||||
noteScan = udc.Note;
|
||||
}
|
||||
else
|
||||
{
|
||||
searchRecordsLottoEsterni = MIService.ListLottiEsterni(articoloScan, lastScan, magID.ToString());
|
||||
lottoEsterno = searchRecordsLottoEsterni.FirstOrDefault();
|
||||
currLotto = null;
|
||||
currUdc = null;
|
||||
alreadyScan = null;
|
||||
lottoScan = lastScan;
|
||||
articoloScan = "";
|
||||
quantitaScan = 0;
|
||||
noteScan = "";
|
||||
searchRecordsLottoInterni = MIService.ElencoLotti();
|
||||
lottoInterno = searchRecordsLottoInterni.Where(x => x.Lotto == lastScan).FirstOrDefault();
|
||||
if (lottoInterno != null)
|
||||
{
|
||||
tipo = "LOTTO";
|
||||
currLotto = lottoInterno;
|
||||
lottoScan = lottoInterno.Lotto;
|
||||
articoloScan = lottoInterno.CodArt;
|
||||
quantitaScan = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
searchRecordsLottoEsterni = MIService.ListLottiEsterni(articoloScan, lastScan, magID.ToString());
|
||||
lottoEsterno = searchRecordsLottoEsterni.FirstOrDefault();
|
||||
if (lottoEsterno != null)
|
||||
{
|
||||
tipo = "LOTTO EXT";
|
||||
//currLotto = lottoEsterno;
|
||||
//lottoScan = lottoEsterno.Lotto;
|
||||
//articoloScan = lottoInterno.CodArt;
|
||||
quantitaScan = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
currLotto = null;
|
||||
currUdc = null;
|
||||
alreadyScan = null;
|
||||
lottoScan = lastScan;
|
||||
articoloScan = "";
|
||||
quantitaScan = 0;
|
||||
noteScan = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -143,96 +162,95 @@ namespace MP.INVE.Components
|
||||
protected decimal qtaLotto = 0;
|
||||
protected async void insertScan()
|
||||
{
|
||||
|
||||
|
||||
var artExists = await MIService.artBySearch(articoloScan);
|
||||
|
||||
if (artExists != null)
|
||||
{
|
||||
var alertInsert = await JSRuntime.InvokeAsync<bool>("confirm", $"Confermi di voler salvare la seguente scansione per la sessione {sessID}?");
|
||||
if (alertInsert)
|
||||
//var alertInsert = await JSRuntime.InvokeAsync<bool>("confirm", $"Confermi di voler salvare la seguente scansione per la sessione {sessID}?");
|
||||
//if (alertInsert)
|
||||
//{
|
||||
if (currUdc != null)
|
||||
{
|
||||
|
||||
if (currUdc != null)
|
||||
if ((currUdc.lottoNav.CodArt != udc.lottoNav.CodArt) || (currUdc.Qta != udc.Qta))
|
||||
{
|
||||
if ((currUdc.lottoNav.CodArt != udc.lottoNav.CodArt) || (currUdc.Qta != udc.Qta))
|
||||
{
|
||||
isForced = true;
|
||||
}
|
||||
//if()
|
||||
|
||||
ScanDataModel newScan = new ScanDataModel()
|
||||
{
|
||||
DtScan = DateTime.Now,
|
||||
UserScan = userScan,
|
||||
ScanValue = lastScan,
|
||||
IsForced = isForced,
|
||||
CodArticolo = currUdc.lottoNav.CodArt,
|
||||
Lotto = currUdc.lottoNav.Lotto,
|
||||
RifExt = currUdc.lottoNav.RifExt,
|
||||
Qty = currUdc.Qta,
|
||||
Note = currUdc.Note,
|
||||
IsKnown = true,
|
||||
IsUnique = true,
|
||||
InveSessID = sessID
|
||||
};
|
||||
|
||||
|
||||
|
||||
await MIService.InsertNewScansione(newScan);
|
||||
NavManager.NavigateTo(NavManager.Uri, true);
|
||||
isForced = true;
|
||||
}
|
||||
else if (currLotto != null)
|
||||
//if()
|
||||
|
||||
ScanDataModel newScan = new ScanDataModel()
|
||||
{
|
||||
ScanDataModel newScan = new ScanDataModel()
|
||||
{
|
||||
DtScan = DateTime.Now,
|
||||
UserScan = userScan,
|
||||
ScanValue = lastScan,
|
||||
IsForced = true,
|
||||
CodArticolo = currLotto.CodArt,
|
||||
Lotto = currLotto.Lotto,
|
||||
RifExt = currLotto.RifExt,
|
||||
Qty = qtaLotto,
|
||||
Note = currLotto.Note,
|
||||
IsKnown = true,
|
||||
IsUnique = false,
|
||||
InveSessID = sessID
|
||||
};
|
||||
await MIService.InsertNewScansione(newScan);
|
||||
NavManager.NavigateTo(NavManager.Uri, true);
|
||||
}
|
||||
else if (alreadyScan != null)
|
||||
{
|
||||
ScanDataModel newScan = new ScanDataModel()
|
||||
{
|
||||
DtScan = DateTime.Now,
|
||||
UserScan = userScan,
|
||||
ScanValue = lastScan,
|
||||
IsForced = true,
|
||||
CodArticolo = alreadyScan.CodArticolo,
|
||||
Lotto = alreadyScan.Lotto,
|
||||
RifExt = alreadyScan.RifExt,
|
||||
Qty = alreadyScan.Qty,
|
||||
Note = alreadyScan.Note,
|
||||
IsKnown = alreadyScan.IsKnown,
|
||||
IsUnique = alreadyScan.IsUnique,
|
||||
InveSessID = sessID
|
||||
};
|
||||
await MIService.InsertNewScansione(newScan);
|
||||
NavManager.NavigateTo(NavManager.Uri, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
currLotto = null;
|
||||
currUdc = null;
|
||||
alreadyScan = null;
|
||||
DtScan = DateTime.Now,
|
||||
UserScan = userScan,
|
||||
ScanValue = lastScan,
|
||||
IsForced = isForced,
|
||||
CodArticolo = currUdc.lottoNav.CodArt,
|
||||
Lotto = currUdc.lottoNav.Lotto,
|
||||
RifExt = currUdc.lottoNav.RifExt,
|
||||
Qty = currUdc.Qta,
|
||||
Note = currUdc.Note,
|
||||
IsKnown = true,
|
||||
IsUnique = true,
|
||||
InveSessID = sessID
|
||||
};
|
||||
|
||||
|
||||
|
||||
await MIService.InsertNewScansione(newScan);
|
||||
NavManager.NavigateTo(NavManager.Uri, true);
|
||||
}
|
||||
else if (currLotto != null)
|
||||
{
|
||||
ScanDataModel newScan = new ScanDataModel()
|
||||
{
|
||||
DtScan = DateTime.Now,
|
||||
UserScan = userScan,
|
||||
ScanValue = lastScan,
|
||||
IsForced = true,
|
||||
CodArticolo = currLotto.CodArt,
|
||||
Lotto = currLotto.Lotto,
|
||||
RifExt = currLotto.RifExt,
|
||||
Qty = qtaLotto,
|
||||
Note = currLotto.Note,
|
||||
IsKnown = true,
|
||||
IsUnique = false,
|
||||
InveSessID = sessID
|
||||
};
|
||||
await MIService.InsertNewScansione(newScan);
|
||||
NavManager.NavigateTo(NavManager.Uri, true);
|
||||
}
|
||||
else if (alreadyScan != null)
|
||||
{
|
||||
ScanDataModel newScan = new ScanDataModel()
|
||||
{
|
||||
DtScan = DateTime.Now,
|
||||
UserScan = userScan,
|
||||
ScanValue = lastScan,
|
||||
IsForced = true,
|
||||
CodArticolo = alreadyScan.CodArticolo,
|
||||
Lotto = alreadyScan.Lotto,
|
||||
RifExt = alreadyScan.RifExt,
|
||||
Qty = alreadyScan.Qty,
|
||||
Note = alreadyScan.Note,
|
||||
IsKnown = alreadyScan.IsKnown,
|
||||
IsUnique = alreadyScan.IsUnique,
|
||||
InveSessID = sessID
|
||||
};
|
||||
await MIService.InsertNewScansione(newScan);
|
||||
NavManager.NavigateTo(NavManager.Uri, true);
|
||||
}
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// currLotto = null;
|
||||
// currUdc = null;
|
||||
// alreadyScan = null;
|
||||
// NavManager.NavigateTo(NavManager.Uri, true);
|
||||
//}
|
||||
}
|
||||
else
|
||||
{
|
||||
await JSRuntime.InvokeVoidAsync("alert", $"l'articolo {articoloScan} non risulta presente nelle nostre anagrafiche. Inserire un articolo giusto o controllare di non aver sbagliato a digitare");
|
||||
await JSRuntime.InvokeVoidAsync("alert", $"Articolo errato: {articoloScan} non trovato in anagrafica");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP.INVE</RootNamespace>
|
||||
<Version>6.16.2212.1212</Version>
|
||||
<Version>6.16.2212.1216</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,37 +1,33 @@
|
||||
@page "/Acquisizione"
|
||||
|
||||
|
||||
|
||||
<div class="mb-2">
|
||||
<div class="d-flex justify-content-between">
|
||||
<h3 class="fw-bold">Acquisizione</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<CodeScan lastRawScan="saveScan"></CodeScan>
|
||||
</div>
|
||||
<div class="card mb-5">
|
||||
<div class="card-header">
|
||||
<div class="card-header py-1">
|
||||
<div class="col-12">
|
||||
Last scan: <b>@rawScan</b>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="card-body py-0">
|
||||
@*if (rawScan != null)
|
||||
{
|
||||
}*@
|
||||
<div class="col-12">
|
||||
<ProcSuggestion lastScan="@rawScan" sessID="@sessionId" magID="@magazzinoId" userScan="@idOPeratore"></ProcSuggestion>
|
||||
<ProcSuggestion lastScan="@rawScan" sessID="@sessionId" magID="@magazzinoId" userScan="@idOpr"></ProcSuggestion>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<div class="d-flex justify-content-between">
|
||||
<div>
|
||||
Sessione: <b>@sessionId</b>
|
||||
S.<b>@sessionId</b> | @descr
|
||||
</div>
|
||||
<div>
|
||||
Scansioni totali: <b>@nScansioniTot</b>
|
||||
#:<b>@nScansioniTot</b>
|
||||
</div>
|
||||
<div>
|
||||
@magInv
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -35,29 +35,44 @@ namespace MP.INVE.Pages
|
||||
|
||||
private bool logged { get; set; } = false;
|
||||
protected string rawScan { get; set; } = null!;
|
||||
protected string idOPeratore { get; set; } = null!;
|
||||
protected string idOpr { get; set; } = null!;
|
||||
protected int sessionId { get; set; } = 0;
|
||||
protected int magazzinoId { get; set; } = 0;
|
||||
protected int nScansioniTot { get; set; } = 0;
|
||||
|
||||
protected string descr { get; set; } = "";
|
||||
protected string magInv { get; set; } = "";
|
||||
|
||||
protected List<ScanDataModel>? eleScansioni;
|
||||
//protected AnagUdcModel currUdc{ get; set; } = null!;
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
var uri = NavManager.ToAbsoluteUri(NavManager.Uri);
|
||||
if (QueryHelpers.ParseQuery(uri.Query).TryGetValue("idOperatore", out var _matrOpr) && QueryHelpers.ParseQuery(uri.Query).TryGetValue("idSessione", out var _inveSessionId) && QueryHelpers.ParseQuery(uri.Query).TryGetValue("IdMag", out var _idMag))
|
||||
if (QueryHelpers.ParseQuery(uri.Query).TryGetValue("idOpr", out var _matrOpr) && QueryHelpers.ParseQuery(uri.Query).TryGetValue("idSess", out var _inveSessionId) && QueryHelpers.ParseQuery(uri.Query).TryGetValue("codMag", out var _idMag))
|
||||
{
|
||||
idOPeratore = _matrOpr;
|
||||
idOpr = _matrOpr;
|
||||
sessionId = int.Parse(_inveSessionId);
|
||||
magazzinoId = int.Parse(_idMag);
|
||||
eleScansioni = MIService.ScanBySession(sessionId);
|
||||
|
||||
nScansioniTot = eleScansioni.Count();
|
||||
// recupero dati della sessione di inventario...
|
||||
var currSessions = MIService.InventSessCurrList();
|
||||
var currInv = currSessions.Where(x=> x.InveSessID== sessionId).FirstOrDefault();
|
||||
if (currInv != null)
|
||||
{
|
||||
descr = currInv.Description;
|
||||
magInv = currInv.AnagMagNav.DescMag;
|
||||
}
|
||||
}
|
||||
}
|
||||
protected void saveScan(string newScan)
|
||||
{
|
||||
rawScan = newScan;
|
||||
if (!string.IsNullOrEmpty(newScan))
|
||||
{
|
||||
rawScan = newScan;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,9 +12,11 @@ namespace MP.INVE.Pages
|
||||
{
|
||||
#region Protected Properties
|
||||
|
||||
protected string authKey { get; set; } = null!;
|
||||
protected string authKey { get; set; } = "";
|
||||
|
||||
protected string idOPeratore { get; set; } = null!;
|
||||
protected string codMag { get; set; } = "";
|
||||
|
||||
protected string idOpr { get; set; } = "";
|
||||
|
||||
protected int inveSessionId { get; set; } = 0;
|
||||
|
||||
@@ -38,21 +40,22 @@ namespace MP.INVE.Pages
|
||||
{
|
||||
await Task.Delay(1);
|
||||
var uri = NavManager.ToAbsoluteUri(NavManager.Uri);
|
||||
if (QueryHelpers.ParseQuery(uri.Query).TryGetValue("MatrOpr", out var _matrOpr) && QueryHelpers.ParseQuery(uri.Query).TryGetValue("UserAuthKey", out var _authKey) && QueryHelpers.ParseQuery(uri.Query).TryGetValue("idSessione", out var _inveSessionId))
|
||||
if (QueryHelpers.ParseQuery(uri.Query).TryGetValue("MatrOpr", out var _matrOpr) && QueryHelpers.ParseQuery(uri.Query).TryGetValue("UserAuthKey", out var _authKey) && QueryHelpers.ParseQuery(uri.Query).TryGetValue("idSessione", out var _inveSessionId) && QueryHelpers.ParseQuery(uri.Query).TryGetValue("idMag", out var _codMag))
|
||||
{
|
||||
idOPeratore = _matrOpr;
|
||||
idOpr = _matrOpr;
|
||||
authKey = _authKey;
|
||||
codMag = _codMag;
|
||||
inveSessionId = int.Parse(_inveSessionId);
|
||||
}
|
||||
string pw = MIService.DeriptData(authKey);
|
||||
logged = MIService.loginOperatore(int.Parse(idOPeratore), pw);
|
||||
logged = MIService.loginOperatore(int.Parse(idOpr), pw);
|
||||
|
||||
if (logged)
|
||||
{
|
||||
operatore = MIService.ElencoOperatori();
|
||||
if (operatore != null)
|
||||
{
|
||||
AnagOperatoriModel? currOpr = operatore.Where(x => (x.MatrOpr == int.Parse(idOPeratore)) && (x.authKey == pw)).SingleOrDefault();
|
||||
AnagOperatoriModel? currOpr = operatore.Where(x => (x.MatrOpr == int.Parse(idOpr)) && (x.authKey == pw)).SingleOrDefault();
|
||||
|
||||
if (currOpr != null)
|
||||
{
|
||||
@@ -69,7 +72,7 @@ namespace MP.INVE.Pages
|
||||
await localStorage.SetItemAsync("MatrOpr", currOpr);
|
||||
await sessionStorage.SetItemAsync("idSessione", inveSessionId);
|
||||
}
|
||||
NavManager.NavigateTo($"Acquisizione?idSessione={inveSessionId}&idOperatore={idOPeratore}");
|
||||
NavManager.NavigateTo($"Acquisizione?idSess={inveSessionId}&idOpr={idOpr}&codMag={codMag}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,9 +32,7 @@
|
||||
|
||||
<script src="lib/bootstrap/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="_framework/blazor.server.js" autostart="false"></script>
|
||||
<script src="lib/chartBoot.js"></script>
|
||||
<script src="lib/modalHandler.js"></script>
|
||||
<script src="lib/Chart.js/chart.js"></script>
|
||||
|
||||
@*Gestione autoriconnessione: https://github.com/dotnet/aspnetcore/issues/38305 (vedere anche https://docs.microsoft.com/it-it/aspnet/core/blazor/fundamentals/signalr?view=aspnetcore-6.0#modify-the-reconnection-handler-blazor-server)*@
|
||||
<script>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOINVE </i>
|
||||
<h4>Versione: 6.16.2212.1212</h4>
|
||||
<h4>Versione: 6.16.2212.1216</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.16.2212.1212
|
||||
6.16.2212.1216
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.16.2212.1212</version>
|
||||
<version>6.16.2212.1216</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/MP.INVE.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"CodApp": "MP.INVE",
|
||||
"ConnectionStrings": {
|
||||
"Mp.Inve": "Server=SQL2016DEV;Database=MoonPro_MAG; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.INVE;",
|
||||
"Mp.IS": "Server=SQL2016DEV;Database=MoonPro_IS_EdilChim; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.INVE;",
|
||||
"Mp.Data": "Server=SQL2016DEV;Database=MoonPro; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.INVE;",
|
||||
"Redis": "localhost:6379,DefaultDatabase=1,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false",
|
||||
"RedisAdmin": "localhost:6379,DefaultDatabase=1,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false,allowAdmin=true"
|
||||
|
||||
Reference in New Issue
Block a user