// Implements IEditableObject public void BeginEdit() { //make a copy of the original in case cancels ObjectCopier.CopyFields(_editCopy = new ServiceModel(0), this); CopyDetailLines(ref _editServiceLines, _serviceLineList); foreach (ServiceLineModel SL in _serviceLineList) { SL.SnapShotCharge(); } ServiceLineModel.RecalcAction = RecalcCost; ServiceLineModel.ValidChangedAction = NotifyValidDetail; NotifyOfPropertyChange(() => IsValidState); }
public void CancelEdit() { ObjectCopier.CopyFields(this, _editCopy); _editCopy = null; }
public ServiceLineModel(ServiceLineModel copy) { ObjectCopier.CopyFields(this, copy); }
// IEditableObject public void BeginEdit() { //make a copy of the original in case cancels ObjectCopier.CopyFields(_editCopy = new CarModel(), this); }