private void LoadData()
{
cmd.CommandText = "Select Eno,Ename,Job,Salary,Status from Employee order by Eno";
dr = cmd.ExecuteReader();
ShowData();
}
private void ShowData()
{
if (dr.Read())
{
textBox1.Text = dr[0].ToString();
textBox2.Text = dr[1].ToString();
textBox3.Text = dr[2].ToString();
textBox4.Text = dr[3].ToString();
checkBox1.Checked = Convert.ToBoolean(dr[4]);
}
else
{
MessageBox.Show("No Data Exist");
}
}