示例#1
0
        /// <summary>
        /// 列表
        /// </summary>
        /// <param name="_ProblemCategoryVM"></param>
        /// <param name="pn"></param>
        /// <returns></returns>
        public ActionResult List(ProblemCategoryVM _ProblemCategoryVM, int pn = 1)
        {
            int totalCount,
                pageIndex = pn,
                pageSize  = PagingConfig.PAGE_SIZE;
            var list      = _ProblemCategoryService.GetManagerList(_ProblemCategoryVM.QueryName, pageIndex, pageSize, out totalCount);
            var paging    = new Paging <ProblemCategory>()
            {
                Items = list,
                Size  = PagingConfig.PAGE_SIZE,
                Total = totalCount,
                Index = pn,
            };

            _ProblemCategoryVM.Paging = paging;
            return(View(_ProblemCategoryVM));
        }
示例#2
0
 /// <summary>
 /// 编辑
 /// </summary>
 /// <param name="_ProblemCategoryVM"></param>
 /// <returns></returns>
 public ActionResult Edit(ProblemCategoryVM _ProblemCategoryVM)
 {
     _ProblemCategoryVM.ProblemCategory = _ProblemCategoryService.GetById(_ProblemCategoryVM.Id) ?? new ProblemCategory();
     return(View(_ProblemCategoryVM));
 }