36 lines
884 B
C#
36 lines
884 B
C#
using System.Collections.Generic;
|
|
using System.Web.Mvc;
|
|
using EnVisage.Code;
|
|
|
|
namespace EnVisage.Controllers
|
|
{
|
|
[Authorize]
|
|
public class ReportingController : Controller
|
|
{
|
|
//
|
|
// GET: /Reporting/
|
|
[AreaSecurityAttribute(area = Areas.Reports, level = AccessLevel.Read)]
|
|
public ActionResult Index(string rpt)
|
|
{
|
|
foreach (KeyValuePair<string, List<KeyValuePair<System.Type, string>>> group in Utils.GetReports())
|
|
{
|
|
if (group.Value != null && group.Value.Count > 0)
|
|
{
|
|
foreach (KeyValuePair<System.Type, string> report in group.Value)
|
|
{
|
|
if (report.Key.Name == rpt)
|
|
return View(model: report.Key);
|
|
}
|
|
}
|
|
}
|
|
|
|
return View(model: typeof(EnVisage.Reports.ResourceAvailability));
|
|
}
|
|
|
|
[AreaSecurityAttribute(area = Areas.Reports, level = AccessLevel.Read)]
|
|
public ActionResult Index2(string rpt)
|
|
{
|
|
return Index(rpt);
|
|
}
|
|
}
|
|
} |