private void searchHocVien(string textSearch) { DataTable tbHocVien = new DataTable(); //1. Lastname if (int.Parse(lookSearchBy.GetColumnValue("ID").ToString()) == 1) { //tbHocVien = boHv.searchHocVienByLastName(textSearch); tbHocVien = boHv.searchHocVienByFullName(textSearch); } //2. Firstname if (int.Parse(lookSearchBy.GetColumnValue("ID").ToString()) == 2) { tbHocVien = boHv.searchHocVienByFirstName(textSearch); } //3.Ngay sinh if (int.Parse(lookSearchBy.GetColumnValue("ID").ToString()) == 3) { tbHocVien = boHv.searchHocVienByBirthday(textSearch); } //4. Noi sinh if (int.Parse(lookSearchBy.GetColumnValue("ID").ToString()) == 4) { tbHocVien = boHv.searchHocVienByNoiSinh(textSearch); } //Dien thoai if (int.Parse(lookSearchBy.GetColumnValue("ID").ToString()) == 5) { tbHocVien = boHv.searchHocVienByDienThoai(textSearch); } gridTrainee.DataSource = tbHocVien; }
private void searchHocVien(string textSearch) { DataTable tbHocVien = new DataTable(); //1. Full name if (int.Parse(lookSearchBy.GetColumnValue("ID").ToString()) == 1) { tbHocVien = boHv.searchHocVienByFullName(textSearch); } //2. Last name else if (int.Parse(lookSearchBy.GetColumnValue("ID").ToString()) == 2) { tbHocVien = boHv.searchHocVienByLastName(textSearch); } //3. Firstname else if (int.Parse(lookSearchBy.GetColumnValue("ID").ToString()) == 3) { tbHocVien = boHv.searchHocVienByFirstName(textSearch); } //4.Ngay sinh else if (int.Parse(lookSearchBy.GetColumnValue("ID").ToString()) == 4) { tbHocVien = boHv.searchHocVienByBirthday(textSearch); } //5. Noi sinh else if (int.Parse(lookSearchBy.GetColumnValue("ID").ToString()) == 5) { tbHocVien = boHv.searchHocVienByNoiSinh(textSearch); } //6. Dien thoai else if (int.Parse(lookSearchBy.GetColumnValue("ID").ToString()) == 6) { tbHocVien = boHv.searchHocVienByDienThoai(textSearch); } //7.Theo số chứng chỉ else if (int.Parse(lookSearchBy.GetColumnValue("ID").ToString()) == 7) { tbHocVien = boHv.searchHocVienBySoCC(textSearch + " GTVT"); } gridStudentsList.DataSource = tbHocVien; }