using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using EMIS.CommonLogic.ExaminationManage; using EMIS.ViewModel; using EMIS.ViewModel.ExaminationManage; using EMIS.Web.Controls; using Bowin.Common.Linq.Entity; using Bowin.Web.Controls.Mvc; namespace EMIS.Web.Controllers.ExaminationManage { [Authorization] public class ExaminationModeSettingController : Controller { public IExaminationModeSettingServices ExaminationModeSettingServices { get; set; } public ActionResult List() { return View(); } [HttpPost] public ActionResult List(QueryParamsModel pararms) { var examinationModeSettingList = ExaminationModeSettingServices.GetExaminationModeSettingViewList(); return Json(new GridResultSet() { rows = examinationModeSettingList, total = examinationModeSettingList.Count }); } [HttpPost] public ActionResult Edit() { try { var list = DataGrid.GetTableData("dgExaminationModeSettingList"); ExaminationModeSettingServices.Save(list); return RedirectToAction("MsgShow", "Common", new { WindowID = "none", msg = "保存成功!", url = Url.Content("~/ExaminationModeSetting/List").AddMenuParameter() }); } catch (Exception ex) { return RedirectToAction("MsgShow", "Common", new { WindowID = "none", msg = "保存失败!" + ex.Message, url = Url.Content("~/ExaminationModeSetting/List").AddMenuParameter() }); } } } }