Ejemplo n.º 1
0
        public static BaseExeclReport CreateReport(string type, DateTime startTime, DateTime endTime)
        {
            if (string.IsNullOrWhiteSpace(type))
            {
                throw new Exception("type为空");
            }

            BaseExeclReport report = (BaseExeclReport)System.Reflection.Assembly.GetExecutingAssembly().CreateInstance(DllName + type, false);

            if (report == null)
            {
                throw new Exception("创建对象失败!");
            }
            report.TemplateName = type;
            report.StartTime    = startTime;
            report.EndTime      = endTime;
            return(report);
        }
Ejemplo n.º 2
0
        public static BaseExeclReport CreateReport(string type, string name, string idno, string nsId, string status)
        {
            if (string.IsNullOrWhiteSpace(type))
            {
                throw new Exception("type为空");
            }

            BaseExeclReport report = (BaseExeclReport)System.Reflection.Assembly.GetExecutingAssembly().CreateInstance(DllName + type, false);

            if (report == null)
            {
                throw new Exception("创建对象失败!");
            }
            report.TemplateName = type;
            report.Name         = name;
            report.IdNo         = idno;
            report.NsId         = nsId;
            report.Status       = status;
            return(report);
        }