Beispiel #1
0
        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;
        }