Beispiel #1
0
        public byte CreateProduct(uint number, string name, string description, string code, string cost, string price, string priceW, int stock, string image)
        {
            byte    success = 0;
            float   fCost   = parseFloat(cost);
            float   fPrice  = parseFloat(price);
            float   fPriceW = parseFloat(priceW);
            Product product = new Product(number, code, name, description, fCost, fPrice, fPriceW, image);

            try
            {
                success = ProductsProvider.InsertProduct(product);
            }
            catch
            {
            }

            return(success);
        }