private async System.Threading.Tasks.Task Serch() { int NumberPhones = 0; try { NumberPhones = Convert.ToInt32(textBoxX2.Text); } catch { } List <CV_Info> CvList = await CV_Info.Serch(textBox1.Text, textBox2.Text, comboBox1.SelectedIndex != -1?CV_Study.CV_StudyList[comboBox1.SelectedIndex].id : -1, comboBox2.SelectedIndex, comboBox3.SelectedIndex != -1?CvTeamNeed.CvTeamNeedList[comboBox3.SelectedIndex].id : -1, checkBoxX1.Checked, NumberPhones, textBoxX1.Text, comboBoxEx1.SelectedIndex != -1?CvTeamNeed.CvTeamNeedList[comboBoxEx1.SelectedIndex].id : -1, textBoxX3.Text); List <CV_Info> CvListAfter = new List <CV_Info>(); if (comboBoxEx2.SelectedIndex != -1) { for (int i = 0; i < CvList.Count; i++) { if (await HaveScil.GetHAVECVSELC(CvList[i].id, Scileis.ScileislList[comboBoxEx2.SelectedIndex].id)) { CvListAfter.Add(CvList[i]); } } } else { CvListAfter = CvList; } System.Threading.Tasks.Task.Run(() => { ClassDataGridViewDo.DataGridEnterGridForCV_InfoCV(dataGridViewX1, CvListAfter); } ); }