예제 #1
0
        public Boolean UpdatePrice(int product_id, float price, IPriceLogServices _precios)
        {
            PriceLog precios = new PriceLog();
            float    price_old;

            price_old = _products[product_id].price_product;

            _products[product_id].price_product = price;

            //Construir objeto para registrar bitacora
            //precios.priceLog_id = 1;
            precios.priceLog_id   = _precios.IdMaximo();
            precios.price_current = price;
            precios.price_old     = price_old;
            precios.product_id    = product_id;
            precios.price_updated = DateTime.Now;

            //Añadir bitacora
            return(_precios.AddPriceLog(precios));
        }
예제 #2
0
 public ProductController(IProductServices services, IPriceLogServices priceServices)
 {
     _services      = services;
     _priceServices = priceServices;
 }
예제 #3
0
 //Constructor
 public PriceLogController(IPriceLogServices servicioPrecios)
 {
     _priceServices = servicioPrecios;
 }