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; }
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); }
public PatientInputViewModel(IPatientAppService appService, IEventAggregator ea) { EventAggregator = ea; AppService = appService; CreateCommand = new DelegateCommand <ICloseable>(Create); }
public PatientController(INotificationHandler <DomainNotification> notifications, IMediatorHandler mediator, IPatientAppService patientAppService) : base(notifications, mediator) { _patientAppService = patientAppService; }
public PatientController(IPatientAppService patientAppService) { _patientAppService = patientAppService; }
public PatientAppService_Tests() { _PatientAppService = GetRequiredService <IPatientAppService>(); }
public PatientController(IPatientAppService appService, PatientValidator validator, IConfigurationRoot configuration) { this.appService = appService; this.validator = validator; this.configuration = configuration; }