private new void Refresh() { IEnumerable <SysOrganization> enums = this.Find <SysOrganization>(Globals.ORGANIZATION_SERVICE_NAME, "findAll", new object[0]); List <SysOrganization> orgList = new List <SysOrganization>(); orgList.AddRange(enums); UltraTreeHelper.FillData(orgList, this.ultraTree1, null, true); }
private void QueryFunction() { IEnumerable <SysFunction> funs = this.Find <SysFunction>(Globals.FUNCTION_SERVICE_NAME, "findFunctionList", new object[0]); List <SysFunction> funList = new List <SysFunction>(); funList.AddRange(funs); UltraTreeHelper.FillData(funList, this.ultraTreeFunction, null); }
private void QueryRole() { IEnumerable <SysRole> roles = this.Find <SysRole>(Globals.ROLE_SERVICE_NAME, "findAll", new object[0]); List <SysRole> roleList = new List <SysRole>(); roleList.AddRange(roles); UltraTreeHelper.FillData(roleList, this.ultraTreeRole); }
private void QueryAuthor(string roleId) { IEnumerable <SysFunction> funs = this.Find <SysFunction>(Globals.ROLE_SERVICE_NAME, "findAuthor", new object[] { roleId }); List <SysFunction> funList = new List <SysFunction>(); funList.AddRange(funs); UltraTreeHelper.FillData(funList, this.ultraTreeAuthor, "1014"); }
private void Init() { if (post != null) { this.Text += " [岗位:" + post.PostName + "]"; } List <SysOrganization> orgList = this.FindList <SysOrganization>(Globals.ORGANIZATION_SERVICE_NAME, "findAll", new object[0]); UltraTreeHelper.FillData(orgList, this.ultraTree1, null, true); }
private new void Refresh() { //获取功能菜单数据 IEnumerable <SysFunction> functions = this.Find <SysFunction>(Globals.FUNCTION_SERVICE_NAME, "findFunctionListByUser", new object[] { User }); List <SysFunction> list = new List <SysFunction>(); list.AddRange(functions); //绑定到左侧菜单树,从根目录开始绑定 ultraTree1.Nodes.Clear(); UltraTreeHelper.FillData(list, ultraTree1, null); //清空所有文本框 ultraTabControl1.Tabs[0].Selected = true; lblSubSystemPos.Text = ""; txtSystemId.Text = ""; txtSystemKey.Text = ""; txtSystemName.Text = ""; txtSystemUrl.Text = ""; bilSystemIcon.Text = ""; lblSubSystemPos.Text = ""; lblModulePos.Text = ""; txtSubSysId.Text = ""; txtSubSysKey.Text = ""; txtSubSysName.Text = ""; bilSubSysIcon.Text = ""; lblSubSystemPos.Text = ""; lblModulePos.Text = ""; lblFormPos.Text = ""; txtModuleId.Text = ""; txtModuleKey.Text = ""; txtModuleName.Text = ""; bilModuleIcon.Text = ""; lblModulePos.Text = ""; lblFormPos.Text = ""; txtFormId.Text = ""; txtFormCaption.Text = ""; txtFormCustom.Text = ""; txtFormUrl.Text = ""; uteFormAssembly.Text = ""; bilFormIcon.Text = ""; ucbFormType.Value = 1; uceFormHotkey.Checked = false; uceFormToolbar.Checked = false; sysFunctionBindingSource.Clear(); }
private void LoadFunctionTree() { List <SysFunction> funList = this.FindList <SysFunction>(Globals.FUNCTION_SERVICE_NAME, "findFunctionListByUser", new object[] { User }); UltraTreeHelper.FillData(funList, ultraTreeFun, null); }
private void AppendNodes(UltraTreeNode sourceNode, UltraTree targetTree) { UltraTreeNode tmp = sourceNode; if (sourceNode == null || targetTree.GetNodeByKey(tmp.Key) != null) { return; } TreeNodesCollection nodes = targetTree.Nodes; Stack <UltraTreeNode> stack = new Stack <UltraTreeNode>(); if (tmp.Parent == null) { stack.Push(UltraTreeHelper.SingleClone(tmp)); } else { bool flag = false; //如果选择的节点为界面,自动选择所有按钮 int index = 0; while (tmp != null) { UltraTreeNode newNode = UltraTreeHelper.SingleClone(tmp); if (index == 0 && (tmp.Tag as SysFunction).FunctionType.Equals("1014")) { foreach (UltraTreeNode n in tmp.Nodes) { newNode.Nodes.Add(UltraTreeHelper.SingleClone(n)); } } stack.Push(newNode); tmp = tmp.Parent; if (tmp != null && targetTree.GetNodeByKey(tmp.Key) != null) { flag = true; break; } index++; } if (flag) { nodes = targetTree.GetNodeByKey(tmp.Key).Nodes; } } UltraTreeNode node = null; while (stack.Count > 0) { node = stack.Pop(); nodes.Add(node); if (node.Parent != null && !(node.Parent.Tag as SysFunction).FunctionType.Equals("1014")) { node.Parent.Expanded = true; } nodes = node.Nodes; } if (node != null) { ultraTreeAuthor.ActiveNode = node; } }