public int Add(NewsInfo News) { var entity = new NewsEntity(News); entity.IsDelete = false; entity.CreateDate = DateTime.Now; this._DB.Add(entity); _NotifySrv.Send(new { Head = "新闻公告", Title = entity.Title, Content = ReplaceHtmlTag(entity.Content, 100), }); //foreach (var attachID in News.AttachIDs) //{ // AddAttach(entity.ID, attachID); //} return(entity.ID); }
public void SetEntity(NewsEntity Entity) { this.Title = Entity.Title; this.Content = Entity.Content; this.Type = Entity.Type; }
public void Update(int ID, NewsEntity Entity) { this._INewsService.Update(ID, Entity); }