private async void btnEditPersonalData_Click(object sender, EventArgs e) { if (!_bindingContext.Id.HasValue) { return; } using (PersonalDataEditor editor = new PersonalDataEditor()) { var aggreage = _contactInfoRepository.GetById(_bindingContext.Id.Value); var model = new PersonalDataEditorModel(aggreage); await editor.Bind(model); if (editor.ShowDialog() == DialogResult.OK) { await Dispatchers.RiseCommand(new PersonalDataChanging(aggreage.Id, model.CreateValueObject())); await RefreshBinding(); } } }
public NoRequiredDataProvidedForPersonalData(PersonalDataEditorModel model) : base( "No required data - firstName, lastName was provided. Cannot create personal data") { Model = model; }