Typo fix admin fasi
This commit is contained in:
@@ -533,16 +533,18 @@ namespace GPW_Admin.WebUserControls
|
||||
public bool delEnabled(object _totOre, object _idxFase, object _idxFaseAncest)
|
||||
{
|
||||
bool answ = isWritable();
|
||||
int idxFase = 0;
|
||||
int idxFaseAnc = 0;
|
||||
// solo se ha diritti scrittura controllo
|
||||
if (answ && _totOre != null && _idxFase != null && _idxFaseAncest != null)
|
||||
{
|
||||
// se è una fase master (ancestor == 0 ) e ha child --> false...
|
||||
int idxFaseAnc = 0;
|
||||
_ = int.TryParse($"{_idxFaseAncest}", out idxFaseAnc);
|
||||
_ = int.TryParse($"{_idxFase}", out idxFase);
|
||||
if (idxFaseAnc == 0)
|
||||
{
|
||||
// verifico: se ha child --> NON eliminabile
|
||||
int numFasiChild = DataProxy.DP.taAF.getByAncest(idxFaseAnc).Count;
|
||||
int numFasiChild = DataProxy.DP.taAF.getByAncest(idxFase).Count;
|
||||
answ = numFasiChild == 0;
|
||||
}
|
||||
else
|
||||
@@ -553,8 +555,6 @@ namespace GPW_Admin.WebUserControls
|
||||
// se fosse true --> procedo con controllo fasi
|
||||
if (answ)
|
||||
{
|
||||
int idxFase = 0;
|
||||
_ = int.TryParse($"{_idxFase}", out idxFase);
|
||||
answ = !hasChildObj(idxFase);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user