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