COmpletata gestione deroga con visuals
This commit is contained in:
@@ -90,6 +90,7 @@ namespace MoonProTablet.WebUserControls
|
||||
private void processInput()
|
||||
{
|
||||
bool found = false;
|
||||
bool batchOk = false;
|
||||
MapoDb.DS_Arca.GiacenzeDataTable tabGiacenzeLotto = new MapoDb.DS_Arca.GiacenzeDataTable();
|
||||
MapoDb.DS_SheetTech.ST_ActualRowDataTable tabRichieste = new MapoDb.DS_SheetTech.ST_ActualRowDataTable();
|
||||
MapoDb.DS_SheetTech.ST_ActualRowRow datiBatchCheck;
|
||||
@@ -136,6 +137,7 @@ namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
lblMessage.Text = $"Lotto riconosciuto: {BCodeVal} --> {datiLotto.Cd_AR} | Articolo acquisito";
|
||||
lblMessage.CssClass = "text-success";
|
||||
batchOk = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -143,22 +145,25 @@ namespace MoonProTablet.WebUserControls
|
||||
lblMessage.CssClass = "text-danger";
|
||||
}
|
||||
}
|
||||
else
|
||||
}
|
||||
|
||||
if (!batchOk)
|
||||
{
|
||||
// verifico EVENTUALI deroghe
|
||||
var currDeroga = DataLayerObj.getDerogaSt(tabRichieste[0].IdxST);
|
||||
// se è deroga x gruppo/tipo/num corretto...
|
||||
if (currDeroga.CanForce && tabRichieste[0].CodGruppo == currDeroga.CodGruppo && tabRichieste[0].CodTipo == currDeroga.CodTipo && tabRichieste[0].Num == currDeroga.Num)
|
||||
{
|
||||
// verifico EVENTUALI deroghe
|
||||
var currDeroga = DataLayerObj.getDerogaSt(tabRichieste[0].IdxST);
|
||||
// se è deroga x gruppo/tipo/num corretto...
|
||||
if (currDeroga.CanForce && tabRichieste[0].CodGruppo == currDeroga.CodGruppo && tabRichieste[0].CodTipo == currDeroga.CodTipo && tabRichieste[0].Num == currDeroga.Num)
|
||||
{
|
||||
// ... forzo accettazione deroga
|
||||
DataLayerObj.taSTChk.upsertQuery(idxOdl, datiBatchCheck.IdxST, datiBatchCheck.Oggetto, datiBatchCheck.Num, BCodeVal, tabRichieste[0].Value, true, user_std.UtSn.utente);
|
||||
lblMessage.Text = $"Lotto/articolo non valido: {BCodeVal} --> Forzato a valido per articolo {tabRichieste[0].Value}";
|
||||
lblMessage.CssClass = "text-warning";
|
||||
DataLayerObj.setDerogaSt(new MapoSDK.StCheckOverride() { IdxST = tabRichieste[0].IdxST, CanForce = false });
|
||||
}
|
||||
// ... forzo accettazione deroga
|
||||
DataLayerObj.taSTChk.upsertQuery(idxOdl, tabRichieste[0].IdxST, tabRichieste[0].Oggetto, tabRichieste[0].Num, BCodeVal, tabRichieste[0].Value, true, user_std.UtSn.utente);
|
||||
lblMessage.Text = $"Lotto/articolo non valido: {BCodeVal} --> Forzato a valido per articolo {tabRichieste[0].Value}";
|
||||
lblMessage.CssClass = "text-warning";
|
||||
DataLayerObj.setDerogaSt(new MapoSDK.StCheckOverride() { IdxST = tabRichieste[0].IdxST, CanForce = false });
|
||||
batchOk = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// se non trovato
|
||||
if (!found)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user