public JsonResult GetIndustrys() { var list = IndustryBusiness.GetIndustrys(); JsonDictionary.Add("Items", list); return(new JsonResult() { Data = JsonDictionary, JsonRequestBehavior = JsonRequestBehavior.AllowGet }); }
/// <summary> /// 获取行业列表 /// </summary> public JsonResult GetIndustrys(string keyWords) { var list = IndustryBusiness.GetIndustrys(); if (!string.IsNullOrEmpty(keyWords)) { list = list.FindAll(m => m.Name.Contains(keyWords)); } JsonDictionary.Add("items", list); return(new JsonResult() { Data = JsonDictionary, JsonRequestBehavior = JsonRequestBehavior.AllowGet }); }
public ActionResult Detail(string id) { ViewBag.ID = id; ViewBag.Industry = IndustryBusiness.GetIndustrys(); return(View()); }
public ActionResult Create() { ViewBag.Industry = IndustryBusiness.GetIndustrys(); return(View()); }
/// <summary> /// 数据绑定 /// </summary> public override void DataBind() { IndustryRepeater.DataSource = m_Industry.GetIndustrys(); base.DataBind(); }