private void txtSearchStudent_TextChanged(object sender, EventArgs e) { try { if (string.IsNullOrEmpty(txtSearchStudent.Text)) { ItemSales.DispayStudentNames(dataGridStudentNames, txtSearchStudent.Text); } else { ItemSales.DispayStudentNames(dataGridStudentNames, txtSearchStudent.Text); } }catch (Exception ex) { MessageBox.Show(ex.Message, "Student Search Error", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
public Make_Sale() { InitializeComponent(); ItemSales.DispayItems(dataGridItmes, ""); ItemSales.DispayStudentNames(dataGridStudentNames, ""); }