Exemplo n.º 1
0
        public JsonResult getprojectitem(int page, int rows)
        {
            var list   = new JiaJiBLL.projectitembll().ShowProjectitem();
            var result = new { total = list.Count, rows = list.Skip((page - 1) * rows).Take(rows) };

            return(Json(result));
        }
Exemplo n.º 2
0
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        public int deleteprojectitem(string ids)
        {
            bool isOK = new JiaJiBLL.projectitembll().DelProjectitem(ids);

            if (isOK)
            {
                return(0);
            }
            else
            {
                return(1);
            }
        }
Exemplo n.º 3
0
        public JsonResult editprojectitem(JiaJiModels.projectitem model)
        {
            try
            {
                int id = model.Pro_ID;

                var i = new JiaJiBLL.projectitembll().Updpro(model);
                if (i > 0)
                {
                    return(Json(new { Success = true, Message = "修改成功" }));
                }
                else
                {
                    return(Json(new { Success = false, Message = "修改失败" }));
                }
            }
            catch
            {
                return(Json(new { Success = false, Message = "修改失败" }));
            }
        }
Exemplo n.º 4
0
 public ActionResult addprojectitem(JiaJiModels.projectitem model)
 {
     try
     {
         model.Pro_Img       = "/image/" + model.Pro_Img;
         model.ProactiveImg1 = "/image/" + model.ProactiveImg1;
         model.ProactiveImg2 = "/image/" + model.ProactiveImg2;
         var i = new JiaJiBLL.projectitembll().proadd(model);
         if (i > 0)
         {
             return(Json(new { Success = true, Message = "添加成功" }));
         }
         else
         {
             return(Json(new { Success = false, Message = "添加失败" }));
         }
     }
     catch
     {
         return(Json(new { Success = false, Message = "添加失败" }));
     }
 }