Пример #1
0
        /// <summary>
        /// 三个广告
        /// </summary>
        /// <returns></returns>
        public ActionResult GetAdvList()
        {
            Business.Sys_Adviertisement Sys_Adviertisement = new Business.Sys_Adviertisement();
            List <Model.Adviertisement> FlowerList         = Sys_Adviertisement.GetAdviertisementList(3, 0, "");

            return(Json(FlowerList, JsonRequestBehavior.AllowGet));
        }
Пример #2
0
        /// <summary>
        /// 分页获得数据信息
        /// </summary>
        /// <param name="limit">页码大小</param>
        /// <param name="offset">从第几条数据开始</param>
        /// <param name="AdTitle">标题</param>
        /// <returns></returns>
        public JsonResult GetAdviertisementList(int limit, int offset, string Title)
        {
            Business.Sys_Adviertisement Sys_UserLog = new Business.Sys_Adviertisement();
            StringBuilder sb = new StringBuilder();

            if (!string.IsNullOrEmpty(Title))
            {
                sb.Append(" and Title='" + Title + "'");
            }

            return(Json(new { total = Sys_UserLog.GetAdviertisementListCount(sb.ToString()), rows = Sys_UserLog.GetAdviertisementList(limit, offset, sb.ToString()) }, JsonRequestBehavior.AllowGet));
        }