public ActionResult Edit(int id) { var entity = (new YhAreainfoManager()).GetItemByKey(id); ViewBag.region = new SelectList(CommonFeild.GetAreaList(), "Name", "Name", entity.region); return(View(entity)); }
public ActionResult GetRegions() { List <string> allRegion = (new YhAreainfoManager()).GetAllRegion(); List <object> newList = new List <object>(); foreach (dynamic item in CommonFeild.GetAreaList()) { if (allRegion.Contains(item.Name)) { newList.Add(item); } } return(Json(newList, JsonRequestBehavior.AllowGet)); }
public ActionResult Add() { ViewBag.region = new SelectList(CommonFeild.GetAreaList(), "Name", "Name", "浦东新区"); return(View()); }