Пример #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            grau_instrucao grau_instrucao = db.grau_instrucao.Find(id);

            db.grau_instrucao.Remove(grau_instrucao);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Пример #2
0
 public ActionResult Edit([Bind(Include = "id_grau_instrucao,descricao,ordem,id_tipo_curso")] grau_instrucao grau_instrucao)
 {
     if (ModelState.IsValid)
     {
         db.Entry(grau_instrucao).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.id_tipo_curso = new SelectList(db.tipo_curso, "id_tipo_curso", "nome", grau_instrucao.id_tipo_curso);
     return(View(grau_instrucao));
 }
Пример #3
0
        // GET: grau_instrucao/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            grau_instrucao grau_instrucao = db.grau_instrucao.Find(id);

            if (grau_instrucao == null)
            {
                return(HttpNotFound());
            }
            return(View(grau_instrucao));
        }
Пример #4
0
        // GET: grau_instrucao/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            grau_instrucao grau_instrucao = db.grau_instrucao.Find(id);

            if (grau_instrucao == null)
            {
                return(HttpNotFound());
            }
            ViewBag.id_tipo_curso = new SelectList(db.tipo_curso, "id_tipo_curso", "nome", grau_instrucao.id_tipo_curso);
            return(View(grau_instrucao));
        }