Exemple #1
0
        public DataTable ShowProfession()
        {
            string SqlString = "select ProNum AS 专业号,ProName AS 专业名,Profession.deptNum AS 系别号,Department.DeptName as 系部名称 from dbo.Profession join Department on Profession.deptNum=Department.DeptNum";

            DataBaseOperaClass objDataBase = new DataBaseOperaClass();

            DataTable objDataTable = objDataBase.ShowTable(SqlString);
            return (objDataTable);
        }
Exemple #2
0
        public DataTable ShowStuInfo()
        {
            string SqlString = "Select * From V_Student_All_Info";

            DataBaseOperaClass objDataBase = new DataBaseOperaClass();

            DataTable objDataTable = objDataBase.ShowTable(SqlString);
            return (objDataTable);
        }
Exemple #3
0
        //获取所有班级信息
        public DataTable ShowTeaching()
        {
            string Sqlstring = "Select TeaName AS 教师姓名,Semester AS 学期,CourseName AS 授课名称 From Teacher,Teaching,Course Where Teacher.TeaNum=Teaching.TeaNum and Course.CourseNum=Teaching.CourseNum";

            DataBaseOperaClass objDataBase = new DataBaseOperaClass();

            DataTable objDataTable = objDataBase.ShowTable(Sqlstring);

            return (objDataTable);
        }
Exemple #4
0
        //任务14
        //获取所有班级信息
        public DataTable ShowClass()
        {
            //string Sqlstring = "select ClaNum AS 班级号,ClaName AS 班级名,DeptNum AS 系别编号,ProNum AS 专业编号 from dbo.Class";

            string SqlString = "Select * From V_ClassInfo";

            DataBaseOperaClass objDataBase = new DataBaseOperaClass();

            DataTable objDataTable = objDataBase.ShowTable(SqlString);

            return (objDataTable);
        }
Exemple #5
0
        //获取表格数据给下拉字段使用:
        public string[] GetSchNum()
        {
            string SqlString = "Select SchNum AS 学校代码, SchName AS 校区 From School";

                DataBaseOperaClass objDataBase = new DataBaseOperaClass();

                DataTable objTable = objDataBase.ShowTable(SqlString);
                string[] SchNum = new string[objTable.Rows.Count];
                for (int i = 0; i < objTable.Rows.Count; i++)
                    SchNum[i] = objTable.Rows[i][0].ToString();
                return (SchNum);
        }