public ActionResult DeleteConfirmed(int id) { PayrollCust payrollCust = db.PayrollCusts.Find(id); db.PayrollCusts.Remove(payrollCust); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "prCust_id,prCust_OrgId,prCust_CustId,prCust_paymnt,prCust_date")] PayrollCust payrollCust) { if (ModelState.IsValid) { db.Entry(payrollCust).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.prCust_CustId = new SelectList(db.Customers, "Cust_id", "Cust_Firstname", payrollCust.prCust_CustId); ViewBag.prCust_OrgId = new SelectList(db.Organizations, "org_id", "org_name", payrollCust.prCust_OrgId); return(View(payrollCust)); }
// GET: PayrollCusts/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PayrollCust payrollCust = db.PayrollCusts.Find(id); if (payrollCust == null) { return(HttpNotFound()); } return(View(payrollCust)); }
// GET: PayrollCusts/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PayrollCust payrollCust = db.PayrollCusts.Find(id); if (payrollCust == null) { return(HttpNotFound()); } ViewBag.prCust_CustId = new SelectList(db.Customers, "Cust_id", "Cust_Firstname", payrollCust.prCust_CustId); ViewBag.prCust_OrgId = new SelectList(db.Organizations, "org_id", "org_name", payrollCust.prCust_OrgId); return(View(payrollCust)); }