public AppointmentViewModel( IMedicalSpecializationDataService medicalSpecializationDataService, IBuildingDataService buildingDataService, IProfileDataService profileDataService, ISuggestionProvider geoSuggestionProvider, IEventAggregator eventAggregator) { this.MedicalSpecializationDataService = medicalSpecializationDataService; this.GeoSuggestionProvider = geoSuggestionProvider; this.BuildingDataService = buildingDataService; this.ProfileDataService = profileDataService; this.EventAggregator = eventAggregator; this.PageContract = new PageControlContract(default(int), this.MedicalSpecializationDataService); this.PageSizes = new ObservableCollection <int> { 2, 10, 20, 50, 100, 200 }; this.LoadedCommand = AsyncCommand.Create(this.OnLoadedAsync); this.OpenSpecializationCommand = new RelayCommand( parameter => { var args = (List <int>)parameter; this.EventAggregator.GetEvent <OpenSpecializationDoctorsEvent>().Publish( new OpenSpecializationDoctorsArgs { PolyclinicId = args[1], SpecializationId = args[0], ParentViewModel = this }); }); }
public SpecializationDoctorsViewModel( int polyclinicId, int specializationId, object parentViewModel, IMedicalSpecializationDataService specializationDataService, IPolyclinicDataService polyclinicDataService, IDoctorDataService doctorDataService, IProfileDataService profileDataService, IEventAggregator eventAggregator) { this.PolyclinicId = polyclinicId; this.SpecializationId = specializationId; this.SpecializationDataService = specializationDataService; this.PolyclinicDataService = polyclinicDataService; this.DoctorDataService = doctorDataService; this.ProfileDataService = profileDataService; this.EventAggregator = eventAggregator; this.PageContract = new PageControlContract( this.PolyclinicId, this.SpecializationId, this.DoctorDataService, this.ProfileDataService); this.PageSizes = new ObservableCollection <int> { 2, 10, 20, 50, 100, 200 }; this.LoadedCommand = AsyncCommand.Create(this.OnLoadedAsync); this.OpenDoctorCommand = new RelayCommand <int>( doctorId => this.EventAggregator.GetEvent <OpenDoctorTimetableEvent>().Publish( new OpenDoctorTimetableEventArgs { DoctorId = doctorId, ParentViewModel = this })); this.BackCommand = new RelayCommand( () => this.EventAggregator.GetEvent <NavigationEvent>().Publish(parentViewModel)); }
public PageControlContract(int polyclinicId, IMedicalSpecializationDataService specializationDataService) { this.PolyclinicId = polyclinicId; this.SpecializationDataService = specializationDataService; }