public ActionResult Edit([Bind(Include = "Id,first_name,last_name,password")] tbl_admin tbl_admin) { if (ModelState.IsValid) { db.Entry(tbl_admin).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tbl_admin)); }
public ActionResult Edit([Bind(Include = "Id,full_name,age,gender,address,date")] tbl_volunteer_application tbl_volunteer_application) { if (ModelState.IsValid) { db.Entry(tbl_volunteer_application).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tbl_volunteer_application)); }
public ActionResult Edit([Bind(Include = "Id,name,content,admin_id")] tbl_page tbl_page) { if (ModelState.IsValid) { db.Entry(tbl_page).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.admin_id = new SelectList(db.tbl_admin, "Id", "first_name", tbl_page.admin_id); return(View(tbl_page)); }
public ActionResult Edit([Bind(Include = "Id,title,content,admin_id,date_created")] tbl_volunteer_posting tbl_volunteer_posting) { if (ModelState.IsValid) { db.Entry(tbl_volunteer_posting).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.admin_id = new SelectList(db.tbl_admin, "Id", "first_name", tbl_volunteer_posting.admin_id); return(View(tbl_volunteer_posting)); }