コード例 #1
0
 private async void InitalizeData()
 {
     (await clinicService.GetAll()).Select(x => Mapping.Mapper.Map <ClinicViewModel>(x))?.ToList()?.
     ForEach(x => ClinicComboBox.Items.Add(x));
     (await medicalTitleService.GetAll()).Select(x => Mapping.Mapper.Map <MedicalTitleViewModel>(x))?.ToList()?.
     ForEach(x => MedicalTitleComboBox.Items.Add(x));
     (await localAccountService.GetAllWithRoleNames()).Select(x => Mapping.Mapper.Map <LocalAccountViewModel>(x))?.ToList()?.
     ForEach(x => AccountComboBox.Items.Add(x));
 }
コード例 #2
0
 private async Task InitalizeData()
 {
     (await clinicService.GetAll()).Select(x => Mapping.Mapper.Map <ClinicViewModel>(x))?.ToList()?.
     ForEach(async x =>
     {
         Place place = await placeService.GetByPrimaryKey(new Place()
         {
             IdPlace = x.IdPlace
         });
         place.SetFormat("{0}, {1}");
         x.Place = place.ToString();
         x.SetFormat("{0}, {1}");
         ClinicComboBox.Items.Add(x);
     });
     (await medicalTitleService.GetAll()).Select(x => Mapping.Mapper.Map <MedicalTitleViewModel>(x))?.ToList()?.
     ForEach(x => MedicalTitleComboBox.Items.Add(x));
     (await localAccountService.GetAllWithRoleNames()).Select(x => Mapping.Mapper.Map <LocalAccountViewModel>(x))?.ToList()?.
     ForEach(x => AccountComboBox.Items.Add(x));
 }