public ActionResult DeleteConfirmed(int id) { tbBonusRecord tbbonusrecord = db.tbBonusRecord.Find(id); db.tbBonusRecord.Remove(tbbonusrecord); db.SaveChanges(); return(RedirectToAction("Index")); }
// // GET: /BonusRecord/Delete/5 public ActionResult Delete(int id = 0) { tbBonusRecord tbbonusrecord = db.tbBonusRecord.Find(id); if (tbbonusrecord == null) { return(HttpNotFound()); } return(View(tbbonusrecord)); }
public ActionResult Edit(tbBonusRecord tbbonusrecord) { if (ModelState.IsValid) { db.Entry(tbbonusrecord).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Member_ID = new SelectList(db.tbMemberInfo, "Member_ID", "Member_Name", tbbonusrecord.Member_ID); return(View(tbbonusrecord)); }
// // GET: /BonusRecord/Edit/5 public ActionResult Edit(int id = 0) { tbBonusRecord tbbonusrecord = db.tbBonusRecord.Find(id); if (tbbonusrecord == null) { return(HttpNotFound()); } ViewBag.Member_ID = new SelectList(db.tbMemberInfo, "Member_ID", "Member_Name", tbbonusrecord.Member_ID); return(View(tbbonusrecord)); }
public ActionResult Create(tbBonusRecord tbbonusrecord) { if (ModelState.IsValid) { db.tbBonusRecord.Add(tbbonusrecord); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Member_ID = new SelectList(db.tbMemberInfo, "Member_ID", "Member_Name", tbbonusrecord.Member_ID); return(View(tbbonusrecord)); }