public ActionResult ManagePromoImages(int PromoSliderId = 0) { PromoImageRecord image = new PromoImageRecord(); image.PromoSliderId = PromoSliderId; return(View(image)); }
public ActionResult DeletePromoImage(int PromoImageId) { PromoImageRecord image = _imageRepo.GetById(PromoImageId); _imageRepo.Delete(image); return(new NullJsonResult()); }
public ActionResult CreatePromoImage(PromoImageRecord image) { image.FilePath = _pictureService.GetPictureUrl(image.PromoImageId); var slider = _sliderRepo.GetById(image.PromoSliderId); slider.Images.Add(image); _sliderRepo.Update(slider); SuccessNotification("Image Added!", false); return(new NullJsonResult()); }
public ActionResult UpdatePromoImage(PromoImageRecord imageUpdate) { PromoImageRecord image = _imageRepo.GetById(imageUpdate.PromoImageId); image.Caption = imageUpdate.Caption; image.Url = imageUpdate.Url; image.DisplayOrder = imageUpdate.DisplayOrder; _imageRepo.Update(image); return(new NullJsonResult()); }