/// <summary>
 /// 查询版块下所有分类
 /// </summary>
 /// <param name="selected">选中项</param> 
 protected IList<SelectListItem> QueryCategoryAll(string selected = null)
 {
     string resultMsg = string.Empty;
     LogicCategory dalCategory = new LogicCategory();
     var list = dalCategory.CategoryAllThree(out resultMsg,this.AuthorizeInfo, ParentCateg: 0);
     var slist = (from ModelCategory model in list
                  select new SelectListItem()
                  {
                      Selected = model.Id.ToString().Equals(selected) ? true : false,
                      Text = model.Name,
                      Value = model.Id.ToString()
                  }).ToList();
     return slist;
 }
        public ActionResult Tree(FormCollection fc)
        {
            string resultMsg = string.Empty;
            LogicCategory logic = new LogicCategory();
            var list = logic.CategoryAllThree(out resultMsg,base.AuthorizeInfo, ParentCateg: 0);

            var listTree = (from ModelCategory model in list
                            select new ModelTree() {
                                id = model.Id.ToString(),
                                name = model.Name,
                                pId = model.Parentcateg.ToString() }).ToList();

            return Json(listTree);
        }