Exemple #1
0
        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));
            }
        }
Exemple #2
0
        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));
        }
Exemple #3
0
        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));
        }