Exemple #1
0
        public static void SaveReport(ViewGroup viewGroup, ReportOrViewSpec reportOrViewSpec)
        {
            var srmDocument             = GetDefaultDocument();
            var documentGridViewContext = new DocumentGridViewContext(GetSkylineDataSchema(srmDocument, DataSchemaLocalizer.INVARIANT));

            documentGridViewContext.AddOrReplaceViews(viewGroup.Id, ConvertAll(new[] { reportOrViewSpec }, srmDocument));
        }
Exemple #2
0
 public static void SaveReportAs(ViewGroup viewPath, ReportOrViewSpec reportOrViewSpec, string newName)
 {
     if (null != reportOrViewSpec.ReportSpec)
     {
         SaveReport(viewPath, new ReportOrViewSpec((ReportSpec)reportOrViewSpec.ReportSpec.ChangeName(newName)));
     }
     else if (null != reportOrViewSpec.ViewSpec)
     {
         SaveReport(viewPath, new ReportOrViewSpec(reportOrViewSpec.ViewSpec.SetName(newName)));
     }
 }
Exemple #3
0
        public static bool AreEquivalent(ReportOrViewSpec reportOrViewSpec1, ReportOrViewSpec reportOrViewSpec2)
        {
            if (reportOrViewSpec1.ReportSpec != null && reportOrViewSpec2.ReportSpec != null)
            {
                return(reportOrViewSpec1.ReportSpec.Equals(reportOrViewSpec2.ReportSpec));
            }
            var viewSpec1 = ConvertView(reportOrViewSpec1);
            var viewSpec2 = ConvertView(reportOrViewSpec2);

            return(viewSpec1.Equals(viewSpec2));
        }
Exemple #4
0
 private static ViewSpec ConvertView(ReportOrViewSpec reportOrViewSpec)
 {
     return(ConvertAll(new[] { reportOrViewSpec }, GetDefaultDocument()).First());
 }