void ObjectsItemEndEdit(IEditableObject sender) { RecursoRampaViewModel UIObject = sender as RecursoRampaViewModel; try { RecursoRampaDataAccess.UpdateRecursoRampa(UIObject.GetDataObject()); } catch (Exception ex) { log.Error(ex.StackTrace); } }
void ObjectsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) { if (e.Action == NotifyCollectionChangedAction.Remove) { try { foreach (object item in e.OldItems) { RecursoRampaViewModel UIObject = item as RecursoRampaViewModel; RecursoRampaDataAccess.DeleteRecursoRampa(UIObject.GetDataObject()); } } catch (Exception ex) { log.Error(ex.StackTrace); } } }