public ActionResult GetStudents(string sectionId, int? limit, int? offset, string view)
{
if (string.IsNullOrEmpty(sectionId))
{
return RedirectToAction("Index");
}
try
{
var sectionService = new SectionDataService();
dynamic studentsData = sectionService.GetSectionStudentAssociationStudentList(SessionInfo.Current.AccessToken, sectionId, limit, offset, view);
return View("GetStudents", studentsData);
}
catch(Exception ex)
{
Trace.TraceError(ex.Message);
ViewBag.Error = ex.Message;
return Content("No students found");
}
}