public ActionResult DeleteConfirmed(int id)
        {
            DailyDietEntry dailydietentry = db.DailyDietEntry.Find(id);

            db.DailyDietEntry.Remove(dailydietentry);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit(DailyDietEntry dailydietentry)
 {
     if (ModelState.IsValid)
     {
         db.Entry(dailydietentry).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(dailydietentry));
 }
Ejemplo n.º 3
0
 public ActionResult DailyEntryCreate(DailyDietEntry dailydietentry)
 {
     if (ModelState.IsValid)
     {
         ddeb.DailyDietEntry.Add(dailydietentry);
         ddeb.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(dailydietentry));
 }
        //
        // GET: /DailyDietEntry/Delete/5

        public ActionResult Delete(int id)
        {
            DailyDietEntry dailydietentry = db.DailyDietEntry.Find(id);

            return(View(dailydietentry));
        }
        //
        // GET: /DailyDietEntry/Details/5

        public ViewResult Details(int id)
        {
            DailyDietEntry dailydietentry = db.DailyDietEntry.Find(id);

            return(View(dailydietentry));
        }
Ejemplo n.º 6
0
        //
        // GET: /DailyDiet/Edit/5

        public ActionResult DailyEntryEdit(int id)
        {
            DailyDietEntry dailydietentry = ddeb.DailyDietEntry.Find(id);

            return(View(dailydietentry));
        }