Пример #1
0
 public HomeController(IUserService _IUserService, ITemplateService _ITemplateService, ITemplateCategoryService _ITemplateCategoryService, ICarouselService _ICarouselService)
 {
     this.IUserService             = _IUserService;
     this.ITemplateService         = _ITemplateService;
     this.ITemplateCategoryService = _ITemplateCategoryService;
     this.ICarouselService         = _ICarouselService;
 }
Пример #2
0
 public WidgetsController(IFriendLinkService friendLinkService,
                          ISocialNetworkService socialNetworkService,
                          ITestimonialService testimonialService,
                          ICarouselService carouselService)
 {
     _friendLinkService    = friendLinkService;
     _socialNetworkService = socialNetworkService;
     _testimonialService   = testimonialService;
     _carouselService      = carouselService;
 }
Пример #3
0
 public HomeController(INewsService newsService, IEventService eventService,
                       IPageService pageService, ICampusService campusService,
                       ICarouselService carouselService, IReviewService reviewService, IFormService formService)
 {
     _newsService     = newsService;
     _eventService    = eventService;
     _pageService     = pageService;
     _campusService   = campusService;
     _carouselService = carouselService;
     _reviewService   = reviewService;
     _formService     = formService;
 }
Пример #4
0
 public HomeController(IUnitOfWork unitOfWork, IContentService contentService,
                       ICommentService commentService,
                       ICarouselService carouselService, IUserService userService, IPollService pollService,
                       IFileService fileService,
                       IWebHelper webHelper)
 {
     _unitOfWork      = unitOfWork;
     _contentService  = contentService;
     _commentService  = commentService;
     _carouselService = carouselService;
     _userService     = userService;
     _pollService     = pollService;
     _fileService     = fileService;
     _webHelper       = webHelper;
 }
Пример #5
0
        private string PostSlideForm(Form form, long tenantId, long pageId, long elementId)
        {
            // Get carousel slide details
            long          carouselSlideId = Convert.ToInt64(form.Data);
            string        uploadIds       = ((UploadField)form.Fields["upload"]).Value;
            string        pageValue       = ((SelectListField <string>)form.Fields["page"]).Value;
            CarouselSlide slide           = new CarouselSlide
            {
                TenantId        = tenantId,
                ElementId       = elementId,
                CarouselSlideId = carouselSlideId,
                Name            = ((TextField)form.Fields["name"]).Value,
                Description     = ((MultiLineTextField)form.Fields["description"]).Value,
                PageText        = ((TextField)form.Fields["pageText"]).Value,
                PageId          = pageValue == string.Empty ? null : (long?)Convert.ToInt64(pageValue),
                PageTenantId    = pageValue == string.Empty ? null : (long?)tenantId
            };

            if (!string.IsNullOrWhiteSpace(uploadIds))
            {
                string[] uploadParts = uploadIds.Split('|');
                slide.ImageTenantId          = tenantId;
                slide.ThumbnailImageUploadId = Convert.ToInt64(uploadParts[0]);
                slide.PreviewImageUploadId   = Convert.ToInt64(uploadParts[1]);
                slide.ImageUploadId          = Convert.ToInt64(uploadParts[2]);
            }

            // Validate supplied data
            _carouselValidator.ValidateSlide(slide);

            // Determine whether or not there are uncommitted slide images
            bool uncommittedSlideImages = true;

            if (carouselSlideId > 0)
            {
                ICarouselService carouselService = (ICarouselService)_elementFactory.GetElementService(FormId);
                CarouselSlide    currentSlide    = carouselService.ReadSlide(tenantId, elementId, carouselSlideId);
                uncommittedSlideImages = currentSlide.ImageUploadId != slide.ImageUploadId;
            }

            // Get slide view model and return it's JSON representation as form result status
            CarouselSlideViewModel slideViewModel = GetSlideViewModel(slide, uncommittedSlideImages);

            return(JsonConvert.SerializeObject(slideViewModel));
        }
Пример #6
0
 public EditModel(ICarouselService carouselService,
                  ILogger <EditModel> logger)
 {
     _carouselService = carouselService;
     _logger          = logger;
 }
Пример #7
0
 public CreateModel(ICarouselService carouselService,
                    ILogger <CreateModel> logger)
 {
     _carouselService = carouselService;
     _logger          = logger;
 }
Пример #8
0
 public CarouselController(ICarouselService carouselService, IHostingEnvironment hostingEnvironment, IStatusService statusService)
 {
     _carouselService    = carouselService;
     _hostingEnvironment = hostingEnvironment;
     _statusService      = statusService;
 }
Пример #9
0
        public AdminController(ICarouselService carouselService)
        {
            _carouselService = carouselService;

            Logger = NullLogger.Instance;
        }
Пример #10
0
 public IndexModel(ICarouselService carouselService, ILogger <IndexModel> logger)
 {
     _carouselService = carouselService;
     _logger          = logger;
 }
Пример #11
0
        private HomeController GetHomeController(ICarouselService carouselService = null)
        {
            carouselService ??= new FakeCarouselService();

            return(new HomeController(null, carouselService));
        }
Пример #12
0
 public CarouselController(ICarouselService newsService)
 {
     this.service = newsService;
 }
Пример #13
0
        /// <summary>
        /// Show constructor
        /// </summary>
        /// <param name="showService"></param>
        /// <param name="userScheduleService"></param>
        /// <param name="carouselService"></param>

        public ShowController(IShowService showService, IUserScheduleService userScheduleService, ICarouselService carouselService)
        {
            _showService          = showService;
            _userSchedulerService = userScheduleService;
            _carouselService      = carouselService;
        }
Пример #14
0
 public IndexModel(ICarouselService carouselService)
 {
     _carouselService = carouselService;
 }
Пример #15
0
 public CarouselController(ICarouselService _ICarouselService)
 {
     this.ICarouselService = _ICarouselService;
 }
Пример #16
0
 public CarouselsController(IUnitOfWork unitOfWork, ICarouselService carouselService)
 {
     _unitOfWork      = unitOfWork;
     _carouselService = carouselService;
 }
Пример #17
0
 // step 1: add constructor
 public DeleteModel(ICarouselService carouselService, ILogger <DeleteModel> logger)
 {
     // step 2: inject iCarouselService
     _carouselService = carouselService;
     _logger          = logger;
 }
Пример #18
0
 public CarouselsController(ICarouselService carouselService)
 {
     _carouselService = carouselService;
 }
Пример #19
0
 public HomeController(ILogger <HomeController> logger, ICarouselService carouselService)
 {
     _logger          = logger;
     _carouselService = carouselService;
 }
Пример #20
0
 public DeleteModel(ICarouselService carouselService, ILogger <DeleteModel> logger)
 {
     _carouselService = carouselService;
     _logger          = logger;
 }
Пример #21
0
 /// <summary>
 /// User Schedule Constructor
 /// </summary>
 /// <param name="userScheduleService"></param>
 /// <param name="carouselService"></param>
 public UserScheduleController(IUserScheduleService userScheduleService, ICarouselService carouselService)
 {
     _userSchedulerService = userScheduleService;
     _carouselService      = carouselService;
 }