Ejemplo n.º 1
0
        public static bool Editar(T_GDA_INGRESOUCI IngresoUCI)
        {
            bool exito = false;
            RicardoPalmaEntities db = new RicardoPalmaEntities();

            try
            {
                db.Database.ExecuteSqlCommand(
                    "UPDATE T_GDA_INGRESOUCI SET estPaciente = @p1 , gravedad =  @p2 , motDesaprobacion = @p3 , obsDesaprobacion = @p4 WHERE idIngreso = @p5",
                    new SqlParameter[]
                {
                    new SqlParameter("p1", IngresoUCI.estPaciente),
                    new SqlParameter("p2", IngresoUCI.gravedad),
                    new SqlParameter("p3", IngresoUCI.motDesaprobacion),
                    new SqlParameter("p4", IngresoUCI.obsDesaprobacion),
                    new SqlParameter("p5", IngresoUCI.idIngreso),
                }
                    );
                db.SaveChanges();
                exito = true;
            }
            catch (Exception ex)
            {
                exito = false;
                Bitacora.CrearLog("Error al editar el presupuesto", TipoLog.Error, ex);
            }

            return(exito);
        }
Ejemplo n.º 2
0
        public string Desaprobar(T_GDA_INGRESOUCI IngresoUCI)
        {
            string mensaje = "Error al grabar los datos";

            bool esValido = TGDAIngresoUCI.Editar(IngresoUCI);

            if (esValido)
            {
                mensaje = "Datos grabadas y notificaciones enviadas";
            }
            return(mensaje);
        }