public DataTable GetAllEmployee()
{
DataTable tblEmployee = new DataTable();
SqlDataReader rdr = null;
cmd.CommandType = CommandType.Text;
cmd.CommandText = @"SELECT ID, NAME, DESIGNATION, BLOODGROUP FROM EMPLOYEE";
try
{
if (sqlConn.State == ConnectionState.Closed)
sqlConn.Open();
rdr = cmd.ExecuteReader();
tblEmployee.Load(rdr);
}
catch (Exception exp)
{
throw (exp);
}
finally
{
if (sqlConn.State == ConnectionState.Open)
sqlConn.Close();
}
return tblEmployee;
}