public OpenCourseForm(Course c)
 {
     InitializeComponent();
     this.Text = "开设课程";
     tbTeachCourseNo.Enabled = true;
     isUpdate          = false;
     btnAdd.Text       = "开课";
     cbCourseName.Text = c.courseName;
     tbCourseNo.Text   = CourseManageAction.QuerycourseNo(c.courseName);
 }
 public OpenCourseForm(OpenCourse oc)
 {
     InitializeComponent();
     this.Text = "修改开课";
     tbTeachCourseNo.Enabled = false;
     tbTeachCourseNo.Text    = oc.teachCourseNo;
     cbCourseName.Text       = oc.courseName;
     tbTeacher.Text          = oc.teacher;
     tbAmount.Text           = oc.amount.ToString();
     cbStartWeek.Text        = oc.startWeek.ToString();
     cbEndWeek.Text          = oc.endWeek.ToString();
     isUpdate        = true;
     btnAdd.Text     = "保存修改";;
     tbCourseNo.Text = CourseManageAction.QuerycourseNo(oc.courseName);
 }