using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using EMIS.CommonLogic.SupervisionManage; using Bowin.Web.Controls.Mvc; namespace EMIS.Web.Controllers.SupervisionManage { [Authorization] public class SupervisionCollegeController : Controller { public ISupervisionCollegeServices SupervisionCollegeServices { get; set; } [HttpPost] public ActionResult Dropdown(DropdownListBindType? bindType) { var supervisionCollegeList = SupervisionCollegeServices.GetSupervisionCollegeViewList() .Select(x => new DropdownListItem { Text = x.Name, Value = x.SupervisionCollegeID }).ToList(); DropdownListBindType dbt = bindType == null ? DropdownListBindType.SelectAll : bindType.Value; DropdownList.FormatDropdownItemList(dbt, supervisionCollegeList); return base.Json(supervisionCollegeList); } } }