예제 #1
0
 public DashboardController(IDashboardBuilder dashboardbuilder, IDashboardRepository dashboardrepository,
     SecurityResolver sr, SessionData sd)
 {
     _sr = sr;
     _sd = sd;
     _dashboardbuilder = dashboardbuilder;
     _dashboardrepository = dashboardrepository;
 }
예제 #2
0
 public Dashboard BuildDashboard(SecurityResolver sr)
 {
     var dashboardtype = _dashboardrepository.GetDashboardType(sr.user, sr.CurrentRole);
     var dashboard = dashboardtype == "Company" ? _dashboardrepository.GetCompanyDashboard(sr.user) :
         _dashboardrepository.GetUserDashboard(sr.user, sr.CurrentRole);
     InitDashboard(dashboard);
     return dashboard;
 }
예제 #3
0
 public WidgetController(IWidgetBuilder widgetbuilder, IWidgetRepository widgetrepository, 
     SecurityResolver sr, SessionData sd)
 {
     _widgetbuilder = widgetbuilder;
     _widgetrepository = widgetrepository;
     _sr = sr;
     _sd = sd;
 }
예제 #4
0
 public string BuildWidgets(SecurityResolver sr)
 {
     var widgets = JsonConvert.SerializeObject(_widgetrepository.BuildCategoryWidgets());
     var formattedwidgets = "{\"result\":{\"data\":" + widgets + "}}";
     return formattedwidgets;
 }