public IActionResult EditElementGroupe(CaseLoadElementGroup model) { SetViewbagElementGroupe(); if (!ModelState.IsValid) { return(View(nameof(EditElementGroupe), model)); } string _isvalid = IsValidElementGroupe(model); if (_isvalid != string.Empty) { SetErrorMessage(_isvalid); return(View(nameof(EditElementGroupe), model)); } var currentId = model.Id; if (service.CaseLoadElementGroup_SaveData(model)) { this.SaveLogOperation(currentId == 0, model.Id); SetSuccessMessage(MessageConstant.Values.SaveOK); return(RedirectToAction(nameof(EditElementGroupe), new { id = model.Id })); } else { SetErrorMessage(MessageConstant.Values.SaveFailed); } return(View(nameof(EditElementGroupe), model)); }