public DataSet.DsPSMS.ST_TIMETABLE_DETAILDataTable getAllTimeDetailData(string id, out string msg) { DataSet.DsPSMS.ST_TIMETABLE_DETAILDataTable result = new DataSet.DsPSMS.ST_TIMETABLE_DETAILDataTable(); try { timedb.Open(); result = timedb.selectAllTimeDetail(id); 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); }