Пример #1
0
        public ActionResult ManagePromoImages(int PromoSliderId = 0)
        {
            PromoImageRecord image = new PromoImageRecord();

            image.PromoSliderId = PromoSliderId;
            return(View(image));
        }
Пример #2
0
        public ActionResult DeletePromoImage(int PromoImageId)
        {
            PromoImageRecord image = _imageRepo.GetById(PromoImageId);

            _imageRepo.Delete(image);

            return(new NullJsonResult());
        }
Пример #3
0
        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());
        }
Пример #4
0
        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());
        }