예제 #1
0
        public static void BuildContent(ReportData client, OpenXmlPartContainer container, BlockItem block, string blockName, Dictionary <string, string> options)
        {
            TableBlock instance = BlockHelper.GetAssociatedBlockInstance <TableBlock>(blockName);

            if (null != instance)
            {
                LogHelper.Instance.LogDebugFormat("Start TableBlock generation : Type {0}", blockName);
                Stopwatch       treatmentWatch = Stopwatch.StartNew();
                TableDefinition content        = instance.Content(client, options);
                if (null != content)
                {
                    ApplyContent(client, container, block, content, options);
                }
                treatmentWatch.Stop();
                LogHelper.Instance.LogDebugFormat
                    ("End TableBlock generation ({0}) in {1} millisecond{2}"
                    , blockName
                    , treatmentWatch.ElapsedMilliseconds.ToString()
                    , treatmentWatch.ElapsedMilliseconds > 1 ? "s" : string.Empty
                    );
            }
        }
예제 #2
0
        public static TableDefinition GetContent(string blockName, ReportData client, Dictionary <string, string> options)
        {
            TableBlock instance = BlockHelper.GetAssociatedBlockInstance <TableBlock>(blockName);

            return(null == instance ? (TableDefinition)null : instance.Content(client, options));
        }