modifica: NO reset stima prime fasi nesting (da validare)
This commit is contained in:
@@ -37,10 +37,6 @@ namespace NKC_WF
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
doUpdate();
|
||||
#if false
|
||||
processPending();
|
||||
checkVisibility();
|
||||
#endif
|
||||
}
|
||||
cmp_batchList.eh_doRefresh += Cmp_batchList_eh_doRefresh;
|
||||
cmp_fileUpload.eh_doRefresh += Cmp_fileUpload_eh_doRefresh;
|
||||
@@ -83,17 +79,11 @@ namespace NKC_WF
|
||||
private void Cmp_fileUpload_eh_doRefresh(object sender, EventArgs e)
|
||||
{
|
||||
doUpdate();
|
||||
#if false
|
||||
checkVisibility();
|
||||
#endif
|
||||
}
|
||||
|
||||
private void Cmp_batchList_eh_doRefresh(object sender, EventArgs e)
|
||||
{
|
||||
doUpdate();
|
||||
#if false
|
||||
checkVisibility();
|
||||
#endif
|
||||
}
|
||||
|
||||
public void doUpdate()
|
||||
@@ -101,80 +91,5 @@ namespace NKC_WF
|
||||
|
||||
}
|
||||
|
||||
#if false
|
||||
private void processPending()
|
||||
{
|
||||
// se trova batch non riportati in REDIS li scrive x richiedere processing
|
||||
string batchKey = $"{batchOutChannel}:{currBatchID}";
|
||||
bool reqPresent = !string.IsNullOrEmpty(memLayer.ML.getRSV(batchKey));
|
||||
if (!reqPresent)
|
||||
{
|
||||
// !!!FIXME!!! leggere da DB!!!
|
||||
|
||||
var articoli = new List<Part>();
|
||||
var articolo = new Part()
|
||||
{
|
||||
PartId = 1,
|
||||
PartExtCode = "abc.2345",
|
||||
MatId = 2,
|
||||
PartQty = 2,
|
||||
CadFilePath = @"c:\temp\prova.dxf"
|
||||
};
|
||||
articoli.Add(articolo);
|
||||
|
||||
var divani = new List<Kit>();
|
||||
Kit divano = new Kit()
|
||||
{
|
||||
PartList = articoli
|
||||
};
|
||||
divani.Add(divano);
|
||||
|
||||
var ordini = new List<Order>();
|
||||
Order ordine = new Order()
|
||||
{
|
||||
OrderCod = "abcde",
|
||||
OrderExtCode = "HFA_123456",
|
||||
DestPlant = "Striker",
|
||||
//OrderQty = 1,
|
||||
KitList = divani
|
||||
};
|
||||
ordini.Add(ordine);
|
||||
|
||||
var currBatch = new batchRequest
|
||||
{
|
||||
BatchId = currBatchID,
|
||||
OrderList = ordini
|
||||
}
|
||||
;
|
||||
string payload = JsonConvert.SerializeObject(currBatch);
|
||||
memLayer.ML.setRSV(batchKey, payload);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// ID del batch corrente
|
||||
/// </summary>
|
||||
protected int currBatchID
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
if (memLayer.ML.isInSessionObject("BatchID"))
|
||||
{
|
||||
answ = memLayer.ML.IntSessionObj("BatchID");
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
private void checkVisibility()
|
||||
{
|
||||
bool hasBatch = false;
|
||||
if (currBatchID > 0)
|
||||
{
|
||||
hasBatch = true;
|
||||
}
|
||||
divStatus.Visible = hasBatch;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -72,7 +72,7 @@ namespace NKC_WF.WebUserControls
|
||||
// !!!FIXME!!! inviare a redis...
|
||||
|
||||
// registro su DB nesting iniziato...
|
||||
DataLayer.man.taBL.updateStatus(BatchId, (int)BatchStatus.Imported, 0);
|
||||
DataLayer.man.taBL.updateStatus(BatchId, (int)BatchStatus.Imported, -1);
|
||||
raiseEvent();
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace NKC_WF.WebUserControls
|
||||
// !!!FIXME!!! inviare a redis...
|
||||
|
||||
// registro su DB nesting iniziato...
|
||||
DataLayer.man.taBL.updateStatus(BatchId, (int)BatchStatus.EstimationDone, 0);
|
||||
DataLayer.man.taBL.updateStatus(BatchId, (int)BatchStatus.EstimationDone, -1);
|
||||
raiseEvent();
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace NKC_WF.WebUserControls
|
||||
ComLib.sendBatchReq(BatchId, "Nesting");
|
||||
|
||||
// registro su DB nesting iniziato...
|
||||
DataLayer.man.taBL.updateStatus(BatchId, (int)BatchStatus.NestRequested, 0);
|
||||
DataLayer.man.taBL.updateStatus(BatchId, (int)BatchStatus.NestRequested, -1);
|
||||
raiseEvent();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user