1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Linq.Expressions;
- using System.Text;
- using Bowin.Common.Linq.Entity;
- using EMISOnline.ViewModel.SystemView;
- using EMISOnline.DataLogic.SystemDAL;
- using EMISOnline.Entities;
- using EMISOnline.DataLogic.Student;
- using EMISOnline.CommonLogic.StudentServices;
- using Bowin.Web.Controls.Mvc;
- using Bowin.Common.Linq;
- using EMISOnline.ViewModel.Student;
- using EMISOnline.DataLogic.Repositories;
- namespace EMISOnline.CommonLogic.StudentServices
- {
- public class CourseExamServices : ICourseExamServices
- {
- public StudentHomeWorkDAL HomeWorkDAL { get; set; }
- public CourseEaxmDAL courseEaxmDAL { get; set; }
- public SchoolyearDAL SchoolyearDAL { get; set; }
- public IGridResultSet<CourseExamView> getCourseExamList(string CourseName, int? ExamStatus, Guid UserId, int page, int rows)
- {
- var curSchoolyearID = SchoolyearDAL.GetCurSchoolyear();
- var sql = courseEaxmDAL.getStudentEaxmListbySchoolyear(UserId, curSchoolyearID.SchoolyearID);
- if (!string.IsNullOrEmpty(CourseName))
- {
- sql = sql.Where(w =>w.CourseName.Contains(CourseName));
- }
- if (ExamStatus.HasValue && ExamStatus.Value!=0)
- {
- sql = sql.Where(w => w.ExamStatus == ExamStatus);
- }
- return sql.OrderByDescending(o=>o.test_begin_date).ToGridResultSet(page,rows);
- }
- public List<Sys_DictionaryItem> getExamResult_state()
- {
- var dics = HomeWorkDAL.examResultRepository.UnitOfWork.Sys_DictionaryItem.Where(w => w.DictionaryCode == "ExamResult_state").OrderBy(o=>o.OrderNo);
- return dics.ToList();
- }
- }
- }
|