Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            playgroup_courses playgroup_courses = db.playgroup_courses.Find(id);

            db.playgroup_courses.Remove(playgroup_courses);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 public ActionResult Edit([Bind(Include = "cous_id,cous_name")] playgroup_courses playgroup_courses)
 {
     if (ModelState.IsValid)
     {
         db.Entry(playgroup_courses).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(playgroup_courses));
 }
Example #3
0
        public ActionResult Create([Bind(Include = "cous_id,cous_name")] playgroup_courses playgroup_courses)
        {
            if (ModelState.IsValid)
            {
                db.playgroup_courses.Add(playgroup_courses);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(playgroup_courses));
        }
Example #4
0
        // GET: playgroup_courses/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            playgroup_courses playgroup_courses = db.playgroup_courses.Find(id);

            if (playgroup_courses == null)
            {
                return(HttpNotFound());
            }
            return(View(playgroup_courses));
        }