Exemple #1
0
        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"));
        }
Exemple #2
0
 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));
 }
Exemple #3
0
        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));
        }
Exemple #4
0
        // 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));
        }