/// <summary>
        /// Images
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public ActionResult Images(int Id)
        {
            if (!SavePermissionsToViewBag(FeatureEnum.ImageGallery))
                return Redirect("~/home/unauthorized");

            ImageGalleryModel imageGalleryModel = new ImageGalleryModel();
            imageGalleryModel.ImageGalleryId = Id;
            if (Request.IsAjaxRequest())
                return PartialView(imageGalleryModel);
            else
                return View(imageGalleryModel);
        }
Exemple #2
0
 /// <summary>
 /// GetImageGallery
 /// </summary>
 /// <param name="imageGalleryId"></param>
 /// <returns></returns>
 public ImageGalleryModel GetImageGallery(int imageGalleryId)
 {
     ImageGalleryModel ImageGalleryResult = new ImageGalleryModel();
     ServiceResponse<ImageGalleryDC> imageGalleryResponse = _contentProxy.Execute(opt => opt.GetImageGallery(imageGalleryId));
     if (imageGalleryResponse.Status == ResponseStatus.Success)
     {
         ImageGalleryResult = Mapper.Map<ImageGalleryDC, ImageGalleryModel>(imageGalleryResponse.Result);
     }
     else
     {
         HandleError(imageGalleryResponse.Status, imageGalleryResponse.ResponseMessage);
     }
     return ImageGalleryResult;
 }
Exemple #3
0
 /// <summary>
 /// SaveImageGallery
 /// </summary>
 /// <param name="imageGallery"></param>
 public void SaveImageGallery(ImageGalleryModel imageGallery)
 {
     ImageGalleryDC imageGalleryDC = Mapper.Map<ImageGalleryModel, ImageGalleryDC>(imageGallery);
     ServiceResponse<int> saveImageGalleryResponse = _contentProxy.Execute(opt => opt.SaveImageGallery(imageGalleryDC));
     if (saveImageGalleryResponse.Status != ResponseStatus.Success)
         HandleError(saveImageGalleryResponse.Status, saveImageGalleryResponse.ResponseMessage);
     else
         imageGallery.ImageGalleryId = saveImageGalleryResponse.Result;
 }
 public HttpResponseMessage SaveImageGallery(ImageGalleryModel imageGalleryModel, int siteId)
 {
     ContentClientProcessor.UserContext.SiteId = siteId;
     ContentClientProcessor.SaveImageGallery(imageGalleryModel);
     return Request.CreateResponse(HttpStatusCode.OK, new { Message = CoreMessages.SavedSuccessfully, Id = imageGalleryModel.ImageGalleryId });
 }