using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using EMIS.CommonLogic.Students.HighBaseTable; using EMIS.ViewModel; using Bowin.Web.Controls.Mvc; namespace EMIS.Web.Controllers.StudentManage.HighBaseTable { [Authorization] public class HighbaseInschoolOtherStatusController : Controller { public IInschoolOtherStatusServices InschoolOtherStatusServices { get; set; } public ActionResult List() { return View(); } [HttpPost] public ActionResult Update() { try { InschoolOtherStatusServices.Update(DateTime.Now.Year); return Json(new ReturnMessage() { IsSuccess = true, Message = "更新成功!" }); } catch (Exception ex) { return Json(new ReturnMessage() { IsSuccess = false, Message = "更新失败,原因:" + ex.Message + "!" }); } } [HttpPost] public ActionResult SchoolYearDropDown(DropdownListBindType? bindType) { List list = InschoolOtherStatusServices.SchoolYearDropDownList() .Select(x => new DropdownListItem { Text = x, Value = x }) .OrderByDescending(x => x.Value).ToList(); DropdownListBindType dbt = bindType == null ? DropdownListBindType.SelectAll : bindType.Value; DropdownList.FormatDropdownItemList(dbt, list); return base.Json(list); } } }