public bool updateTimeTable(DataSet.DsPSMS.ST_TIMETABLERow dr, int id, out string msg) { bool isOk = true; if (dr == null) { msg = "data is empty "; return(false); } try { timedb.Open(); int result = timedb.updateStuTimeTable(dr, id); msg = "update complete"; } catch { msg = "error occurs when updating data to ST_TIMETABLE table"; return(false); } finally { timedb.Close(); } return(isOk); }