private ReportTreeNode CopyReport(Serialization.Node src, int businessUnitId) { ReportTreeNode dst = null; if (reportFactory.IsAuthorized(((Serialization.ReportReference)src.Content.Items[0]).Value, businessUnitId)) { ReportHandle handle = new ReportHandle(); CopyFields(handle, src); Serialization.ReportReference reference = (Serialization.ReportReference)src.Content.Items[0]; if (reference.ComingSoon) { handle.ComingSoon = true; } else { handle.Report = reportFactory.FindReport(reference.Value); } dst = handle; } return(dst); }
private ReportTreeNode CopyGroup(Serialization.Node src, int businessUnitId) { ReportGroup dst = new ReportGroup(); CopyFields(dst, src); foreach (Serialization.Node node in src.Content.Items) { ReportTreeNode child = Copy(node, businessUnitId); if (child != null) { dst.Children.Add(child); } } return(dst); }
private static void CopyFields(ReportTreeNode dst, Serialization.Node src) { dst.Title = src.Title; dst.Description = src.Description; dst.NodeType = (ReportTreeNodeType)Enum.Parse(typeof(ReportTreeNodeType), src.NodeType.ToString()); }