private void button11_Click(object sender, EventArgs e) { L1 = new laboratorist(); DataTable tbl = new DataTable(); tbl = L1.ShowTable("SELECT * FROM laboratorist"); dataGridView1.DataSource = tbl; }
private void button9_Click(object sender, EventArgs e) { if (comboBox1.Text != "") { L1 = new laboratorist(); DataTable tbl = new DataTable(); tbl = L1.ShowTable("SELECT * FROM laboratorist WHERE ID = '" + comboBox1.Text + "'"); dataGridView1.DataSource = tbl; dataGridView1.DataSource = tbl; } else { MessageBox.Show("Please Select An Id"); } }