123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.Mvc;
- using Bowin.Common.Data;
- using Bowin.Common.Exceptions;
- using Bowin.Common.Utility;
- using Bowin.Common.JSON;
- using Bowin.Web.Controls.Mvc;
- using EMIS.Web.Controls;
- using EMIS.Utility;
- using EMIS.ViewModel;
- using EMIS.ViewModel.EvaluationManage.StudentEvaluation;
- using EMIS.ViewModel.EducationManage.EducationArrange;
- using EMIS.CommonLogic.EvaluationManage.StudentEvaluation;
- namespace EMIS.Web.Controllers.EvaluationManage.StudentEvaluation
- {
- [Authorization]
- public class EvaluationStudentSettingController : Controller
- {
- public Lazy<IEvaluationStudentSettingServices> EvaluationStudentSettingServices { get; set; }
- /// <summary>
- /// 学评设定页面
- /// </summary>
- /// <returns></returns>
- public ActionResult List()
- {
- return View();
- }
- /// <summary>
- /// 学评设定列表查询
- /// </summary>
- /// <param name="pararms"></param>
- /// <returns></returns>
- [HttpPost]
- public ActionResult List(QueryParamsModel pararms)
- {
- ConfiguretView configuretView = ConfiguretExtensions.GetConfiguretermsView(pararms);
- var schoolyearID = pararms.getExtraGuid("SchoolyearDropdown");
- var campusID = pararms.getExtraGuid("CampusDropdown");
- var collegeID = pararms.getExtraGuid("CollegeDropdown");
- var departmentID = pararms.getExtraGuid("DepartmentDropdown");
- var coursematerialID = pararms.getExtraGuid("CourseComboGrid");
- var courseTypeID = pararms.getExtraInt("DictionaryCourseType") == DropdownList.SELECT_ALL ? null : pararms.getExtraInt("DictionaryCourseType");
- var handleModeID = pararms.getExtraInt("DictionaryHandleMode") == DropdownList.SELECT_ALL ? null : pararms.getExtraInt("DictionaryHandleMode");
- var teachingModeID = pararms.getExtraInt("DictionaryTeachingMode") == DropdownList.SELECT_ALL ? null : pararms.getExtraInt("DictionaryTeachingMode");
- var staffID = pararms.getExtraGuid("StaffComboGrid");
- var teachingMethodID = pararms.getExtraInt("DictionaryTeachingMethod") == DropdownList.SELECT_ALL ? null : pararms.getExtraInt("DictionaryTeachingMethod");
- var evaluationTableID = pararms.getExtraGuid("EvaluationTableDropdown");
- var openState = pararms.getExtraInt("OpenStateDropdown") == DropdownList.SELECT_ALL ? null : pararms.getExtraInt("OpenStateDropdown");
- return base.Json(EvaluationStudentSettingServices.Value.GetEvaluationStudentSettingViewGrid(configuretView, schoolyearID, campusID, collegeID, departmentID,
- coursematerialID, courseTypeID, handleModeID, teachingModeID, staffID, teachingMethodID, evaluationTableID, openState, (int)pararms.page, (int)pararms.rows));
- }
- /// <summary>
- /// 评价生成
- /// </summary>
- /// <returns></returns>
- public ActionResult Create()
- {
- return View();
- }
- /// <summary>
- /// 评价生成
- /// </summary>
- /// <param name="evaluationStudentSettingView"></param>
- /// <returns></returns>
- [HttpPost]
- public ActionResult Create(EvaluationStudentSettingView evaluationStudentSettingView)
- {
- try
- {
- ConfiguretView configuretView = ConfiguretExtensions.GetConfiguretermsView(null);
- var campusID = Request.Form["CampusDropdown"].ParseStrTo<Guid>();
- var collegeID = Request.Form["CollegeDropdown"].ParseStrTo<Guid>();
- var departmentID = Request.Form["DepartmentDropdown"].ParseStrTo<Guid>();
- var gradeID = Request.Form["DictionaryGrade"].ParseStrTo<int>() == DropdownList.SELECT_ALL ? null : Request.Form["DictionaryGrade"].ParseStrTo<int>();
- var standardID = Request.Form["DictionaryStandard"].ParseStrTo<int>() == DropdownList.SELECT_ALL ? null : Request.Form["DictionaryStandard"].ParseStrTo<int>();
- var coursematerialID = Request.Form["CourseComboGrid"].ParseStrTo<Guid>();
- var courseTypeID = Request.Form["DictionaryCourseType"].ParseStrTo<int>() == DropdownList.SELECT_ALL ? null : Request.Form["DictionaryCourseType"].ParseStrTo<int>();
- var handleModeID = Request.Form["DictionaryHandleMode"].ParseStrTo<int>() == DropdownList.SELECT_ALL ? null : Request.Form["DictionaryHandleMode"].ParseStrTo<int>();
- var teachingModeID = Request.Form["DictionaryTeachingMode"].ParseStrTo<int>() == DropdownList.SELECT_ALL ? null : Request.Form["DictionaryTeachingMode"].ParseStrTo<int>();
- var staffID = Request.Form["StaffComboGrid"].ParseStrTo<Guid>();
- var teachingMethodID = Request.Form["DictionaryTeachingMethod"].ParseStrTo<int>() == DropdownList.SELECT_ALL ? null : Request.Form["DictionaryTeachingMethod"].ParseStrTo<int>();
- string result = EvaluationStudentSettingServices.Value.EvaluationStudentSettingCreate(campusID, collegeID, departmentID, gradeID, standardID,
- coursematerialID, courseTypeID, handleModeID, teachingModeID, staffID, teachingMethodID, evaluationStudentSettingView.SchoolyearID);
- return Json(new ReturnMessage()
- {
- IsSuccess = true,
- Message = "生成成功" + result + "。"
- });
- }
- catch (Exception ex)
- {
- return Json(new ReturnMessage()
- {
- IsSuccess = false,
- Message = "生成失败,原因:" + ex.Message
- });
- }
- }
- /// <summary>
- /// 复制新增
- /// </summary>
- /// <param name="evaluationStudentSettingID"></param>
- /// <returns></returns>
- public ActionResult CopyAdd(Guid evaluationStudentSettingID)
- {
- var evaluationStudentSettingView = new EvaluationStudentSettingView();
- evaluationStudentSettingView = EvaluationStudentSettingServices.Value.GetEvaluationStudentSettingView(evaluationStudentSettingID);
- return View("Edit", evaluationStudentSettingView);
- }
- /// <summary>
- /// 复制新增
- /// </summary>
- /// <param name="evaluationStudentSettingView"></param>
- /// <returns></returns>
- [HttpPost]
- public ActionResult CopyAdd(EvaluationStudentSettingView evaluationStudentSettingView)
- {
- evaluationStudentSettingView.EvaluationStudentSettingID = Guid.Empty;
- evaluationStudentSettingView.OpenState = false;
- return this.Edit(evaluationStudentSettingView);
- }
- /// <summary>
- /// 编辑
- /// </summary>
- /// <param name="evaluationStudentSettingID"></param>
- /// <returns></returns>
- [HttpGet]
- public ActionResult Edit(Guid? evaluationStudentSettingID)
- {
- var evaluationStudentSettingView = new EvaluationStudentSettingView();
- if (evaluationStudentSettingID.HasValue && evaluationStudentSettingID != Guid.Empty)
- {
- evaluationStudentSettingView = EvaluationStudentSettingServices.Value.GetEvaluationStudentSettingView(evaluationStudentSettingID);
- }
- else
- {
- evaluationStudentSettingView.OpenState = false;
- }
- return View(evaluationStudentSettingView);
- }
- /// <summary>
- /// 编辑
- /// </summary>
- /// <param name="evaluationStudentSettingView"></param>
- /// <returns></returns>
- [HttpPost]
- public ActionResult Edit(EvaluationStudentSettingView evaluationStudentSettingView)
- {
- try
- {
- EvaluationStudentSettingServices.Value.EvaluationStudentSettingEdit(evaluationStudentSettingView);
- return Json(new ReturnMessage()
- {
- IsSuccess = true,
- Message = "保存成功。"
- });
- }
- catch (Exception ex)
- {
- return Json(new ReturnMessage()
- {
- IsSuccess = false,
- Message = "保存失败,原因:" + ex.Message
- });
- }
- }
- /// <summary>
- /// 批量新增
- /// </summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult EvaluationStudentSettingBatchAdd()
- {
- var evaluationStudentSettingView = new EvaluationStudentSettingView();
- return View(evaluationStudentSettingView);
- }
- /// <summary>
- /// 批量新增
- /// </summary>
- /// <param name="evaluationStudentSettingView"></param>
- /// <returns></returns>
- public ActionResult EvaluationStudentSettingBatchAdd(EvaluationStudentSettingView evaluationStudentSettingView)
- {
- try
- {
- var educationMissionClassViewList = Request["educationMissionClassViewList"].JsonToObject<List<EducationMissionClassView>>();
- string result = EvaluationStudentSettingServices.Value.EvaluationStudentSettingBatchAdd(educationMissionClassViewList, evaluationStudentSettingView);
- return Json(new ReturnMessage()
- {
- IsSuccess = true,
- Message = "新增成功" + result + "。"
- });
- }
- catch (Exception ex)
- {
- return Json(new ReturnMessage()
- {
- IsSuccess = false,
- Message = "新增失败,原因:" + ex.Message
- });
- }
- }
- /// <summary>
- /// 查询教学任务班中未新增学生评价信息EducationMissionClassView
- /// </summary>
- /// <param name="pararms"></param>
- /// <returns></returns>
- [HttpPost]
- public ActionResult EducationMissionClassNoAddList(QueryParamsModel pararms)
- {
- ConfiguretView configuretView = ConfiguretExtensions.GetConfiguretermsView(pararms);
- var campusID = pararms.getExtraGuid("CampusDropdown");
- var collegeID = pararms.getExtraGuid("CollegeDropdown");
- var departmentID = pararms.getExtraGuid("DepartmentDropdown");
- var gradeID = pararms.getExtraInt("DictionaryGrade") == DropdownList.SELECT_ALL ? null : pararms.getExtraInt("DictionaryGrade");
- var standardID = pararms.getExtraInt("DictionaryStandard") == DropdownList.SELECT_ALL ? null : pararms.getExtraInt("DictionaryStandard");
- var coursematerialID = pararms.getExtraGuid("CourseComboGrid");
- var courseTypeID = pararms.getExtraInt("DictionaryCourseType") == DropdownList.SELECT_ALL ? null : pararms.getExtraInt("DictionaryCourseType");
- var handleModeID = pararms.getExtraInt("DictionaryHandleMode") == DropdownList.SELECT_ALL ? null : pararms.getExtraInt("DictionaryHandleMode");
- var teachingModeID = pararms.getExtraInt("DictionaryTeachingMode") == DropdownList.SELECT_ALL ? null : pararms.getExtraInt("DictionaryTeachingMode");
- var staffID = pararms.getExtraGuid("StaffComboGrid");
- var teachingMethodID = pararms.getExtraInt("DictionaryTeachingMethod") == DropdownList.SELECT_ALL ? null : pararms.getExtraInt("DictionaryTeachingMethod");
- var schoolyearID = pararms.getExtraGuid("SchoolyearID");
- return base.Json(EvaluationStudentSettingServices.Value.GetEducationMissionClassViewNoAddGrid(configuretView, campusID, collegeID, departmentID,
- gradeID, standardID, coursematerialID, courseTypeID, handleModeID, teachingModeID, staffID, teachingMethodID, schoolyearID, (int)pararms.page, (int)pararms.rows));
- }
- /// <summary>
- /// 查询教学任务班中未新增学生评价信息Excel导出
- /// </summary>
- /// <returns></returns>
- [HttpPost]
- public ActionResult EducationMissionClassNoAddListExcel()
- {
- return null;
- }
- /// <summary>
- /// 删除
- /// </summary>
- /// <param name="evaluationStudentSettingIDs"></param>
- /// <returns></returns>
- [HttpPost]
- public ActionResult Delete(string evaluationStudentSettingIDs)
- {
- try
- {
- List<Guid?> list = evaluationStudentSettingIDs.Split(',').Where(x => !string.IsNullOrEmpty(x)).Select(x => (Guid?)new Guid(x)).ToList();
- EvaluationStudentSettingServices.Value.EvaluationStudentSettingDelete(list);
- return base.Json(new ReturnMessage { IsSuccess = true, Message = "删除成功。" });
- }
- catch (Exception ex)
- {
- string mge = ex.Message;
- System.Data.SqlClient.SqlException num = ExceptionHelper.GetSqlException(ex);
- if (num != null)
- {
- if (num.Number == 547)
- {
- mge = "请先删除所有关联的数据,如:评价记录、评价建议等。";
- }
- }
- return base.Json(new ReturnMessage { IsSuccess = false, Message = "删除失败,原因:" + mge });
- }
- }
- /// <summary>
- /// 对应的学生信息页面
- /// </summary>
- /// <returns></returns>
- public ActionResult EvaluationStudentList()
- {
- return View();
- }
- /// <summary>
- /// 对应的学生信息列表查询
- /// </summary>
- /// <param name="pararms"></param>
- /// <returns></returns>
- [HttpPost]
- public ActionResult EvaluationStudentList(QueryParamsModel pararms)
- {
- ConfiguretView configuretView = ConfiguretExtensions.GetConfiguretermsView(pararms);
- var evaluationStudentSettingID = Request["evaluationStudentSettingID"].ParseStrTo<Guid>();
- var isEvaluation = pararms.getExtraInt("IsEvaluationDropdown") == DropdownList.SELECT_ALL ? null : pararms.getExtraInt("IsEvaluationDropdown");
- var inSchoolStatus = pararms.getExtraInt("DictionaryInschoolStatus") == DropdownList.SELECT_ALL ? null : pararms.getExtraInt("DictionaryInschoolStatus");
- return Json(EvaluationStudentSettingServices.Value.GetEvaluationStudentSettingDetailViewGrid(configuretView, evaluationStudentSettingID, isEvaluation, inSchoolStatus, (int)pararms.page, (int)pararms.rows));
- }
- /// <summary>
- /// 对应的学生信息Excel导出
- /// </summary>
- /// <returns></returns>
- [HttpPost]
- public ActionResult EvaluationStudentListExcel()
- {
- NpoiExcelHelper neh = new NpoiExcelHelper();
- ConfiguretView configuretView = ConfiguretExtensions.GetConfiguretermsView(null);
- var evaluationStudentSettingID = Request["evaluationStudentSettingID"].ParseStrTo<Guid>();
- int? isEvaluation = Request["IsEvaluationDropdown"].ParseStrTo<int>() == DropdownList.SELECT_ALL ? null : Request["IsEvaluationDropdown"].ParseStrTo<int>();
- int? inSchoolStatus = Request["DictionaryInschoolStatus"].ParseStrTo<int>() == DropdownList.SELECT_ALL ? null : Request["DictionaryInschoolStatus"].ParseStrTo<int>();
- var dt = EvaluationStudentSettingServices.Value.GetEvaluationStudentSettingDetailViewList(configuretView, evaluationStudentSettingID, isEvaluation, inSchoolStatus)
- .Select(x => new
- {
- x.StudentNo,
- x.Name,
- x.SexName,
- x.ClassmajorNo,
- x.ClassmajorName,
- x.CollegeNo,
- x.CollegeName,
- x.CampusNo,
- x.CampusName,
- x.InSchoolStatusName,
- x.SchoolyearCode,
- x.MissionName,
- x.MissionClassName,
- x.CourseCode,
- x.CourseName,
- x.CourseStructureName,
- x.CourseCategoryName,
- x.CourseTypeName,
- x.CourseQualityName,
- Credit = x.Credit.HasValue ? x.Credit.Value.ToString("#.#") : null,
- x.DepartmentNo,
- x.DepartmentName,
- x.HandleModeName,
- x.TeachingModeName,
- x.MissionClassStatusName,
- x.EvaluationTableCode,
- x.EvaluationTableName,
- x.ParticipateTypeName,
- x.EvaluationTypeCode,
- x.EvaluationTypeName,
- x.StaffCode,
- x.StaffName,
- x.TitleName,
- x.TeachingMethodName,
- x.OpenStateName,
- x.IsEvaluationName
- }).ToTable();
- string[] liststring = {
- "学号", "姓名", "性别", "班级编号", "班级名称", RSL.Get("CollegeCode"), RSL.Get("College"), RSL.Get("CampusCode"), RSL.Get("CampusName"),
- "在校状态", "学年学期", "任务名称", "任务班名称", "课程代码", "课程名称", "课程结构", "课程属性", "课程类型", "课程性质",
- "课程学分", "开课教研室代码", "开课教研室", "处理方式", "授课方式", "任务状态", "评价表编号", "评价表名", "参评类型", "评价类型编号",
- "评价类型", "教师工号", "任课教师", "职称", "任课方式", "开放状态", "评价状态"
- };
- var title = "参评人数明细信息";
- if (isEvaluation == (int)CF_GeneralPurpose.IsNo)
- {
- title = "参评人数明细信息(未评)";
- }
- if (isEvaluation == (int)CF_GeneralPurpose.IsYes)
- {
- title = "参评人数明细信息(已评)";
- }
- neh.Export(dt, liststring, title + DateTime.Now.ToString("yyyyMMdd"));
- return Json(new ReturnMessage()
- {
- IsSuccess = true,
- Message = "导出成功。"
- });
- }
- /// <summary>
- /// 编辑学生
- /// </summary>
- /// <param name="evaluationStudentSettingID"></param>
- /// <returns></returns>
- public ActionResult EvaluationStudentEdit(Guid? evaluationStudentSettingID)
- {
- var evaluationStudentSettingDetailView = new EvaluationStudentSettingDetailView();
- if (evaluationStudentSettingID.HasValue && evaluationStudentSettingID != Guid.Empty)
- {
- var evaluationStudentSettingView = EvaluationStudentSettingServices.Value.GetEvaluationStudentSettingView(evaluationStudentSettingID);
- evaluationStudentSettingDetailView.EvaluationStudentSettingID = evaluationStudentSettingView.EvaluationStudentSettingID;
- evaluationStudentSettingDetailView.EducationMissionClassID = evaluationStudentSettingView.EducationMissionClassID;
- evaluationStudentSettingDetailView.MissionClassName = evaluationStudentSettingView.MissionClassName;
- evaluationStudentSettingDetailView.SchoolyearID = evaluationStudentSettingView.SchoolyearID;
- evaluationStudentSettingDetailView.CollegeID = evaluationStudentSettingView.CollegeID;
- evaluationStudentSettingDetailView.CoursematerialID = evaluationStudentSettingView.CoursematerialID;
- evaluationStudentSettingDetailView.DepartmentID = evaluationStudentSettingView.DepartmentID;
- evaluationStudentSettingDetailView.CourseTypeID = evaluationStudentSettingView.CourseTypeID;
- evaluationStudentSettingDetailView.TeachingModeID = evaluationStudentSettingView.TeachingModeID;
- }
- else
- {
- evaluationStudentSettingDetailView.EvaluationStudentSettingID = evaluationStudentSettingID.Value;
- }
- return View(evaluationStudentSettingDetailView);
- }
- /// <summary>
- /// 编辑学生
- /// </summary>
- /// <param name="evaluationStudentSettingDetailView"></param>
- /// <returns></returns>
- [HttpPost]
- public ActionResult EvaluationStudentEdit(Guid? evaluationStudentSettingID, Guid? userID)
- {
- try
- {
- EvaluationStudentSettingServices.Value.EvaluationStudentEdit(evaluationStudentSettingID, userID);
- return Json(new ReturnMessage()
- {
- IsSuccess = true,
- Message = "保存成功。"
- });
- }
- catch (Exception ex)
- {
- return Json(new ReturnMessage()
- {
- IsSuccess = false,
- Message = "保存失败,原因:" + ex.Message
- });
- }
- }
- /// <summary>
- /// 删除学生
- /// </summary>
- /// <param name="evaluationStudentSettingID"></param>
- /// <param name="userIDs"></param>
- /// <returns></returns>
- [HttpPost]
- public ActionResult EvaluationStudentDelete(Guid? evaluationStudentSettingID, string userIDs)
- {
- try
- {
- List<Guid?> list = userIDs.Split(',').Where(x => !string.IsNullOrEmpty(x)).Select(x => (Guid?)new Guid(x)).ToList();
- EvaluationStudentSettingServices.Value.EvaluationStudentDelete(evaluationStudentSettingID, list);
- return base.Json(new ReturnMessage { IsSuccess = true, Message = "删除成功。" });
- }
- catch (Exception ex)
- {
- return base.Json(new ReturnMessage() { IsSuccess = false, Message = "删除失败,原因:" + ex.Message });
- }
- }
- /// <summary>
- /// 取消
- /// </summary>
- /// <param name="evaluationStudentSettingIDs"></param>
- /// <returns></returns>
- [HttpPost]
- public ActionResult Cancel(string evaluationStudentSettingIDs)
- {
- try
- {
- List<Guid?> list = evaluationStudentSettingIDs.Split(',').Where(x => !string.IsNullOrEmpty(x)).Select(x => (Guid?)new Guid(x)).ToList();
- EvaluationStudentSettingServices.Value.EvaluationStudentSettingCancel(list);
- return base.Json(new ReturnMessage { IsSuccess = true, Message = "取消评价成功。" });
- }
- catch (Exception ex)
- {
- return base.Json(new ReturnMessage() { IsSuccess = false, Message = "取消评价失败,原因:" + ex.Message });
- }
- }
- /// <summary>
- /// 开放
- /// </summary>
- /// <param name="evaluationStudentSettingIDs"></param>
- /// <returns></returns>
- [HttpPost]
- public ActionResult Open(string evaluationStudentSettingIDs)
- {
- try
- {
- List<Guid?> list = evaluationStudentSettingIDs.Split(',').Where(x => !string.IsNullOrEmpty(x)).Select(x => (Guid?)new Guid(x)).ToList();
- EvaluationStudentSettingServices.Value.EvaluationStudentSettingOpen(list);
- return base.Json(new ReturnMessage { IsSuccess = true, Message = "开放评价成功。" });
- }
- catch (Exception ex)
- {
- return base.Json(new ReturnMessage() { IsSuccess = false, Message = "开放评价失败,原因:" + ex.Message });
- }
- }
- /// <summary>
- /// Excel导出
- /// </summary>
- /// <returns></returns>
- [HttpPost]
- public ActionResult Excel()
- {
- NpoiExcelHelper neh = new NpoiExcelHelper();
- ConfiguretView configuretView = ConfiguretExtensions.GetConfiguretermsView(null);
- var schoolyearID = Request.Form["SchoolyearDropdown"] == DropdownList.SELECT_ALL.ToString() ? null : Request.Form["SchoolyearDropdown"].ParseStrTo<Guid>();
- var campusID = Request.Form["CampusDropdown"].ParseStrTo<Guid>();
- var collegeID = Request.Form["CollegeDropdown"].ParseStrTo<Guid>();
- var departmentID = Request.Form["DepartmentDropdown"].ParseStrTo<Guid>();
- var coursematerialID = Request.Form["CourseComboGrid"].ParseStrTo<Guid>();
- var courseTypeID = Request.Form["DictionaryCourseType"].ParseStrTo<int>() == DropdownList.SELECT_ALL ? null : Request.Form["DictionaryCourseType"].ParseStrTo<int>();
- var handleModeID = Request.Form["DictionaryHandleMode"].ParseStrTo<int>() == DropdownList.SELECT_ALL ? null : Request.Form["DictionaryHandleMode"].ParseStrTo<int>();
- var teachingModeID = Request.Form["DictionaryTeachingMode"].ParseStrTo<int>() == DropdownList.SELECT_ALL ? null : Request.Form["DictionaryTeachingMode"].ParseStrTo<int>();
- var staffID = Request.Form["StaffComboGrid"].ParseStrTo<Guid>();
- var teachingMethodID = Request.Form["DictionaryTeachingMethod"].ParseStrTo<int>() == DropdownList.SELECT_ALL ? null : Request.Form["DictionaryTeachingMethod"].ParseStrTo<int>();
- var evaluationTableID = Request.Form["EvaluationTableDropdown"].ParseStrTo<Guid>();
- var openState = Request.Form["OpenStateDropdown"].ParseStrTo<int>() == DropdownList.SELECT_ALL ? null : Request.Form["OpenStateDropdown"].ParseStrTo<int>();
- var dt = EvaluationStudentSettingServices.Value.GetEvaluationStudentSettingViewList(configuretView, schoolyearID, campusID, collegeID, departmentID,
- coursematerialID, courseTypeID, handleModeID, teachingModeID, staffID, teachingMethodID, evaluationTableID, openState)
- .Select(x => new
- {
- x.SchoolyearCode,
- x.MissionName,
- x.MissionClassName,
- x.CollegeNo,
- x.CollegeName,
- x.CampusNo,
- x.CampusName,
- x.CourseCode,
- x.CourseName,
- x.CourseStructureName,
- x.CourseCategoryName,
- x.CourseTypeName,
- x.CourseQualityName,
- Credit = x.Credit.HasValue ? x.Credit.Value.ToString("#.#") : null,
- x.DepartmentNo,
- x.DepartmentName,
- x.HandleModeName,
- x.TeachingModeName,
- x.MissionClassStatusName,
- x.EvaluationTableCode,
- x.EvaluationTableName,
- x.ParticipateTypeName,
- x.EvaluationTypeCode,
- x.EvaluationTypeName,
- x.StaffCode,
- x.StaffName,
- x.TitleName,
- x.TeachingMethodName,
- x.ParticipateCount,
- x.NoParticipateCount,
- x.ValidityParticipateCount,
- ValidityParticipateRate = x.ValidityParticipateRate.HasValue ? x.ValidityParticipateRate.Value.ToString("#.#") : "0",
- x.OpenStateName,
- x.Remark
- }).ToTable();
- string[] liststring = {
- "学年学期", "任务名称", "任务班名称", RSL.Get("CollegeCode"), RSL.Get("College"), RSL.Get("CampusCode"), RSL.Get("CampusName"),
- "课程代码", "课程名称", "课程结构", "课程属性", "课程类型", "课程性质", "课程学分", "开课教研室代码", "开课教研室",
- "处理方式", "授课方式", "任务状态", "评价表编号", "评价表名", "参评类型", "评价类型编号", "评价类型", "教师工号",
- "任课教师", "职称", "任课方式", "参评人数", "未评人数", "有效评数", "有效评率%", "开放状态", "备注"
- };
- neh.Export(dt, liststring, "学评设定信息" + DateTime.Now.ToString("yyyyMMdd"));
- return Json(new ReturnMessage()
- {
- IsSuccess = true,
- Message = "导出成功。"
- });
- }
- }
- }
|