public JsonNetResult LoadMenuTree() { BaseSearchModel se = new BaseSearchModel("bw_menu"); se.OrderBy("parentid", EnumOrderBy.Asc); se.OrderBy("id"); var r = se.Load<BW_Menu>(); List<HtmlTreeNode> treeNodes = new List<HtmlTreeNode>(); foreach (var d in r.Data) { treeNodes.Add(new HtmlTreeNode() { id = (int)d.ID, text = d.Name, parentid = d.ParentID }); } return ExController.JsonNet(HtmlTree.InitTree(treeNodes)); }
public JsonNetResult LoadRoles(BaseSearchModel se, int page_g, int psize_g) { #region 查询条件初始化 Example:se["Field"] = "value"; se.SearchID = "bw_role"; se.OrderBy("id", EnumOrderBy.Desc); #endregion se.PageIndex = page_g; se.PageSize = psize_g; var result = se.Load<BW_Role>(); return ExController.JsonNet(result); }