public bool AddExcludeCourse(DataRow dr) { string s = dr["teachingPlan"].ToString(); DSExcludeTableAdapters.ExcludeCourseTableAdapter helper = new DSExcludeTableAdapters.ExcludeCourseTableAdapter(); string strNum = dr["course_num"].ToString(); if (CountByCourseNum(strNum) == 0) { helper.InsertExcludeCourse(dr["type"].ToString(), dr["course_num"].ToString(), dr["course_name"].ToString()); } return(true); }
public bool ExcludeUpdateTypeByID(string type, int ID) { DSExcludeTableAdapters.ExcludeCourseTableAdapter helper = new DSExcludeTableAdapters.ExcludeCourseTableAdapter(); if (type == "") { helper.UpdateTypeNULLByID(ID); } else { helper.UpdateTypeByID(type, ID); } return(true); }
public int CountByCourseNum(string courseNum) { DSExcludeTableAdapters.ExcludeCourseTableAdapter helper = new DSExcludeTableAdapters.ExcludeCourseTableAdapter(); return(Convert.ToInt32(helper.ScalarByCourseNum(courseNum))); }
public bool DeleteByID(int ID) { DSExcludeTableAdapters.ExcludeCourseTableAdapter helper = new DSExcludeTableAdapters.ExcludeCourseTableAdapter(); helper.DeleteByID(ID); return(true); }