public ActionResult DeleteConfirmed(int id) { HrGlobalSetup hrGlobalSetup = Service.GetById(id); Service.Delete(hrGlobalSetup); return(RedirectToAction("Index")); }
public ActionResult Edit(HrGlobalSetup hrGlobalSetup) { if (ModelState.IsValid) { Service.Update(hrGlobalSetup); return(RedirectToAction("Index")); } return(View(hrGlobalSetup)); }
// GET: HrGlobalSetups/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } HrGlobalSetup hrGlobalSetup = Service.GetById(id.GetValueOrDefault()); if (hrGlobalSetup == null) { return(HttpNotFound()); } return(View(hrGlobalSetup)); }