Example #1
0
        public AdvertisementController(ColibriDbContext colibriDbContext,
                                       HostingEnvironment hostingEnvironment,
                                       IStringLocalizer <AdvertisementController> localizer)
        {
            _colibriDbContext   = colibriDbContext;
            _hostingEnvironment = hostingEnvironment;
            _localizer          = localizer;

            // initialize the Constructor for the ProductsController
            ProductsViewModel = new ProductsViewModel()
            {
                CategoryGroups = _colibriDbContext.CategoryGroups.ToList(),
                CategoryTypes  = _colibriDbContext.CategoryTypes.ToList(),
                Products       = new Models.Products()
            };

            // Advertisement ViewModel
            AdvertisementViewModel = new AdvertisementViewModel
            {
                // initialize
                Products = new List <Products>(),
                Users    = new List <ApplicationUser>()
            };

            // ProductsRatingModel
            ProductsRatingViewModel = new ProductsRatingViewModel()
            {
                Products = new List <ProductsRatings>(),
                Product  = new Models.ProductsRatings(),
                Users    = new List <ApplicationUser>()
            };
        }
Example #2
0
        // CTOR: use the ICategoryData Service
        //public HomeController(ICategoryTypesData categoryData, IEmailSender emailSender)
        public HomeController(ColibriDbContext colibriDbContext,
                              HostingEnvironment hostingEnvironment,
                              IStringLocalizer <HomeController> localizer,
                              IEmailSender emailSender)
        {
            // incoming Category Object will be saved into the private Field
            //_categoryData = categoryData;
            _colibriDbContext   = colibriDbContext;
            _hostingEnvironment = hostingEnvironment;
            _localizer          = localizer;
            _emailSender        = emailSender;

            // CTOR initialize
            HomeIndexViewModel = new HomeIndexViewModel
            {
                CategoryGroups = _colibriDbContext.CategoryGroups.ToList(),
                CategoryTypes  = _colibriDbContext.CategoryTypes.ToList(),
                SpecialTags    = _colibriDbContext.SpecialTags.ToList(),
                Users          = _colibriDbContext.ApplicationUsers.ToList()
                                 //Users = new List<ApplicationUser>()
            };

            searchVM = new SearchViewModel()
            {
                Products     = new Models.Products(),
                UserServices = new Models.UserServices(),
                //CategoryTypes = new Models.CategoryTypes()
                CategoryTypesList = _colibriDbContext.CategoryTypes.ToList()
            };
        }
Example #3
0
        // Constructor
        public SearchesController(ColibriDbContext colibriDbContext, IStringLocalizer <SearchesController> localizer)
        {
            _colibriDbContext = colibriDbContext;
            _localizer        = localizer;

            // ViewModel
            UserSearchesViewModel = new UserSearchesViewModel()
            {
                SearchEntry = new Models.SearchEntry(),

                // Standardmässig keine Einschränkung auf Datum
                dateAll    = true,
                date30Days = false,
                dateToday  = false,

                // Standardmässig keine Einschränkung auf Ergebnis
                resAll         = true,
                resSuccess     = false,
                resPartSuccess = false,
                resNoSuccess   = false,

                // Standardmässig keine Einschränkunf auf Angebot oder Nachfrage
                searchAll     = true,
                searchOffer   = false,
                searchRequest = false
            };
        }
Example #4
0
        public ServicesController(ColibriDbContext colibriDbContext,
                                  HostingEnvironment hostingEnvironment,
                                  IStringLocalizer <ServicesController> localizer)
        {
            _colibriDbContext   = colibriDbContext;
            _hostingEnvironment = hostingEnvironment;
            _localizer          = localizer;

            // initialize the Constructor with the UserServicesViewModel
            UserServicesViewModel = new UserServicesViewModel()
            {
                CategoryGroups = _colibriDbContext.CategoryGroups.ToList(),
                CategoryTypes  = _colibriDbContext.CategoryTypes.ToList(),
                UserServices   = new List <UserServices>(),
                Users          = new List <ApplicationUser>()
            };

            // initialize the Constructor with the UserServicesAddToEntityViewModel
            UserServicesAddToEntityViewModel = new UserServicesAddToEntityViewModel()
            {
                CategoryGroups = _colibriDbContext.CategoryGroups.ToList(),
                CategoryTypes  = _colibriDbContext.CategoryTypes.ToList(),
                UserServices   = new Models.UserServices()
            };
        }
Example #5
0
 public AppointmentsController(ColibriDbContext colibriDbContext,
                               IStringLocalizer <AppointmentsController> localizer,
                               ILogger <AppointmentsController> logger)
 {
     _colibriDbContext = colibriDbContext;
     _localizer        = localizer;
     _logger           = logger;
 }
Example #6
0
 public UserSubscribeModel(
     ColibriDbContext colibriDbContext,
     ILogger <RegisterModel> logger,
     IEmailSender emailSender)
 {
     _colibriDbContext = colibriDbContext;
     _logger           = logger;
     _emailSender      = emailSender;
 }
Example #7
0
        // Constructor
        public ArchiveController(ColibriDbContext colibriDbContext, IStringLocalizer <ArchiveController> localizer)
        {
            _colibriDbContext = colibriDbContext;
            _localizer        = localizer;

            // ViewModel
            ArchiveViewModel = new ArchiveViewModel()
            {
                ArchiveEntry = new ArchiveEntry()
            };
        }
Example #8
0
        public ApplicationUserRatingController(ColibriDbContext colibriDbContext,
                                               IStringLocalizer <ApplicationUserRatingController> localizer)
        {
            _colibriDbContext = colibriDbContext;
            _localizer        = localizer;

            ApplicationUserRatingViewModel = new ApplicationUserRatingViewModel()
            {
                ApplicationUsers = new List <ApplicationUserRatings>(),
                ApplicationUser  = new Models.ApplicationUserRatings()
            };
        }
Example #9
0
        public CategoryTypesController(ColibriDbContext colibriDbContext, IStringLocalizer <CategoryTypesController> localizer)
        {
            _colibriDbContext = colibriDbContext;
            _localizer        = localizer;

            // Search ViewModel
            SearchViewModel = new SearchViewModel()
            {
                Products     = new Models.Products(),
                UserServices = new Models.UserServices(),
                PLZ          = new string("")
            };
        }
Example #10
0
        public UserServicesRatingController(ColibriDbContext colibriDbContext,
                                            IStringLocalizer <UserServicesRatingController> localizer)
        {
            _colibriDbContext = colibriDbContext;
            _localizer        = localizer;

            UserServicesRatingViewModel = new UserServicesRatingViewModel()
            {
                UserServices      = new List <UserServicesRatings>(),
                UserServiceRating = new Models.UserServicesRatings(),
                Users             = new List <ApplicationUser>()
            };
        }
Example #11
0
        public ProductsRatingController(ColibriDbContext colibriDbContext,
                                        IStringLocalizer <ProductsRatingController> localizer)
        {
            _colibriDbContext = colibriDbContext;
            _localizer        = localizer;

            ProductsRatingViewModel = new ProductsRatingViewModel()
            {
                Products = new List <ProductsRatings>(),
                Product  = new Models.ProductsRatings(),
                Users    = new List <ApplicationUser>()
            };
        }
Example #12
0
        public AppointmentsController(ColibriDbContext colibriDbContext,
                                      IStringLocalizer <AppointmentsController> localizer,
                                      ILogger <AppointmentsController> logger)
        {
            _colibriDbContext = colibriDbContext;
            _localizer        = localizer;
            _logger           = logger;

            // only if the User is AdminUser -> get ID
            AppointmentViewModel = new AppointmentViewModel
            {
                // initialize
                Appointments = new List <Models.Appointments>()
            };
        }
Example #13
0
        public SchedulingController(ColibriDbContext colibriDbContext,
                                    IEmailSender emailSender,
                                    IStringLocalizer <SchedulingController> localizer)
        {
            _colibriDbContext = colibriDbContext;
            _emailSender      = emailSender;
            _localizer        = localizer;

            // initialize the SchedulingViewModel
            SchedulingViewModel = new SchedulingViewModel()
            {
                Products     = new List <Models.Products>(),
                UserServices = new List <Models.UserServices>()
            };
        }
Example #14
0
        // Constructor
        public SearchOffersController(ColibriDbContext colibriDbContext,
                                      HostingEnvironment hostingEnvironment,
                                      IStringLocalizer <SearchOffersController> localizer)
        {
            _colibriDbContext   = colibriDbContext;
            _hostingEnvironment = hostingEnvironment;
            _localizer          = localizer;

            // Search ViewModel
            SearchViewModel = new SearchViewModel()
            {
                Products     = new Models.Products(),
                UserServices = new Models.UserServices()
            };
        }
Example #15
0
        public SubscriberController(ColibriDbContext colibriDbContext,
                                    IStringLocalizer <SubscriberController> localizer)
        {
            _colibriDbContext = colibriDbContext;
            _localizer        = localizer;

            SubscriberViewModel = new SubscriberViewModel
            {
                //MyMessage = new List<string>()
                //Notifications = new List<Notifications>()

                Notifications = new Notifications(),
                ApplicationUserCategoryTypesSubscriber = new ApplicationUserCategoryTypesSubscriber(),
                NotificationsEnumerable = new List <Notifications>(),
                CategoryTypes           = _colibriDbContext.CategoryTypes.ToList()
            };
        }
Example #16
0
        // Constructor
        public AdvertisementRequestController(ColibriDbContext colibriDbContext,
                                              HostingEnvironment hostingEnvironment,
                                              IStringLocalizer <AdvertisementRequestController> localizer)
        {
            _colibriDbContext   = colibriDbContext;
            _hostingEnvironment = hostingEnvironment;
            _localizer          = localizer;

            // Advertisement ViewModel
            AdvertisementViewModel = new AdvertisementViewModel()
            {
                // initialize
                CategoryGroups = _colibriDbContext.CategoryGroups.ToList(),
                CategoryTypes  = _colibriDbContext.CategoryTypes.ToList(),
                Product        = new Products(),
                UserService    = new UserServices(),
            };
        }
Example #17
0
        // CTOR
        // get the Data from the DB
        public ApplicationUserController(ColibriDbContext colibriDbContext,
                                         HostingEnvironment hostingEnvironment,
                                         IEmailSender emailSender,
                                         IStringLocalizer <ApplicationUserController> localizer)
        {
            _colibriDbContext   = colibriDbContext;
            _hostingEnvironment = hostingEnvironment;
            _emailSender        = emailSender;
            _localizer          = localizer;

            ApplicationUserViewModel = new ApplicationUserViewModel()
            {
                ApplicationUser  = new Models.ApplicationUser(),
                ApplicationUsers = new List <ApplicationUser>()
            };

            ApplicationUserRatingViewModel = new ApplicationUserRatingViewModel()
            {
                ApplicationUsers = new List <ApplicationUserRatings>(),
                ApplicationUser  = new Models.ApplicationUserRatings()
            };
        }
Example #18
0
        // CTOR: use the ICategoryData Service
        //public HomeController(ICategoryTypesData categoryData, IEmailSender emailSender)
        public AdminDashboardController(ColibriDbContext colibriDbContext,
                                        HostingEnvironment hostingEnvironment,
                                        IStringLocalizer <AdvertisementController> localizer,
                                        IEmailSender emailSender)
        {
            // incoming Category Object will be saved into the private Field
            //_categoryData = categoryData;
            _colibriDbContext   = colibriDbContext;
            _hostingEnvironment = hostingEnvironment;
            _localizer          = localizer;
            _emailSender        = emailSender;

            // CTOR initialize
            HomeIndexViewModel = new HomeIndexViewModel
            {
                CategoryGroups = _colibriDbContext.CategoryGroups.ToList(),
                CategoryTypes  = _colibriDbContext.CategoryTypes.ToList(),
                SpecialTags    = _colibriDbContext.SpecialTags.ToList(),
                Users          = _colibriDbContext.ApplicationUsers.ToList()
                                 //Users = new List<ApplicationUser>()
            };
        }
Example #19
0
        public ProductsController(ColibriDbContext colibriDbContext,
                                  HostingEnvironment hostingEnvironment,
                                  IStringLocalizer <ProductsController> localizer)
        {
            _colibriDbContext   = colibriDbContext;
            _hostingEnvironment = hostingEnvironment;
            _localizer          = localizer;

            // initialize the Constructor for the ProductsController
            ProductsViewModel = new ProductsViewModel()
            {
                CategoryGroups = _colibriDbContext.CategoryGroups.ToList(),
                CategoryTypes  = _colibriDbContext.CategoryTypes.ToList(),
                Products       = new Models.Products()
            };

            // extra for the Index View with the Pagination
            ProductsListViewModel = new ProductsListViewModel()
            {
                Products = new List <Products>(),
                Users    = new List <ApplicationUser>()
            };
        }
Example #20
0
 public SpecialTagsController(ColibriDbContext colibriDbContext)
 {
     _colibriDbContext = colibriDbContext;
 }
Example #21
0
 public SqlCategoryTypesData(ColibriDbContext context)
 {
     _context = context;
 }
Example #22
0
 public AdminUsersController(ColibriDbContext colibriDbContext, IStringLocalizer <AdminUsersController> localizer)
 {
     _colibriDbContext = colibriDbContext;
     _localizer        = localizer;
 }
Example #23
0
 //public ProductsHomeController(IColibriRepository repository)
 public ProductsHomeController(ColibriDbContext colibriDbContext, IStringLocalizer <ProductsHomeController> localizer)
 {
     //_repository = repository;
     _colibriDbContext = colibriDbContext;
     _localizer        = localizer;
 }
Example #24
0
 public UserNameViewComponent(ColibriDbContext colibriDbContext)
 {
     _colibriDbContext = colibriDbContext;
 }
Example #25
0
 public UserServicesHomeController(ColibriDbContext colibriDbContext, IStringLocalizer <UserServicesHomeController> localizer)
 {
     //_repository = repository;
     _colibriDbContext = colibriDbContext;
     _localizer        = localizer;
 }
Example #26
0
 public CustomerUsersController(ColibriDbContext colibriDbContext, IStringLocalizer <CustomerUsersController> localizer)
 {
     _colibriDbContext = colibriDbContext;
     _localizer        = localizer;
 }
Example #27
0
 public CategoryGroupsController(ColibriDbContext colibriDbContext, IStringLocalizer <CategoryGroupsController> localizer)
 {
     _colibriDbContext = colibriDbContext;
     _localizer        = localizer;
 }