Пример #1
0
        //TODO: Za duży konstruktor, Dodać IOrderContext.
        public OrderViewModel(IRegionManager regionManager, IOrderRepository orderRepository, IOrderTypeRepository typeRepository,
                              IOrderStatusRepository statusRepository, IEventAggregator eventAggregator, IHardwareTypeRepository hardwareTypesRepository,
                              INumerationRepository numerationRepository, IMessageDialogService messageDialogService, IRBACManager rBACManager,
                              IPrintTemplateRepository templateRepository, ISettingsManager <Setting> settingsManager) : base(eventAggregator, messageDialogService)
        {
            _orderRepository         = orderRepository;
            _typeRepository          = typeRepository;
            _statusRepository        = statusRepository;
            _hardwareTypesRepository = hardwareTypesRepository;
            _numerationRepository    = numerationRepository;
            _rBACManager             = rBACManager;
            _templateRepository      = templateRepository;
            _settingsManager         = settingsManager;
            _regionManager           = regionManager;

            OrderStatuses  = new ObservableCollection <OrderStatus>();
            OrderTypes     = new ObservableCollection <OrderType>();
            HardwareTypes  = new ObservableCollection <HardwareType>();
            Attachments    = new ObservableCollection <Blob>();
            PrintTemplates = new ObservableCollection <PrintTemplate>();

            AddAttachmentCommand            = new DelegateCommand(OnAddAttachmentExecute);
            RemoveAttachmentCommand         = new DelegateCommand(OnRemoveAttachmentExecute, OnRemoveAttachmentCanExecute);
            PrintCommand                    = new DelegateCommand <object>(OnPrintExecute);
            ShowHardwareDetailFlyoutCommand = new DelegateCommand(OnShowHardwareFlyoutExecute);
            ShowCustomerDetailFlyoutCommand = new DelegateCommand(OnShowCustomerFlyoutExecute);
        }
Пример #2
0
        public OrderContext(IEventAggregator eventAggregator, IMessageDialogService messageDialogService, IOrderRepository orderRepository,
                            ICustomerRepository customerRepository, ICustomItemRepository customItemRepository, IHwCustomItemRepository hwCustomItemRepository,
                            IHardwareTypeRepository hardwareTypeRepository, IOrderStatusRepository orderStatusRepository, IOrderTypeRepository orderTypeRepository,
                            INumerationRepository numerationRepository) : base(eventAggregator, messageDialogService)
        {
            _orderRepository        = orderRepository;
            _customerRepository     = customerRepository;
            _customItemRepository   = customItemRepository;
            _hwCustomItemRepository = hwCustomItemRepository;
            _hardwareTypeRepository = hardwareTypeRepository;
            _orderStatusRepository  = orderStatusRepository;
            _orderTypeRepository    = orderTypeRepository;
            _numerationRepository   = numerationRepository;

            Customers              = new ObservableCollection <Customer>();
            HardwareTypes          = new ObservableCollection <HardwareType>();
            HardwareCustomItems    = new ObservableCollection <HwCustomItem>();
            DisplayableCustomItems = new ObservableCollection <DisblayableCustomItem>();
            OrderStatuses          = new ObservableCollection <OrderStatus>();
            OrderTypes             = new ObservableCollection <OrderType>();

            Attachments = new ObservableCollection <Blob>();

            Initialize();
        }
Пример #3
0
        public NumerationSettingsViewModel(IEventAggregator eventAggregator, INumerationRepository numerationRepository,
                                           IMessageDialogService messageDialogService, IRBACManager rBACManager) : base(eventAggregator, messageDialogService)
        {
            _repository  = numerationRepository;
            _rBACManager = rBACManager;

            Title = "Schemat numeracji";
        }
 public NumerationService(INumerationRepository numerationRepository, IUnitOfWork unitOfWork)
 {
     this.numerationRepository = numerationRepository;
     this.unitOfWork           = unitOfWork;
 }