Exemple #1
0
        public virtual ActionResult List(string term = "", int page = 1, int count = 10,
                                         Order order = Order.Descending, ScoreStateType objSearchBy = ScoreStateType.Score,
                                         ElectionOrderBy objOrderBy = ElectionOrderBy.Id)
        {
            string    userName = HttpContext.User.Identity.Name;
            Professor pro      = _ProfessorService.GetByUserId(_UserService.GetUserByUserName(userName).Id);
            //#region Retrive Data
            int total;
            var articles = _ElectionService.GetDataTableForScore(out total, term, page, order,
                                                                 objSearchBy, objOrderBy, pro.Id, count);
            var model = new ScoreListVM
            {
                Order          = order,
                PageCount      = count,
                PageNumber     = page,
                ScoreList      = articles,
                Term           = term,
                TotalElections = total
            };

            ViewBag.CountList = DropDown.GetCountList(count);
            ViewBag.OrderList = DropDown.GetOrderList(order);
            return(PartialView("_ListPartial", model));
        }