示例#1
0
 public ActionResult addProject(JiaJiModels.ProjectModel model)
 {
     try
     {
         model.Image = "/image/" + model.Image;
         var i = new JiaJiBLL.ProjectBLL().AddPro(model);
         if (i > 0)
         {
             return(Json(new { Success = true, Message = "添加成功" }));
         }
         else
         {
             return(Json(new { Success = false, Message = "添加失败" }));
         }
     }
     catch
     {
         return(Json(new { Success = false, Message = "添加失败" }));
     }
 }
示例#2
0
        public JsonResult editProject(JiaJiModels.ProjectModel model)
        {
            try
            {
                int id = model.ProjectID;

                var i = new JiaJiBLL.ProjectBLL().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 = "修改失败" }));
            }
        }