Exemple #1
0
 private void GetOrganizeList()
 {
     // 获取部门数据,这里是按权限范围进行获取
     this.DTOrganize = this.GetOrganizeScope(this.PermissionItemScopeCode, true);//organizationService.GetDT(this.UserInfo);
     if (!this.UserInfo.IsAdministrator)
     {
         BasePageLogic.CheckTreeParentId(this.DTOrganize, PiOrganizeTable.FieldId, PiOrganizeTable.FieldParentId);
     }
     this.LoadTree();
     if (this.tvOrganize.SelectedNode == null && this.tvOrganize.Nodes.Count > 0)
     {
         if (this.TargetOrganizeId.Length == 0)
         {
             this.tvOrganize.SelectedNode = this.tvOrganize.Nodes[0];
         }
         else
         {
             BasePageLogic.FindTreeNode(this.tvOrganize, this.TargetOrganizeId);
             if (BasePageLogic.TargetNode != null)
             {
                 this.tvOrganize.SelectedNode = BasePageLogic.TargetNode;
                 // 展开当前选中节点的所有父节点
                 BasePageLogic.ExpandTreeNode(this.tvOrganize);
             }
         }
         if (this.tvOrganize.SelectedNode != null)
         {
             // 让选中的节点可视,并用展开方式
             this.tvOrganize.SelectedNode.Expand();
             this.tvOrganize.SelectedNode.EnsureVisible();
         }
     }
 }
Exemple #2
0
 /// <summary>
 /// 加载模块树的主键
 /// </summary>
 /// <param name="treeNode">当前节点</param>
 private void LoadTreeModule(TreeNode treeNode)
 {
     if ((SystemInfo.EnableUserAuthorizationScope) && !UserInfo.IsAdministrator)
     {
         BasePageLogic.CheckTreeParentId(this.DTModule, PiModuleTable.FieldId, PiModuleTable.FieldParentId);
     }
     BasePageLogic.LoadTreeNodes(this.DTModule, PiModuleTable.FieldId, PiModuleTable.FieldParentId, PiModuleTable.FieldFullName, this.tvModule, treeNode);
 }
Exemple #3
0
 /// <summary>
 /// 加载数据字典树的主键
 /// </summary>
 /// <param name="treeNode">当前节点</param>
 private void LoadTreeItems(TreeNode treeNode)
 {
     if ((SystemInfo.EnableUserAuthorizationScope) && !UserInfo.IsAdministrator)
     {
         BasePageLogic.CheckTreeParentId(this.DTItems, CiItemsTable.FieldId, CiItemsTable.FieldParentId);
     }
     BasePageLogic.LoadTreeNodes(this.DTItems, CiItemsTable.FieldId, CiItemsTable.FieldParentId, CiItemsTable.FieldFullName, this.tvItems, treeNode, true, 2);
 }
 /// <summary>
 /// 加载组织机构树的主键
 /// </summary>
 /// <param name="treeNode">当前节点</param>
 private void LoadTreeCustomerClass(TreeNode treeNode)
 {
     if ((SystemInfo.EnableUserAuthorizationScope) && !UserInfo.IsAdministrator)
     {
         BasePageLogic.CheckTreeParentId(this.dtCustomerClass, CustomerClassTable.FieldId, CustomerClassTable.FieldParentId);
     }
     BasePageLogic.LoadTreeNodes(this.dtCustomerClass, CustomerClassTable.FieldId, CustomerClassTable.FieldParentId, CustomerClassTable.FieldClassName, tvCustomerClass, treeNode);
 }
Exemple #5
0
 /// <summary>
 /// 加载组织机构树的主键
 /// </summary>
 /// <param name="treeNode">当前节点</param>
 private void LoadTreeOrganize(TreeNode treeNode)
 {
     if ((SystemInfo.EnableUserAuthorizationScope) && !UserInfo.IsAdministrator)
     {
         BasePageLogic.CheckTreeParentId(this.DTOrganize, PiOrganizeTable.FieldId, PiOrganizeTable.FieldParentId);
     }
     BasePageLogic.LoadTreeNodes(this.DTOrganize, PiOrganizeTable.FieldId, PiOrganizeTable.FieldParentId, PiOrganizeTable.FieldFullName, this.tvOrganize, treeNode, !SystemInfo.OrganizeDynamicLoading);
 }
        /// <summary>
        /// 绑定屏幕数据
        /// </summary>
        /// <param name="reloadTree">重新加部门载树</param>
        private void BindData(bool reloadTree)
        {
            // 加载树
            if (reloadTree)
            {
                // 获取客户分类数据
                this.dtCustomerClass = customerClassService.GetDataTable(UserInfo);

                if (!this.UserInfo.IsAdministrator)
                {
                    BasePageLogic.CheckTreeParentId(this.dtCustomerClass, CustomerClassTable.FieldId, CustomerClassTable.FieldParentId);
                }
                this.LoadTree();
                if (this.tvCustomerClass.SelectedNode == null)
                {
                    if (this.tvCustomerClass.Nodes.Count > 0)
                    {
                        if (this.parentEntityId.Length == 0)
                        {
                            this.tvCustomerClass.SelectedNode = this.tvCustomerClass.Nodes[0];
                        }
                        else
                        {
                            BasePageLogic.FindTreeNode(this.tvCustomerClass, this.parentEntityId);
                            if (BasePageLogic.TargetNode != null)
                            {
                                this.tvCustomerClass.SelectedNode = BasePageLogic.TargetNode;
                                // 展开当前选中节点的所有父节点
                                BasePageLogic.ExpandTreeNode(this.tvCustomerClass);
                            }
                        }
                        if (this.tvCustomerClass.SelectedNode != null)
                        {
                            // 让选中的节点可视,并用展开方式
                            this.tvCustomerClass.SelectedNode.Expand();
                            this.tvCustomerClass.SelectedNode.EnsureVisible();
                        }
                    }
                }
            }

            if (this.ParentEntityId.Length > 0)
            {
                if (reloadTree)
                {
                    // 获得得到分类下的客户列表
                    this.GetCustomerList();
                }
            }
            // 设置按钮状态
            this.SetCustomerControlState();
        }
        /// <summary>
        /// 绑定屏幕数据
        /// </summary>
        /// <param name="reloadTree">重新加部门载树</param>
        private void BindData(bool reloadTree)
        {
            // 加载树
            if (reloadTree)
            {
                // 获取部门数据,这里是按权限范围进行获取
                this.DTOrganize = this.GetOrganizeScope(this.PermissionItemScopeCode, this.chkInnerOrganize.Checked);//organizationService.GetDT(this.UserInfo);
                if (!this.UserInfo.IsAdministrator || this.chkInnerOrganize.Checked)
                {
                    BasePageLogic.CheckTreeParentId(this.DTOrganize, PiOrganizeTable.FieldId, PiOrganizeTable.FieldParentId);
                }
                this.LoadTree();
                if (this.tvOrganize.SelectedNode == null && this.tvOrganize.Nodes.Count > 0)
                {
                    if (this.parentEntityId.Length == 0)
                    {
                        this.tvOrganize.SelectedNode = this.tvOrganize.Nodes[0];
                    }
                    else
                    {
                        BasePageLogic.FindTreeNode(this.tvOrganize, this.parentEntityId);
                        if (BasePageLogic.TargetNode != null)
                        {
                            this.tvOrganize.SelectedNode = BasePageLogic.TargetNode;
                            // 展开当前选中节点的所有父节点
                            BasePageLogic.ExpandTreeNode(this.tvOrganize);
                        }
                    }
                    if (this.tvOrganize.SelectedNode != null)
                    {
                        // 让选中的节点可视,并用展开方式
                        this.tvOrganize.SelectedNode.Expand();
                        this.tvOrganize.SelectedNode.EnsureVisible();
                    }
                }
            }

            if (this.ParentEntityId.Length > 0 && reloadTree)
            {
                // 获得子部门列表
                this.GetOrganizeList();
            }
            // 设置按钮状态
            this.SetControlState();
        }
Exemple #8
0
        private void FormOnLoad(bool loadUser, string searchValue)
        {
            this.DTOrganize = this.GetOrganizeScope(this.PermissionItemScopeCode, true);
            BasePageLogic.CheckTreeParentId(this.DTOrganize, PiOrganizeTable.FieldId, PiOrganizeTable.FieldParentId);

            if (this.DTOrganize != null && this.DTOrganize.Rows.Count > 0)
            {
                this.LoadTreeOrganize();
                if (!UserInfo.IsAdministrator && SystemInfo.EnableUserAuthorizationScope &&
                    this.tvOrganize.Nodes.Count > 0)
                {
                    this.tvOrganize.SelectedNode = tvOrganize.Nodes[0];
                }

                this.Search(true);
                this.SetRowFilter();
            }
        }
        /// <summary>
        /// 加载窗体
        /// </summary>
        public override void FormOnLoad()
        {
            this.isUserClick = false;

            if (string.IsNullOrEmpty(this.PermissionItemId))
            {
                var permissionItemEntity = RDIFrameworkService.Instance.PermissionItemService.GetEntityByCode(this.UserInfo, this.PermissionItemCode);
                this.PermissionItemId   = permissionItemEntity.Id.ToString(CultureInfo.InvariantCulture);
                this.PermissionItemName = permissionItemEntity.FullName;
            }

            this.DTTargetResource            = RDIFrameworkService.Instance.RDIFrameworkDBProviderService.Fill(this.UserInfo, this.TargetResourceSQL);
            this.DTTargetResource.PrimaryKey = new DataColumn[] { this.DTTargetResource.Columns[this.FieldId] };
            BasePageLogic.CheckTreeParentId(this.DTTargetResource, this.FieldId, this.FieldParentId);

            this.LoadTree();

            // 获得用户列表
            this.GetUserList();

            this.isUserClick = true;
        }
Exemple #10
0
 /// <summary>
 /// 加载组织机构树的主键
 /// </summary>
 /// <param name="treeNode">当前节点</param>
 private void LoadTreeOrganize(TreeNode treeNode)
 {
     BasePageLogic.CheckTreeParentId(this.DTOrganize, PiOrganizeTable.FieldId, PiOrganizeTable.FieldParentId);
     BasePageLogic.LoadTreeNodes(this.DTOrganize, PiOrganizeTable.FieldId, PiOrganizeTable.FieldParentId, PiOrganizeTable.FieldFullName, this.tvOrganize, treeNode, true, 2);
 }