Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
 public EditTimeBlockViewModel(Guid timeBlockId, ITimeBlocksModel timeBlocksModel)
 {
     this.timeBlocksModel   = timeBlocksModel;
     timeBlock              = timeBlocksModel.Get(timeBlockId);
     UpdateTimeBlockCommand = new RelayCommand(UpdateTimeBlockExecute, CanExecuteUpdateTimeBlock);
 }
Ejemplo n.º 3
0
 public EditTimeBlockViewModel(Guid timeBlockId, ITimeBlocksModel timeBlocksModel)
 {
     this.timeBlocksModel = timeBlocksModel;
     timeBlock = timeBlocksModel.Get(timeBlockId);
     UpdateTimeBlockCommand = new RelayCommand(UpdateTimeBlockExecute, CanExecuteUpdateTimeBlock);
 }