public override void Run() { if (this.Owner is ObjectNode) { ObjectNode owner = (ObjectNode) this.Owner; PrintSet set = new PrintSet(); set.Id = StringHelper.GetNewGuid(); set.Name = "新报表集合"; set.Description = "新报表集合"; set.TempletPrints = new List<TempletPrint>(); set.Save(); owner.AddSingleNode<PrintSet, PrintSetNode>(set); } }
public static PrintSet GetPrintSet(string id) { if (StringHelper.IsNull(id)) { return null; } string key = "PrintSet_" + id; PrintSet set = DAOCacheService.Get(key) as PrintSet; if (set == null) { set = new PrintSet(); set.Id = id; set.TempletPrints = new List<TempletPrint>(); string[] strArray = id.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); foreach (string str2 in strArray) { PrintSet set2 = QueryHelper.Get<PrintSet>("PrintSet_" + str2, str2); if (set2 != null) { foreach (TempletPrint print in set2.TempletPrints) { if (!set.TempletPrints.Contains(print)) { set.TempletPrints.Add(print); } } } } DAOCacheService.Put(key, set); } return set; }
public virtual PrintSet FilterTempletPrints(PrintSet printSet) { return printSet; }