public string Add(Module model) { try { _app.AddOrUpdate(model); } catch (Exception ex) { BjuiResponse.statusCode = "300"; BjuiResponse.message = ex.Message; } return(JsonHelper.Instance.Serialize(BjuiResponse)); }
public string Add(Module model) { try { _app.AddOrUpdate(model); } catch (Exception ex) { Result.Status = false; Result.Message = ex.Message; } return(JsonHelper.Instance.Serialize(Result)); }
public void InitNav() { var root = new Module() { Name = "基础设置", ParentId = 0 }; _app.AddOrUpdate(root); var module = new Module { Name = "模块管理", Url = "ModuleManager/Index", ParentId = root.Id }; _app.AddOrUpdate(module); module = new Module { Name = "用户管理", Url = "UserManager/Index", ParentId = root.Id }; _app.AddOrUpdate(module); module = new Module { Name = "角色管理", Url = "RoleManager/Index", ParentId = root.Id }; _app.AddOrUpdate(module); module = new Module { Name = "机构管理", Url = "OrgManager/Index", ParentId = root.Id }; _app.AddOrUpdate(module); }