예제 #1
0
        public AccountSelectorViewModel(IAccountService accountService, ICacheService cacheService, IApplicationState applicationState, IEntityService entityService,
            IReportServiceClient reportServiceClient)
        {
            _accounts = new ObservableCollection<AccountScreenRow>();
            _accountService = accountService;
            _cacheService = cacheService;
            _applicationState = applicationState;
            _entityService = entityService;
            _reportServiceClient = reportServiceClient;
            ShowAccountDetailsCommand = new CaptionCommand<string>(Resources.AccountDetails.Replace(' ', '\r'), OnShowAccountDetails, CanShowAccountDetails);
            PrintCommand = new CaptionCommand<string>(Resources.Print, OnPrint);
            AccountButtonSelectedCommand = new CaptionCommand<AccountScreen>("", OnAccountScreenSelected);
            AutomationCommandSelectedCommand = new CaptionCommand<AccountScreenAutmationCommandMap>("", OnAutomationCommandSelected);

            EventServiceFactory.EventService.GetEvent<GenericEvent<EventAggregator>>().Subscribe(
            x =>
            {
                if (x.Topic == EventTopicNames.ResetCache)
                {
                    _accountButtons = null;
                    _batchDocumentButtons = null;
                    _selectedAccountScreen = null;
                }
            });
        }
예제 #2
0
 public RelationService(IDatabaseUnitOfWorkProvider uowProvider, RepositoryFactory repositoryFactory,
                        IEntityService entityService)
 {
     _uowProvider = uowProvider;
     _repositoryFactory = repositoryFactory;
     _entityService = entityService;
 }
예제 #3
0
 /// <summary>
 /// public ctor - will generally just be used for unit testing
 /// </summary>
 /// <param name="contentService"></param>
 /// <param name="mediaService"></param>
 /// <param name="contentTypeService"></param>
 /// <param name="dataTypeService"></param>
 /// <param name="fileService"></param>
 /// <param name="localizationService"></param>
 /// <param name="packagingService"></param>
 /// <param name="entityService"></param>
 /// <param name="relationService"></param>
 /// <param name="sectionService"></param>
 /// <param name="treeService"></param>
 /// <param name="tagService"></param>
 public ServiceContext(
     IContentService contentService, 
     IMediaService mediaService, 
     IContentTypeService contentTypeService, 
     IDataTypeService dataTypeService, 
     IFileService fileService, 
     ILocalizationService localizationService, 
     PackagingService packagingService, 
     IEntityService entityService,
     IRelationService relationService,
     ISectionService sectionService,
     IApplicationTreeService treeService,
     ITagService tagService)
 {
     _tagService = new Lazy<ITagService>(() => tagService);     
     _contentService = new Lazy<IContentService>(() => contentService);        
     _mediaService = new Lazy<IMediaService>(() => mediaService);
     _contentTypeService = new Lazy<IContentTypeService>(() => contentTypeService);
     _dataTypeService = new Lazy<IDataTypeService>(() => dataTypeService);
     _fileService = new Lazy<IFileService>(() => fileService);
     _localizationService = new Lazy<ILocalizationService>(() => localizationService);
     _packagingService = new Lazy<PackagingService>(() => packagingService);
     _entityService = new Lazy<IEntityService>(() => entityService);
     _relationService = new Lazy<IRelationService>(() => relationService);
     _sectionService = new Lazy<ISectionService>(() => sectionService);
     _treeService = new Lazy<IApplicationTreeService>(() => treeService);
 }
        public EntitySearchWidgetViewModel(Widget model, IApplicationState applicationState, ICacheService cacheService, IEntityService entityService)
            : base(model, applicationState)
        {
            _applicationState = applicationState;
            _cacheService = cacheService;
            EntitySearchViewModel = new EntitySearchViewModel(applicationState, cacheService, entityService) { IsKeyboardVisible = false };
            
            EventServiceFactory.EventService.GetEvent<GenericEvent<OperationRequest<Entity>>>().Subscribe(x =>
            {
                if (x.Topic == EventTopicNames.SelectEntity)
                {
                    _request = x.Value;
                }
            });

            EventServiceFactory.EventService.GetEvent<GenericEvent<WidgetEventData>>().Subscribe(
                x =>
                {
                    if (x.Value.WidgetName == Name)
                    {
                        EntitySearchViewModel.SearchString = x.Value.Value;
                       
                    }
                });
        }
예제 #5
0
 public ChangeTicketEntity(ITicketService ticketService, IApplicationState applicationState, ICacheService cacheService, IEntityService entityService)
 {
     _ticketService = ticketService;
     _applicationState = applicationState;
     _cacheService = cacheService;
     _entityService = entityService;
 }
예제 #6
0
 /// <summary>
 /// Initializes a new instance of the EntityController class.
 /// </summary>
 /// <param name="entityService">Instance of Entity Service</param>
 /// <param name="profileService">Instance of profile Service</param>
 public EntityController(IEntityService entityService, IProfileService profileService, ICommunityService communityService,INotificationService notificationService)
     : base(profileService)
 {
     _entityService = entityService;
     _notificationService = notificationService;
     _communityService = communityService;
 }
 public EntityGridWidgetViewModel(Widget model, IApplicationState applicationState,
     IEntityService entityService, IUserService userService, ICacheService cacheService)
     : base(model, applicationState)
 {
     _applicationState = applicationState;
     _cacheService = cacheService;
     ResourceSelectorViewModel = new EntitySelectorViewModel(applicationState, entityService, userService, cacheService);
 }
 public EntityButtonWidgetViewModel(Widget model, ICacheService cacheService, IApplicationState applicationState, IEntityService entityService)
     : base(model, applicationState)
 {
     _cacheService = cacheService;
     _applicationState = applicationState;
     _entityService = entityService;
     ItemClickedCommand = new CaptionCommand<EntityButtonWidgetViewModel>("", OnItemClickExecute);
 }
예제 #9
0
 /// <summary>
 /// See 8.2.4 Tokenization
 /// </summary>
 /// <param name="source">The source code manager.</param>
 /// <param name="events">The event aggregator to use.</param>
 /// <param name="resolver">The entity resolver to use.</param>
 public HtmlTokenizer(TextSource source, IEventAggregator events, IEntityService resolver)
     : base(source, events)
 {
     _state = HtmlParseMode.PCData;
     _acceptsCharacterData = false;
     _lastStartTag = String.Empty;
     _resolver = resolver;
 }
 public RelationsController()
 {
     relationService = ApplicationContext.Services.RelationService;
     contentService = ApplicationContext.Services.ContentService;
     mediaService = ApplicationContext.Services.MediaService;
     contentTypeService = ApplicationContext.Services.ContentTypeService;
     entityService = ApplicationContext.Services.EntityService;
 }
예제 #11
0
        public ProductListViewModel(IEnumerable<Product> products, IEntityService entityService)
        {
            if (products == null) { throw new ArgumentNullException("products"); }

            var productViewModelList = products.Select(p => new ProductViewModel(this, p));
            this.ProductViewModels = new ObservableCollection<ProductViewModel>(productViewModelList);
            this.entityService = entityService;
        }
예제 #12
0
 public ModuleController(CompositionContainer container, IShellService shellService, IEntityService entityService, Lazy<ReportViewModel> reportViewModel)
 {
     this.container = container;
     this.shellService = shellService;
     this.entityService = entityService;
     this.reportViewModel = reportViewModel;
     this.createBookListReportCommand = new DelegateCommand(CreateBookListReport);
     this.createBorrowedBooksReportCommand = new DelegateCommand(CreateBorrowedBooksReport);
 }
예제 #13
0
 public EntityGridWidgetCreator(IEntityService entityService, IUserService userService, ICacheService cacheService, 
     IAutomationDao automationDao,IPrinterService printerService)
 {
     _entityService = entityService;
     _userService = userService;
     _cacheService = cacheService;
     _automationDao = automationDao;
     _printerService = printerService;
 }
예제 #14
0
        public void Can_Delete_DM_CodeKind()
        {
            _service = new DM_CodeKindService(_mockContext.Object);
            //Arrange
            _service.Delete(new DM_CodeKind() { CodeKind_Id = 1, CodeKindName = "UK" });

            //Assert
            Assert.IsNull(_service.GetEntityById(1));
            _mockContext.Verify(m => m.SaveChanges(), Times.Once());
        }
예제 #15
0
 public AddEntityViewModel(Guid id, IEntityService service)
 {
     _id = id;
     _service = service;
     _item = _service.GetThings().Single(x => x.Id == id);
     Name = _item.Name;
     Description = _item.Description;
     IsActive = _item.IsActive;
     EditCommand = new Command(Edit);
     DeleteCommand = new Command(Delete);
 }
예제 #16
0
        public CustomerListViewModel(IEnumerable<Customer> customers, IEntityService entityService)
        {
            if (customers == null) { throw new ArgumentNullException("customers"); }
            this.customers = customers.ToList();

            this.entityService = entityService;

            this.ShowDeletedData = false;
            this.ShowDeletedDataFunc();
            this.SelectedCustomer = this.CustomerViewModels.FirstOrDefault();
        }
예제 #17
0
 public ModuleController(IShellService shellService, IEntityService entityService, Lazy<ReportViewModel> reportViewModel,
     ExportFactory<IBookListReport> bookListReportFactory, ExportFactory<IBorrowedBooksReport> borrowedBooksReportFactory)
 {
     this.shellService = shellService;
     this.entityService = entityService;
     this.reportViewModel = reportViewModel;
     this.bookListReportFactory = bookListReportFactory;
     this.borrowedBooksReportFactory = borrowedBooksReportFactory;
     this.createBookListReportCommand = new DelegateCommand(CreateBookListReport);
     this.createBorrowedBooksReportCommand = new DelegateCommand(CreateBorrowedBooksReport);
 }
예제 #18
0
 public BookController(CompositionContainer container, IShellService shellService, IEntityService entityService,
     BookViewModel bookViewModel)
 {
     this.container = container;
     this.shellService = shellService;
     this.entityService = entityService;
     this.bookViewModel = bookViewModel;
     this.addNewCommand = new DelegateCommand(AddNewBook, CanAddNewBook);
     this.removeCommand = new DelegateCommand(RemoveBook, CanRemoveBook);
     this.lendToCommand = new DelegateCommand(p => LendTo((Book)p));
 }
예제 #19
0
 public BookController(IShellService shellService, IEntityService entityService,
     BookListViewModel bookListViewModel, BookViewModel bookViewModel, ExportFactory<LendToViewModel> lendToViewModelFactory)
 {
     this.shellService = shellService;
     this.entityService = entityService;
     this.bookListViewModel = bookListViewModel;
     this.bookViewModel = bookViewModel;
     this.lendToViewModelFactory = lendToViewModelFactory;
     this.addNewCommand = new DelegateCommand(AddNewBook, CanAddNewBook);
     this.removeCommand = new DelegateCommand(RemoveBook, CanRemoveBook);
     this.lendToCommand = new DelegateCommand(p => LendTo((Book)p));
 }
예제 #20
0
 /// <summary>
 /// public ctor - will generally just be used for unit testing
 /// </summary>
 /// <param name="contentService"></param>
 /// <param name="mediaService"></param>
 /// <param name="contentTypeService"></param>
 /// <param name="dataTypeService"></param>
 /// <param name="fileService"></param>
 /// <param name="localizationService"></param>
 /// <param name="packagingService"></param>
 /// <param name="entityService"></param>
 /// <param name="relationService"></param>
 public ServiceContext(IContentService contentService, IMediaService mediaService, IContentTypeService contentTypeService, IDataTypeService dataTypeService, IFileService fileService, ILocalizationService localizationService, PackagingService packagingService, IEntityService entityService, RelationService relationService)
 {
     _contentService = new Lazy<IContentService>(() => contentService);        
     _mediaService = new Lazy<IMediaService>(() => mediaService);
     _contentTypeService = new Lazy<IContentTypeService>(() => contentTypeService);
     _dataTypeService = new Lazy<IDataTypeService>(() => dataTypeService);
     _fileService = new Lazy<IFileService>(() => fileService);
     _localizationService = new Lazy<ILocalizationService>(() => localizationService);
     _packagingService = new Lazy<PackagingService>(() => packagingService);
     _entityService = new Lazy<IEntityService>(() => entityService);
     _relationService = new Lazy<RelationService>(() => relationService);
 }
예제 #21
0
 public PersonController(CompositionContainer container, IMessageService messageService, IShellService shellService,
     IEntityService entityService, IEmailService emailService, PersonViewModel personViewModel)
 {
     this.container = container;
     this.messageService = messageService;
     this.shellService = shellService;
     this.entityService = entityService;
     this.emailService = emailService;
     this.personViewModel = personViewModel;
     this.addNewCommand = new DelegateCommand(AddNewPerson, CanAddPerson);
     this.removeCommand = new DelegateCommand(RemovePerson, CanRemovePerson);
     this.createNewEmailCommand = new DelegateCommand(CreateNewEmail);
 }
        public EntityDashboardViewModel(IApplicationState applicationState, IEntityService entityService)
        {
            _applicationState = applicationState;
            _entityService = entityService;

            EventServiceFactory.EventService.GetEvent<GenericEvent<Message>>().Subscribe(
            x =>
            {
                if (x.Topic == EventTopicNames.MessageReceivedEvent && x.Value.Command == Messages.WidgetRefreshMessage)
                {
                    Widgets.Where(y => y.IsVisible && y.CreatorName == x.Value.Data).ToList().ForEach(y => y.Refresh());
                }
            });
        }
예제 #23
0
 public EntityEditorViewModel(ICacheService cacheService, IAccountService accountService, IUserService userService,
     ITicketServiceBase ticketServiceBase, IApplicationState applicationState, IEntityService entityService)
 {
     _cacheService = cacheService;
     _accountService = accountService;
     _userService = userService;
     _ticketServiceBase = ticketServiceBase;
     _applicationState = applicationState;
     _entityService = entityService;
     SaveEntityCommand = new CaptionCommand<string>(Resources.Save, OnSaveEntity, CanSelectEntity);
     SelectEntityCommand = new CaptionCommand<string>(string.Format(Resources.Select_f, Resources.Entity).Replace(" ", "\r"), OnSelectEntity, CanSelectEntity);
     CreateAccountCommand = new CaptionCommand<string>(string.Format(Resources.Create_f, Resources.Account).Replace(" ", "\r"), OnCreateAccount, CanCreateAccount);
     EventServiceFactory.EventService.GetEvent<GenericEvent<OperationRequest<Entity>>>().Subscribe(OnEditEntity);
 }
예제 #24
0
        public EntitySearchViewModel(IApplicationState applicationState, ICacheService cacheService, IEntityService entityService)
        {
            _updateTimer = new Timer(500);
            _updateTimer.Elapsed += UpdateTimerElapsed;

            _applicationState = applicationState;
            _cacheService = cacheService;
            _entityService = entityService;

            IsKeyboardVisible = true;
            FoundEntities = new ObservableCollection<EntitySearchResultViewModel>();

            SelectEntityCommand = new CaptionCommand<string>("", OnSelectEntity, CanSelectEntity);
            EditEntityCommand = new CaptionCommand<string>("", OnEditEntity, CanEditEntity);
            CreateEntityCommand = new CaptionCommand<string>("", OnCreateEntity, CanCreateEntity);
            DisplayAccountCommand = new CaptionCommand<string>(Resources.AccountDetails.Replace(" ", "\r"), OnDisplayAccount, CanDisplayAccount);
            DisplayInventoryCommand = new CaptionCommand<string>(Resources.Inventory, OnDisplayInventory, CanDisplayInventory);
            RemoveEntityCommand = new CaptionCommand<string>("", OnRemoveEntity, CanRemoveEntity);
        }
예제 #25
0
        public EntityGridWidgetViewModel(Widget model, IApplicationState applicationState, IPrinterService printerService,
            IEntityService entityService, IUserService userService, ICacheService cacheService, IAutomationDao automationDao)
            : base(model, applicationState)
        {
            _applicationState = applicationState;
            _cacheService = cacheService;
            _automationDao = automationDao;
            ResourceSelectorViewModel = new EntitySelectorViewModel(applicationState, entityService, userService, cacheService, printerService);

            EventServiceFactory.EventService.GetEvent<GenericEvent<WidgetEventData>>().Subscribe(
                x =>
                {
                    if (x.Value.WidgetName == Name)
                    {
                        Settings.StateFilterName = x.Value.Value;
                        Refresh();
                    }
                });
        }
예제 #26
0
        public EntityController(
            Notificator notificator,
            IEntityService entityService,
            IFetchingRecords source,
            IFetchingRecordsHierarchy hierarchySource)
        {
            if (notificator == null)
                throw new ArgumentNullException("notificator");
            if (entityService == null)
                throw new ArgumentNullException("entityService");
            if (source == null)
                throw new ArgumentNullException("source");
            if (hierarchySource == null)
                throw new ArgumentNullException("hierarchySource");

            _notificator = notificator;
            _entityService = entityService;
            _source = source;
            _hierarchySource = hierarchySource;
        }
예제 #27
0
        public TicketViewModel(IApplicationState applicationState, IExpressionService expressionService,
            ITicketService ticketService, IAccountService accountService, IEntityService locationService, IUserService userService,
            ICacheService cacheService, IAutomationService automationService, TicketOrdersViewModel ticketOrdersViewModel,
            TicketTotalsViewModel totals, TicketInfoViewModel ticketInfoViewModel, PaymentButtonViewModel paymentButtonViewModel)
        {
            _ticketService = ticketService;
            _userService = userService;
            _cacheService = cacheService;
            _applicationState = applicationState;
            _expressionService = expressionService;
            _automationService = automationService;
            _ticketOrdersViewModel = ticketOrdersViewModel;
            _totals = totals;
            _ticketInfo = ticketInfoViewModel;
            _paymentButtonViewModel = paymentButtonViewModel;

            SelectEntityCommand = new DelegateCommand<EntityType>(OnSelectEntity, CanSelectEntity);
            ExecuteAutomationCommnand = new DelegateCommand<CommandContainerButton>(OnExecuteAutomationCommand, CanExecuteAutomationCommand);

            IncQuantityCommand = new CaptionCommand<string>("+", OnIncQuantityCommand, CanIncQuantity);
            DecQuantityCommand = new CaptionCommand<string>("-", OnDecQuantityCommand, CanDecQuantity);
            IncSelectionQuantityCommand = new CaptionCommand<string>("(+)", OnIncSelectionQuantityCommand, CanIncSelectionQuantity);
            DecSelectionQuantityCommand = new CaptionCommand<string>("(-)", OnDecSelectionQuantityCommand, CanDecSelectionQuantity);
            ShowTicketTagsCommand = new CaptionCommand<TicketTagGroup>(Resources.Tag, OnShowTicketsTagExecute, CanExecuteShowTicketTags);
            CancelItemCommand = new CaptionCommand<string>(Resources.Cancel, OnCancelItemCommand);
            MoveOrdersCommand = new CaptionCommand<string>(Resources.MoveTicketLine, OnMoveOrders, CanMoveOrders);
            EditTicketNoteCommand = new CaptionCommand<string>(Resources.TicketNote.Replace(" ", Environment.NewLine), OnEditTicketNote, CanEditTicketNote);
            RemoveTicketLockCommand = new CaptionCommand<string>(Resources.ReleaseLock, OnRemoveTicketLock, CanRemoveTicketLock);
            ChangePriceCommand = new CaptionCommand<string>(Resources.ChangePrice, OnChangePrice, CanChangePrice);

            EventServiceFactory.EventService.GetEvent<GenericEvent<OrderViewModel>>().Subscribe(OnSelectedOrdersChanged);
            EventServiceFactory.EventService.GetEvent<GenericEvent<TicketTagData>>().Subscribe(OnTagSelected);
            EventServiceFactory.EventService.GetEvent<GenericEvent<EventAggregator>>().Subscribe(OnRefreshTicket);
            EventServiceFactory.EventService.GetEvent<GenericEvent<PopupData>>().Subscribe(OnAccountSelectedFromPopup);
            EventServiceFactory.EventService.GetEvent<GenericEvent<OrderTagData>>().Subscribe(OnOrderTagEvent);
            EventServiceFactory.EventService.GetEvent<GenericEvent<MenuItemPortion>>().Subscribe(OnPortionSelected);
            EventServiceFactory.EventService.GetEvent<GenericEvent<Department>>().Subscribe(OnDepartmentChanged);
            EventServiceFactory.EventService.GetEvent<GenericEvent<AutomationCommandValueData>>().Subscribe(OnAutomationCommandValueSelected);

            SelectedTicket = Ticket.Empty;
        }
        public EntitySelectorViewModel(IApplicationState applicationState, IEntityService entityService,
            IUserService userService, ICacheService cacheService)
        {
            _applicationState = applicationState;
            _entityService = entityService;
            _userService = userService;
            _cacheService = cacheService;

            EntitySelectionCommand = new DelegateCommand<EntityScreenItemViewModel>(OnSelectEntityExecuted);
            IncPageNumberCommand = new CaptionCommand<string>(Resources.NextPage + " >>", OnIncPageNumber, CanIncPageNumber);
            DecPageNumberCommand = new CaptionCommand<string>("<< " + Resources.PreviousPage, OnDecPageNumber, CanDecPageNumber);

            EventServiceFactory.EventService.GetEvent<GenericEvent<Message>>().Subscribe(
                x =>
                {
                    if (_applicationState.ActiveAppScreen == AppScreens.EntityView
                        && x.Topic == EventTopicNames.MessageReceivedEvent
                        && x.Value.Command == Messages.TicketRefreshMessage)
                    {
                        RefreshEntityScreenItems();
                    }
                });
        }
예제 #29
0
        public EntityController(
            IIlaroAdmin admin,
            Notificator notificator,
            IEntityService entityService,
            IFetchingRecords source,
            IFetchingRecordsHierarchy hierarchySource)
        {
            if (admin == null)
                throw new ArgumentNullException(nameof(admin));
            if (notificator == null)
                throw new ArgumentNullException(nameof(notificator));
            if (entityService == null)
                throw new ArgumentNullException(nameof(entityService));
            if (source == null)
                throw new ArgumentNullException(nameof(source));
            if (hierarchySource == null)
                throw new ArgumentNullException(nameof(hierarchySource));

            _admin = admin;
            _notificator = notificator;
            _entityService = entityService;
            _source = source;
            _hierarchySource = hierarchySource;
        }
        public EntitySearchViewModel(IApplicationState applicationState, ICacheService cacheService, IEntityService entityService)
        {
            _updateTimer          = new Timer(250);
            _updateTimer.Elapsed += UpdateTimerElapsed;

            _applicationState = applicationState;
            _cacheService     = cacheService;
            _entityService    = entityService;

            IsKeyboardVisible              = true;
            IsEditEntityCommandVisible     = true;
            IsCreateEntityCommandVisible   = true;
            IsDisplayAccountCommandVisible = true;
            SearchLabel   = Resources.Search;
            FoundEntities = new ObservableCollection <EntitySearchResultViewModel>();

            SelectEntityCommand     = new CaptionCommand <string>("", OnSelectEntity, CanSelectEntity);
            EditEntityCommand       = new CaptionCommand <string>("", OnEditEntity, CanEditEntity);
            CreateEntityCommand     = new CaptionCommand <string>("", OnCreateEntity, CanCreateEntity);
            DisplayAccountCommand   = new CaptionCommand <string>(Resources.AccountDetails.Replace(" ", "\r"), OnDisplayAccount, CanDisplayAccount);
            DisplayInventoryCommand = new CaptionCommand <string>(Resources.Inventory, OnDisplayInventory, CanDisplayInventory);
            RemoveEntityCommand     = new CaptionCommand <string>("", OnRemoveEntity, CanRemoveEntity);
        }
예제 #31
0
        /// <summary>
        /// Updates the entities.
        /// </summary>
        public static void Update(IList <T> entities)
        {
            IEntityService <T> service = EntityRegistration.GetService <T>();

            service.Update(entities);
        }
예제 #32
0
 public CompanyDocumentController(IGenericRepository <CompanyDocument> companyDocumentRepository, IMapper mapper,
                                  UserManager <ApplicationUser> userManager,
                                  IGenericRepository <CompanyUser> companyUserRepository,
                                  IGenericRepository <Company> companyRepository,
                                  IGenericRepository <FiscalYear> fiscalYearRepository,
                                  IGenericRepository <MainGroup> mainGroupRepository,
                                  IGenericRepository <SubGroup> subGroupRepository, IEntityService _entityService)
 {
     _companyDocumentRepository = companyDocumentRepository;
     _mapper                     = mapper;
     this._userManager           = userManager;
     this._companyUserRepository = companyUserRepository;
     _companyRepository          = companyRepository;
     _fiscalYearRepository       = fiscalYearRepository;
     _mainGroupRepository        = mainGroupRepository;
     _subGroupRepository         = subGroupRepository;
     entityService               = _entityService;
 }
예제 #33
0
 public DonationController(IEntityService entityService)
 {
     _entityService = entityService;
 }
 public FilterAllowedOutgoingContentFilter(Type outgoingType, string propertyName, char permissionToCheck, IUserService userService, IEntityService entityService, AppCaches appCaches, IBackOfficeSecurityAccessor backofficeSecurityAccessor)
     : base(entityService, backofficeSecurityAccessor, appCaches, outgoingType, propertyName)
 {
     _permissionToCheck = permissionToCheck;
     _userService       = userService;
     _entityService     = entityService;
     _appCaches         = appCaches;
 }
예제 #35
0
 public ProjectController(IEntityService <PRProductDTO> ProdService)
 {
     this.ProdService = ProdService;
 }
 public ContentTypeTreeController(ILocalizedTextService localizedTextService, UmbracoApiControllerTypeCollection umbracoApiControllerTypeCollection, UmbracoTreeSearcher treeSearcher, IMenuItemCollectionFactory menuItemCollectionFactory, IContentTypeService contentTypeService, IEntityService entityService, IEventAggregator eventAggregator) : base(localizedTextService, umbracoApiControllerTypeCollection, eventAggregator)
 {
     _treeSearcher = treeSearcher;
     _menuItemCollectionFactory = menuItemCollectionFactory;
     _contentTypeService        = contentTypeService;
     _entityService             = entityService;
 }
예제 #37
0
        /// <summary>
        /// Creates the entities conditionally based on whether they exists in the datastore.
        /// Existance in the datastore is done by finding any entities w/ matching values for the
        /// <paramref name="checkFields"/> supplied.
        /// </summary>
        /// <param name="entities"></param>
        /// <param name="checkFields"></param>
        public static void Create(IList <T> entities, params Expression <Func <T, object> >[] checkFields)
        {
            IEntityService <T> service = EntityRegistration.GetService <T>();

            service.Create(entities, checkFields);
        }
예제 #38
0
파일: MovieController.cs 프로젝트: srog/SSV
 public MovieController(IAuthService authService, IEntityService entityService, IRatingService ratingService)
 {
     _authService   = authService;
     _entityService = entityService;
     _ratingService = ratingService;
 }
예제 #39
0
 /// <summary>
 /// Initializes a new instance of the <see cref="uSyncMediaService"/> class.
 /// </summary>
 /// <param name="logger">The logger.</param>
 /// <param name="mediaService">The media service.</param>
 /// <param name="appCaches">The application caches.</param>
 /// <param name="entityService">The entity service.</param>
 /// <param name="shortStringHelper">The short string helper.</param>
 /// <param name="uSyncFileService">The u synchronize file service.</param>
 /// <param name="uSyncEventService">The u synchronize event service.</param>
 /// <param name="uSyncConfigService">The u synchronize configuration service.</param>
 /// <param name="syncItemFactory">The synchronize item factory.</param>
 public uSyncMediaService(ILogger <MediaHandler> logger, IMediaService mediaService, AppCaches appCaches, IEntityService entityService, IShortStringHelper shortStringHelper, SyncFileService uSyncFileService, uSyncEventService uSyncEventService, uSyncConfigService uSyncConfigService, ISyncItemFactory syncItemFactory)
 {
     _logger             = logger;
     _mediaService       = mediaService;
     _appCaches          = appCaches;
     _entityService      = entityService;
     _shortStringHelper  = shortStringHelper;
     _uSyncFileService   = uSyncFileService;
     _uSyncEventService  = uSyncEventService;
     _uSyncConfigService = uSyncConfigService;
     _syncItemFactory    = syncItemFactory;
 }
예제 #40
0
 public SiteService(IEntityService <Site> entityService, IRepository <Site> repository)
 {
     _entityService = entityService;
     _repository    = repository;
 }
예제 #41
0
 public EntityGridWidgetCreator(IEntityService entityService, IUserService userService, ICacheService cacheService)
 {
     _entityService = entityService;
     _userService   = userService;
     _cacheService  = cacheService;
 }
예제 #42
0
 public NewsCategoryService(IRepository <NewsCategory> categoryRepository, IEntityService entityService)
 {
     _categoryRepository = categoryRepository;
     _entityService      = entityService;
 }
예제 #43
0
 public DashboardService(IDashboardRepository dashboardrepository, LogHandler.Logger logManager, IDeviceService deviceService, IEntityService entityService)
 {
     _dashboardrepository = dashboardrepository;
     _logger        = logManager;
     _deviceService = deviceService;
     _entityService = entityService;
 }
예제 #44
0
        public AccountSelectorViewModel(IAccountService accountService, ICacheService cacheService, IApplicationState applicationState, IEntityService entityService,
                                        IReportServiceClient reportServiceClient)
        {
            _accounts                        = new ObservableCollection <AccountScreenRow>();
            _accountService                  = accountService;
            _cacheService                    = cacheService;
            _applicationState                = applicationState;
            _entityService                   = entityService;
            _reportServiceClient             = reportServiceClient;
            ShowAccountDetailsCommand        = new CaptionCommand <string>(Resources.AccountDetails.Replace(' ', '\r'), OnShowAccountDetails, CanShowAccountDetails);
            PrintCommand                     = new CaptionCommand <string>(Resources.Print, OnPrint);
            AccountButtonSelectedCommand     = new CaptionCommand <AccountScreen>("", OnAccountScreenSelected);
            AutomationCommandSelectedCommand = new CaptionCommand <AccountScreenAutmationCommandMap>("", OnAutomationCommandSelected);

            EventServiceFactory.EventService.GetEvent <GenericEvent <EventAggregator> >().Subscribe(
                x =>
            {
                if (x.Topic == EventTopicNames.ResetCache)
                {
                    _accountButtons        = null;
                    _batchDocumentButtons  = null;
                    _selectedAccountScreen = null;
                }
            });
        }
예제 #45
0
 public RepeatableValueMapper(IEntityService entityService)
     : base(entityService)
 {
 }
예제 #46
0
 /// <summary>
 /// Singleton service and repository with optional flag to indicate
 /// whether or not to configure the repository.
 /// </summary>
 /// <param name="service"></param>
 /// <param name="configureRepository"></param>
 public static void Init(IEntityService <T> service, bool configureRepository)
 {
     EntityRegistration.Register <T>(service, configureRepository);
 }
예제 #47
0
 public CardTypeController(IEntityService <CardType> service, IEntityService <Class> classService)
 {
     _service      = service;
     _classService = classService;
 }
예제 #48
0
 /// <summary>
 /// Initialize the behaviour of creating the service and repository.
 /// </summary>
 /// <param name="useSingletonService"></param>
 /// <param name="useSingletonRepository"></param>
 public static void Init(IEntityService <T> service)
 {
     Init(service, false);
 }
 public CompanyShareController(IGenericRepository <CompanyShare> companyShareRepository,
                               IGenericRepository <CompanyShareholder> companyShareholderRepository,
                               IGenericRepository <Portfo> portfoRepository, IMapper mapper, UserManager <ApplicationUser> userManager, IGenericRepository <CompanyUser> companyUserRepository, IEntityService _entityService)
 {
     _companyShareRepository = companyShareRepository;
     _mapper                       = mapper;
     this._userManager             = userManager;
     _companyShareholderRepository = companyShareholderRepository;
     _portfoRepository             = portfoRepository;
     this._companyUserRepository   = companyUserRepository;
     entityService                 = _entityService;
 }
예제 #50
0
        /// <summary>
        /// Decrements the specified member.
        /// </summary>
        /// <param name="member">The member.</param>
        /// <param name="by">The by.</param>
        /// <param name="id">The id.</param>
        public static void Decrement(Expression <Func <T, object> > member, int by, int id)
        {
            IEntityService <T> service = EntityRegistration.GetService <T>();

            service.Decrement(member, by, id);
        }
예제 #51
0
 public JobCardController(IDDService dDService, IJobCardService jobCardService, IEntityService <Employee> employeeService, IEntityService <JobCardApp> jobCardAppService
                          , IEntityService <VAT_LeaveApplication> vATLeaveApplicationService, IEntityService <JobCardDetail> jobCardDetailService
                          , IEntityService <VEP_JobCardApplication> vEPJobCardApplicationService, IEntityService <VHR_UserEmployee> vhr_UserEmployeeService
                          , IEntityService <Shift> shiftService, IEntityService <PayrollPeriod> payrollPeriodService)
 {
     DDService                    = dDService;
     JobCardService               = jobCardService;
     EmployeeService              = employeeService;
     JobCardAppService            = jobCardAppService;
     VATLeaveApplicationService   = vATLeaveApplicationService;
     JobCardDetailService         = jobCardDetailService;
     VEPJobCardApplicationService = vEPJobCardApplicationService;
     VHR_UserEmployeeService      = vhr_UserEmployeeService;
     ShiftService                 = shiftService;
     PayrollPeriodService         = payrollPeriodService;
 }
예제 #52
0
        /// <summary>
        /// Delete the model associated with the id.
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public static void Delete(int id)
        {
            IEntityService <T> service = EntityRegistration.GetService <T>();

            service.Delete(id);
        }
 internal FilterAllowedOutgoingContentAttribute(Type outgoingType, IUserService userService, IEntityService entityService)
     : this(outgoingType, null, ActionBrowse.ActionLetter)
 {
 }
예제 #54
0
        /// <summary>
        /// Deletes all the entities from the system.
        /// </summary>
        /// <returns></returns>
        public static new void DeleteAll()
        {
            IEntityService <T> service = EntityRegistration.GetService <T>();

            service.DeleteAll();
        }
예제 #55
0
 public BotManager()
 {
     entityManager = new EntityManager();
 }
예제 #56
0
 public LanguageSerializer(IEntityService entityService, ILogger logger,
                           ILocalizationService localizationService)
     : base(entityService, logger)
 {
     this.localizationService = localizationService;
 }
예제 #57
0
        public AbsentNotificationController(IEntityService <DailyAttendance> dailyAttendanceService, IGetSpecificEmployeeService getSpecificEmployeeService)
        {
            DailyAttendanceService = dailyAttendanceService;

            GetSpecificEmployeeService = getSpecificEmployeeService;
        }
 public ChannelHelper(IConfiguration config, IEntityService entityService)
 {
     _config        = config;
     _entityService = entityService;
 }
예제 #59
0
 /// <summary>
 /// Creates a new tokenizer for XML documents.
 /// </summary>
 /// <param name="source">The source code manager.</param>
 /// <param name="events">The event aggregator to use.</param>
 /// <param name="resolver">The entity resolver to use.</param>
 public XmlTokenizer(TextSource source, IEventAggregator events, IEntityService resolver)
     : base(source, events)
 {
     _resolver = resolver;
 }
예제 #60
0
 public ScreenController(IEntityService <Screen, ScreenDto, Guid> service, IUserIdService userIdService) : base(service, userIdService)
 {
 }