Esempio n. 1
0
 public InvoiceInputViewModel(IInvoiceAppService appService,
                              IPatientAppService patientApp, ICategoryAppService categoryApp,
                              IEventAggregator eventAggregator, ISettingProvider setting, IExchangeRateAppService exchangeRateApp, IServiceProvider serviceProvider)
 {
     SettingProvider          = setting;
     EventAggregator          = eventAggregator;
     _serviceProvider         = serviceProvider;
     PatientService           = patientApp;
     AppService               = appService;
     rateAppService           = exchangeRateApp;
     CategoryService          = categoryApp;
     CreateCommand            = new DelegateCommand <ICloseable>(Create);
     AddPatientCommand        = new DelegateCommand(CreatePatient);
     DeleteInvoiceLineCommand = new DelegateCommand(OnInvoiceLineDeleted);
     SelectedCommand          = new DelegateCommand <object[]>(OnItemSelected);
     AddExamCommand           = new DelegateCommand <ExamDto>(AddExam);
     Patients = new ObservableCollection <PatientDto>();
     Patients.AddRange(PatientService.GetListAsync().Result);
     Currency          = SettingProvider.GetOrNullAsync(FacCigoSettings.InvoiceCurrency).Result;
     Model             = new InvoiceModel();
     Model.ReferenceNo = AppService.NextReferenceNo(Model.InvoiceDate.Year).Result;
     Categories        = new ObservableCollection <CategoryDto>();
     Categories.AddRange(CategoryService.GetListAsync().Result);
     EventAggregator.GetEvent <PatientAddedEvent>().Subscribe(PatientAdded);
     ExchangeRate = rateAppService.CurrentExchangeRate().Result;
 }
Esempio n. 2
0
 public PatientsViewModel(IPatientAppService appService, IServiceProvider serviceProvider, IEventAggregator eventAggregator)
 {
     AppService       = appService;
     _serviceProvider = serviceProvider;
     EventAggregator  = eventAggregator;
     SelectedCommand  = new DelegateCommand <object[]>(OnItemSelected);
     CreateCommand    = new DelegateCommand(Create);
     UpdateCommand    = new DelegateCommand(Update);
     DeleteCommand    = new DelegateCommand(Delete);
     Items            = new ObservableCollection <PatientDto>();
     Items.AddRange(AppService.GetListAsync().Result);
     EventAggregator.GetEvent <PatientUpdatedEvent>().Subscribe(OnPatientUpdated);
     EventAggregator.GetEvent <PatientDeletedEvent>().Subscribe(OnPatientDeleted);
     EventAggregator.GetEvent <PatientAddedEvent>().Subscribe(OnPatientAdded);
 }
Esempio n. 3
0
 public PatientInputViewModel(IPatientAppService appService, IEventAggregator ea)
 {
     EventAggregator = ea;
     AppService      = appService;
     CreateCommand   = new DelegateCommand <ICloseable>(Create);
 }
Esempio n. 4
0
 public PatientController(INotificationHandler <DomainNotification> notifications, IMediatorHandler mediator,
                          IPatientAppService patientAppService) :
     base(notifications, mediator)
 {
     _patientAppService = patientAppService;
 }
Esempio n. 5
0
 public PatientController(IPatientAppService patientAppService)
 {
     _patientAppService = patientAppService;
 }
Esempio n. 6
0
 public PatientAppService_Tests()
 {
     _PatientAppService = GetRequiredService <IPatientAppService>();
 }
Esempio n. 7
0
 public PatientController(IPatientAppService appService, PatientValidator validator, IConfigurationRoot configuration)
 {
     this.appService    = appService;
     this.validator     = validator;
     this.configuration = configuration;
 }