⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 student2.cs

📁 一个研究生管理系统 具体的情况自己看了
💻 CS
📖 第 1 页 / 共 2 页
字号:
        public static DataTable GetIndividualTeaPracApplyFailure(string StuID)
        {
            //返回个人申请的所有失败的教学实践;
            //字段包括。
            //本科课程编号 课程名称 教师姓名 本科课程 课程班号 
            string SqlString = "select UndergraduateCourse.UnderCourseID,UndergraduateCourse.CourseName,UndergraduateCourse.Teacher,";
            SqlString = SqlString + "UndergraduateCourse.CourseID,UndergraduateCourse.TeaClassID from UndergraduateCourse,";
            SqlString = SqlString + "TeachPracApply where TeachPracApply.StuID='" + StuID.ToString() + "'and TeachPracApply.IsChecked=2";
            SqlString = SqlString + " and TeachPracApply.UnderCourseID=UndergraduateCourse.UnderCourseID";
            DataTable dt = Query.ProcessSql(SqlString, "GradMIS_Data");
            if (dt.Rows.Count > 0)
            {
                return dt;
            }
            return null;


        }
        public static DataTable GetIndividualTeaPracApplyDoing(string StuID)
        {
            //返回个人申请的所有正在申请的教学实践;
            //字段包括。
            //本科课程编号 课程名称 教师姓名 本科课程 课程班号 
            string SqlString = "select UndergraduateCourse.UnderCourseID,UndergraduateCourse.CourseName,UndergraduateCourse.Teacher,";
            SqlString = SqlString + "UndergraduateCourse.CourseID,UndergraduateCourse.TeaClassID from UndergraduateCourse,";
            SqlString = SqlString + "TeachPracApply where TeachPracApply.StuID='" + StuID.ToString() + "' and TeachPracApply.IsChecked=0";
            SqlString = SqlString + " and TeachPracApply.UnderCourseID=UndergraduateCourse.UnderCourseID";
            DataTable dt = Query.ProcessSql(SqlString, "GradMIS_Data");
            if (dt.Rows.Count > 0)
            {
                return dt;
            }
            return null;

        }
        public static DataTable GetAllReStudyInfoHistory(string StuID)
        {
            //返回学生所选择的所有补修课程
            //学号为:StuID
            //字段包含:补修课程序号 课程名称 教师姓名 课程编号 课程班号 五个;
            //ReStudyCourseID,CourseName,Teacher,CourseID,TeaClassID
            string SqlString = "select ReStudyCourse.ReStudyCourseID,ReStudyCourse.CourseName,ReStudyCourse.Teacher,";
            SqlString = SqlString + "ReStudyCourse.CourseID,ReStudyCourse.TeaClassID from ReStudyCourse,RestStudyList";
            SqlString = SqlString + " where RestStudyList.StuID=" + StuID.ToString() + " and RestStudyList.ReStudyCourseID=";
            SqlString = SqlString + "ReStudyCourse.ReStudyCourseID";
            DataTable dt = Query.ProcessSql(SqlString, "GradMIS_Data");
            if (dt.Rows.Count > 0)
            {
                return dt;
            }
            return null;
    
        }
        public static DataRow GetTheDetailInfoFromStationInfoandStationApply(string StuID,int StationID)
        {
            //返回StationID对应的详细信息DataRow中包含以下字段
            //StationID,StationName,StationDescrip,IsApplied2,
            //StationInfo.Remark as SInfoRemark;
            //StationApply.Remark as SApplyRemark;
            //如果没有找到StationID返回null
            //

            string SqlString = "select StationInfo.StationID,StationInfo.StationName,StationInfo.StationDescrip,";
            SqlString = SqlString + "StationInfo.IsApplied2,StationInfo.Remark as SInfoRemark,StationApply.Remark as SApplyRemark";
            SqlString = SqlString + " from StationInfo,StationApply where StationInfo.StationID=StationApply.StationID and StuID='"+StuID+"'and ";
            SqlString = SqlString + " StationApply.StationID=" + StationID.ToString() + "";
            DataTable dt = Query.ProcessSql(SqlString, "GradMIS_Data");
            if (dt.Rows.Count > 0)
            {
                return dt.Rows[0];
            }
            return null;

        }
        public static DataRow GetAllInfoFromStudentInfoAndSpvInfo(string StuID)
        {
            //获取该学生还有其导师的所有信息;
            //从StudentInfo和SpvInfo中获取;

            //StudentInfo:StuID SpvID StuName Gender Grade Direction PoliticsVisage NativePlace Birthday Nation EntranceTime RegisteredPermanentResidence
            // IDCard Address PrimTeachPhone TrainMode IsGraduate Remark
            //StudentInfo: SpvID  SpvName SpvType SpvGender IsDoctor RecruitNumber AddNumber ConfirmDate AlreadyNumber Remark
            /*
                * 学号	StuID
                学生姓名	StuName
                性别	Gender
                年级	Grade
                方向	Direction
                政治面貌	PoliticsVisage
                籍贯	NativePlace
                出生年月	Birthday
                民族	Nation
                入学时间	EntranceTime
                户口所在地	RegisteredPermanentResidence
                身份证号码	IDCard
                家庭地址	Address
                主联系电话	PrimTeachPhone
                培养方式	TrainMode
                备注	Remark
                寝室号	暂无字段;
                寝室电话	暂无字段
                E-mail	暂无字段

             * */
            /*
             *   导师编号	SpvID
                 导师姓名	SpvName
                 导师职称	SpvType
                 导师性别	SpvGender
                 是否博导	IsDoctor
                 招生人数	RecruitNumber
                 增加招生人数	AddNumber
                 批准时间	ConfirmDate
                 已招人数	AlreadyNumber
                 备注	Remark

             * */

            string SqlString = "SELECT StudentInfo.*, SpvInfo.SpvName, SpvInfo.SpvType, SpvInfo.SpvGender, SpvInfo.IsDoctor,";
            SqlString = SqlString + "SpvInfo.RecruitNumber, SpvInfo.AddNumber, SpvInfo.ConfirmDate, SpvInfo.AlreadyNumber, ";
            SqlString = SqlString + "SpvInfo.Remark AS SpvRemark, StudentInfo.Remark AS StuRemark FROM StudentInfo INNER JOIN ";
            SqlString = SqlString + "SpvInfo ON StudentInfo.SpvID = SpvInfo.SpvID and StudentInfo.StuID='" + StuID.ToString()+"'";
            DataTable dt = Query.ProcessSql(SqlString, "GradMIS_Data");
            if (dt.Rows.Count > 0)
            {
                return dt.Rows[0];
            }
            return null;


        }
        public static bool UpdateStudentInfo(string StuID,string Dormitory, string DormitoryPhone, string PrimTeachPhone,string E_mail)
        {//修改学生信息表将这几个字段对应的StudentInfo中的字段进行修改;
           
            UpdateCriteria uc = new UpdateCriteria(typeof(StudentInfoEntity));
            Condition cd = uc.GetNewCondition();
            cd.AddEqualTo(StudentInfoEntity.__STUID, StuID);
            uc.AddAttributeForUpdate(StudentInfoEntity.__DORMITORY, Dormitory);
            uc.AddAttributeForUpdate(StudentInfoEntity.__DORMITORYPHONE, DormitoryPhone);
            uc.AddAttributeForUpdate(StudentInfoEntity.__E_MAIL, E_mail);
            uc.AddAttributeForUpdate(StudentInfoEntity.__PRIMTEACHPHONE,PrimTeachPhone);
            try
            {
                uc.Perform();
                return true;
            }
            catch
            {
                return false;
            }
        }

	}
    


}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -