Пример #1
0
 /// <summary>
 /// 修改帖子回复
 /// </summary>
 /// <param name="reContent"></param>
 public static void UpdateReContent(Model.Exchange_ReContent reContent)
 {
     Model.SUBHSSEDB          db           = Funs.DB;
     Model.Exchange_ReContent newReContent = db.Exchange_ReContent.FirstOrDefault(e => e.ReContentId == reContent.ReContentId);
     if (newReContent != null)
     {
         newReContent.Contents    = reContent.Contents;
         newReContent.CompileDate = reContent.CompileDate;
         newReContent.AttachUrl   = reContent.AttachUrl;
         db.SubmitChanges();
     }
 }
Пример #2
0
 /// <summary>
 ///根据主键删除帖子回复
 /// </summary>
 /// <param name="lawRegulationId"></param>
 public static void DeleteReContentById(string reContentId)
 {
     Model.SUBHSSEDB          db        = Funs.DB;
     Model.Exchange_ReContent reContent = db.Exchange_ReContent.FirstOrDefault(e => e.ReContentId == reContentId);
     if (reContent != null)
     {
         if (!string.IsNullOrEmpty(reContent.AttachUrl))
         {
             BLL.UploadFileService.DeleteFile(Funs.RootPath, reContent.AttachUrl);
         }
         db.Exchange_ReContent.DeleteOnSubmit(reContent);
         db.SubmitChanges();
     }
 }
Пример #3
0
 /// <summary>
 /// 添加帖子回复
 /// </summary>
 /// <param name="reContent"></param>
 public static void AddReContent(Model.Exchange_ReContent reContent)
 {
     Model.SUBHSSEDB          db           = Funs.DB;
     Model.Exchange_ReContent newReContent = new Model.Exchange_ReContent
     {
         ReContentId = reContent.ReContentId,
         ContentId   = reContent.ContentId,
         Contents    = reContent.Contents,
         CompileMan  = reContent.CompileMan,
         CompileDate = reContent.CompileDate,
         AttachUrl   = reContent.AttachUrl
     };
     db.Exchange_ReContent.InsertOnSubmit(newReContent);
     db.SubmitChanges();
 }