public async Task <JsonResult> List(int jtStartIndex, int jtPageSize) { var activities = await ActivityEditCollection.GetAllActivitiesAsync(); var totalRecourds = activities.Count(); var pagedActivities = activities.Skip(jtStartIndex).Take(jtPageSize); return(Json(new { Result = "OK", Records = pagedActivities, TotalRecordCount = totalRecourds })); }
public async virtual Task <ActionResult> ManageActivities() { var allActivities = await ActivityEditCollection.GetAllActivitiesAsync(); IActivityEdit firstActivity = new ActivityEdit(); if (allActivities.Count() > 0) { firstActivity = allActivities.First(); } return(View(firstActivity)); }