public ActionResult DeleteConfirmed(int id) { PayPlanSetup payPlanSetup = Service.GetById(id); Service.Delete(payPlanSetup); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,EmployeeId,BasicSalary,PreviousGrade,CurrentGrade,SpecialAllow,DearnessAllow,OtherAllow,CIT,Insurance")] PayPlanSetup payPlanSetup) { if (ModelState.IsValid) { Service.Update(payPlanSetup); return(RedirectToAction("Index")); } return(View(payPlanSetup)); }
public ActionResult Create(PayPlanSetup payPlanSetup) { if (ModelState.IsValid) { Service.Add(payPlanSetup); return(RedirectToAction("Index")); } return(View(payPlanSetup)); }
// GET: PayPlanSetups/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PayPlanSetup payPlanSetup = Service.GetById(id.GetValueOrDefault()); if (payPlanSetup == null) { return(HttpNotFound()); } return(View(payPlanSetup)); }