public DataSet.DsPSMS.ST_GRADE_MSTDataTable getAllGradeData(out string msg) { DataSet.DsPSMS.ST_GRADE_MSTDataTable result = new DataSet.DsPSMS.ST_GRADE_MSTDataTable(); try { timedb.Open(); result = timedb.selectAllGradeData(); if (result != null && result.Rows.Count > 0) { msg = result.Rows.Count + " user found"; } else { result = null; msg = "user not found"; } } catch { msg = "error has occure when insert data"; return(null); } finally { timedb.Close(); } return(result); }