private void btnEditUser_Click_1(object sender, EventArgs e) { if (_selectedNode == null) { return; } Position pos = _selectedNode.Tag as Position; if (pos == null) { return; } Department dep = _selectedNode.Parent.Tag as Department; if (dep == null) { return; } //获取当前部门下的用户 _usersInDep = _userLogic.GetUsersByDepID(dep.DepartmentID); FrmIncludeUser frm = new FrmIncludeUser(dep.DepartmentID, pos.PositionID, _usersInDep); if (frm.ShowDialog() == DialogResult.OK) { ShowNodeInfo(_selectedNode); } }
private void btnEditUser_Click_1(object sender, EventArgs e) { if (_selectedNode == null) { return; } Position pos = _selectedNode.Tag as Position; if (pos == null) { return; } Department dep = _selectedNode.Parent.Tag as Department; if (dep == null) { return; } FrmIncludeUser include = new FrmIncludeUser(dep.DepartmentID, pos.PositionID, lis); include.ShowDialog(); }