public async override void Edit(object selectedItem) { DataRowView item = (DataRowView)selectedItem; Doctor doctor = Mapping.Mapper.Map <Doctor>(item); doctor = await doctorService.GetByPrimaryKey(doctor); EditModalWindow editModal = await EditModalWindow.Create(Mapping.Mapper.Map <DoctorViewModel>(doctor)); _ = editModal.ShowDialog(); DataGridControl.InformAboutStatus(editModal.OperationStatus); }
public static async Task <EditModalWindow> Create(DoctorViewModel doctor) { EditModalWindow modal = new EditModalWindow(doctor); await modal.InitalizeData(); modal.doctorUtil = new DoctorClinicAndMedicalTitleUtil(modal.ClinicsListBox, modal.TitlesListBox, modal.MedicalTitleComboBox, modal.ClinicComboBox, modal.doctor) { CurrentDictionary = modal.CurrentDictionary.MergedDictionaries[0] }; await modal.SetExistingData(); return(modal); }