/// <summary>
        /// 生成多个报表,并保存到月报表数据中
        /// </summary>
        /// <param name="reportInfoNames"></param>
        /// <param name="dateStart"></param>
        /// <param name="dateEnd"></param>
        public static void GenerateMonthReport(MonthReportInfo monthReportInfo, string[] reportInfoNames)
        {
            LogEntityDao<MonthReportInfo> dao = new LogEntityDao<MonthReportInfo>();
            LogEntityDao<MonthReportDataInfo> subDao = new LogEntityDao<MonthReportDataInfo>();

            using (IRepository rep = ServiceProvider.GetService<IRepositoryFactory>().GenerateRepository<MonthReportInfo>())
            {
                try
                {
                    rep.BeginTransaction();
                    dao.Update(rep, monthReportInfo);

                    if (monthReportInfo.Reports != null)
                    {
                        foreach (MonthReportDataInfo i in monthReportInfo.Reports)
                        {
                            rep.Delete(i);
                        }
                        monthReportInfo.Reports.Clear();
                    }
                    foreach (string s in reportInfoNames)
                    {
                        MonthReportDataInfo dataInfo = new MonthReportDataInfo();
                        dataInfo.Name = s;
                        dataInfo.MonthReport = monthReportInfo;
                        dataInfo.Data = GenerateReport(s, monthReportInfo.报表日期起, monthReportInfo.报表日期止);
                        dataInfo.ClientId = 0;
                        dataInfo.OrgId = 0;

                        if (monthReportInfo.Reports == null)
                        {
                            monthReportInfo.Reports = new List<MonthReportDataInfo>();
                        }
                        monthReportInfo.Reports.Add(dataInfo);

                        subDao.Save(rep, dataInfo);
                    }

                    rep.CommitTransaction();
                }
                catch (Exception ex)
                {
                    rep.RollbackTransaction();
                    ExceptionProcess.ProcessWithNotify(ex);
                }

            }
        }
        /// <summary>
        /// 生成多个报表,并保存到月报表数据中
        /// </summary>
        /// <param name="reportInfoNames"></param>
        /// <param name="dateStart"></param>
        /// <param name="dateEnd"></param>
        public static void GenerateMonthReport(MonthReportInfo monthReportInfo, string[] reportInfoNames)
        {
            LogEntityDao <MonthReportInfo>     dao    = new LogEntityDao <MonthReportInfo>();
            LogEntityDao <MonthReportDataInfo> subDao = new LogEntityDao <MonthReportDataInfo>();

            using (IRepository rep = ServiceProvider.GetService <IRepositoryFactory>().GenerateRepository <MonthReportInfo>())
            {
                try
                {
                    rep.BeginTransaction();
                    dao.Update(rep, monthReportInfo);

                    if (monthReportInfo.Reports != null)
                    {
                        foreach (MonthReportDataInfo i in monthReportInfo.Reports)
                        {
                            rep.Delete(i);
                        }
                        monthReportInfo.Reports.Clear();
                    }
                    foreach (string s in reportInfoNames)
                    {
                        MonthReportDataInfo dataInfo = new MonthReportDataInfo();
                        dataInfo.Name        = s;
                        dataInfo.MonthReport = monthReportInfo;
                        dataInfo.Data        = GenerateReport(s, monthReportInfo.报表日期起, monthReportInfo.报表日期止);
                        dataInfo.ClientId    = 0;
                        dataInfo.OrgId       = 0;

                        if (monthReportInfo.Reports == null)
                        {
                            monthReportInfo.Reports = new List <MonthReportDataInfo>();
                        }
                        monthReportInfo.Reports.Add(dataInfo);

                        subDao.Save(rep, dataInfo);
                    }

                    rep.CommitTransaction();
                }
                catch (Exception ex)
                {
                    rep.RollbackTransaction();
                    ExceptionProcess.ProcessWithNotify(ex);
                }
            }
        }
        /// <summary>
        /// 打开报表
        /// </summary>
        /// <param name="monthReportDataInfo"></param>
        public static void OpenReport(MonthReportDataInfo monthReportDataInfo)
        {
            if (monthReportDataInfo == null)
            {
                throw new ArgumentNullException("monthReportDataInfo");
            }
            string fileName = System.IO.Path.GetTempFileName();

            fileName = System.IO.Path.ChangeExtension(fileName, ".pdf");
            byte[] data             = monthReportDataInfo.Data;
            System.IO.FileStream fs = new System.IO.FileStream(fileName, System.IO.FileMode.CreateNew);
            using (System.IO.BinaryWriter w = new System.IO.BinaryWriter(fs))
            {
                w.Write(data);
            }
            fs.Close();

            ProcessHelper.ExecuteApplication(fileName);
        }
        /// <summary>
        /// 打开报表
        /// </summary>
        /// <param name="monthReportDataInfo"></param>
        public static void OpenReport(MonthReportDataInfo monthReportDataInfo)
        {
            if (monthReportDataInfo == null)
            {
                throw new ArgumentNullException("monthReportDataInfo");
            }
            string fileName = System.IO.Path.GetTempFileName();
            fileName = System.IO.Path.ChangeExtension(fileName, ".pdf");
            byte[] data = monthReportDataInfo.Data;
            System.IO.FileStream fs = new System.IO.FileStream(fileName, System.IO.FileMode.CreateNew);
            using (System.IO.BinaryWriter w = new System.IO.BinaryWriter(fs))
            {
                w.Write(data);
            }
            fs.Close();

            ProcessHelper.ExecuteApplication(fileName);
        }