标签:
DataTable Detail = EditData.Tables[dt_MyUserRole._TableName].Copy(); Detail.AcceptChanges(); var enumTable = from d1 in dtRoleAuthority.AsEnumerable() join d2 in Detail.AsEnumerable() on d1.Field<string>(dt_MyRole.RoleID) equals d2.Field<string>(dt_MyUserRole.RoleID) select new { RoldID = d1.Field<string>(dt_MyRoleAuthority.RoleID), FullName = d1.Field<string>(dt_MyRoleAuthority.FullName), Authority = d1.Field<int>(dt_MyRoleAuthority.Authority), PKey = d1.Field<string>(dt_MyRoleAuthority.FullName) + "." + d1.Field<int>(dt_MyRoleAuthority.Authority) }; TreeListNode node; foreach (var v in enumTable) { node = tree_Module.FindNodeByKeyID(v.PKey); if (node != null) _TreeListInitial.SetNodeCheckState(node, CheckState.Checked); }
标签:
原文地址:http://www.cnblogs.com/GarsonZhang/p/4309081.html