/// <summary> /// 学生个人信息 /// </summary> /// <param name="id"></param> /// <returns></returns> public DtoStudentInfo GetStudentInfoByAccount(string account) { StudentBll studentBll = new StudentBll(); StudentApplyBll studentApplyBll = new StudentApplyBll(); var studentInfo = studentBll.StudentRepository.GetStudentInfoByAccount(account); return(studentInfo); }
/// <summary> /// 选课中心课程详情-预览功能 /// </summary> /// <param name="courseId">课程Id</param> /// <param name="studentId">学生Id</param> /// <returns></returns> public DtoSelectCenterCourseDetailResult GetCourseDetailForPreview(int courseId, int studentId) { DtoSelectCenterCourseDetailResult result = new DtoSelectCenterCourseDetailResult(); DtoCourseSelectCondition condition = new DtoCourseSelectCondition(); condition.StudentId = studentId; DtoSelectCenterCourseDetailObject course = null; Dictionary <string, decimal> voucherDic = null; Yw_StudentOrder order = null; DtoStudentApplySchool applyRecord = null; SchoolBll schBll = new SchoolBll(); Bas_School school = schBll.GetSchoolByStudent(condition.StudentId); if (school != null) { condition.SetSchoolLevel(school.Bsl_Level); condition.SetSchoolId(school.Bsl_Id); course = CourseRepository.GetCourseDetailWithPrice(courseId, condition.SchoolLevel, true); if (course != null && course.CourseId > 0) { DtoSimpleCourse simpleCourse = new DtoSimpleCourse() { CourseId = course.CourseId, Amount = course.CoursePrice, CourseType = course.CourseType, Grade = course.Grade }; voucherDic = GetVoucherDicForUserCourse(new List <DtoSimpleCourse>() { simpleCourse }, condition); //查询用户是否已购买此课程 StudentOrderBll studentOrderBll = new StudentOrderBll(); order = studentOrderBll.GetFinishOrder(condition.StudentId, course.CourseId); } } else { course = CourseRepository.GetCourseDetailWithoutPrice(courseId, true); StudentApplyBll studentApplyBll = new StudentApplyBll(); applyRecord = studentApplyBll.GetApplyByStudentId(condition.StudentId); } if (course != null) { Yw_CourseIntroduction introduction = CourseIntroductionRespository.GetCourseIntroduction(course.CourseId); result = CreateSelectCenterCourseDetailResultItem(course, introduction, school, applyRecord, voucherDic, order); } else { throw new AbhsException(ErrorCodeEnum.CourseNotExists, AbhsErrorMsg.ConstCourseNotExists); } return(result); }
/// <summary> /// 学生个人信息 /// </summary> /// <param name="id"></param> /// <returns></returns> public DtoStudentInfo GetStudentInfo(int id) { StudentBll studentBll = new StudentBll(); StudentApplyBll studentApplyBll = new StudentApplyBll(); var studentInfo = studentBll.StudentRepository.GetStudentInfoById(id); if (studentInfo.Bst_SchoolId > 0) { return(studentInfo); } DtoStudentApplySchool studentApplySchool = studentApplyBll.GetApplyByStudentId(id); if (studentApplySchool != null) { studentInfo.ApplyStatus = studentApplySchool.Yay_Status; studentInfo.ApplySchoolName = studentApplySchool.SchoolName; } return(studentInfo); }