Esempio n. 1
0
        public void OnGet(string category = null, string key = null, string where = "", int limit = 5)
        {
            int page     = 1;
            var listPage = Request.Query["page"];

            if (!string.IsNullOrEmpty(listPage))
            {
                page = Convert.ToInt32(listPage);
            }
            Types     = where;
            pageIndex = page;
            Limit     = limit;

            classifyList = _classifyService.GetListAsync(m => !m.IsDel, m => m.FirstLetter, DbOrderEnum.Asc).Result.data;
            if (category != null)
            {
                Classify = category;
                category = classifyList.FirstOrDefault(m => m.EnClassName == category)?.Guid;
            }
            var param = new PageParm()
            {
                guid = category, page = page, key = key, audit = 1, where = where, limit = limit
            };

            Ask = _askService.GetPageList(param).Result.data;
        }
Esempio n. 2
0
        public void OnGet()
        {
            classifyList = _classifyService.GetListAsync(m => !m.IsDel, m => m.FirstLetter, DbOrderEnum.Asc).Result.data;

            var tagList = _tagService.GetListAsync().Result.data;

            if (tagList.Any())
            {
                TagStr = JsonConvert.SerializeObject(tagList.Select(m => new TagsDto()
                {
                    Name = m.TagName, FirstLetter = m.FirstLetter
                }));
            }
        }
Esempio n. 3
0
 public void OnGet()
 {
     CategoryList = _classifyService.GetListAsync(m => !m.IsDel, m => m.FirstLetter, DbOrderEnum.Desc).Result.data;
 }