public ActionResult DeleteConfirmed(int id) { var formacaoBo = new FormacaoBo(); formacaoBo.Apagar(id); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "FormacaoId,Curso,Instituicao,Descricao,Conclusao,CadidatoId")] Formacao formacao) { if (ModelState.IsValid) { var formacaoBo = new FormacaoBo(); formacaoBo.Editar(formacao); return(RedirectToAction("Index")); } return(View(formacao)); }
// GET: Formacoes/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var formacaoBo = new FormacaoBo(); var formacao = formacaoBo.ObterPorId(id.Value); if (formacao == null) { return(HttpNotFound()); } return(View(formacao)); }