public ActionResult Edit(CompanyDepartment department) { try { if (ModelState.IsValid) { string result = departmentService.EditExistingDepartment(department); return(RedirectToAction("Index")); } else { return(View(department)); } } catch (Exception ex) { return(ShowExceptionMessage(ex)); } }