public static void CopyPageSet(int sourceID, string newName) { // pageset int id = NewPageSet(newName, false); // page List <DisplayPage> dpl = ClsDisplayControler.DisplayPagesForPageSet(sourceID); for (int i = 0; i < dpl.Count; i++) { ClsPages.CopyPage(sourceID, id, dpl[i].PageName, dpl[i].PageName); } }
public static int NewPageSet(string newName, bool firstPage = true) { long s = (from x in ClsDisplayControler.DisplayPageSets() select x.Sort).Max(); DisplayPageSet dps = new DisplayPageSet(); dps.PageSetName = newName; dps.Sort = s + 1; long id = ClsDisplayControler.AddDisplayPageSet(dps); // add first Page if (firstPage) { ClsPages.NewPage((int)id, "Spiel"); } return((int)id); }