private void txtMaDGTk_TextChanged(object sender, EventArgs e) { DocGiaDAO dg = new DocGiaDAO(); DocGia d = dg.GetNameDG(txtMaDGTk.Text); txtTenDGtk.Text = d.HoTen; txtMsvtk.Text = d.MaSV.ToString(); }
private void btnSearchPeople_Click(object sender, EventArgs e) { txtName.Text = ""; lvSearch.Columns.Clear(); lvSearch.Items.Clear(); if (radMaDG.Checked == true) { SearchByMaDG(txtSearchPeople.Text); DocGiaDAO dg = new DocGiaDAO(); DocGia docgia = dg.GetNameDG(txtSearchPeople.Text); txtName.Text = docgia.HoTen; } if (rabMaSV.Checked == true) { DocGiaDAO dg = new DocGiaDAO(); DocGia docgia = dg.GetNameDGByMsv(txtSearchPeople.Text); txtName.Text = docgia.HoTen; SearchByMaSV(txtSearchPeople.Text); } }