public ActionResult Edit([Bind(Include = "RegionID,Name,CountryID,isDeleted,DateInsert,DateUpdate")] Region region) { if (ModelState.IsValid) { db.Entry(region).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CountryID = new SelectList(db.Countries, "CountryID", "Name", region.CountryID); return(View(region)); }
public ActionResult Edit([Bind(Include = "VolunteerID,FirstName,LastName,DateOfBirth,MobileNo,PhoneNo,Email,Password,ImagePath,DateRegister,RegionID,StatusID,DateInsert,DateUpdate")] Volunteer volunteer) { if (ModelState.IsValid) { db.Entry(volunteer).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.RegionID = new SelectList(db.Regions, "RegionID", "Name", volunteer.RegionID); ViewBag.StatusID = new SelectList(db.Status, "StatusID", "Name", volunteer.StatusID); return(View(volunteer)); }