Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            TahDoList tahdolist = db.TahDoLists.Find(id);

            db.TahDoLists.Remove(tahdolist);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit(TahDoList tahdolist)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tahdolist).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tahdolist));
 }
Beispiel #3
0
        // GET: TahDoLists/Delete/5
        public ActionResult Delete(int id)
        {
            TahDoList tahDoList = db.TahDoLists.Find(id);

            if (tahDoList == null)
            {
                return(HttpNotFound());
            }
            return(View(tahDoList));
        }
Beispiel #4
0
 public ActionResult Edit([Bind(Include = "Id,Title,CreatedAt,Priority,Cost,Summary,Done,DoneAt")] TahDoList tahDoList)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tahDoList).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tahDoList));
 }
Beispiel #5
0
        public ActionResult Create(TahDoList tahdolist)
        {
            if (ModelState.IsValid)
            {
                db.TahDoLists.Add(tahdolist);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(tahdolist));
        }
Beispiel #6
0
        public ActionResult Create([Bind(Include = "Id,Title,CreatedAt,Priority,Cost,Summary,Done,DoneAt")] TahDoList tahDoList)
        {
            if (ModelState.IsValid)
            {
                db.TahDoLists.Add(tahDoList);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(tahDoList));
        }
Beispiel #7
0
        //
        // GET: /TahDoList/Delete/5

        public ActionResult Delete(int id)
        {
            TahDoList tahdolist = db.TahDoLists.Find(id);

            return(View(tahdolist));
        }
Beispiel #8
0
        //
        // GET: /TahDoList/Details/5

        public ViewResult Details(int id)
        {
            TahDoList tahdolist = db.TahDoLists.Find(id);

            return(View(tahdolist));
        }