/// <summary> /// Event handler fires when the SelectedOriginRelationship is modified /// </summary> private async void OriginRelatedFeature_FeatureCRUDOperationCompleted(object sender, FeatureOperationEventArgs e) { var originRelationshipVM = sender as OriginRelationshipViewModel; var originRelationshipVMCollection = (OriginRelationships.FirstOrDefault(o => o.RelationshipInfo == originRelationshipVM.RelationshipInfo)).OriginRelationshipViewModelCollection; if (e.Args == CRUDOperation.Delete) { // remove viewmodel from collection originRelationshipVMCollection.Remove(originRelationshipVM); } else { //sort collection SortCollection(originRelationshipVMCollection); } try { // call method to update tree condition and dbh in custom tree workflow await TreeSurveyWorkflows.UpdateIdentifiedFeature(originRelationshipVMCollection, Feature, PopupManager); } catch (Exception ex) { UserPromptMessenger.Instance.RaiseMessageValueChanged( Resources.GetString("GenericError_Title"), ex.Message, true, ex.StackTrace); } }