fix save carico pezzi (sperabilmente...)
This commit is contained in:
@@ -3777,7 +3777,13 @@ namespace MP.IOC.Data
|
||||
// default: 0, non registrato x cautela...
|
||||
string answ = "0";
|
||||
// controllo per proseguire
|
||||
if (!string.IsNullOrEmpty(idxMacchina) && !string.IsNullOrEmpty(qty))
|
||||
if (string.IsNullOrEmpty(idxMacchina) || string.IsNullOrEmpty(qty))
|
||||
{
|
||||
string errore = $"Errore: mancano parametri macchina/incremento: idxMacchina {idxMacchina} | qty {qty}";
|
||||
Log.Error(errore);
|
||||
answ = errore;
|
||||
}
|
||||
else
|
||||
{
|
||||
int numPzIncr = -1;
|
||||
int.TryParse(qty, out numPzIncr);
|
||||
@@ -3785,8 +3791,7 @@ namespace MP.IOC.Data
|
||||
if (numPzIncr >= 0)
|
||||
{
|
||||
// recupero info tra cui ODL corrente
|
||||
Dictionary<string, string> datiMacc = mDatiMacchine(idxMacchina);
|
||||
//var currData = await GetCurrOdlAsync(idxMacchina);
|
||||
Dictionary<string, string> datiMacc = await mDatiMacchineAsync(idxMacchina);
|
||||
// registro evento 120 --> contapezzi in blocco !!!HARD CODED!!! !!!FIXME!!!
|
||||
int idxEvento = 120;
|
||||
DateTime adesso = DateTime.Now;
|
||||
@@ -3808,17 +3813,11 @@ namespace MP.IOC.Data
|
||||
Value = qty
|
||||
};
|
||||
// salva e processa
|
||||
var resp = scriviRigaEvento(newRecEv);
|
||||
var resp = await scriviRigaEventoAsync(newRecEv);
|
||||
// registro in risposta che è andato tutto bene... ovvero la qty richiesta...
|
||||
answ = qty;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
string errore = $"Errore: mancano parametri macchina/incremento: idxMacchina {idxMacchina} | qty {qty}";
|
||||
Log.Error(errore);
|
||||
answ = errore;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user