Ejemplo n.º 1
0
 public JsonResult addinformation(JiaJiModels.Information infor)
 {
     try
     {
         infor.InformationImgUrl = "/image/" + infor.InformationImgUrl;
         var i = new JiaJiBLL.infobll().infoadd(infor);
         if (i > 0)
         {
             return(Json(new { Success = true, Message = "添加成功" }));
         }
         else
         {
             return(Json(new { Success = false, Message = "添加失败" }));
         }
     }
     catch
     {
         return(Json(new { Success = false, Message = "添加失败" }));
     }
 }
Ejemplo n.º 2
0
        public JsonResult editinformation(JiaJiModels.Information model)
        {
            try
            {
                int id = model.InformationID;

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