public ActionResult Edit([Bind(Include = "ID,Disciplina,ID_Curso")] tbl_Disciplina tbl_Disciplina) { if (ModelState.IsValid) { db.Entry(tbl_Disciplina).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ID_Curso = new SelectList(db.tbl_Curso, "ID", "Curso", tbl_Disciplina.ID_Curso); return(View(tbl_Disciplina)); }
public JsonResult Editar(tbl_Curso curso) { db.Entry(curso).State = EntityState.Modified; db.SaveChanges(); return(Json(true, JsonRequestBehavior.AllowGet)); }