Update check stato folgli: evitato con batch a zero...

This commit is contained in:
Samuele Locatelli
2023-10-27 09:10:49 +02:00
parent 8d526a5760
commit ec6422d280
4 changed files with 38 additions and 23 deletions
+11 -8
View File
@@ -860,7 +860,7 @@ namespace AppData
public static DS_App.SheetListRow getCurrSheet(int BatchID, string machine)
{
DS_App.SheetListRow answ = null;
if (BatchID > 0)
if (BatchID > 0 && !string.IsNullOrEmpty(machine))
{
try
{
@@ -3262,17 +3262,20 @@ namespace AppData
protected int getSheetIdByBatch(int BatchID, int minVal, int maxVal, string machine)
{
int answ = 0;
try
if (BatchID > 0 && !string.IsNullOrEmpty(machine))
{
DataLayer DLMan = new DataLayer();
var tabSheet = DLMan.taSHL.getByMLStatus(BatchID, minVal, maxVal, machine);
if (tabSheet.Count > 0)
try
{
answ = tabSheet[0].SheetID;
DataLayer DLMan = new DataLayer();
var tabSheet = DLMan.taSHL.getByMLStatus(BatchID, minVal, maxVal, machine);
if (tabSheet.Count > 0)
{
answ = tabSheet[0].SheetID;
}
}
catch
{ }
}
catch
{ }
return answ;
}
@@ -92,6 +92,7 @@ namespace NKC_WF.WebUserControls
}
}
#if false
/// <summary>
/// Sheet selezionato...
/// </summary>
@@ -107,7 +108,8 @@ namespace NKC_WF.WebUserControls
int.TryParse(hfSheetID.Value, out answ);
return answ;
}
}
}
#endif
#endregion Protected Properties
@@ -848,8 +850,10 @@ namespace NKC_WF.WebUserControls
// elimino item sel...
itemIdSelected = 0;
resetShowData();
#if false
bool fatto = ComLib.resetItemPickup(SheetID, DeviceId);
lgInfo($"cmp_kittingSmart | ComLib.resetItemPickup | SheetID: {SheetID} | DeviceId: {DeviceId} | done: {fatto}");
lgInfo($"cmp_kittingSmart | ComLib.resetItemPickup | SheetID: {SheetID} | DeviceId: {DeviceId} | done: {fatto}");
#endif
}
/// <summary>
@@ -857,13 +861,15 @@ namespace NKC_WF.WebUserControls
/// </summary>
protected void updateCurrData()
{
#if false
// FORSE 5/5?!?
DataLayer DLMan = new DataLayer();
var sheetList = DLMan.taSHL.getByMLStatus(PackListID, 3, 5, PlaceCod);
if (sheetList.Count > 0)
{
SheetID = sheetList[0].SheetID;
}
}
#endif
DeviceId = ComLib.GetIPAddress().Replace(".", "0").Replace(":", "0");
}
+10 -7
View File
@@ -64,19 +64,22 @@ namespace NKC_WF.WebUserControls
/// </summary>
protected void updateCurrData()
{
// FORSE 5/5?!?
DataLayer DLMan = new DataLayer();
var sheetList = DLMan.taSHL.getByMLStatus(PackListID, 3, 5, MachineSel);
if (sheetList.Count > 0)
if (BatchID > 0)
{
SheetID = sheetList[0].SheetID;
// FORSE 5/5?!?
DataLayer DLMan = new DataLayer();
var sheetList = DLMan.taSHL.getByMLStatus(BatchID, 3, 5, MachineSel);
if (sheetList.Count > 0)
{
SheetID = sheetList[0].SheetID;
}
}
DeviceId = ComLib.GetIPAddress().Replace(".", "0").Replace(":", "0");
}
/// <summary>
/// PackList corrente...
/// Batch corrente...
/// </summary>
public int PackListID
public int BatchID
{
set
{
@@ -854,12 +854,15 @@ namespace NKC_WF.WebUserControls
/// </summary>
protected void updateCurrData()
{
// FORSE 5/5?!?
DataLayer DLMan = new DataLayer();
var sheetList = DLMan.taSHL.getByMLStatus(BatchId, 3, 5, PlaceCodFix);
if (sheetList.Count > 0)
if (BatchId > 0)
{
SheetID = sheetList[0].SheetID;
// FORSE 5/5?!?
DataLayer DLMan = new DataLayer();
var sheetList = DLMan.taSHL.getByMLStatus(BatchId, 3, 5, PlaceCodFix);
if (sheetList.Count > 0)
{
SheetID = sheetList[0].SheetID;
}
}
DeviceId = ComLib.GetIPAddress().Replace(".", "0").Replace(":", "0");
}