예제 #1
0
        private void DoAddTheraptPlaceType()
        {
            var newTherapyPlaceType = TherapyPlaceTypeCreateAndEditLogic.Create();

            dataCenter.AddNewTherapyPlaceType(newTherapyPlaceType);
            connectionService.SendTherapyPlaceTypeAddedNotification(newTherapyPlaceType);
            TherapyPlaceTypes.Add(newTherapyPlaceType);

            SelectedTherapyPlaceType = newTherapyPlaceType;
        }
예제 #2
0
        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;
        }