Ejemplo n.º 1
0
        /// <summary>
        /// 检索用户
        /// </summary>
        private void ProcessQuery()
        {
            TreeViewUserList.Nodes.Clear();
            if (string.IsNullOrEmpty(txtDisplayName.Text))
            {
                AddTopNodes();
            }
            else
            {
                // 根据名称检索到所有的用户。
                Epoint.RegisterUser.Bizlogic.RegisterUser rguser = new Epoint.RegisterUser.Bizlogic.RegisterUser();
                DataView       dvUser = rguser.GetRGUser(txtDisplayName.Text);
                EpointTreeNode node;

                for (int j = 0; j < dvUser.Count; j++)
                {
                    if (Convert.ToString(dvUser[j]["DispName"]) != "")
                    {
                        node                   = new EpointTreeNode();
                        node.Text              = dvUser[j]["DispName"].ToString();
                        node.Value             = dvUser[j]["RowGuid"].ToString();
                        node.PopulateOnDemand  = false;
                        node.CtrlClickFunction = "AutoSetPValue(this, '" + node.Text + "', '" + node.Value + "')";
                        TreeViewUserList.Nodes.Add(node);
                    }
                }
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 检索用户
        /// </summary>
        private void ProcessQuery()
        {
            TreeViewUserList.Nodes.Clear();
            if (string.IsNullOrEmpty(txtDisplayName.Text))
            {
                AddTopNodes();
            }
            else
            {
                // 根据名称检索到所有的用户。
                Epoint.RegisterUser.Bizlogic.RegisterUser rguser = new Epoint.RegisterUser.Bizlogic.RegisterUser();
                DataView dvUser = rguser.GetRGUser(txtDisplayName.Text);
                EpointTreeNode node;

                for (int j = 0; j < dvUser.Count; j++)
                {
                    if (Convert.ToString(dvUser[j]["DispName"]) != "")
                    {
                        node = new EpointTreeNode();
                        node.Text = dvUser[j]["DispName"].ToString();
                        node.Value = dvUser[j]["RowGuid"].ToString();
                        node.PopulateOnDemand = false;
                        node.CtrlClickFunction = "AutoSetPValue(this, '" + node.Text + "', '" + node.Value + "')";
                        TreeViewUserList.Nodes.Add(node);
                    }
                }
            }
        }