Exemplo n.º 1
0
        /// <summary>
        /// 属性分组列表
        /// </summary>
        public ActionResult AttributeGroupList()
        {
            //CategoryInfo categoryInfo = AdminCategories.GetCategoryById(cateId);
            //if (categoryInfo == null)
            //    return PromptView("分类不存在");

            AttributeGroupListModel model = new AttributeGroupListModel()
            {
                AttributeGroupList = AdminCategories.GetAttributeGroupList(),
                //CateId = cateId,
                //CategoryName = categoryInfo.Name
            };

            MallUtils.SetAdminRefererCookie(string.Format("{0}", Url.Action("attributegrouplist")));
            return(View(model));
        }
Exemplo n.º 2
0
        private List <SelectListItem> GetAttributeGroupSelectList()
        {
            List <SelectListItem>     itemList           = new List <SelectListItem>();
            List <AttributeGroupInfo> attributeGroupList = AdminCategories.GetAttributeGroupList();

            itemList.Add(new SelectListItem()
            {
                Text = "请选择分组", Value = "0"
            });
            foreach (AttributeGroupInfo attributeGroupInfo in attributeGroupList)
            {
                itemList.Add(new SelectListItem()
                {
                    Text = attributeGroupInfo.Name, Value = attributeGroupInfo.AttrGroupId.ToString()
                });
            }
            return(itemList);
        }