Boy_Scouts_Scheduler.Controllers.SchedulingConstraintController.GridData C# (CSharp) Méthode

GridData() public méthode

public GridData ( int start, int itemsPerPage = 20, string orderBy = "ID", bool desc = false ) : System.Web.Mvc.ActionResult
start int
itemsPerPage int
orderBy string
desc bool
Résultat System.Web.Mvc.ActionResult
        public ActionResult GridData(int start = 0, int itemsPerPage = 20, string orderBy = "ID", bool desc = false)
        {
            Response.AppendHeader("X-Total-Row-Count", db.SchedulingConstraints.Count(c => c.Event.ID == eventID).ToString());
            ObjectQuery<SchedulingConstraint> schedulingconstraints = (db as IObjectContextAdapter).ObjectContext.CreateObjectSet<SchedulingConstraint>();
            schedulingconstraints = schedulingconstraints.OrderBy("it." + orderBy + (desc ? " desc" : ""));

            return PartialView(schedulingconstraints.Where(c => c.Event.ID == eventID)
                                                    .Include(c => c.Group)
                                                    .Include(c => c.GroupType)
                                                    .Include(c => c.Station)
                                                    .Skip(start).Take(itemsPerPage));
        }