public JsonResult getMaxScoStu(int page, int rows, int?LearnerID = null, int?LanguageID = null) { var list = new JiaJiBLL.LearnerBll().showMaxScoStu(); var result = new { total = list. Where(e => (LearnerID == null ? true : e.LearnerID == LearnerID) && (LanguageID == null ? true : e.LanguageID == LanguageID) ).Count(), rows = list. Where(e => (LearnerID == null ? true : e.CountryID == LearnerID) && (LanguageID == null ? true : e.LanguageID == LanguageID) ).Skip((page - 1) * rows).Take(rows) }; return(Json(result)); }
public JsonResult getLearnerList(int page, int rows, int?CountryID = null) { var list = new JiaJiBLL.LearnerBll().showLearner(); var result = new { total = list. Where(e => (CountryID == null ? true : e.CountryID == CountryID) ).Count(), rows = list. Where(e => (CountryID == null ? true : e.CountryID == CountryID) ).Skip((page - 1) * rows).Take(rows) }; return(Json(result)); }