private void load() { if (iD != "") { dt = dg.searchData(iD); textBox1.Text = dt.Rows[0][1].ToString(); textBox2.Text = dt.Rows[0][2].ToString(); if (dt.Rows[0][3].ToString() == "nam") { checkBox1.Checked = true; } ; if (dt.Rows[0][3].ToString() == "nữ") { checkBox2.Checked = true; } ; if (dt.Rows[0][3].ToString() == "khác") { checkBox1.Checked = true; checkBox2.Checked = true; } ; textBox3.Text = dt.Rows[0][4].ToString(); textBox4.Text = dt.Rows[0][5].ToString(); textBox5.Text = dt.Rows[0][6].ToString(); textBox6.Text = dt.Rows[0][7].ToString(); textBox7.Text = dt.Rows[0][8].ToString(); textBox8.Text = dt.Rows[0][9].ToString(); } ; }
private void load() { dt = dg.searchData(iD); label1.Text = dt.Rows[0][0].ToString(); label3.Text = dt.Rows[0][1].ToString(); label5.Text = dt.Rows[0][2].ToString(); label16.Text = dt.Rows[0][3].ToString(); label6.Text = dt.Rows[0][4].ToString(); label8.Text = dt.Rows[0][6].ToString(); label10.Text = dt.Rows[0][5].ToString(); label12.Text = dt.Rows[0][7].ToString(); label14.Text = dt.Rows[0][8].ToString(); pictureBox1.Image = Image.FromFile(dt.Rows[0][9].ToString()); pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage; a = dg.searchDatamuon(iD); dataGridView1.DataSource = a; }