public void Update(WSNews wsNews) { if (!this.IsValid()) return; ModNewsService.Instance.Save(new ModNewsEntity() { MenuID = wsNews.MenuID, Name = wsNews.Name, Code = HL.Lib.Global.Data.GetCode(wsNews.Name), Summary = wsNews.Summary, Content = wsNews.Content, File = wsNews.File, Custom = wsNews.Custom, State = 0, Published = (wsNews.Publish.Year > 2000 ? wsNews.Publish : DateTime.Now), Order = getMaxOrder(), Activity = true }); }
public void Update(WSNews wsNews) { if (!this.IsValid()) { return; } ModNewsService.Instance.Save(new ModNewsEntity() { MenuID = wsNews.MenuID, Name = wsNews.Name, Code = HL.Lib.Global.Data.GetCode(wsNews.Name), Summary = wsNews.Summary, Content = wsNews.Content, File = wsNews.File, Custom = wsNews.Custom, State = 0, Published = (wsNews.Publish.Year > 2000 ? wsNews.Publish : DateTime.Now), Order = getMaxOrder(), Activity = true }); }