OpenAuth.Net/OpenAuth.Mvc/Controllers/HomeController.cs

30 lines
729 B
C#
Raw Normal View History

2015-11-13 21:33:53 +08:00
using System.Web.Mvc;
2015-11-22 21:32:38 +08:00
using Infrastructure;
using OpenAuth.App;
2015-09-22 23:10:00 +08:00
namespace OpenAuth.Mvc.Controllers
{
public class HomeController : BaseController
{
2015-11-22 21:32:38 +08:00
private ModuleManagerApp _app;
public HomeController()
{
_app = (ModuleManagerApp)DependencyResolver.Current.GetService(typeof(ModuleManagerApp));
}
public string GetModules(int parentId = 0)
{
return JsonHelper.Instance.Serialize(_app.LoadByParent(parentId));
}
2015-09-22 23:10:00 +08:00
public ActionResult Index()
{
2015-11-22 21:32:38 +08:00
return View(_app.LoadByParent(0));
2015-09-22 23:10:00 +08:00
}
2015-10-26 21:58:12 +08:00
public ActionResult Main()
{
2015-10-26 21:58:12 +08:00
return View();
}
2015-09-22 23:10:00 +08:00
}
}