예제 #1
0
        public PrincipalSelectFieldNode(bool loading = true)
        {
            this.Children = new ObservableCollection<PrincipalSelectFieldNode>();

            if (loading == true)
            {
                PrincipalSelectFieldNode dummy = new PrincipalSelectFieldNode(false);
                dummy.parent = this;
                dummy.Label = "正在加载数据...";
                _children.Add(dummy);
            }
        }
예제 #2
0
 private void onSelectChange(PrincipalSelectFieldNode node)
 {
     if (node.type == "P")
         btnOK.IsEnabled = true;
     else
         btnOK.IsEnabled = false;
 }
예제 #3
0
        private void cb_getOrganizationRoot(object data)
        {
            ASObject record = data as ASObject;
            PrincipalSelectFieldNode node = new PrincipalSelectFieldNode();
            node.Label = "部门";
            node.id = record.getLong("departmentRootId");
            node.type = "D";

            PrincipalList.Add(node);
        }
예제 #4
0
        private void getChildPri(int groupId, PrincipalSelectFieldNode node)
        {
            object result = Remoting.call("PrincipalService.getPrincipals", new object[] { groupId, 0, 99999 });
            if (result == null)
                return;

            object[] data = result as object[];

            PrincipalSelectFieldNode childNode = null;
            for (int i = 0; i < data.Length; i++)
            {
                ASObject record = data[i] as ASObject;

                childNode = new PrincipalSelectFieldNode(false);
                childNode.id = record.getLong("id");
                childNode.Label = record.getString("name");
                childNode.type = "P";
                childNode.entity = record;
                childNode.parent = node;
                childNode.IsLoading = true;

                node.Children.Add(childNode);
            }
        }
예제 #5
0
 private void cb_findDepartmentGroup(ASObject data)
 {
     PrincipalSelectFieldNode node = new PrincipalSelectFieldNode();
     node.id = data.getLong("id");
     if (data.getString("name") == "%DepartmentRoot%")
         node.Label = "部门";
     else
         node.Label = data.getString("name");
     node.type = "D";
     node.entity = data;
     PrincipalList.Add(node);
 }