Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Eparchy eparchy = db.Eparchies.Find(id);

            db.Eparchies.Remove(eparchy);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit(Eparchy eparchy)
 {
     if (ModelState.IsValid)
     {
         db.Entry(eparchy).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(eparchy));
 }
Beispiel #3
0
        //
        // GET: /Eparchy/Delete/5

        public ActionResult Delete(int id = 0)
        {
            ViewBag.ProvinceList = db.Provinces.ToList();
            Eparchy eparchy = db.Eparchies.Find(id);

            if (eparchy == null)
            {
                return(HttpNotFound());
            }
            return(View(eparchy));
        }
Beispiel #4
0
        public ActionResult Create(Eparchy eparchy)
        {
            if (ModelState.IsValid)
            {
                db.Eparchies.Add(eparchy);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(eparchy));
        }