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)); }
public ProductController(IProductServices services, IPriceLogServices priceServices) { _services = services; _priceServices = priceServices; }
//Constructor public PriceLogController(IPriceLogServices servicioPrecios) { _priceServices = servicioPrecios; }