示例#1
0
 public void OnGet()
 {
     Exclude = Request.Query["exclude"];
     if (string.IsNullOrEmpty(Exclude))
     {
         Problems = _repository.GetProblems();
     }
     else
     {
         Problems             = _repository.GetExclude(Enum.Parse <ProblemStatus>(Exclude));
         SumOfExcludeProblems = Problems.Count;
     }
     PageIndex     = Convert.ToInt32(Request.Query["pageIndex"]);
     Problems      = _repository.GetPaged(Problems, PageIndex, Const.PageSize);
     SumOfProblems = _repository.GetSum();
 }
示例#2
0
        public void OnGet()
        {
            string exclude = Request.Query["exclude"];

            if (string.IsNullOrEmpty(exclude))
            {
                Problems = _problem.Get();
            }
            else
            {
                Problems = _problem.GetExclude(Enum.Parse <ProblemStatus>(exclude));
            }



            int pageIndex = Convert.ToInt32(Request.RouteValues["id"]);
            int pageSize  = 2;

            Problems     = Problems.GetPage(pageSize, pageIndex);
            SumOfArticle = _problem.GetSum();
        }