Inizio fix calcolo bunk corrente...

This commit is contained in:
Samuele E. Locatelli
2020-01-29 22:05:40 +01:00
parent cfdb7e8cdb
commit c4680a2ca2
2 changed files with 52 additions and 5 deletions
+31 -1
View File
@@ -1184,7 +1184,7 @@ namespace AppData
}
/// <summary>
/// Restituisce il PRIMO bunk secondo criterio:
/// Restituisce il BUNK che è il primo della lissta:
/// - posizione = 5 (ho letto da webApp il BUNK e preso in carico)
/// - NumSheet > NumSheetUnload
/// - Ordinato per StackIndex (crescente) x avere il più VECCHIO
@@ -1209,6 +1209,36 @@ namespace AppData
}
return answ;
}
/// <summary>
/// BUNK corrente (x ora copia di first, poi sarà quello SELEZIONATO tra quelli SELEZIONABILI)
/// </summary>
/// <returns></returns>
public static DS_App.StackListRow getCurrBunk()
{
DS_App.StackListRow answ = null;
var tabStl = DataLayer.man.taSTL.getLoaded();
if (tabStl.Count > 0)
{
answ = tabStl[0];
}
return answ;
}
/// <summary>
/// Recupera lo sheet corrente da un BUNK come quello in status 5...
/// </summary>
/// <param name="BatchID"></param>
/// <returns></returns>
public static DS_App.SheetListRow getCurrSheet(int BatchID)
{
DS_App.SheetListRow answ = null;
// recupero sheet corrente da Bunk...
DS_App.SheetListDataTable tabSheets = DataLayer.man.taSHL.getByMLStatus(BatchID, 5, 5);
if (tabSheets.Count > 0)
{
answ = tabSheets[0];
}
return answ;
}
/// <summary>
/// Restituisce il PROSSIMO bunk secondo criterio:
+21 -4
View File
@@ -1,4 +1,5 @@
using SteamWare;
using AppData;
using SteamWare;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -75,9 +76,25 @@ namespace NKC_WF.site
{
imgQrLogin.ImageUrl = getLoginUrl();
updateSize();
//!!!FIXME!!! fare calcolo del VERO batch corrente...
BatchId = 242; // fixed x test!
SheetID = 770;
// recupero bunk corrente...
var currBunk = ComLib.getCurrBunk();
if (currBunk != null)
{
BatchId = currBunk.BatchID;
var currSheet = ComLib.getCurrSheet(BatchId);
if(currSheet!=null)
{
SheetID = currSheet.SheetID;
}
}
#if false
else
{
//!!!FIXME!!! fare calcolo del VERO batch corrente...
BatchId = 242; // fixed x test!
SheetID = 770;
}
#endif
// aggiorno child
cmp_MU_bins.ShowQr = true;
cmp_MU_bins.BatchId = BatchId;