public ActionResult Delete(int id, Participante participante) { try { SRefParticipante.ServiceResponse response = clientP.eliminar(id); if (response.IsSuccess) { return(RedirectToAction("Index")); } // TODO: Add delete logic here return(View(participante)); } catch { return(View(participante)); } }
public ActionResult Edit(int id, Participante participante) { try { participante.CodParticipante = id; SRefParticipante.ServiceResponse response = clientP.actualizar(participante); if (response.IsSuccess) { return(RedirectToAction("Index")); } ViewBag.TipoParticipantes = comboBoxTipoParticipante(); ViewBag.Message = response.Message; } catch (Exception ex) { } return(View(participante)); }
public ActionResult Create(Participante participante) { try { SRefParticipante.ServiceResponse response = clientP.registrar(participante); if (response.IsSuccess) { return(RedirectToAction("Index")); } ViewBag.TipoParticipantes = comboBoxTipoParticipante(); ViewBag.Message = response.Message; //return View(participante); } catch (Exception ex) { } return(View(participante)); }