public void Execute() { #region "Creating and preparing the object to send to RavenDB" DataBaseBase dataBaseBase = new DatabaseSQLServer("Server=.\\SQLEXPRESS;Database=AdventureWorks2008;Trusted_Connection=True;", "http://localhost:8080", "Test"); dataBaseBase.LoadSchema(); ProcessingQueueReports reports = new ProcessingQueueReports("http://localhost:8080", "", "Teste", DataBaseBase.BancoDados.MSSQLSERVER, dataBaseBase); ReportConfiguration rc = new ReportConfiguration(); rc.Id = 1; rc.ReportName = "ReportTest"; rc.MainTable = new DSTable(1,"Test","schema"); rc.MainSchemaName = "schema"; rc.Columns = new List<DSColumn>{new DSColumn(),new DSColumn()}; reports.AddProcessReport(rc); #endregion using (var store = NewDocumentStore()) { using (var session = store.OpenSession()) { session.Store(reports); session.SaveChanges(); } } }
public static ReportDatasetBase GetReportDataset(DataBaseBase.BancoDados tipoBancoDados, string connectionStringRDB, ReportConfiguration config, DataBaseBase dataBase ) { switch (tipoBancoDados) { case DataBaseBase.BancoDados.MSSQLSERVER: return new ReportDatasetGeneric(connectionStringRDB, config, dataBase); default: return new ReportDatasetGeneric(connectionStringRDB, config, dataBase); } }
public void AddProcessReport(ReportConfiguration reportConfiguration) { LoadQueue(); reportConfiguration.Id = ReportConfigurations.Count + 1; ReportConfigurations.Add(reportConfiguration); }
protected ReportDatasetBase(String connectionStringRDB, ReportConfiguration config, DataBaseBase database) { this.Config = config; ConnectionStringRDB = connectionStringRDB; this.Database = database; }
public ReportDatasetGeneric(string connectionStringRDB, ReportConfiguration config, DataBaseBase dataBase) : base(connectionStringRDB, config, dataBase) { }