public JsonResult Edit(News news)
 {
     var total = 0;
     var pro = pService.GetList(1, int.MaxValue, out total).FirstOrDefault(x => x.Id == news.Id);
     news.CreateTime = pro.CreateTime;
     if (new BaseService().Update<News>(news))
         return Json(new { flag = true, msg = "修改成功!" });
     return Json(new { flag = false, msg = "修改失败" });
 }
        public JsonResult AddNew(News news)
        {
            try
            {
                if (news != null)
                {
                    news.Id = Guid.NewGuid().ToSafeTrim();
                    news.CreateTime = DateTime.Now;
                    if (new BaseService().Insert<News>(news))
                        return Json(new { flag = true, msg = "添加成功" });
                }
                return Json(new { flag = false, msg = "添加失败" });
            }
            catch (Exception e)
            {
                return Json(new { flag = false, msg = "发生异常" });

            }
        }