Ejemplo n.º 1
0
 //修改公告信息
 public ActionResult editGongGao(GongGao tqz)
 {
     if (tqz.ID <= 0)
     {
         GongGaoService.AddEntity(tqz);
         return(Json(new { ret = "ok", JsonRequestBehavior.AllowGet }));
     }
     else
     {
         return(Json(new { msg = "添加出错,请联系管理员!~", JsonRequestBehavior.AllowGet }));
     }
 }
Ejemplo n.º 2
0
 //添加公告信息
 public ActionResult AddGongGao(GongGao tqz)
 {
     if (tqz.ID <= 0)
     {
         var isnull = GongGaoService.LoadEntities(x => x.Items == tqz.Items).FirstOrDefault();
         if (isnull != null)
         {
             return(Json(new { msg = "文本分类必须保证唯一性~", JsonRequestBehavior.AllowGet }));
         }
         GongGaoService.AddEntity(tqz);
         return(Json(new { ret = "ok", JsonRequestBehavior.AllowGet }));
     }
     else
     {
         GongGaoService.EditEntity(tqz);
         return(Json(new { ret = "editok", msg = "修改成功!~", JsonRequestBehavior.AllowGet }));
     }
 }