private void OnEdit() { var emailDetailsViewModel = new EmailDetailsViewModel(SelectedEmail.Email); if (DialogService.ShowModalWindow(emailDetailsViewModel)) { SelectedEmail.Email = emailDetailsViewModel.EmailViewModel.Email; ServiceFactory.SaveService.EmailsChanged = true; } }
private void OnAdd() { var emailDetailsViewModel = new EmailDetailsViewModel(); if (DialogService.ShowModalWindow(emailDetailsViewModel)) { FiresecManager.SystemConfiguration.EmailData.Emails.Add(emailDetailsViewModel.EmailViewModel.Email); var emailViewModel = new EmailViewModel(emailDetailsViewModel.EmailViewModel.Email); Emails.Add(emailViewModel); SelectedEmail = emailViewModel; ServiceFactory.SaveService.EmailsChanged = true; } }