// GET: Departments/Details/5 public ActionResult Details(int?id) { try { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Department department = _departmentManager.FindById((int)id); if (department == null) { return(HttpNotFound()); } DepartmentViewModel departmentViewMode = Mapper.Map <DepartmentViewModel>(department); return(View(departmentViewMode)); } catch (Exception ex) { return(View("Error", new HandleErrorInfo(ex, "Departments", "Details"))); } }
public ActionResult Update(int id) { var department = _departmentManager.FindById(id); return(View(department)); }