Пример #1
0
        /// <summary>
        /// 绑定角色树
        /// </summary>
        private void BindRolesTree()
        {
            ShowWaitting(enuWaitMsgType.BindData);
            treeRoles.Nodes.Clear();

            List <Sys_RoleResult> rolesResult = roleLogic.GetRolesTree(new Sys_RoleParam());
            Node newNode = null;

            foreach (Sys_RoleResult info in rolesResult)
            {
                newNode = new Node
                {
                    VerticalCellLayoutAlignment = eHorizontalAlign.Left,
                    CellLayout = eCellLayout.Vertical,
                    Text       = info.RoleName,
                    Name       = "trn" + info.RoleID,
                    Image      = global::ZNLCRM.UI.Properties.Resources.dept,
                    Tag        = info.RoleName
                };
                treeRoles.Nodes.Add(newNode);
            }
            //节点双击事件
            treeRoles.NodeDoubleClick += treeRoles_NodeDoubleClick;
            treeRoles.NodeClick       += treeRoles_NodeClick;
            HideWaitting();
        }
Пример #2
0
 void BindDataGridView()
 {
     dgvRole.DataSource = roleLogic.GetRolesTree(new Sys_RoleParam()
     {
     });
     dgvOrg.DataSource = orgLogic.GetOrgTree(new HR_OrgParam()
     {
     });
     dgvDept.DataSource = deptLogic.GetPageList(new HR_DepartmentParam()
     {
     });
     dgvEmp.DataSource = empLogic.GetPageList(new HR_EmployeeParam()
     {
     });
 }