예제 #1
0
        public ActionResult Delete(int id, Usuario usuario)
        {
            Usuario u = null;

            try
            {
                // TODO: Add delete logic here
                u        = repositorioUsuario.ObtenerPorId(id);
                u.Estado = "0";
                int res = repositorioUsuario.BajaLogica(u);
                return(RedirectToAction(nameof(Index)));
            }
            catch (Exception ex)
            {
                ViewBag.Error = ex.Message;
                return(View());
            }
        }