using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using EMIS.CommonLogic.SystemServices; using EMIS.ViewModel.ExaminationManage; using EMIS.ViewModel; namespace EMIS.Web.Controllers.ExaminationManage { [Authorization] public class ExaminationNoticeSettingController : Controller { // // GET: /ExaminationNoticeSetting/ public IParameterServices parameterServices { get; set; } [HttpGet] public ActionResult List() { ExaminationNoticeSettingView examinationNoticeSettingView = new ExaminationNoticeSettingView(); var notice=parameterServices.GetParameterValue(CF_ParameterType.ExaminationNotice); examinationNoticeSettingView.Notice = notice; return View(examinationNoticeSettingView); } /// /// 保存 /// /// /// [HttpPost] public ActionResult List(ExaminationNoticeSettingView examinationNoticeSettingView) { try { parameterServices.SaveTo(ViewModel.CF_ParameterType.ExaminationNotice, examinationNoticeSettingView.Notice); return Json(new ReturnMessage() { IsSuccess = true, Message = "保存成功!" }); } catch (Exception ex) { return Json(new ReturnMessage() { IsSuccess = true, Message = "保存失败,原因:" + ex.Message + "!" }); } } } }