Пример #1
0
 public ActionResult Edit([Bind(Include = "id,nome,sobrenome,titulacao,cursoId")] ProfessorRemoto.Professor professor)
 {
     if (ModelState.IsValid)
     {
         service.atualiza(professor);
         return(RedirectToAction("Index"));
     }
     return(View(professor));
 }
Пример #2
0
 // GET: Professores/Delete/5
 public ActionResult Delete(int?id)
 {
     if (id == null)
     {
         return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
     }
     ProfessorRemoto.Professor professor = service.procura(id);
     if (professor == null)
     {
         return(HttpNotFound());
     }
     return(View(professor));
 }
Пример #3
0
 public ActionResult DeleteConfirmed(int id)
 {
     ProfessorRemoto.Professor professor = service.procura(id);
     service.remove(professor);
     return(RedirectToAction("Index"));
 }