Пример #1
0
        public RespuestaCotizacion armarRespuestaCotizacion(Cotizacion cotizacion, bool conExistencias)
        {
            RespuestaCotizacion respuestaCotizacion = new RespuestaCotizacion();
            Productos           producto            = context.Productos.Where(m => m.Referencia == cotizacion.Referencia).FirstOrDefault();

            respuestaCotizacion.CantidadDisponible      = producto.CantidadStock;
            respuestaCotizacion.Descripcion             = producto.Descripcion;
            respuestaCotizacion.DisponibilidadInmediata = true;
            respuestaCotizacion.FechaDisponibilidad     = DateTime.Now.AddDays(2);
            respuestaCotizacion.FechaRespuesta          = DateTime.Now;
            respuestaCotizacion.IdCotizacion            = cotizacion.IdCotizacion;
            respuestaCotizacion.Precio = producto.ValorProducto;
            return(respuestaCotizacion);
        }
Пример #2
0
 public async Task sendMessages(RespuestaCotizacion respuestaCotizacion)
 {
     BusMessage busMessage = new BusMessage(TokenIDSend, TopicSendMessage, SubscriptionSendName, Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(respuestaCotizacion)));
     await administradorMensajes.SendResponseMessagesAsync(busMessage);
 }