2015-10-26 21:58:12 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Web;
|
|
|
|
|
using System.Web.Mvc;
|
|
|
|
|
using Infrastructure;
|
|
|
|
|
using OpenAuth.App;
|
2015-10-29 23:51:10 +08:00
|
|
|
|
using OpenAuth.Domain;
|
2015-10-26 21:58:12 +08:00
|
|
|
|
|
|
|
|
|
namespace OpenAuth.Mvc.Controllers
|
|
|
|
|
{
|
|
|
|
|
public class OrgManagerController : BaseController
|
|
|
|
|
{
|
|
|
|
|
private OrgManagerApp _orgApp;
|
|
|
|
|
|
|
|
|
|
public OrgManagerController()
|
|
|
|
|
{
|
|
|
|
|
_orgApp = (OrgManagerApp) DependencyResolver.Current.GetService(typeof (OrgManagerApp));
|
|
|
|
|
}
|
|
|
|
|
//
|
|
|
|
|
// GET: /OrgManager/
|
|
|
|
|
public ActionResult Index()
|
|
|
|
|
{
|
|
|
|
|
return View();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public string LoadOrg()
|
|
|
|
|
{
|
2015-10-29 23:51:10 +08:00
|
|
|
|
return JsonHelper.Instance.Serialize(_orgApp.GetAll());
|
2015-10-26 21:58:12 +08:00
|
|
|
|
}
|
2015-10-28 22:49:59 +08:00
|
|
|
|
|
2015-10-29 23:51:10 +08:00
|
|
|
|
public string LoadChildren(int id)
|
2015-10-28 22:49:59 +08:00
|
|
|
|
{
|
2015-10-29 23:51:10 +08:00
|
|
|
|
return JsonHelper.Instance.Serialize(_orgApp.LoadChildren(id));
|
2015-10-28 22:49:59 +08:00
|
|
|
|
}
|
2015-10-29 23:51:10 +08:00
|
|
|
|
|
|
|
|
|
|
2015-10-26 21:58:12 +08:00
|
|
|
|
}
|
|
|
|
|
}
|