示例#1
0
        public static System.Data.DataSet LoadProperties(ReportsTypes type)
        {
            DataSet result = new DataSet();

            result.ReadXml(@"..\..\TestData\" + type.ToString() + ".xml");
            return(result);
        }
示例#2
0
        public static string EnsureDeletion(ReportsTypes type)
        {
            string fileName = GetFileName(type);

            if (File.Exists(fileName))
            {
                File.Delete(fileName);
            }
            return(fileName);
        }
示例#3
0
        public static void ProcessReport(BaseReport report, ReportsTypes type)
        {
            report.ReportCaption = report.ReportCaption ?? "Automate Created Report";
            ProfileHelper.Start();
            using (new SessionScope()) {
                ArHelper.WithSession(s => {
                    report.Session        = s;
                    report.CheckEmptyData = false;
                    report.Write(EnsureDeletion(type));
                });
            }

            ProfileHelper.Stop();
        }
示例#4
0
 public static string GetFileName(ReportsTypes type)
 {
     return(Path.GetFullPath(type.ToString() + ".xls"));
 }