public async void Initialize(IServicePool servicePool) { _sessionService = servicePool.GetService <ISessionService>(); this.AddCommand = new DelegateCommand(p => true, this.ExecuteAddCommand); this.DeleteCommand = new DelegateCommand(p => true, this.ExecuteDeleteCommand); this.CancelDeleteCommand = new DelegateCommand(p => true, this.ExecuteCancelDeleteCommand); this.IsBusy = true; _sessionList = await _sessionService.GetSessionListAsync(); _sessionList.Insert(0, new SessionDto { Title = "" }); this.SessionsView = new ListCollectionView(_sessionList); this.Slots = await _sessionService.AllSlotsAsync(); this.SlotsView = new ListCollectionView(this.Slots); foreach (var item in this.Slots) { item.PropertyChanged += this.OnScheduleItemPropertyChanged; } this.IsBusy = false; this.ErrorText = "Mindestens eine Session wurde mehrfach zugewiesen!"; }
public async void Initialize(IServicePool servicePool) { _sessionService = servicePool.GetService<ISessionService>(); this.AddCommand = new DelegateCommand(p => true, this.ExecuteAddCommand); this.DeleteCommand = new DelegateCommand(p => true, this.ExecuteDeleteCommand); this.CancelDeleteCommand = new DelegateCommand(p => true, this.ExecuteCancelDeleteCommand); this.IsBusy = true; _sessionList = await _sessionService.GetSessionListAsync(); _sessionList.Insert(0, new SessionDto { Title = "" }); this.SessionsView = new ListCollectionView(_sessionList); this.Slots = await _sessionService.AllSlotsAsync(); this.SlotsView = new ListCollectionView(this.Slots); foreach (var item in this.Slots) { item.PropertyChanged += this.OnScheduleItemPropertyChanged; } this.IsBusy = false; this.ErrorText = "Mindestens eine Session wurde mehrfach zugewiesen!"; }