Inglobata NUOVA procedura setup (DA FARE!!!!)
This commit is contained in:
@@ -314,41 +314,41 @@ namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
confermaProdOdl(false);
|
||||
if (idxODLSel > 0)
|
||||
{
|
||||
{ // se vedesse TCRich a zero lo reimposta a quello assegnato...
|
||||
if (TCRichAttr == 0)
|
||||
{
|
||||
TCRichAttr = TCAssegnato(idxODLSel);
|
||||
}
|
||||
// splitto VECCHIO ODL (se è rimasto qualcosa da produrre e se ce ne è rimasto uno.......)
|
||||
int idxODL = 0;
|
||||
try
|
||||
{
|
||||
idxODL = DataLayer.obj.taODL.getByMacchina(idxMacchina)[0].IdxODL;
|
||||
DataLayer.obj.taODL.splitODL(idxODL, idxMacchina, TCAssegnato(idxODL), string.Format("inizio attrezzaggio, Sospensione ODL {0}, generato residuo con pari TCiclo: {1}", idxODL, TCAssegnato(idxODL)), false);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// 2018.07.24 verifico se devo lavorare come ODL classico o come RPO (Richiesta / Promessa / ODL)
|
||||
if (EnableRPO)
|
||||
{
|
||||
|
||||
// creo nuovo ODL da promessa ed associo
|
||||
DataLayer.obj.taODL.inizioSetupPromessa(idxODLSel, idxMacchina, TCRichAttr, txtNote.Text);
|
||||
}
|
||||
// ODL classico
|
||||
else
|
||||
{
|
||||
// se vedesse TCRich a zero lo reimposta a quello assegnato...
|
||||
if (TCRichAttr == 0)
|
||||
{
|
||||
TCRichAttr = TCAssegnato(idxODLSel);
|
||||
}
|
||||
// splitto VECCHIO ODL (se è rimasto qualcosa da produrre e se ce ne è rimasto uno.......)
|
||||
int idxODL = 0;
|
||||
try
|
||||
{
|
||||
idxODL = DataLayer.obj.taODL.getByMacchina(idxMacchina)[0].IdxODL;
|
||||
DataLayer.obj.taODL.splitODL(idxODL, idxMacchina, TCAssegnato(idxODL), string.Format("inizio attrezzaggio, Sospensione ODL {0}, generato residuo con pari TCiclo: {1}", idxODL, TCAssegnato(idxODL)), false);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// avvio NUOVO ODL
|
||||
DataLayer.obj.taODL.inizioSetup(idxODLSel, idxMacchina, TCRichAttr, txtNote.Text);
|
||||
// process evento
|
||||
int idxEvento = 2; // !!!HARD CODED
|
||||
processaEvento(idxEvento, String.Format("Registrata inizio attrezzaggio per ODL {0}", idxODLSel), idxODLSel);
|
||||
// resetto contapezzi redis...
|
||||
DataLayer.saveCounter(idxMacchina, "0");
|
||||
// imposto ODL su redis...
|
||||
DataLayer.saveCurrODL(idxMacchina, idxODLSel.ToString());
|
||||
// ricarico...
|
||||
Response.Redirect("~/ODL.aspx");
|
||||
}
|
||||
// process evento
|
||||
int idxEvento = 2; // !!!HARD CODED
|
||||
processaEvento(idxEvento, String.Format("Registrata inizio attrezzaggio per ODL {0}", idxODLSel), idxODLSel);
|
||||
// resetto contapezzi redis...
|
||||
DataLayer.saveCounter(idxMacchina, "0");
|
||||
// imposto ODL su redis...
|
||||
DataLayer.saveCurrODL(idxMacchina, idxODLSel.ToString());
|
||||
// ricarico...
|
||||
Response.Redirect("~/ODL");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user