Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 public void SetEntity(NewsEntity Entity)
 {
     this.Title   = Entity.Title;
     this.Content = Entity.Content;
     this.Type    = Entity.Type;
 }
Ejemplo n.º 3
0
 public void Update(int ID, NewsEntity Entity)
 {
     this._INewsService.Update(ID, Entity);
 }