12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.Mvc;
- using EMIS.Web.Controls;
- using EMIS.CommonLogic.SelectCourse;
- using EMIS.ViewModel.SelectCourse;
- using EMIS.ViewModel;
- namespace EMIS.Web.Controllers.SelectCourseManage
- {
- [Authorization]
- public class SelectCourseConditionController : Controller
- {
- public IConditionServices ConditionServices { get; set; }
- /// <summary>
- /// 条件设定页面
- /// </summary>
- /// <returns></returns>
- public ActionResult Index()
- {
- var conditionView = ConditionServices.GetSelectCourseConditionView();
- return View(conditionView);
- }
- [HttpPost]
- public ActionResult Index(SelectCourseConditionView conditionView)
- {
- try
- {
- var user = HttpContext.User as EMIS.Utility.FormValidate.CustomPrincipal;
- ConditionServices.Save(conditionView);
- return Json(new ReturnMessage
- {
- IsSuccess = true,
- Message = "保存成功"
- });
- }
- catch (Exception ex)
- {
- return Json(new ReturnMessage
- {
- IsSuccess = false,
- Message = "保存失败!" + ex.Message
- });
- }
- }
- }
- }
|