public DataTable load_department() { DataTable dt = new DataTable(); sqlcon = new SqlConnection(con); sqlcon.Open(); string sql = "select * from department"; SqlCommand cmd = new SqlCommand(sql); cmd.CommandType = CommandType.Text; cmd.Connection = sqlcon; SqlDataAdapter sd = new SqlDataAdapter(cmd); sd.Fill(dt); return dt; }
No comments:
Post a Comment