private void OnEdit() { EditMode = true; CanEditFields = true; CanUseDatagrid = false; SelectedEvent.BeginEdit(); }
private void ModifyCommandExecute(Object param) { SelectedEvent.BeginEdit(); if (AddNewEventFunc != null && AddNewEventFunc(SelectedEvent)) { using (var context = new DataContext()) { context.UpdateEventParticipators(SelectedEvent.Id, SelectedEvent.Participators); context.UpdateEvent(SelectedEvent.ConvertBackToDalModel()); context.UpdateEventDocuments(SelectedEvent.Documents.Select(d => d.ConvertBackToDalModel()), SelectedEvent.Id); SelectedEvent.EndEdit(); RefreshEvents(); return; } } SelectedEvent.CancelEdit(); }