private void DoAddTheraptPlaceType() { var newTherapyPlaceType = TherapyPlaceTypeCreateAndEditLogic.Create(); dataCenter.AddNewTherapyPlaceType(newTherapyPlaceType); connectionService.SendTherapyPlaceTypeAddedNotification(newTherapyPlaceType); TherapyPlaceTypes.Add(newTherapyPlaceType); SelectedTherapyPlaceType = newTherapyPlaceType; }
private void DoSaveChanges() { if (!NameChecker.CheckName(Name)) { NameChecker.ShowCharacterError(Name); return; } var newTherapyPlaceType = SelectedTherapyPlaceType.SetNewName(Name) .SetNewIcon(IconType.IconType); dataCenter.UpdateTherapyPlaceType(newTherapyPlaceType); connectionService.SendTherapyPlaceTypeUpdatedNotification(newTherapyPlaceType); TherapyPlaceTypes.Remove(SelectedTherapyPlaceType); TherapyPlaceTypes.Add(newTherapyPlaceType); SelectedTherapyPlaceType = null; ShowModificationView = false; }