void HandleTimeBlockUpdated(object sender, EntityEventArgs <TimeBlock> e) { ITimeBlockListItemViewModel item = Items.FirstOrDefault(i => i.Id == e.Entity.Id); if (item != null) { TimeBlock timeBlock = timeBlocksModel.Get(e.Entity.Id); item.Update(timeBlock); } }
public EditTimeBlockViewModel(Guid timeBlockId, ITimeBlocksModel timeBlocksModel) { this.timeBlocksModel = timeBlocksModel; timeBlock = timeBlocksModel.Get(timeBlockId); UpdateTimeBlockCommand = new RelayCommand(UpdateTimeBlockExecute, CanExecuteUpdateTimeBlock); }
public EditTimeBlockViewModel(Guid timeBlockId, ITimeBlocksModel timeBlocksModel) { this.timeBlocksModel = timeBlocksModel; timeBlock = timeBlocksModel.Get(timeBlockId); UpdateTimeBlockCommand = new RelayCommand(UpdateTimeBlockExecute, CanExecuteUpdateTimeBlock); }