// GET: Supplier public ActionResult Index() { var s = SupplierTypeManager.GetAll(); s.Insert(0, new SupplierType() { Id = 9999, SupplierTypeName = "请选择供应商" }); ViewBag.SupTypeId = new SelectList(s, "Id", "SupplierTypeName"); return(View()); }
/// <summary> /// 下拉列表框 /// </summary> /// <returns></returns> public ActionResult GetSupplierType() { return(Json(SupplierTypeManager.GetSupplierType(), JsonRequestBehavior.AllowGet)); }