private void FixupStation(Station previousValue) { if (previousValue != null && previousValue.Tests.Contains(this)) { previousValue.Tests.Remove(this); } if (Station != null) { if (!Station.Tests.Contains(this)) { Station.Tests.Add(this); } } }
/// <summary> /// Initializes a new instance of the <see cref="ProductVM"/> class from the model. /// </summary> /// <param name="entity">The model.</param> /// <param name="access"></param> public StationVM(Station entity, AccessType access, StationDataService dataService) : base(access) { InitializeData(dataService); _model = entity; }
public override void Save(object param) { StationDataService.AttachModel(_model); _model = StationDataService.GetSingle(_model.Id); OnPropertyChanged("ModifiedBy");OnPropertyChanged("ModifiedDate");Mode = ModificationStatus.Saved; }
/// <summary> /// Initializes a new instance of the <see cref="StationInfoVM"/> class from the model. /// </summary> /// <param name="entity">The model.</param> public StationInfoVM(Station entity) { _model = entity; }