public ActionResult CrearCausa(CAUSAS obj)
        {
            try
            {
                bool   respuesta;
                string mensaje = "Causa creada correctamente";
                if (obj.CAUCODIGOI == 0)
                {
                    respuesta = objDAL.Crear_Causas(obj, true);
                }
                else
                {
                    respuesta = objDAL.Crear_Causas(obj, false);
                    mensaje   = "Causa editada correctamente";
                }
                if (respuesta)
                {
                    Request.Flash("success", mensaje);
                }
            }
            catch (Exception exc)
            {
                Request.Flash("danger", "Ha ocurrido un error: " + exc.Message);
            }

            return(RedirectToAction("Index", "Causas"));
        }
        public ActionResult CrearCausa(int id = 0)
        {
            CAUSAS obj = new CAUSAS();

            if (id != 0)
            {
                obj = objDAL.Buscar_Causas(id);
            }
            return(View(obj));
        }