修复机构添加编辑的异常的bug

This commit is contained in:
yubao
2018-05-20 13:54:56 +08:00
parent 18d6d416d7
commit 9faedc1260
7 changed files with 37 additions and 13 deletions

View File

@@ -18,13 +18,7 @@ namespace OpenAuth.Mvc.Controllers
{
return View();
}
public ActionResult Assign(string firstId, string key)
{
ViewBag.FirstId = firstId;
ViewBag.ModuleType = key;
return View();
}
public string LoadForUser(string firstId)
{
var orgs = OrgApp.LoadForUser(firstId);
@@ -72,7 +66,6 @@ namespace OpenAuth.Mvc.Controllers
/// <summary>
/// 删除指定ID的组织
/// <para>Id为逗号分开的字符串</para>
/// </summary>
/// <returns>System.String.</returns>
[HttpPost]

View File

@@ -78,7 +78,13 @@ namespace OpenAuth.Mvc.Controllers
{
var org = user.Orgs.SingleOrDefault(u => u.Id == orgId);
if (org == null)
throw new Exception("未能找到指定对象信息");
{
return JsonHelper.Instance.Serialize(new TableData
{
msg ="未找到指定的节点",
code = 500,
});
}
cascadeId = org.CascadeId;
}