/// <summary> /// 添加待审文本 /// </summary> /// <param name="ftm">待审文本模型</param> public void AddFilterText(FilterTextModel ftm) { try { MongoDatabase md = MongoDBHelper.MongoDB; MongoCollection<FilterTextModel> mc = md.GetCollection<FilterTextModel>("FilterText"); mc.Insert(ftm); } catch (Exception es) { throw new CBB.ExceptionHelper.OperationException( CBB.ExceptionHelper.ErrType.SystemErr, CBB.ExceptionHelper.ErrNo.DBOperationError, es); } }
public void UpdateContent(FilterTextModel ftm, string text) { if (ftm.Tablename == InterView.InterView.GetCollectionName()) { Content.InterViewContent interviewobj = Content.ContentProvider.getInterviewContent(ftm.Colid, ftm.MemberID); foreach (var interview in interviewobj.InterviewList) { if (interview.ID == ftm.Colid) { interview.Answer = text; break; } } new Content.PublicContent().savePublicContent(interviewobj); } else if (ftm.Tablename == Comment.Comment.GetCollectionName()) { Content.PublicContent contentobj = Content.ContentProvider.getContentToComment(ftm.Colid); foreach (var comment in contentobj.AnswerList) { if (comment.ID == ftm.Colid) { comment.Content = text; break; } } new Content.PublicContent().savePublicContent(contentobj); } }