Exemple #1
0
        /// <summary>
        /// 载入创建数据
        /// </summary>
        /// <returns></returns>
        public ActionResult Create()
        {
            string title = "请选择";

            ViewBag.Category = _categoryContract.ParentSelectList(title);
            return(PartialView());
        }
Exemple #2
0
        /// <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());
        }
Exemple #3
0
 public ActionResult Index()
 {
     ViewBag.Categories = _categoryContract.ParentSelectList("请选择品类").ToList();
     ViewBag.Brands     = CacheAccess.GetBrand(_brandContract, true);
     ViewBag.Colors     = CacheAccess.GetColorsName(_colorContract, true);
     return(View());
 }