fix gestione datareader che si piantano togliendo singleton
This commit is contained in:
+6
-3
@@ -1625,6 +1625,7 @@ namespace AppData
|
||||
{
|
||||
DS_App.StackListRow answ = null;
|
||||
DS_App.StackListDataTable tabBunk = null;
|
||||
DataLayer DLMan = new DataLayer();
|
||||
// cerco in cache....
|
||||
if (getCurrBunkTab(machine) != null)
|
||||
{
|
||||
@@ -1632,7 +1633,7 @@ namespace AppData
|
||||
}
|
||||
else
|
||||
{
|
||||
tabBunk = DataLayer.man.taSTL.getLoaded();
|
||||
tabBunk = DLMan.taSTL.getLoaded();
|
||||
// salvo in redis
|
||||
setCurrBunkTab(machine, tabBunk);
|
||||
}
|
||||
@@ -1722,7 +1723,8 @@ namespace AppData
|
||||
else
|
||||
{
|
||||
// recupero sheet corrente da Bunk...
|
||||
tabSheets = DataLayer.man.taSHL.getByMLStatus(BatchID, 5, 5);
|
||||
DataLayer DLMan = new DataLayer();
|
||||
tabSheets = DLMan.taSHL.getByMLStatus(BatchID, 5, 5);
|
||||
// salvo in redis
|
||||
setCurrSheetTab(machine, tabSheets);
|
||||
}
|
||||
@@ -2426,7 +2428,8 @@ namespace AppData
|
||||
int answ = 0;
|
||||
try
|
||||
{
|
||||
var tabSheet = DataLayer.man.taSHL.getByMLStatus(BatchID, minVal, maxVal);
|
||||
DataLayer DLMan = new DataLayer();
|
||||
var tabSheet = DLMan.taSHL.getByMLStatus(BatchID, minVal, maxVal);
|
||||
if (tabSheet.Count > 0)
|
||||
{
|
||||
answ = tabSheet[0].SheetID;
|
||||
|
||||
@@ -78,12 +78,17 @@ namespace NKC_WF.WebUserControls
|
||||
|
||||
protected void lbtTryReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
// aggiorno vocabolario
|
||||
DataWrap.DW.resetVocabolario();
|
||||
// reset dati in cache x DbConfig...
|
||||
memLayer.ML.resetAppConf();
|
||||
// svuoto session e cache per rileggere i dati da Db
|
||||
Session.RemoveAll();
|
||||
try
|
||||
{
|
||||
// aggiorno vocabolario
|
||||
DataWrap.DW.resetVocabolario();
|
||||
// reset dati in cache x DbConfig...
|
||||
memLayer.ML.resetAppConf();
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// ulteriore reset sessione
|
||||
Session.Clear();
|
||||
// attendo...
|
||||
|
||||
@@ -56,7 +56,8 @@ namespace NKC_WF.WebUserControls
|
||||
protected void updateCurrData()
|
||||
{
|
||||
// FORSE 5/5?!?
|
||||
var sheetList = DataLayer.man.taSHL.getByMLStatus(PackListID, 3, 5);
|
||||
DataLayer DLMan = new DataLayer();
|
||||
var sheetList = DLMan.taSHL.getByMLStatus(PackListID, 3, 5);
|
||||
if (sheetList.Count > 0)
|
||||
{
|
||||
SheetID = sheetList[0].SheetID;
|
||||
@@ -269,13 +270,14 @@ namespace NKC_WF.WebUserControls
|
||||
private void processItemSuggestion(codeType tipoCod, string rawData, int codeInt)
|
||||
{
|
||||
DS_App.ItemListDataTable tabItem = null;
|
||||
DataLayer DLMan = new DataLayer();
|
||||
divInfo.Visible = false;
|
||||
// processo suggerimenti x ITEM / cart / bin dato suo RawData (Dtmx) e Cod univoco (intero)
|
||||
switch (tipoCod)
|
||||
{
|
||||
case codeType.Cart:
|
||||
// primo step: verifico dal codice CART l'ordine da cui deriva...
|
||||
var tabOrdini = DataLayer.man.taOL.getByCart(rawData);
|
||||
var tabOrdini = DLMan.taOL.getByCart(rawData);
|
||||
if (tabOrdini.Count == 0)
|
||||
{
|
||||
displError($"{traduci("KS_PIS_CartNotFound")} {rawData}, {traduci("ErrPleaseRetry")}");
|
||||
@@ -285,7 +287,7 @@ namespace NKC_WF.WebUserControls
|
||||
{
|
||||
var rigaOrd = tabOrdini[0];
|
||||
// ora si va sulla tab delle PackListDet x cercare ordine legato al Cart... prendo quella attiva!
|
||||
var tabPLD = DataLayer.man.taPLD.getRunByOrdExtCode(rigaOrd.OrderExtCode);
|
||||
var tabPLD = DLMan.taPLD.getRunByOrdExtCode(rigaOrd.OrderExtCode);
|
||||
// controllo se trovo righe...
|
||||
if (tabPLD.Count == 0)
|
||||
{
|
||||
@@ -304,11 +306,11 @@ namespace NKC_WF.WebUserControls
|
||||
{ }
|
||||
setCart(rawData, codeInt, descr);
|
||||
// verifico se il cart sia già stato messo in scarico (in quel caso dico già ok...)
|
||||
var tabLog = DataLayer.man.taPLog.getByCartId(codeInt);
|
||||
var tabLog = DLMan.taPLog.getByCartId(codeInt);
|
||||
if (tabLog.Count > 0)
|
||||
{
|
||||
// verifico se sia completo --> reset... altrimenti lascio così...
|
||||
var tabCOK = DataLayer.man.taCOK.GetData();
|
||||
var tabCOK = DLMan.taCOK.GetData();
|
||||
// cerco se sia "green" numWait + numReady + numOtherWait = 0
|
||||
var tabGreen = tabCOK.Where(x => (x.NumPzWaiting + x.NumPzBinAvail + x.OtherQtyWait == 0) && x.CartDtmx == rawData).ToList();
|
||||
if (tabGreen.Count > 0)
|
||||
@@ -317,7 +319,7 @@ namespace NKC_WF.WebUserControls
|
||||
if (lastObject == rawData)
|
||||
{
|
||||
// --> metto cart in scarico e registro LOG come se avesse appena letto 1:1 ogni Dtmx
|
||||
DataLayer.man.taPLog.closeCart(codeInt);
|
||||
DLMan.taPLog.closeCart(codeInt);
|
||||
lgInfo($"cmp_kittingSmart | taPLog.closeCart | codeInt: {codeInt} | rawData: {rawData}");
|
||||
// mostro che ho fatto
|
||||
displInfo($"OK: CART removed {rawData}");
|
||||
@@ -337,7 +339,7 @@ namespace NKC_WF.WebUserControls
|
||||
else
|
||||
{
|
||||
// recupero da tab di check complessiva
|
||||
var tabPLCheck = DataLayer.man.taPLC.GetData(rawData);
|
||||
var tabPLCheck = DLMan.taPLC.GetData(rawData);
|
||||
if (tabPLCheck.Count == 0)
|
||||
{
|
||||
displError($"ERROR evaluating CART: {rawData}");
|
||||
@@ -353,12 +355,12 @@ namespace NKC_WF.WebUserControls
|
||||
if (lastObject == rawData)
|
||||
{
|
||||
// --> metto cart in scarico e registro LOG come se avesse appena letto 1:1 ogni Dtmx
|
||||
DataLayer.man.taPLog.acquireCart(rawData, currIpAddress, user_std.UtSn.userNameAD);
|
||||
DLMan.taPLog.acquireCart(rawData, currIpAddress, user_std.UtSn.userNameAD);
|
||||
lgInfo($"cmp_kittingSmart | taPLog.acquireCart | rawData: {rawData} | UserName: {user_std.UtSn.userNameAD} | currIpAddress: {currIpAddress}");
|
||||
displInfo($"OK: CART acquired {rawData} - item confirmed");
|
||||
lastObject = "";
|
||||
// eseguo comando x spostare i PAINT nel cart corretto...
|
||||
DataLayer.man.taKL.updateCartForBin(rawData);
|
||||
DLMan.taKL.updateCartForBin(rawData);
|
||||
lgInfo($"cmp_kittingSmart | taKL.updateCartForBin | rawData: {rawData}");
|
||||
// resetto BIN & CART
|
||||
resetBin();
|
||||
@@ -382,7 +384,7 @@ namespace NKC_WF.WebUserControls
|
||||
break;
|
||||
case codeType.BinProcessed:
|
||||
// recupero la tab OKIB x iniziare a controllare i dati...
|
||||
var tabOKIB = DataLayer.man.taOKIB.getByBinDtmxProc(rawData);
|
||||
var tabOKIB = DLMan.taOKIB.getByBinDtmxProc(rawData);
|
||||
// PRIMO: verifico SE ho delle righe valide...
|
||||
if (tabOKIB.Count == 0)
|
||||
{
|
||||
@@ -443,7 +445,7 @@ namespace NKC_WF.WebUserControls
|
||||
if (lastObject == rawData)
|
||||
{
|
||||
// seconda lettura x indicare in scarico
|
||||
DataLayer.man.taBN.updateKitting(codeInt, true, false);
|
||||
DLMan.taBN.updateKitting(codeInt, true, false);
|
||||
lgInfo($"cmp_kittingSmart | taBN.updateKitting | BinID: {codeInt} | BinDtmx: {rawData} | recStart: true | recEnd: false");
|
||||
// resetto BIN & CART
|
||||
resetBin();
|
||||
@@ -465,7 +467,7 @@ namespace NKC_WF.WebUserControls
|
||||
break;
|
||||
case codeType.Item:
|
||||
// recupero la tab ITEMS x iniziare a controllare i dati...
|
||||
tabItem = DataLayer.man.taIL.getBySearch(codeInt, rawData, 0, 999);
|
||||
tabItem = DLMan.taIL.getBySearch(codeInt, rawData, 0, 999);
|
||||
if (tabItem.Count == 0)
|
||||
{
|
||||
displError($"{traduci("ErrPartNotFound")} {rawData}, {traduci("ErrPleaseRetry")}");
|
||||
@@ -495,7 +497,7 @@ namespace NKC_WF.WebUserControls
|
||||
break;
|
||||
case codeType.OtherItem:
|
||||
// recupero la tab OKOI x iniziare a controllare i dati...
|
||||
var tabOKOI = DataLayer.man.taOKOI.getByOtherItemDtmx(rawData);
|
||||
var tabOKOI = DLMan.taOKOI.getByOtherItemDtmx(rawData);
|
||||
// PRIMO: verifico SE ho delle righe valide...
|
||||
if (tabOKOI.Count == 0)
|
||||
{
|
||||
@@ -541,9 +543,6 @@ namespace NKC_WF.WebUserControls
|
||||
lastObject = "";
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Imposta il codice Item sugli oggetti dipendenti
|
||||
|
||||
@@ -59,7 +59,8 @@ namespace NKC_WF.WebUserControls
|
||||
protected void updateCurrData()
|
||||
{
|
||||
// FORSE 5/5?!?
|
||||
var sheetList = DataLayer.man.taSHL.getByMLStatus(PackListID, 3, 5);
|
||||
DataLayer DLMan = new DataLayer();
|
||||
var sheetList = DLMan.taSHL.getByMLStatus(PackListID, 3, 5);
|
||||
if (sheetList.Count > 0)
|
||||
{
|
||||
SheetID = sheetList[0].SheetID;
|
||||
@@ -255,12 +256,13 @@ namespace NKC_WF.WebUserControls
|
||||
private void processItemSuggestion(codeType tipoCod, string rawData, int codeInt)
|
||||
{
|
||||
DS_App.ItemListDataTable tabItem = null;
|
||||
DataLayer DLMan = new DataLayer();
|
||||
divInfo.Visible = false;
|
||||
// processo suggerimenti x ITEM / cart / bin dato suo RawData (Dtmx) e Cod univoco (intero)
|
||||
switch (tipoCod)
|
||||
{
|
||||
case codeType.Item:
|
||||
tabItem = DataLayer.man.taIL.getBySearch(codeInt, rawData, 0, 999);
|
||||
tabItem = DLMan.taIL.getBySearch(codeInt, rawData, 0, 999);
|
||||
if (tabItem.Count == 1)
|
||||
{
|
||||
showItemDetail(true, tabItem[0], false);
|
||||
|
||||
@@ -108,7 +108,8 @@ namespace NKC_WF.WebUserControls
|
||||
protected void updateCurrData()
|
||||
{
|
||||
// FORSE 5/5?!?
|
||||
var sheetList = DataLayer.man.taSHL.getByMLStatus(BatchId, 3, 5);
|
||||
DataLayer DLMan = new DataLayer();
|
||||
var sheetList = DLMan.taSHL.getByMLStatus(BatchId, 3, 5);
|
||||
if (sheetList.Count > 0)
|
||||
{
|
||||
SheetID = sheetList[0].SheetID;
|
||||
@@ -288,12 +289,13 @@ namespace NKC_WF.WebUserControls
|
||||
{
|
||||
displMessage("", false);
|
||||
DS_App.ItemListDataTable tabItem = null;
|
||||
DataLayer DLMan = new DataLayer();
|
||||
string message = "";
|
||||
// processo suggerimenti x ITEM / cart / bin dato suo RawData (Dtmx) e Cod univoco (intero)
|
||||
switch (tipoCod)
|
||||
{
|
||||
case codeType.Item:
|
||||
tabItem = DataLayer.man.taIL.getBySearch(codeInt, rawData, 0, 999);
|
||||
tabItem = DLMan.taIL.getBySearch(codeInt, rawData, 0, 999);
|
||||
if (tabItem.Count == 1)
|
||||
{
|
||||
showItemDetail(true, tabItem[0], false);
|
||||
@@ -305,11 +307,11 @@ namespace NKC_WF.WebUserControls
|
||||
break;
|
||||
case codeType.ItemGeneric:
|
||||
// PRIMA CERCA SE ne ho in stato 1..3
|
||||
tabItem = DataLayer.man.taIL.getBySearch(0, rawData, 1, 3);
|
||||
tabItem = DLMan.taIL.getBySearch(0, rawData, 1, 3);
|
||||
if (tabItem.Count == 0)
|
||||
{
|
||||
// se NON ne trovo cerci FINO a stato 5...
|
||||
tabItem = DataLayer.man.taIL.getBySearch(0, rawData, 1, 5);
|
||||
tabItem = DLMan.taIL.getBySearch(0, rawData, 1, 5);
|
||||
}
|
||||
if (tabItem.Count == 1)
|
||||
{
|
||||
@@ -338,7 +340,7 @@ namespace NKC_WF.WebUserControls
|
||||
else
|
||||
{
|
||||
// dichiaro che è depositato
|
||||
DataLayer.man.taIL.updateStatus(itemIdSelected, 3, PlaceId);
|
||||
DLMan.taIL.updateStatus(itemIdSelected, 3, PlaceId);
|
||||
message = $"{traduci("Part")} {itemIdSelected} {traduci("PutInCart")} {rawData}";
|
||||
lblDestination.Text = message;
|
||||
lgInfo($"cmp_unloadSmart | Status --> 3 | {message} | PlaceId: {PlaceId}");
|
||||
@@ -366,7 +368,7 @@ namespace NKC_WF.WebUserControls
|
||||
else
|
||||
{
|
||||
// dichiaro che è depositato
|
||||
DataLayer.man.taIL.updateStatus(itemIdSelected, 4, PlaceId);
|
||||
DLMan.taIL.updateStatus(itemIdSelected, 4, PlaceId);
|
||||
message = $"{traduci("Part")} {itemIdSelected} {traduci("PutInBin")} {rawData}";
|
||||
lblDestination.Text = message;
|
||||
lgInfo($"cmp_unloadSmart | Status --> 4 | {message} | PlaceId: {PlaceId}");
|
||||
|
||||
@@ -47,8 +47,13 @@ namespace NKC_WF.WebUserControls
|
||||
memLayer.ML.setSessionVal("valoreCercato", txtNewLemma.Text.Trim());
|
||||
// svuoto campo text
|
||||
txtNewLemma.Text = "";
|
||||
// aggiorno il vocabolario in memoria...
|
||||
DataWrap.DW.resetVocabolario();
|
||||
try
|
||||
{
|
||||
// aggiorno vocabolario
|
||||
DataWrap.DW.resetVocabolario();
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// riparto...
|
||||
Response.Redirect(_paginaCorrente);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user