private void tbWorkerNo_Leave(object sender, EventArgs e) { tbTeacher.Text = CourseManageAction.QueryWorkerName(tbWorkerNo.Text); if (tbTeacher.Text == "") { MessageBox.Show("不存在该教师"); tbWorkerNo.Text = ""; return; } }