-
Notifications
You must be signed in to change notification settings - Fork 2
/
HomeController.cs
29 lines (26 loc) · 995 Bytes
/
HomeController.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using DevExpress.DataAccess.ObjectBinding;
using System.Collections.Generic;
using System.Web.Mvc;
namespace Reporting_ObjectDS_Mvc.Controllers
{
public class HomeController : Controller {
public ActionResult Index() {
return View();
}
public ActionResult Designer() {
Models.ReportDesignerModel model = new Models.ReportDesignerModel();
ObjectDataSource dataSource = new ObjectDataSource();
dataSource.Name = "EmployeeObjectDS";
dataSource.DataSource = typeof(Employees.EmployeeList);
dataSource.Constructor = ObjectConstructorInfo.Default;
dataSource.DataMember = "Items";
dataSource.RebuildResultSchema();
model.DataSources = new Dictionary<string, object>();
model.DataSources.Add("EmployeeObjectDS", dataSource);
return View(model);
}
public ActionResult Viewer() {
return View();
}
}
}