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; } /// /// 条件设定页面 /// /// 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 }); } } } }