public void AddSubMeasure(object dataContext) { { var subMeasure = new SubMeasure { ReleatedMeasure = Model, Name = NewSubMeasureName, ResponsibleSubject = NewSubMeasureResponsibleSubject.Model }; m_SubMeasureViewModels.Add(m_ViewModelFactory.CreateFromExisting(subMeasure)); NotifyOfPropertyChange(() => SubMeasures); } }
public SubMeasureViewModel(SubMeasure submeasure, IResponsibleSubjectViewModelFactory responsibleSubjectViewModelFactory) { m_Model = submeasure; m_ResponsibleSubjectViewModelFactory = responsibleSubjectViewModelFactory; }
public SubMeasureViewModel CreateFromExisting(SubMeasure subMeasure) { return(new SubMeasureViewModel(subMeasure, m_ResponsibleSubjectViewModelFactory)); }