//获取所有课程名称的集合 public static DataSet FillByAllSubjectName() { string strSql = "select SubjectName from Subject"; SqlCommon sqlcomm = new SqlCommon(); return(sqlcomm.CreaDataSet(strSql, null)); }
//获取所有学生姓名的集合 public static DataSet FillByAllStudentName(string className) { string strSql = "select StudentName from Student where [ClassName] = @className"; SqlCommon sqlcomm = new SqlCommon(); return(sqlcomm.CreaDataSet(strSql, new SqlParameter("@className", className))); }
//获取所有教师的集合 public static DataSet FillByAllTeacher() { string strSql = "select TeacherName,Gender,Birthday,IDCard,University,Specialfield,Diploma,Picture,Remark from Teacher"; SqlCommon sqlcomm = new SqlCommon(); return(sqlcomm.CreaDataSet(strSql, null)); }
//获取所有教师名称的集合 public static DataSet FillByAllTeacherName() { string strSql = "select TeacherName from Teacher"; SqlCommon sqlcomm = new SqlCommon(); return(sqlcomm.CreaDataSet(strSql, null)); }
//得到所有用户的记录 public static DataSet FillByAllUser() { string strSql = "select UserName,Level,Status from UserInfo"; SqlCommon sqlcomm = new SqlCommon(); return(sqlcomm.CreaDataSet(strSql, null)); }
//得到指定班级所有课程名称的记录 public DataSet FillByAllSubjectName() { string strSql = "select SubjectName from Course where [ClassName] = @className"; SqlCommon sqlcomm = new SqlCommon(); DataSet ds = sqlcomm.CreaDataSet(strSql, new SqlParameter("@className", _className)); return(ds); }
//得到指定班级所有课程信息的记录 public DataSet FillByAllCourse() { string strSql = "select SubjectName,Teacher,BeginDate,FinishDate,Remark from Course where [ClassName] = @className"; SqlCommon sqlcomm = new SqlCommon(); DataSet ds = sqlcomm.CreaDataSet(strSql, new SqlParameter("@className", _className)); return(ds); }
public DataTable GetAllStudentNo() { string strSql = "select StudentNo from Student where [ClassName] = @className"; SqlCommon sqlcomm = new SqlCommon(); DataSet ds = sqlcomm.CreaDataSet(strSql, new SqlParameter("@className", _className)); return(ds.Tables[0]); }
//获取班级所有学生的集合 public DataSet FillByAllStudent() { string strSql = "select StudentNo,StudentName,Gender,Birthday,Picture,Remark from Student where [ClassName] = @className"; SqlCommon sqlcomm = new SqlCommon(); DataSet ds = sqlcomm.CreaDataSet(strSql, new SqlParameter("@className", _className)); return(ds); }
//得到所有班级的记录 public static DataSet FillByAllClass() { string strSql = "select * from Class"; SqlCommon sqlcomm = new SqlCommon(); DataSet ds = sqlcomm.CreaDataSet(strSql, null); return(ds); }
//得到所有班级名 public static DataTable GetAllClassName() { string strSql = "select ClassName from Class"; SqlCommon sqlcomm = new SqlCommon(); DataSet ds = sqlcomm.CreaDataSet(strSql, null); return(ds.Tables[0]); }
//得到该班所有学生的成绩 public static DataSet FillByAllScoreInfo(string className) { string strSql = "select * from ScoreView where StudentNo in (select StudentNo from Student where ClassName = @className)"; SqlCommon sqlcomm = new SqlCommon(); DataSet ds = sqlcomm.CreaDataSet(strSql, new SqlParameter("@className", className)); return(ds); }