示例#1
0
        /// <summary>
        /// 删除优势
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        public int deleteDominant(string ids)
        {
            bool isOK = new JiaJiBLL.DoBLL().DelDominant(ids);

            if (isOK)
            {
                return(0);
            }
            else
            {
                return(1);
            }
        }
示例#2
0
 public JsonResult addDominant(JiaJiModels.DominantModel infor)
 {
     try
     {
         var i = new JiaJiBLL.DoBLL().addDominant(infor);
         if (i > 0)
         {
             return(Json(new { Success = true, Message = "添加成功" }));
         }
         else
         {
             return(Json(new { Success = false, Message = "添加失败" }));
         }
     }
     catch
     {
         return(Json(new { Success = false, Message = "添加失败" }));
     }
 }
示例#3
0
        public JsonResult getDominant(int page, int rows, int?CountryID = null)
        {
            var list   = new JiaJiBLL.DoBLL().ShowDominant();
            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));
        }
示例#4
0
        public JsonResult editDominant(JiaJiModels.DominantModel model)
        {
            try
            {
                int id = model.CountryDominantID;

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