///购买力度 public ActionResult ManagementPower(MemberStatisticsType?StatisticsType) { var pageModel = _iMemberLabelService.GetMemberLabelList(new LabelQuery() { PageSize = int.MaxValue }); var LabelInfos = pageModel.Models.ToList(); var categorys = CategoryApplication.GetCategoryByParentId(0); ViewBag.categorys = categorys; ViewBag.StatisticsType = StatisticsType.HasValue ? (int)StatisticsType.Value : -1; return(View(LabelInfos)); }
public JsonResult <Result <dynamic> > GetAllCategories() { var categories = CategoryApplication.GetMainCategory(); var model = categories.Where(p => p.IsShow).OrderBy(c => c.DisplaySequence).Select(c => new { cid = c.Id, name = c.Name, subs = CategoryApplication.GetCategoryByParentId(c.Id).Select(a => new { cid = a.Id, name = a.Name }) }).ToList(); var result = SuccessResult <dynamic>(data: model); return(Json(result)); }