public MedicalCardRecordViewModel( int recordId, object parentViewModel, IMedicalRecordDataService recordDataService, IAttachmentDataService attachmentDataService, IProfileDataService profileDataService, IEventAggregator eventAggregator) { this.RecordId = recordId; this.RecordDataService = recordDataService; this.AttachmentDataService = attachmentDataService; this.ProfileDataService = profileDataService; this.EventAggregator = eventAggregator; this.Attachments = new ObservableCollection <AttachmentInfoWrapper>(); this.LoadedCommand = AsyncCommand.Create(this.OnLoadedAsync); this.OpenAttachmentCommand = AsyncCommand.Create <int>(this.OnOpenAttachmentAsync); this.ShowAttachmentInFolderCommand = AsyncCommand.Create <int>(this.OnShowAttachmentAsync); this.BackCommand = new RelayCommand( () => this.EventAggregator.GetEvent <NavigationEvent>().Publish(parentViewModel)); this.OpenAssociatedRecordCommand = new RelayCommand(() => this.EventAggregator.GetEvent <OpenRecordEvent>().Publish(new OpenRecordEventArgs { RecordId = this.Record.AssociatedRecordId.Value, ParentViewModel = this })); this.OpenDoctorCommand = new RelayCommand(() => this.EventAggregator.GetEvent <OpenDoctorEvent>().Publish(new OpenDoctorEventArgs { DoctorId = this.Record.Author.Id, ParentViewModel = this })); }
public MobileConfigurationDataService( ICategoryInfoDataService categoryInfoDataService, ISettingsDataService settingsDataService, IMobileAppConfigDataService mobileAppConfigDataService, IAttachmentDataService mobileAppConfigAttachmentDataService, ISyncDataService syncDataService) { _syncDataService = syncDataService; _categoryInfoDataService = categoryInfoDataService; _settingsDataService = settingsDataService; _attachmentDataService = mobileAppConfigAttachmentDataService; _mobileAppConfigDataService = mobileAppConfigDataService; }