Exemple #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            scheduleType scheduleType = db.scheduleTypes.Find(id);

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

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

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