public async Task <IActionResult> EditSystemViewPost(EditSystemViewModel model) { if (!ModelState.IsValid) { return(RedirectToPage("/get/system/" + model.Id.ToString())); } var res = await _monitor.EditSystem(model, GetCurrentUserAsync().Result.UserName); if (res.Succeeded) { _toastNotification.AddSuccessToastMessage(res.OkMessage, new ToastrOptions() { PositionClass = ToastPositions.TopCenter }); return(RedirectToAction("ListSystem")); } _toastNotification.AddErrorToastMessage(res.Errors, new ToastrOptions() { PositionClass = ToastPositions.TopCenter }); return(RedirectToPage("/get/system/" + model.Id.ToString())); }