Exemple #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            basDisciplina basdisciplina = db.Disciplinas.Find(id);

            db.Disciplinas.Remove(basdisciplina);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemple #2
0
        //
        // GET: /Disciplina/Delete/5

        public ActionResult Delete(int id = 0)
        {
            basDisciplina basdisciplina = db.Disciplinas.Find(id);

            if (basdisciplina == null)
            {
                return(HttpNotFound());
            }
            return(View(basdisciplina));
        }
Exemple #3
0
 public ActionResult Edit(basDisciplina basdisciplina)
 {
     if (ModelState.IsValid)
     {
         db.Entry(basdisciplina).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(basdisciplina));
 }
Exemple #4
0
        public ActionResult Create(basDisciplina basdisciplina)
        {
            if (ModelState.IsValid)
            {
                db.Disciplinas.Add(basdisciplina);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(basdisciplina));
        }