Exemple #1
0
    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);
    }
Exemple #2
0
 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);
 }
Exemple #3
0
 public int CountByCourseNum(string courseNum)
 {
     DSExcludeTableAdapters.ExcludeCourseTableAdapter helper = new DSExcludeTableAdapters.ExcludeCourseTableAdapter();
     return(Convert.ToInt32(helper.ScalarByCourseNum(courseNum)));
 }
Exemple #4
0
 public bool DeleteByID(int ID)
 {
     DSExcludeTableAdapters.ExcludeCourseTableAdapter helper = new DSExcludeTableAdapters.ExcludeCourseTableAdapter();
     helper.DeleteByID(ID);
     return(true);
 }