这是有史以来最艰难的一次提交,不生则死!

This commit is contained in:
yubao
2017-11-28 23:54:49 +08:00
parent 9c37623d7f
commit 6a3fa6fd3d
114 changed files with 779 additions and 2373 deletions

View File

@@ -1,81 +0,0 @@
using Infrastructure;
using OpenAuth.App;
using System;
using System.Web.Http;
using System.Web.Mvc;
using Newtonsoft.Json.Linq;
using OpenAuth.Mvc.Models;
namespace OpenAuth.Mvc.Controllers
{
public class RoleManagerController : BaseController
{
public RoleManagerApp App { get; set; }
//
// GET: /RoleManager/
[Authenticate]
public ActionResult Index()
{
return View();
}
//添加或修改角色
[System.Web.Mvc.HttpPost]
public string Add([FromBody]JObject obj)
{
try
{
App.AddOrUpdate(obj);
}
catch (Exception ex)
{
Result.Status = false;
Result.Message = ex.Message;
}
return JsonHelper.Instance.Serialize(Result);
}
/// <summary>
/// 加载角色下面的所有用户
/// </summary>
public string Load(string orgId, int pageCurrent = 1, int pageSize = 30)
{
return JsonHelper.Instance.Serialize(App.Load(orgId, pageCurrent, pageSize));
}
[System.Web.Mvc.HttpPost]
public string Delete(string[] ids)
{
try
{
foreach (var obj in ids)
{
App.Delete(obj);
}
}
catch (Exception e)
{
Result.Status = false;
Result.Message = e.Message;
}
return JsonHelper.Instance.Serialize(Result);
}
#region
public ActionResult LookupMulti(string firstId, string key)
{
ViewBag.FirstId = firstId;
ViewBag.ModuleType = key;
return View();
}
public string LoadForOrgAndUser(string orgId, string userId)
{
return JsonHelper.Instance.Serialize(App.LoadForOrgAndUser(orgId, userId));
}
#endregion
}
}