/// <summary> /// 加载指定班级下的T_Course /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ComClass_SelectedIndexChanged(object sender, EventArgs e) { T_CourseDAL dal = new T_CourseDAL(); T_Class @class = comClass.SelectedItem as T_Class; if (@class == null) { ucBtnExt2_BtnClick(null, null); } comCourse.DataSource = dal.ExecuteT_ClassSetUpCourseTeach(@class.ClassID); }
private List <T_InsertedFactionModel> LoadComCourseName(string stuid) { string t_sql = "select ClassID from T_StudentBasicInformation where T_StudentBasicInformation.StuID = @stuid"; SqlParameter pars = new SqlParameter("@stuid", SqlDbType.Int) { Value = stu.StuID }; T_CourseDAL dal = new T_CourseDAL(); int classID = (int)dal.ExecuteScalar(t_sql, CommandType.Text, pars); return(dal.ExecuteT_ClassSetUpCourseTeach(classID)); }