using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using EMIS.CommonLogic.RetakeManage; using EMIS.ViewModel.RetakeManage; using Bowin.Web.Controls.Mvc; using EMIS.ViewModel; using Bowin.Common.Linq.Entity; namespace EMIS.Web.Controllers.RetakeManage { [Authorization] public class RetakeParameterController : Controller { public IRetakeParameterServices RetakeParameterServices { get; set; } /// /// 重修参数设定页面 /// /// public ActionResult Index() { var retakeParameterView = RetakeParameterServices.GetRetakeParameterView(); return View(retakeParameterView); } /// /// 重修参数设定设置 /// /// /// [HttpPost] public ActionResult Index(RetakeParameterView retakeParameterView) { var retakeExamsCategoryViewList = DataGrid.GetTableData("dgRetakeExamsCategoryList"); try { RetakeParameterServices.SaveParameterView(retakeParameterView, retakeExamsCategoryViewList); return Json(new ReturnMessage() { IsSuccess = true, Message = "设置成功。" }); } catch (Exception ex) { return Json(new ReturnMessage() { IsSuccess = false, Message = "设置失败,原因:" + ex.Message }); } } /// /// 重修预查考试性质列表查询 /// /// /// [HttpPost] public ActionResult RetakeExamsCategoryList(QueryParamsModel pararms) { var retakeExamsCategoryList = RetakeParameterServices.GetExamsCategoryViewList(); return Json(new GridResultSet { total = retakeExamsCategoryList.Count, rows = retakeExamsCategoryList }); } } }