/// <summary>
        /// 删除活动
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        public int deleteLatestActivity(string ids)
        {
            bool isOK = new JiaJiBLL.activebll().actionDel(ids);

            if (isOK)
            {
                return(0);
            }
            else
            {
                return(1);
            }
        }
 public JsonResult addLatestActivity(JiaJiModels.Active model)
 {
     try
     {
         var i = new JiaJiBLL.activebll().Actionadd(model);
         if (i > 0)
         {
             return(Json(new { Success = true, Message = "添加成功" }));
         }
         else
         {
             return(Json(new { Success = false, Message = "添加失败" }));
         }
     }
     catch
     {
         return(Json(new { Success = false, Message = "添加失败" }));
     }
 }
        /// <summary>
        /// 显示
        /// </summary>
        /// <param name="page"></param>
        /// <param name="rows"></param>
        /// <returns></returns>
        public JsonResult getLatestActivity(int page, int rows, string ActiveTitle = "", int?CountryID = null, int?Site = null)
        {
            var list = new JiaJiBLL.activebll().Activeshow();

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

            return(Json(result));
        }
        public JsonResult editLatestActivity(JiaJiModels.Active model)
        {
            try
            {
                int ActiveID = model.ActiveID;

                var i = new JiaJiBLL.activebll().ActiveUpd(model);
                if (i > 0)
                {
                    return(Json(new { Success = true, Message = "修改成功" }));
                }
                else
                {
                    return(Json(new { Success = false, Message = "修改失败" }));
                }
            }
            catch
            {
                return(Json(new { Success = false, Message = "修改失败" }));
            }
        }