Exemplo n.º 1
0
 public FirstSetupRepo()
 {
     this.session = HibernateUtil.OpenSession(false);
     this.userRepo = new UserRepository(session);
     this.projectRepo = new ProjectRepository(session);
     this.certificateTypeRepo = new InspectorCertificateTypeRepository(session);
     this.seemTypeRepo = new SeamTypeRepository(session);
     this.permissionRepo = new PermissionRepository(session);
     this.roleRepo = new RoleRepository(session);
     this.categoryRepo = new CategoryRepository(session);
     this.jointOperationRepo = new JointOperationRepository(session);
     this.pipeTestsRepo = new PipeTestRepository(session);
     this.sizeTypeRepo = new MillPipeSizeTypeRepository(session);
     this.plateManRepo = new PlateManufacturerRepository(session);
     this.heatRepo = new HeatRepository(session);
     this.plateRepo = new PlateRepository(session);
     this.purchaseRepo = new PurchaseOrderRepository(session);
     this.railRepo = new RailcarRepository(session);
     this.pipeRepo = new PipeRepository(session);
     this.inspectorRepo = new InspectorRepository(session);
     this.pipeTestResultRepo = new PipeTestResultRepository(session);
     this.welderRepo = new WelderRepository(session);
     componentTypeRepo = new ComponentTypeRepository(session);
     componentRepo = new ComponentRepository(session);
     releaseRepo = new ReleaseNoteRepository(session);
     this.cannedMessageRepo = new CannedMessageRepository(session);
 }
Exemplo n.º 2
0
 public ExpenseController(ICommandBus commandBus, IMappingEngine mapper, ICategoryRepository categoryRepository, IExpenseRepository expenseRepository)
 {
     this.commandBus = commandBus;
     this.mapper = mapper;
     this.categoryRepository = categoryRepository;
     this.expenseRepository = expenseRepository;
 }
Exemplo n.º 3
0
        public AlbumsController(ICategoryRepository categoryRepository, IAlbumRepository albumRepository, ImageRepository imageRepository)
        {
            this.categoryRepository = categoryRepository;
            this.albumRepository = albumRepository;
            this.imageRepository = imageRepository;

        }
Exemplo n.º 4
0
        /// <summary>
        /// Initializes a new instance of the CategoryEditorViewModel class.
        /// </summary>
        public CategoryEditorViewModel(ICategoryRepository categoryRepository)
        {
            CategoryRepository = categoryRepository;
            Categories = new ObservableCollection<Category>(_categoryRepository.FindAll());
            CategoryIds = new List<Guid>();
            NotesToDelete = new List<Guid>();
            NotesToTrash = new List<Guid>();

            NewCategoryCommand = new RelayCommand(NewCategory, () => !OnCategoryUpdate);
            DeleteCategoryCommand = new RelayCommand<object>(DeleteCategory, (noused) => OnCategoryUpdate && Categories.Count > 1);
            DeleteNotesCommand = new RelayCommand<bool?>((mark) => DeleteNotesToo = mark.Value, (noused) => OnCategoryUpdate);
            AcceptCategoryCommand = new RelayCommand(AcceptCategory, () => OnCategoryUpdate && IsValid);
            CategoryBeenSelected = new RelayCommand(() => OnCategoryUpdate = true);
            SelectBgColorCommand = new RelayCommand(SelectBgColor, () => OnCategoryUpdate);
            SelectFontColorCommand = new RelayCommand(SelectFontColor, () => OnCategoryUpdate);
            DefaultCategoryChangedCommand = new RelayCommand<Category>(DefaultCategoryChanged);

            // We register a default message containing a string (See SavingCatOptions) below.
            Messenger.Default.Register<string>(this, SavingCatOptions);

            // Default category
            _defaultCategory = Categories[0]; // The default one is always the first
            if (!_defaultCategory.IsDefault) // first time?
                _defaultCategory.IsDefault = true;
        }
 public HomeController()
 {
   UserRepository = dataProvider.UserRepository;
   EventRepository = dataProvider.EventRepository;
   AuctionRepository = dataProvider.AuctionRepository;
   CategoryRepository = dataProvider.CategoryRepository;
 }
Exemplo n.º 6
0
        /// <summary>
        /// Initializes a new instance of the MainViewModel class.
        /// </summary>
        public MainViewModel(IChapterRepository chapterRepository ,IBookRepository bookRepository, ICategoryRepository categoryRepository)
        {
            _chapterRepository = chapterRepository;
            _bookRepository = bookRepository;
            _categoryRepository = categoryRepository;

            Chapters = new ObservableCollection<Chapter>(_chapterRepository.FindAll());
            Books = new ObservableCollection<Book>(_bookRepository.FindAll());
            Categories = new ObservableCollection<Category>(_categoryRepository.FindAll());

            SelectedBook = new Book();
            SelectedCategory = new Category();
            SelectedChapter = new Chapter();

            //
            Books.Add(new Book(1,"Cánh đồng bất tận", "Nguyễn Ngọc Tư","2011","NXB Tuổi Trẻ",new Media(),new Media()));
            Books.Add(new Book(1, "Sống để kể lại", "Nguyễn Ngọc Tư", "2011", "NXB Tuổi Trẻ", new Media(), new Media()));

            Categories.Add(new Category(1, "Cuộc sống", new Media()));
            Categories.Add(new Category(1, "Tình yêu", new Media()));
            Categories.Add(new Category(1, "Kỹ năng", new Media()));

            Chapters.Add(new Chapter(1, "Giới thiệu sách nói", new Media(), new Media()));
            Chapters.Add(new Chapter(1, "Trở thành biên tập viên ở El Espectador", new Media(), new Media()));
            Chapters.Add(new Chapter(1, "Thử lửa với công việc phóng viên xung kích", new Media(), new Media()));
            Chapters.Add(new Chapter(1, "Công việc viết phê bình điện ảnh", new Media(), new Media()));
        }
Exemplo n.º 7
0
 protected BaseController(
     ICategoryRepository catRepo,
     IManufacturersRepository manufacturersRepository)
 {
     _catRepo = catRepo;
     _manufacturersRepository = manufacturersRepository;
 }
Exemplo n.º 8
0
 public AnalyticsController(ISubCategoryRepository repo, ICategoryRepository repoCat,IUserRepository repoUser,IQuizRepository repoQuiz)
 {
     _repo = repo;
     _repoCat = repoCat;
     _repoUser = repoUser;
     _repoQuiz = repoQuiz;
 }
Exemplo n.º 9
0
 public CategoriesParser(ILog logger, IWebCrawler crawler, ICategoryRepository categories, IUnitOfWork uow)
 {
     this.logger = logger;
     this.crawler = crawler;
     this.categories = categories;
     this.uow = uow;
 }
Exemplo n.º 10
0
 public UnitOfWork()
 {
     entities = new CozyBlogEntities();
     categoryRepo = new CategoryRepository(entities);
     blogRepo = new BlogRepository(entities);
     commentsRepo = new CommentsRepository(entities);
 }
Exemplo n.º 11
0
 public HomeController(ICategoryRepository categoryRepository, IProductRepository productRepository,
     IConstants constants)
 {
     _categoryRepository = categoryRepository;
     _productRepository = productRepository;
     _constants = constants;
 }
 public CategoryPresenter(ICategoryView view, CategoryModel model)
 {
     _view = view;
     _model = model;
     _categoryRepository = _model.CategoryRepository;
     _categories = new BindingList<Category>(_categoryRepository.GetAll().ToList());
 }
Exemplo n.º 13
0
 public DishService(IDishRepository dishRepository, ICategoryRepository categoryRepository, IMarkupRepository markupRepository, IUnitOfWork unitOfWork)
 {
     _dishRepository = dishRepository;
     _categoryRepository = categoryRepository;
     _markupRepository = markupRepository;
     _unitOfWork = unitOfWork;
 }
Exemplo n.º 14
0
        public ProductCatalogService(IProductTitleRepository productTitleRepository, IProductRepository productRepository,
			ICategoryRepository categoryRepository)
        {
            _productTitleRepository = productTitleRepository;
            _productRepository = productRepository;
            _categoryRepository = categoryRepository;
        }
Exemplo n.º 15
0
        /// <summary>
        /// Initializes a new instance of the MainViewModel class.
        /// </summary>
        public MainViewModel(INoteRepository noteRepository, ICategoryRepository categoryRepository)
        {
            _noteRepository = noteRepository;
            _categoryRepository = categoryRepository;

            Notes = new ObservableCollection<Note>(_noteRepository.FindAll());
            Categories = new ObservableCollection<Category>(_categoryRepository.FindAll());

            // Is there categories list empty?
            if (Categories.Count == 0)
            {
                // In this case, I will create a default category with a welcome note
                var cat = new Category(Resources.Strings.GeneralCat, "#33CC00", "#FFFFFF");
                Categories.Add(cat);
                _categoryRepository.SaveAll(Categories);

                var note = new Note(Resources.Strings.WelcomeMessage, cat);
                Notes.Add(note);
                _noteRepository.Save(note);
            }

            ActualNote = new Note();
            SelectedCategory = _categories[0]; // We need to this for Category's ComboBox sake.
            Trash = new Category("Trash", "#f8f8f8", "#777777");

            AddNoteCommand = new RelayCommand(AddNote, CanAddNote);
            EditNoteCommand = new RelayCommand<Note>(EditNote);
            DeleteNoteCommand = new RelayCommand<Note>(DeleteNote);
            DeleteAllNotesCommand = new RelayCommand(DeleteAllNotes);
            CategoryOptionsCommand = new RelayCommand(OpenCategoryOptions);

            // We expect a message with some lists with changes.
            Messenger.Default.Register<CategoryEditorChangesMessage>(this, MakingNewCatChanges);
        }
Exemplo n.º 16
0
        public VotesController(IPollRepository PollRepository, IUserIdentityService UserIdentityService,
            IUserRepository UserRepository, IVoteRepository VoteRepository, ICategoryRepository CategoryRepository)
        {
            if (PollRepository == null)
            {
                throw new ArgumentNullException("CategoryRepository");
            }

            if (UserIdentityService == null)
            {
                throw new ArgumentNullException("UserIdentityService");
            }

            if (UserRepository == null)
            {
                throw new ArgumentNullException("UserIdentityService");
            }

            if (VoteRepository == null)
            {
                throw new ArgumentNullException("VoteRepository");
            }

            if (CategoryRepository == null)
            {
                throw new ArgumentNullException("CategoryRepository");
            }

            this.pollRepository = PollRepository;
            this.userService = UserIdentityService;
            this.userRepository = UserRepository;
            this.voteRepository = VoteRepository;
            this.categoryRepository = CategoryRepository;
        }
 public ProductController(IProductRepository productRepository, ICategoryRepository categoryRepository, 
     ICategoryPresenter categoryPresenter)
 {
     _productRepository = productRepository;
     _categoryRepository = categoryRepository;
     _categoryPresenter = categoryPresenter;
 }
Exemplo n.º 18
0
 public ProductController(IProductRepository productRepo,
                         ICategoryRepository categoryRepo)
 {
     _categoryRepo = categoryRepo;
     _productRepo = productRepo;
     PageSize = 5;
 }
Exemplo n.º 19
0
        public PollsApiController(IPollRepository PollRepository, ICategoryRepository CategoryRepository,  IFrequencyRepository FrequencyRepository, IUserIdentityService UserIdentityService, IUserRepository UserRepository)
        {
            if (PollRepository == null)
            {
                throw new ArgumentNullException("CategoryRepository");
            }

            if (CategoryRepository == null)
            {
                throw new ArgumentNullException("CategoryRepository");
            }

            if (FrequencyRepository == null)
            {
                throw new ArgumentNullException("CategoryRepository");
            }

            if (UserIdentityService == null)
            {
                throw new ArgumentNullException("UserIdentityService");
            }

            if (UserRepository == null)
            {
                throw new ArgumentNullException("UserIdentityService");
            }

            this.pollRepository = PollRepository;
            this.categoryRepository = CategoryRepository;
            this.frequencyRepository = FrequencyRepository;
            this.userService = UserIdentityService;
            this.userRepository = UserRepository;
        }
 /// <summary>
 ///     Creates an CategoryListViewModel for the usage of providing a CategoryViewModel selection.
 /// </summary>
 /// <param name="categoryRepository">An instance of <see cref="IRepository{T}" />.</param>
 /// <param name="modifyDialogService">An instance of <see cref="IModifyDialogService" /></param>
 /// <param name="dialogService">An instance of <see cref="IDialogService" /></param>
 /// <param name="messenger">An instance of <see cref="IMvxMessenger" /></param>
 public SelectCategoryListViewModel(ICategoryRepository categoryRepository,
     IModifyDialogService modifyDialogService,
     IDialogService dialogService, IMvxMessenger messenger) 
     : base(categoryRepository, modifyDialogService, dialogService)
 {
     this.messenger = messenger;
 }
Exemplo n.º 21
0
 public TransactionApp(ITransactionRepository transactionRepository, IAccountRepository accountRepository, ICategoryRepository categoryRepository, IPropertyRepository propertyRepository)
 {
     _transactionRepository = transactionRepository;
     _accountRepository = accountRepository;
     _categoryRepository = categoryRepository;
     _propertyRepository = propertyRepository;
 }
 /// <summary>
 ///     Baseclass for the categorylist usercontrol
 /// </summary>
 /// <param name="categoryRepository">An instance of <see cref="IRepository{CategoryViewModel}" />.</param>
 /// <param name="modifyDialogService">An instance of <see cref="IModifyDialogService"/> to display a context dialog.</param>
 /// <param name="dialogService">An instance of <see cref="IDialogService" /></param>
 protected AbstractCategoryListViewModel(ICategoryRepository categoryRepository,
    IModifyDialogService modifyDialogService, IDialogService dialogService)
 {
     DialogService = dialogService;
     ModifyDialogService = modifyDialogService;
     CategoryRepository = categoryRepository;
 }
Exemplo n.º 23
0
 public ProductController(IProductRepository pRepository, IConfigRepository conf, ICategoryRepository cRep, ICategoryRepository catRep)
 {
     _cRep = cRep;
     _pRepository = pRepository;
     _conf = conf;
     _catRep = catRep;
 }
Exemplo n.º 24
0
 public AdminManager()
 {
     _postRepo = new Factory().PostRepository();
     _pageRepo = new Factory().PageRepository();
     _categoryRepo = new Factory().CategoryRepository();
     _tagRepo = new Factory().TagRepository();
 }
Exemplo n.º 25
0
 public BooksController()
 {
     BookModelContainer db = new BookModelContainer();
     this.bookRepository = new BookRepository(db);
     this.authorRepository = new AuthorRepository(db);
     this.categoryRepository = new CategoryRepository(db);
 }
Exemplo n.º 26
0
 public ProductsController()
 {
     _unitOfWork = new UnitOfWork(new ProjectContext());
     _productRepository = _unitOfWork.Products;
     _categoryRepository = _unitOfWork.Categories;
     _authRepository = _unitOfWork.Users;
 }
Exemplo n.º 27
0
 internal Archive(
     IContentRepository contentRep,
     IArchiveRepository archiveRep,
     ILinkRepository linkRep,
     IExtendFieldRepository extendRep,
     ICategoryRepository categoryRep,
     ITemplateRepository templateRep,
     int id,
     string strId,
     int categoryId,
     string title)
     : base(
         contentRep,
         extendRep,
         categoryRep,
         templateRep,
         linkRep,
         id,
         categoryId,
         title
         )
 {
     this.StrId = strId;
     this._archiveRep = archiveRep;
     this._templateRep = templateRep;
 }
Exemplo n.º 28
0
 public QuestionController()
 {
     _questionRepo = ObjectFactory.GetInstance<IQuestionRepository>();
     _categoryRepo = ObjectFactory.GetInstance<ICategoryRepository>();
     _checklistRepository = ObjectFactory.GetInstance<ICheckListRepository>();
     _userForAuditingRepository = ObjectFactory.GetInstance<BusinessSafe.Domain.RepositoryContracts.IUserForAuditingRepository>();
 }      
Exemplo n.º 29
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="categoryPermissionForRoleRepository"> </param>
 /// <param name="roleService"> </param>
 /// <param name="categoryRepository"> </param>
 /// <param name="categoryNotificationService"> </param>
 public CategoryService(ICategoryRepository categoryRepository, ICategoryPermissionForRoleRepository categoryPermissionForRoleRepository,
     IRoleService roleService, ICategoryNotificationService categoryNotificationService)
 {
     _categoryRepository = categoryRepository;
     _categoryPermissionForRoleRepository = categoryPermissionForRoleRepository;
     _roleService = roleService;
     _categoryNotificationService = categoryNotificationService;
 }
Exemplo n.º 30
0
 public RecipeController(IRecipeRepository recipeRepository, 
     ICategoryRepository categoryRepository, 
     ILogger<RecipeController> logger)
 {
     _recipeRepository = recipeRepository;
     _categoryRepository = categoryRepository;
     _logger = logger;
 }
Exemplo n.º 31
0
 public AnnouncementController(IAnnouncementRepository announcementRepository, ICategoryRepository categoryRepository,
                               UserManager <AplicationUser> userManager, AnnouncementControllerService announcementControllerService,
                               AnnouncementContext announcementContext)
 {
     _announcementContext           = announcementContext;
     _announcementControllerService = announcementControllerService;
     _userManager            = userManager;
     _announcementRepository = announcementRepository;
     _categoryRepository     = categoryRepository;
 }
Exemplo n.º 32
0
 public AdminController(IVapeRepository vapeRepository, ICategoryRepository categoryRepository, AppDbContext appDbContext)
 {
     _vapeRepository     = vapeRepository;
     _appDbContext       = appDbContext;
     _categoryRepository = categoryRepository;
 }
Exemplo n.º 33
0
 public CategoryLogic(ICategoryRepository repository, IProjectRepository projectRepository)
 {
     _repository        = repository;
     _projectRepository = projectRepository;
 }