public virtual void DeleteGoogleProduct(GoogleProductRecord googleProductRecord) { if (googleProductRecord == null) throw new ArgumentNullException("googleProductRecord"); _gpRepository.Delete(googleProductRecord); }
public virtual void InsertGoogleProductRecord(GoogleProductRecord googleProductRecord) { if (googleProductRecord == null) throw new ArgumentNullException("googleProductRecord"); _gpRepository.Insert(googleProductRecord); }
public ActionResult GoogleProductUpdate(GridCommand command, FeedFroogleModel.GoogleProductModel model) { if (!_permissionService.Authorize(StandardPermissionProvider.ManagePlugins)) return Content("Access denied"); var googleProduct = _googleService.GetByProductVariantId(model.ProductVariantId); if (googleProduct != null) { googleProduct.Taxonomy = model.GoogleCategory; googleProduct.Gender = model.Gender; googleProduct.AgeGroup = model.AgeGroup; googleProduct.Color = model.Color; googleProduct.Size = model.GoogleSize; _googleService.UpdateGoogleProductRecord(googleProduct); } else { //insert googleProduct = new GoogleProductRecord() { ProductVariantId = model.ProductVariantId, Taxonomy = model.GoogleCategory, Gender = model.Gender, AgeGroup = model.AgeGroup, Color = model.Color, Size = model.GoogleSize }; _googleService.InsertGoogleProductRecord(googleProduct); } return GoogleProductList(command); }