Exemple #1
0
 public OrderController()
 {
     orderDataService       = new OrderDataService();
     errorDataService       = new ErrorDataService();
     transactionDataService = new TransactionDataService();
     statusDataService      = new StatusDataService();
 }
Exemple #2
0
 public ComponentCreateViewModel(IComponentRepository componentRepository, IErrorDataService errorDataService, IEventAggregator eventAggregator)
 {
     CreateComponentCommand = new DelegateCommand(OnCreateComponentExecute, OnComponentCreateCanExecute);
     _componentRepository   = componentRepository;
     _errorDataService      = errorDataService;
     Component        = CreateNewComponent();
     _eventAggregator = eventAggregator;
     _eventAggregator.GetEvent <AfterUserLogin>().Subscribe(OnLogin);
 }
Exemple #3
0
 public CustomerListViewModel(ICustomerDataService customerDataService, IErrorDataService errorDataService, ICustomerRepository customerRepository)
 {
     _customerDataService = customerDataService;
     _errorDataService    = errorDataService;
     _customerRepository  = customerRepository;
     Customers            = new ObservableCollection <CustomerDto>();
     Equipments           = new ObservableCollection <EquipmentLookup>();
     Departments          = new ObservableCollection <CustomerDepartmentDto>();
 }
Exemple #4
0
 public TissueBankController()
 {
     tbDataService          = new TissueBankDataService();
     transactionDataService = new TransactionDataService();
     errorDataService       = new ErrorDataService();
     statusDataService      = new StatusDataService();
     stateDataService       = new StateDataService();
     cityDataService        = new CityDataService();
 }
 public EquipmentCreateViewModel(IEquipmentRepository equipmentRepository, IErrorDataService errorDataService, IEventAggregator eventAggregator)
 {
     CreateEquipmentCommand = new DelegateCommand(OnCreateEquipmentExecute, OnEquipmentCreateCanExecute);
     _equipmentRepository   = equipmentRepository;
     _errorDataService      = errorDataService;
     Equipment        = CreateNewEquipment(); //assign the equipment to add to the Equipment property
     _eventAggregator = eventAggregator;
     _eventAggregator.GetEvent <AfterUserLogin>().Subscribe(OnLogin);
 }
        public EquipmentDetailViewModel(IEventAggregator eventAggregator, IErrorDataService errorDataService, IEquipmentRepository equipmentRepository)
        {
            _equipmentRepository = equipmentRepository;
            _eventAggregator     = eventAggregator;
            _eventAggregator.GetEvent <OpenEquipmentDetailViewEvent>()
            .Subscribe(OnOpenEquipmentDetailView);
            _errorDataService = errorDataService;
            _eventAggregator.GetEvent <AfterUserLogin>().Subscribe(OnLogin);

            UpdateCommand = new DelegateCommand(OnUpdateExecute);
            Equipment     = UpdateEquipment();
        }
Exemple #7
0
 public ComponentDetailViewModel(IComponentDataService dataService,
                                 IEventAggregator eventAggregator, IErrorDataService errorDataService, IComponentRepository componentRepository)
 {
     _dataService     = dataService;
     _eventAggregator = eventAggregator;
     _eventAggregator.GetEvent <OpenComponentDetailViewEvent>()
     .Subscribe(OnOpenComponentDetailView);
     _errorDataService = errorDataService;
     _eventAggregator.GetEvent <AfterUserLogin>().Subscribe(OnLogin);
     _componentRepository = componentRepository;
     UpdateCommand        = new DelegateCommand(OnUpdateExecute);
 }
 public ComponentListViewModel(IComponentDataService componentDataService,
                               IEventAggregator eventAggregator, IErrorDataService errorDataService, IComponentDetailViewModel componentDetailViewModel)
 {
     _componentDataService = componentDataService;
     Components            = new ObservableCollection <ComponentDto>();
     //initialize event aggregator
     _eventAggregator  = eventAggregator;
     _errorDataService = errorDataService;
     _eventAggregator.GetEvent <AfterComponentCreated>().Subscribe(RefreshList);
     ComponentDetailViewModel = componentDetailViewModel;
     _eventAggregator.GetEvent <AfterUserLogin>().Subscribe(OnLogin);
 }
 public EquipmentListViewModel(IEquipmentLookupDataService equipmentLookupDataService,
                               IEventAggregator eventAggregator, IErrorDataService errorDataService, IEquipmentDetailViewModel equipmentDetailViewModel)
 {
     _equipmentLookupDataService = equipmentLookupDataService;
     Equipments = new ObservableCollection <EquipmentLookup>();
     //initialize event aggregator
     _eventAggregator  = eventAggregator;
     _errorDataService = errorDataService;
     _eventAggregator.GetEvent <AfterEquipmentCreated>().Subscribe(RefreshList);
     _eventAggregator.GetEvent <AfterUserLogin>().Subscribe(OnLogin);
     EquipmentDetailViewModel = equipmentDetailViewModel;
     LoadDetailData();
 }
 public CustomerCreateViewModel(ICustomerRepository customerRepository, IErrorDataService errorDataService, IEventAggregator eventAggregator,
                                IEquipmentLookupDataService equipmentLookupDataService)
 {
     CreateCustomerCommand       = new DelegateCommand(OnCreateCustomerExecute, OnCustomerCreateCanExecute);
     _customerRepository         = customerRepository;
     _errorDataService           = errorDataService;
     _equipmentLookupDataService = equipmentLookupDataService;
     //Customer = CreateNewCustomer();
     _eventAggregator = eventAggregator;
     _eventAggregator.GetEvent <AfterUserLogin>().Subscribe(OnLogin);
     Departments        = new ObservableCollection <CustomerDepartment>();
     SelectedEquipments = new List <Model.Equipment>();
     Equipments         = new ObservableCollection <EquipmentLookup>();
 }
Exemple #11
0
        public AddRemoveEquipmentToFromCustomerViewModel(ICustomerRepository customerRepository, IEquipmentLookupDataService equipmentLookupDataService,
                                                         IErrorDataService errorDataService, IEventAggregator eventAggregator)
        {
            _customerRepository         = customerRepository;
            _equipmentLookupDataService = equipmentLookupDataService;
            _errorDataService           = errorDataService;
            _eventAggregator            = eventAggregator;
            Customers          = new ObservableCollection <CustomerDto>();
            Departments        = new ObservableCollection <CustomerDepartmentDto>();
            Equipments         = new ObservableCollection <EquipmentLookup>();
            CustomerEquipments = new ObservableCollection <EquipmentLookup>();
            _eventAggregator.GetEvent <AfterUserLogin>().Subscribe(OnLogin); //GET CURREMT USER

            AddEquipment = new DelegateCommand(OnAddEquipment);
        }
        public AddRemoveComponentViewModel(IEquipmentLookupDataService equipmentLookupDataService, IErrorDataService errorDataService,
                                           IComponentDataService componentDataService, IEquipmentRepository equipmentRepository, IEventAggregator eventAggregator)
        {
            _equipmentLookupDataService = equipmentLookupDataService;
            _componentDataService       = componentDataService;
            _errorDataService           = errorDataService;
            _equipmentRepository        = equipmentRepository;
            Equipments             = new ObservableCollection <EquipmentLookup>();
            Components             = new ObservableCollection <ComponentDto>();
            ComponentsForEquipment = new ObservableCollection <ComponentDto>();
            EquipmentComponents    = new ObservableCollection <EquipmentComponent>();

            AddComponent    = new DelegateCommand(OnComponentAdded, OnComponentCanAdded);
            RemoveComponent = new DelegateCommand(OnComponentRemoved, OnComponentCanRemoved);
            SaveChanges     = new DelegateCommand(OnChangesSaved, OnChangesCanSaved);

            _eventAggregator = eventAggregator;
            _eventAggregator.GetEvent <AfterUserLogin>().Subscribe(OnLogin);
        }
Exemple #13
0
 public ErrorBusinessService(IErrorDataService _errorDataService)
 {
     errorDataService = _errorDataService;
 }