public void Copy(long siteId, long menuId, long[] ArticleIds, long TargetMenuID) { ViewBag.SiteID = siteId; ViewBag.MenuID = menuId; ViewBag.ActionType = "copy"; if (ArticleIds.Length == 0) { return; } var targetMenu = MenusDAO.GetInfo(TargetMenuID); foreach (long ArticleId in ArticleIds) { ArticleModels articleItem = ArticleDAO.GetItem(ArticleId); CardsModels cardItem = CardsDAO.GetByNo(articleItem.CardNo); ZonesModels zoneItem = ZonesDAO.GetByNo(cardItem.ZoneNo.Value); PagesModels pageItem = PagesDAO.GetPageInfo(zoneItem.PageNo); long newCardNo = WorkV3.Golbal.PubFunc.CopyPage(pageItem, targetMenu.SiteID, targetMenu.ID); long newArticleId = WorkLib.GetItem.NewSN(); bool IsForceRelative = false; if (pageItem.SiteID == targetMenu.SiteID && pageItem.MenuID == targetMenu.ID) { IsForceRelative = true; } ArticleDAO.CopyArticle(ArticleId, newArticleId, newCardNo, targetMenu.ID, targetMenu.SiteID, IsForceRelative); WorkV3.Golbal.PubFunc.CopyIcon(articleItem.Icon, siteId, menuId, targetMenu.SiteID, targetMenu.ID); WorkV3.Golbal.PubFunc.CopyParagraphPhotos(articleItem.ID, siteId, menuId, targetMenu.SiteID, targetMenu.ID); } }
public static void SaveArticleDelLog(long ArticleID) { var articleInfo = ArticleDAO.GetItem(ArticleID); if (articleInfo != null) { var cardInfo = CardsDAO.GetByNo(articleInfo.CardNo); if (cardInfo != null && cardInfo.ZoneNo.HasValue) { var zoneInfo = ZonesDAO.GetByNo(cardInfo.ZoneNo.Value); if (zoneInfo != null) { SysLog.SaveLog(SysActions.Del, SysMgrNo.Page, articleInfo.Title, articleInfo.SiteID, articleInfo.MenuID, zoneInfo.PageNo); } } } }
public void Move(long siteId, long menuId, long[] ArticleIds, long TargetMenuID) { ViewBag.SiteID = siteId; ViewBag.MenuID = menuId; ViewBag.ActionType = "move"; if (ArticleIds.Length == 0) { return; } foreach (long ArticleId in ArticleIds) { ArticleModels articleItem = ArticleDAO.GetItem(ArticleId); CardsModels cardItem = CardsDAO.GetByNo(articleItem.CardNo); ZonesModels zoneItem = ZonesDAO.GetByNo(cardItem.ZoneNo.Value); PagesModels pageItem = PagesDAO.GetPageInfo(zoneItem.PageNo); var targetMenu = MenusDAO.GetInfo(TargetMenuID); WorkV3.Golbal.PubFunc.MovePage(pageItem, targetMenu.SiteID, targetMenu.ID); ArticleDAO.Move(ArticleId, targetMenu.ID, targetMenu.SiteID); WorkV3.Golbal.PubFunc.CopyIcon(articleItem.Icon, siteId, menuId, targetMenu.SiteID, targetMenu.ID); WorkV3.Golbal.PubFunc.CopyParagraphPhotos(articleItem.ID, siteId, menuId, targetMenu.SiteID, targetMenu.ID); } }