Exemplo n.º 1
0
        /// <summary>
        /// 显示
        /// </summary>
        /// <param name="page"></param>
        /// <param name="rows"></param>
        /// <returns></returns>
        public JsonResult getErWeiMaPage(int page, int rows, string EWMTitle = "")
        {
            var list   = new JiaJiBLL.ImageBll().ShowErWeiMa();
            var result = new { total = list.Count, rows = list.Where(e => e.EWMTitle.Contains(EWMTitle)).OrderBy(e => e.EWMID).Skip((page - 1) * rows).Take(rows) };

            return(Json(result));
        }
Exemplo n.º 2
0
        /// <summary>
        /// 显示
        /// </summary>
        /// <param name="page"></param>
        /// <param name="rows"></param>
        /// <returns></returns>
        public JsonResult getCounLunBo(int page, int rows, int?CountryID = null, int?EducationID = null)
        {
            var list = new JiaJiBLL.ImageBll().ShowCounImage();

            var result = new
            {
                total = list.
                        Where(e =>
                              (CountryID == null ? true : e.CountryID == CountryID) &&
                              (EducationID == null ? true : e.EducationID == EducationID)
                              ).Count(),
                rows = list.
                       Where(e =>
                             (CountryID == null ? true : e.CountryID == CountryID) &&
                             (EducationID == null ? true : e.EducationID == EducationID)
                             ).Skip((page - 1) * rows).Take(rows)
            };

            return(Json(result));
        }