예제 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            RefreshmentItem refreshment = db.RefreshmentItems.Find(id);

            db.RefreshmentItems.Remove(refreshment);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #2
0
 public ActionResult Edit(RefreshmentItem refreshment)
 {
     if (ModelState.IsValid)
     {
         db.Entry(refreshment).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(refreshment));
 }
예제 #3
0
        public ActionResult Create(RefreshmentItem refreshment)
        {
            if (ModelState.IsValid)
            {
                db.RefreshmentItems.Add(refreshment);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(refreshment));
        }
예제 #4
0
        //
        // GET: /Meal/Delete/5

        public ActionResult Delete(int id)
        {
            RefreshmentItem refreshment = db.RefreshmentItems.Find(id);

            return(View(refreshment));
        }
예제 #5
0
        //
        // GET: /Meal/Details/5

        public ViewResult Details(int id)
        {
            RefreshmentItem refreshment = db.RefreshmentItems.Find(id);

            return(View(refreshment));
        }