Esempio n. 1
0
        public ActionResult Edit(int id)
        {
            var entity = (new YhAreainfoManager()).GetItemByKey(id);

            ViewBag.region = new SelectList(CommonFeild.GetAreaList(), "Name", "Name", entity.region);
            return(View(entity));
        }
Esempio n. 2
0
        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));
        }
Esempio n. 3
0
 public ActionResult Add()
 {
     ViewBag.region = new SelectList(CommonFeild.GetAreaList(), "Name", "Name", "浦东新区");
     return(View());
 }