void btnSave_Click(object sender, EventArgs e) { TreeNode _current = tvRole.SelectedNode; if (_current == null) { return; } List <string> roles = new List <string>(); roles.Add((_current.Tag as IRole).Id); List <string> menus = new List <string>(); menus = GetSelectedMenuID(tvMenu.Nodes); try { IPrivilegeService _proxy = Common.Util.CreateProxy(); using (_proxy as IDisposable) { _proxy.AddRoleMenuMap(roles, menus); } } catch (Exception ex) { MessageBox.Show(ex.Message, "提示"); return; } MessageBox.Show("保存成功!", "提示"); }