// GET: DistanceDuration public ActionResult Index() { ReportTripCategoriesBySubscriberHour report = new ReportTripCategoriesBySubscriberHour(); // GetData may be overloaded to accept different parameters TableTripCategories model = report.GetData(); return(View("View", model)); }
public TableTripCategories GetData() { TableTripCategories model = new TableTripCategories(); // hierarchy properly defined within report List<BikeTable> hierarchy = new List<BikeTable>(); hierarchy.Add(new TableSubscriber()); hierarchy.Add(new TableHour2()); DataSet ds = new DataSet(); using (AdomdConnection conn = new AdomdConnection("Data Source=miranda;Initial Catalog=bikesMD2")) { conn.Open(); using (AdomdCommand cmd = new AdomdCommand(CommandText(), conn)) { AdomdDataAdapter adapter = new AdomdDataAdapter(cmd); adapter.Fill(ds); } conn.Close(); } PopulateModel(hierarchy, model, ds); return (model); }