예제 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Specialisations specialisations = db.Specialisations.Find(id);

            db.Specialisations.Remove(specialisations);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #2
0
 public ActionResult Edit([Bind(Include = "id,nomSpecialisation")] Specialisations specialisations)
 {
     if (ModelState.IsValid)
     {
         db.Entry(specialisations).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(specialisations));
 }
예제 #3
0
        public ActionResult Create([Bind(Include = "id,nomSpecialisation")] Specialisations specialisations)
        {
            if (ModelState.IsValid)
            {
                db.Specialisations.Add(specialisations);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

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

            if (specialisations == null)
            {
                return(HttpNotFound());
            }
            return(View(specialisations));
        }
예제 #5
0
 public void Specialise(Specialisations specialisation)
 {
 }