public ActionResult Detail(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } A_LocationVM detail = db.getLocationDetail((int)id); if (detail == null) { return(HttpNotFound()); } return(View(detail)); }
public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } A_LocationVM detail = db.getLocationDetail((int)id); if (detail == null) { return(HttpNotFound()); } ViewBag.DepartmentId = new SelectList(ddl.getDepartmentList(), "Id", "Name", detail.DepartmentId); return(View(detail)); }