public ActionResult DeleteConfirmed(int id) { ref_Province ref_Province = db.ref_Province.Find(id); db.ref_Province.Remove(ref_Province); db.SaveChanges(); return(RedirectToAction("Create")); }
public ActionResult Edit([Bind(Include = "provinceID,CountryID,RegionID,ProvinceDistrict,Capital")] ref_Province ref_Province) { if (ModelState.IsValid) { db.Entry(ref_Province).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Create")); } return(View(ref_Province)); }
public ActionResult Create([Bind(Prefix = "Item1", Include = "provinceID,CountryID,RegionID,ProvinceDistrict,Capital")] ref_Province ref_Province) { if (ModelState.IsValid) { db.ref_Province.Add(ref_Province); db.SaveChanges(); return(RedirectToAction("Create")); } return(View(ref_Province)); }
// GET: Provinces/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ref_Province ref_Province = db.ref_Province.Find(id); if (ref_Province == null) { return(HttpNotFound()); } return(View(ref_Province)); }