Esempio n. 1
0
        public void ModifyProduct(int productId, int categoryId,
                                   string name, string description,
                                   string imageName, string thumbnailName,
                                   double price, DateTime? placementDate)
        {
            Product tmpProduct = new Product()
            {
                ProductId = productId,
                CategoryId = categoryId,
                Name = name,
                Description = description,
                ImageName = imageName,
                ThumbnailName = thumbnailName,
                Price = price,
                PlacementDate = placementDate
            };

            _productDataProvider.Modify(tmpProduct);
        }
Esempio n. 2
0
 public void AddProduct(int productId, int categoryId, 
                        string name, string description,
                        string imageName, string thumbnailName,
                        double price, DateTime? placementDate)
 { 
     //TODO: modify AddProduct method and ModifyProduct make one method remove code duplication
     Product tmpProduct = new Product()
     {
         ProductId = (productId++),
         CategoryId = categoryId,
         Name = name,
         Description = description,
         ImageName = imageName,
         ThumbnailName = thumbnailName,
         Price = price,
         PlacementDate = placementDate
     };
     
     _productDataProvider.Add(tmpProduct);
 }