/// <summary>
        /// 得到所有一级类别
        /// </summary>
        /// <returns></returns>
        public string GetMainCategories()
        {
            List <CategoriesModel> model = catebll.GetAllMainCategories();
            JavaScriptSerializer   jss   = new JavaScriptSerializer();

            return(jss.Serialize(model));
        }
Example #2
0
        /// <summary>
        /// 首页Action
        /// </summary>
        /// <returns></returns>
        public ActionResult defaultpage()
        {
            ViewBag.Message = "";
            CategoriesOperateBLL   bll   = new CategoriesOperateBLL();
            List <CategoriesModel> model = bll.GetAllMainCategories();

            return(View(model));
        }