public void UpdateProduct(int productId, string title, double price, string redirectUrl, int catId, int brandId, string detail, bool status, bool slideStatus , bool specialStatus, bool newItemStatus, bool freeShippingStatus) { ProductEntity product = new ProductEntity(productId); product.Title = title; product.Price = price; product.RedirectUrl = redirectUrl; product.CategoryId = catId; product.BrandId = brandId; product.DetailDescription = detail; product.Status = status; product.IsSliderProduct = slideStatus; product.IsSpeacialProduct = specialStatus; product.IsNewItem = newItemStatus; product.IsFreeShipping = freeShippingStatus; product.Save(); }
public ProductEntity AddProduct(string title, double price, string redirectUrl, int catId, int brandId, string detail, bool newItemStatus, bool freeShippingStatus, int storeId) { ProductEntity product = new ProductEntity(); product.Title = title; product.Price = price; product.CategoryId = catId; product.BrandId = brandId; product.DetailDescription = detail; product.Status = false; product.StoreId = storeId; product.IsNewItem = newItemStatus; product.IsSliderProduct = false; product.IsSpeacialProduct = false; product.IsFreeShipping = freeShippingStatus; product.AddedDate = DateTime.Now; product.RedirectUrl = redirectUrl; product.Save(); return(product); }