Exemplo n.º 1
0
        private static string addNotificaciones(string message, DBStorage db)
        {
            AlmacenInventarioNotificacion notificacion;

            try
            {
                notificacion = (AlmacenInventarioNotificacion)JsonConvert.DeserializeObject(message, typeof(AlmacenInventarioNotificacion));
            }
            catch (Exception) { return("ERR"); }
            if (notificacion == null || !notificacion.isValid())
            {
                return("ERR");
            }

            return(db.addNotificacionAlmacen(notificacion) ? "OK" : "ERR");
        }