/// <summary> /// 载入创建数据 /// </summary> /// <returns></returns> public ActionResult Create() { string title = string.Empty; IEnumerable <SelectListItem> listParent = _categoryContract.ParentSelectList(title); int categoryId = int.Parse(listParent.FirstOrDefault().Value); IEnumerable <SelectListItem> listChildren = _categoryContract.ChildrenSelectList(categoryId, title); ViewBag.ParentCategory = listParent; ViewBag.ChildrenCategory = listChildren; ViewBag.SizeExtentions = _sizeExtentionContract.SelectListItem(true); return(PartialView()); }