Пример #1
0
 public AdminManageController(IAskQestionRepository repo, IOrderSiteRepository rep, IFeedbackRepository re, IGalleryRepository galleryRe)
 {
     askQuestionrepository = repo;
     orderSiteRepository   = rep;
     feedbackRepository    = re;
     galleryRepository     = galleryRe;
 }
Пример #2
0
 public MustOwnImageHandler(IHttpContextAccessor httpContextAccessor, IGalleryRepository galleryRepository)
 {
     _httpContextAccessor = httpContextAccessor ??
                            throw new ArgumentNullException(nameof(httpContextAccessor));
     _galleryRepository = galleryRepository ??
                          throw new ArgumentNullException(nameof(galleryRepository));
 }
Пример #3
0
        public void SaveImages(IGalleryRepository gRep)
        {
            if (Images != null)
            {
                try
                {
                    string newPath = "~/Uploads/Images/Galleries/" + Uid + "/";
                    newPath = HttpContext.Current.Request.MapPath(newPath);
                    string oldPath = "~/Uploads/Images/Temp/";
                    oldPath = HttpContext.Current.Request.MapPath(oldPath);
                    if (!Directory.Exists(newPath))
                    {
                        Directory.CreateDirectory(newPath);
                    }


                    foreach (var image in Images)
                    {
                        if (image.Id == 0)
                        {
                            File.Move(oldPath + image.Image, newPath + image.Image);
                            File.Move(oldPath + image.Thumbnail, newPath + image.Thumbnail);
                            image.Id = gRep.InsertGalleryImage(image.BuildInterface(this.Id)).GalleryImageId;
                        }
                    }
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }
        }
Пример #4
0
 public HomeController(IAskQestionRepository askQuestionRepo, IOrderSiteRepository orderSiteRepo, IFeedbackRepository feedbackRepo, IGalleryRepository galleryRepo)
 {
     askQuestionrepository = askQuestionRepo;
     orderSiteRepository   = orderSiteRepo;
     feedbackRepository    = feedbackRepo;
     galleryRepository     = galleryRepo;
 }
Пример #5
0
 public HomeController(IAccountRepository accountRepository, ISnapshotRepository snapshotRepository, IArticleRepository articleRepository, IGalleryRepository galleryRepository)
 {
     _accountRepository  = accountRepository;
     _snapshotRepository = snapshotRepository;
     _articleRepository  = articleRepository;
     _galleryRepository  = galleryRepository;
 }
Пример #6
0
 public MustOwnImageHandler(
     IHttpContextAccessor httpContextAccessor,
     IGalleryRepository galleryRepository)
 {
     _httpContextAccessor = httpContextAccessor;
     _galleryRepository   = galleryRepository;
 }
Пример #7
0
 public ServicesController(AppDbContext appDbContext, IGalleryRepository photosRepository, IFlickrRepository photosetAlbums, IConfiguration config)
 {
     _config           = config;
     _photosRepository = photosRepository;
     _photosetAlbums   = photosetAlbums;
     _appDbContext     = appDbContext;
 }
Пример #8
0
 public AlbumController(IEventLogRepository logger,
                        IPhotoRepository photoRepository,
                        IGalleryRepository gallery,
                        IHostingEnvironment hosting)
 {
     _logger  = logger;
     _gallery = gallery;
 }
 public GalleriesController()
 {
     _accountRepo       = new AccountRepository(new AccountManageService(), new MailingService());
     _fileUploadService = new FileUploadService(new FileSecurityValidator());
     _galleryRepo       = new GalleryRepository(new FileSecurityValidator(), _fileUploadService);
     _categoryRepo      = new ContentCategoryRepository(new ContentCategoryManageService());
     _signedUser        = new Account();
 }
 public ManageProfileController(IGalleryRepository repository, UserManager <ApplicationUser> userManager, IConfiguration configuration)
 {
     _userManager          = userManager;
     _repository           = repository;
     _storageAccountName   = configuration["StorageAccountSettings:StorageAccountName"];
     _storageAccountKey    = configuration["StorageAccountSettings:StorageAccountKey1"];
     _storageContainerName = configuration["StorageAccountSettings:ResourceGroup"];
 }
 public UnitOfWork(ApplicationDbContext context)
 {
     this._context = context;
     Programmes    = new ProgrammeRepository(context);
     UsefulLinks   = new UsefulLinkRepository(context);
     NewsArticles  = new NewsArticleRepository(context);
     Gallerys      = new GalleryRepository(context);
 }
Пример #12
0
 public ImagesController(IGalleryRepository galleryRepository,
                         IHostingEnvironment hostingEnvironment, IMapper mapper, IConfiguration configuration)
 {
     _galleryRepository  = galleryRepository;
     _hostingEnvironment = hostingEnvironment;
     _mapper             = mapper;
     _configuration      = configuration;
 }
Пример #13
0
 public BlogController(IBlogRepository _blogRepository, ICategoryRepository _categoryRepository, IGalleryRepository _galleryRepository, ISettingRepository _settingRepository, IEmailRegRepository _emailRegRepository)
 {
     blogRepository     = _blogRepository;
     categoryRepository = _categoryRepository;
     galleryRepository  = _galleryRepository;
     settingRepository  = _settingRepository;
     emailRegRepository = _emailRegRepository;
 }
Пример #14
0
 public ListController(IConfigRepository configRepository, ISecurityRepository secutiryRepository,
                       ILookupRepository lookupRepository, IArticleRepository articleRepository, IGalleryRepository galleryRepsitory)
 {
     _configRepository  = configRepository;
     _secutiryReposiory = secutiryRepository;
     _lookupRepository  = lookupRepository;
     _articleRepository = articleRepository;
     _galleryRepsitory  = galleryRepsitory;
 }
Пример #15
0
 public UserProfileDetailsController(IGalleryRepository repository, UserManager <ApplicationUser> userManager, IHostingEnvironment hostingEnvironment, IConfiguration configuration)
 {
     _userManager          = userManager;
     _repository           = repository;
     _hostingEnvironment   = hostingEnvironment;
     _storageAccountName   = configuration["StorageAccountSettings:StorageAccountName"];
     _storageAccountKey    = configuration["StorageAccountSettings:StorageAccountKey1"];
     _storageContainerName = configuration["StorageAccountSettings:ResourceGroup"];
 }
Пример #16
0
 public ApplicationUserProfilesController(
     IGalleryRepository galleryRepository,
     IMapper mapper)
 {
     _galleryRepository = galleryRepository ??
                          throw new ArgumentNullException(nameof(galleryRepository));
     _mapper = mapper ??
               throw new ArgumentNullException(nameof(mapper));
 }
Пример #17
0
 public GalleryController(IGalleryRepository galleryRepo, ITechniqueRepository techniqueRepo, UserManager <User> userManager,
                          IEmailConfiguration emailConfiguration, IEmailService emailService, ITextAssetsRepository textRepository)
 {
     _galleryRepo        = galleryRepo;
     _techniqueRepo      = techniqueRepo;
     _emailConfiguration = emailConfiguration;
     _emailService       = emailService;
     _textRepository     = textRepository;
     _userManager        = userManager;
 }
Пример #18
0
 public GalleryEditorController(IOptions <StorageSettings> storageSettings, IGalleryRepository repo,
                                ITextAssetsRepository textRepo, ITechniqueRepository techniqueRepo)
 {
     _galleryRepo     = repo;
     _techniqueRepo   = techniqueRepo;
     _storageSettings = storageSettings;
     _textRepo        = textRepo;
     _storageFacade   = new StorageFacade(storageSettings);
     _factory         = new ArtPieceFactory(_galleryRepo, _textRepo, _techniqueRepo);
 }
Пример #19
0
 public Repositories(string blogConnectionString)
 {
     this.ArticlesRepository          = new ArticlesRepository(blogConnectionString);
     this.FilesRepository             = new FilesRepository(blogConnectionString);
     this.CategoriesRepository        = new CategoriesRepository(blogConnectionString);
     this.ArticleRolesRepository      = new ArticleRolesRepository(blogConnectionString);
     this.ArticleCategoriesRepository = new ArticleCategoriesRepository(blogConnectionString);
     this.ImagesRepository            = new ImagesRepository(blogConnectionString);
     this.GalleryRepository           = new GalleryRepository(blogConnectionString);
 }
Пример #20
0
 public PostController(IPostRepository postRepository, IUserRepository userRepository, ICategoryRepository categoryRepository,
                       ITagRepository tagRepository, IPostGalleryRepository postGalleryRepository, IGalleryRepository galleryRepository)
 {
     _postRepository        = postRepository;
     _userRepository        = userRepository;
     _categoryRepository    = categoryRepository;
     _tagRepository         = tagRepository;
     _postGalleryRepository = postGalleryRepository;
     _galleryRepository     = galleryRepository;
 }
Пример #21
0
 public AdminDataController(ICalendarRepository calendar, AppDbContext appDbContext, IFlickrRepository photosetAlbums, IPieDetailRepository pieDetailRepository, ICategoryRepository categoryRepository, IPieRepository pieRepository, IGalleryRepository galleryRepository)
 {
     _galleryRepository   = galleryRepository;
     _pieDetailRepository = pieDetailRepository;
     _categoryRepository  = categoryRepository;
     _pieRepository       = pieRepository;
     _appDbContext        = appDbContext;
     _photosetAlbums      = photosetAlbums;
     _calendar            = calendar;
 }
Пример #22
0
 public PhotoController(IEventLogRepository logger,
                        IPhotoRepository photos,
                        IGalleryRepository gallery,
                        IHostingEnvironment hosting)
 {
     _logger     = logger;
     _hostingEnv = hosting;
     _photos     = photos;
     _gallery    = gallery;
     Path.Combine("photos");
 }
Пример #23
0
 public HomeController(IUserRepository userRepository, IPostRepository postRepository
                       , ICategoryRepository categoryRepository, ITagRepository tagRepository
                       , ICommentRepository commentRepository, IGalleryRepository galleryRepository)
 {
     _userRepository     = userRepository;
     _postRepository     = postRepository;
     _categoryRepository = categoryRepository;
     _tagRepository      = tagRepository;
     _commentRepository  = commentRepository;
     _galleryRepository  = galleryRepository;
 }
Пример #24
0
 public EMIController(IEventRepository eventRepo, ITestimonyRepository testimonyRepo, IGalleryRepository galleryRepo, IMapper mapper,
                      IEmailService emailService, IVolunteerRepository volRepo, ISubscriptionRepository subRepo)
 {
     this.eventRepo     = eventRepo;
     this.testimonyRepo = testimonyRepo;
     this.galleryRepo   = galleryRepo;
     this.mapper        = mapper;
     this.emailService  = emailService;
     this.volRepo       = volRepo;
     _subRepo           = subRepo;
 }
Пример #25
0
 public GalleryApiController(
     ILog log,
     IServices services,
     IRetrievers retrievers,
     IRepositories repositories)
     : base(log)
 {
     this.galleryService    = services.GalleryService;
     this.galleryRetriever  = retrievers.GalleryRetriever;
     this.galleryRepository = repositories.GalleryRepository;
 }
 public ImagesController(
     IGalleryRepository galleryRepository,
     IWebHostEnvironment hostingEnvironment,
     IMapper mapper)
 {
     _galleryRepository = galleryRepository ??
                          throw new ArgumentNullException(nameof(galleryRepository));
     _hostingEnvironment = hostingEnvironment ??
                           throw new ArgumentNullException(nameof(hostingEnvironment));
     _mapper = mapper ??
               throw new ArgumentNullException(nameof(mapper));
 }
Пример #27
0
        public static List <SelectListItem> GetGalleries(IGalleryRepository rep)
        {
            var galleryList = new List <SelectListItem>();
            var galleries   = rep.FetchGalleries().Select(g => new Gallery(g)).ToList();

            galleries.ForEach(g => galleryList.Add(new SelectListItem
            {
                Text  = g.GalleryId.ToString() + "-" + g.Title,
                Value = g.GalleryId.ToString()
            }));
            return(galleryList);
        }
Пример #28
0
        public GalleryRetriever_Tests()
        {
            IRetrievers retrievers = DependencyResolver.Resolve <IRetrievers>();

            this.galleryRetriever = retrievers.GalleryRetriever;

            IRepositories repositories = DependencyResolver.Resolve <IRepositories>();

            this.galleryRepository = repositories.GalleryRepository;
            this.imagesRepository  = repositories.ImagesRepository;
            this.filesRepository   = repositories.FilesRepository;
        }
Пример #29
0
 public AdminController(ICalendarRepository calendar, IShoppingCartRepository cart, IGalleryRepository galleryRepository, IFlickrRepository flickrRepository, IMapper mapper, AppDbContext appDbContext, IPieDetailRepository pieDetailRepository, ICategoryRepository categoryRepository, IPieRepository pieRepository)
 {
     _calendar            = calendar;
     _cart                = cart;
     _galleryRepository   = galleryRepository;
     _flickrRepository    = flickrRepository;
     _pieDetailRepository = pieDetailRepository;
     _categoryRepository  = categoryRepository;
     _pieRepository       = pieRepository;
     _appDbContext        = appDbContext;
     _mapper              = mapper;
 }
Пример #30
0
 public OrderService(IOrderRepository orderRepository, IDeliveryRepository deliveryRepository, IPaymentRepository paymentRepository, IBrandRepository brandRepository, IClockTypeRepository clockTypeRepository, IUserRepository userRepository, IOrderClockPhotoRepository orderClockPhotoRepository, IGalleryRepository galleryRepository, IGalleryPhotoRepository galleryPhotoRepository)
 {
     _orderRepository           = orderRepository;
     _deliveryRepository        = deliveryRepository;
     _paymentRepository         = paymentRepository;
     _brandRepository           = brandRepository;
     _clockTypeRepository       = clockTypeRepository;
     _userRepository            = userRepository;
     _orderClockPhotoRepository = orderClockPhotoRepository;
     _galleryRepository         = galleryRepository;
     _galleryPhotoRepository    = galleryPhotoRepository;
 }
Пример #31
0
 protected BaseController(IControllerData data)
 {
     this.accountRepository = data.AccountRepository;
     this.formsAuthentication = data.FormsAuthentication;
     this.articlesRepository = data.ArticlesRepository;
     this.staticPagesRepository = data.StaticPagesRepository;
     this.filesRepository = data.FilesRepository;
     this.lecturersRepository = data.LecturersRepository;
     this.eventsRepository = data.EventsRepository;
     this.settingsRepository = data.SettingsRepository;
     this.committeeRepository = data.CommitteeRepository;
     this.slideshowRepository = data.SlideshowRepository;
     this.albumRepository = data.AlbumRepository;
     this.galleryRepository = data.GalleryRepository;
     this.feedbackRepository = data.FeedbackRepository;
     this.sessionsRepository = data.SessionsRepository;
     this.bannersRepository = data.BannersRepository;
 }
Пример #32
0
 public ControllerData(IFormsAuthentication formsAuthentication, IAccountRepository accountRepository, IArticlesRepository articlesRepository,
     IStaticPagesRepository staticPagesRepository, IFilesRepository filesRepository, ILecturersRepository lecturersRepository,
     IEventsRepository eventsRepository, ISettingsRepository settingsRepository, ICommitteeRepository committeeRepository,
     ISlideshowRepository slideshowRepository, IAlbumRepository albumRepository, IGalleryRepository galleryRepository,
     IFeedbackRepository feedbackRepository, ISessionsRepository sessionsRepository, IBannersRepository bannersRepository)
 {
     this.FormsAuthentication = formsAuthentication;
     this.AccountRepository = accountRepository;
     this.ArticlesRepository = articlesRepository;
     this.StaticPagesRepository = staticPagesRepository;
     this.FilesRepository = filesRepository;
     this.LecturersRepository = lecturersRepository;
     this.EventsRepository = eventsRepository;
     this.SettingsRepository = settingsRepository;
     this.CommitteeRepository = committeeRepository;
     this.SlideshowRepository = slideshowRepository;
     this.AlbumRepository = albumRepository;
     this.GalleryRepository = galleryRepository;
     this.FeedbackRepository = feedbackRepository;
     this.SessionsRepository = sessionsRepository;
     this.BannersRepository = bannersRepository;
 }
 public GalleryService(IGalleryRepository galleryRepository, IUnitOfWork unitOfWork)
 {
     this._galleryRepository = galleryRepository;
     this._unitOfWork = unitOfWork;
 }
		public GalleryController(IGalleryRepository repo, ILogger logger)
		{
			db = repo;
			this.logger = logger;
		}
 public GalleryController()
 {
     _galleryRepository = new GalleryRepository(UnitOfWork);
 }
 public GalleryController(IUnitOfWork unitOfWork, IGalleryRepository galleryRepository)
     : base(unitOfWork)
 {
     _galleryRepository = galleryRepository;
 }
Пример #37
0
 public GalleryController(IGalleryRepository m_GalleryRepository, IImageRepository m_ImageRepository)
 {
     GalleryRepository = m_GalleryRepository;
     ImageRepository = m_ImageRepository;
 }
Пример #38
0
 public HomeController(IGalleryRepository rep)
 {
     repository = rep;
 }
		public GalleryController(IGalleryRepository repo)
		{
			this.db = repo;
		}