public bool saveTeacherGrade(DataSet.DsPSMS.ST_TEACHER_GRADERow dr, out string msg) { bool isOk = true; if (dr == null) { msg = "data is empty "; return(false); } try { timedb.Open(); int result = timedb.insertTeacherGrade(dr); msg = "insert complete"; } catch { msg = "error occurs when inserting data to ST_TEACHER_GRADE table"; return(false); } finally { timedb.Close(); } return(isOk); }