Exemplo n.º 1
0
 public HomeController(IUserService _IUserService, ITemplateService _ITemplateService, ITemplateCategoryService _ITemplateCategoryService, ICarouselService _ICarouselService)
 {
     this.IUserService             = _IUserService;
     this.ITemplateService         = _ITemplateService;
     this.ITemplateCategoryService = _ITemplateCategoryService;
     this.ICarouselService         = _ICarouselService;
 }
Exemplo n.º 2
0
 public WidgetsController(IFriendLinkService friendLinkService,
                          ISocialNetworkService socialNetworkService,
                          ITestimonialService testimonialService,
                          ICarouselService carouselService)
 {
     _friendLinkService    = friendLinkService;
     _socialNetworkService = socialNetworkService;
     _testimonialService   = testimonialService;
     _carouselService      = carouselService;
 }
Exemplo n.º 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;
 }
Exemplo n.º 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;
 }
Exemplo n.º 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));
        }
Exemplo n.º 6
0
 public EditModel(ICarouselService carouselService,
                  ILogger <EditModel> logger)
 {
     _carouselService = carouselService;
     _logger          = logger;
 }
Exemplo n.º 7
0
 public CreateModel(ICarouselService carouselService,
                    ILogger <CreateModel> logger)
 {
     _carouselService = carouselService;
     _logger          = logger;
 }
Exemplo n.º 8
0
 public CarouselController(ICarouselService carouselService, IHostingEnvironment hostingEnvironment, IStatusService statusService)
 {
     _carouselService    = carouselService;
     _hostingEnvironment = hostingEnvironment;
     _statusService      = statusService;
 }
Exemplo n.º 9
0
        public AdminController(ICarouselService carouselService)
        {
            _carouselService = carouselService;

            Logger = NullLogger.Instance;
        }
Exemplo n.º 10
0
 public IndexModel(ICarouselService carouselService, ILogger <IndexModel> logger)
 {
     _carouselService = carouselService;
     _logger          = logger;
 }
Exemplo n.º 11
0
        private HomeController GetHomeController(ICarouselService carouselService = null)
        {
            carouselService ??= new FakeCarouselService();

            return(new HomeController(null, carouselService));
        }
Exemplo n.º 12
0
 public CarouselController(ICarouselService newsService)
 {
     this.service = newsService;
 }
Exemplo n.º 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;
        }
Exemplo n.º 14
0
 public IndexModel(ICarouselService carouselService)
 {
     _carouselService = carouselService;
 }
Exemplo n.º 15
0
 public CarouselController(ICarouselService _ICarouselService)
 {
     this.ICarouselService = _ICarouselService;
 }
Exemplo n.º 16
0
 public CarouselsController(IUnitOfWork unitOfWork, ICarouselService carouselService)
 {
     _unitOfWork      = unitOfWork;
     _carouselService = carouselService;
 }
Exemplo n.º 17
0
 // step 1: add constructor
 public DeleteModel(ICarouselService carouselService, ILogger <DeleteModel> logger)
 {
     // step 2: inject iCarouselService
     _carouselService = carouselService;
     _logger          = logger;
 }
Exemplo n.º 18
0
 public CarouselsController(ICarouselService carouselService)
 {
     _carouselService = carouselService;
 }
Exemplo n.º 19
0
 public HomeController(ILogger <HomeController> logger, ICarouselService carouselService)
 {
     _logger          = logger;
     _carouselService = carouselService;
 }
Exemplo n.º 20
0
 public DeleteModel(ICarouselService carouselService, ILogger <DeleteModel> logger)
 {
     _carouselService = carouselService;
     _logger          = logger;
 }
Exemplo n.º 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;
 }