コード例 #1
0
ファイル: Exclude.cs プロジェクト: LuckPumpkin/paperSystem
    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);
    }
コード例 #2
0
ファイル: Exclude.cs プロジェクト: LuckPumpkin/paperSystem
 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);
 }
コード例 #3
0
ファイル: Exclude.cs プロジェクト: LuckPumpkin/paperSystem
 public int CountByCourseNum(string courseNum)
 {
     DSExcludeTableAdapters.ExcludeCourseTableAdapter helper = new DSExcludeTableAdapters.ExcludeCourseTableAdapter();
     return(Convert.ToInt32(helper.ScalarByCourseNum(courseNum)));
 }
コード例 #4
0
ファイル: Exclude.cs プロジェクト: LuckPumpkin/paperSystem
 public bool DeleteByID(int ID)
 {
     DSExcludeTableAdapters.ExcludeCourseTableAdapter helper = new DSExcludeTableAdapters.ExcludeCourseTableAdapter();
     helper.DeleteByID(ID);
     return(true);
 }