Exemplo n.º 1
0
        public bool UpdateProduct(uint id, uint number, string name, string description, string code, string cost, string price, string priceW, string image = "")
        {
            bool    Success = true;
            float   fCost   = parseFloat(cost);
            float   fPrice  = parseFloat(price);
            float   fPriceW = parseFloat(priceW);
            Product product = new Product(number, code, name, description, fCost, fPrice, fPriceW, image);

            product.Id = id;

            try
            {
                ProductsProvider.UpdateProduct(product);
            }
            catch
            {
                Success = false;
            }

            return(Success);
        }