private List <EntryPointGroup> GetGroupList(string groupName) { if (groupList.ContainsKey(groupName)) { return(groupList[groupName]); } List <EntryPointGroup> list = EntryPointGroup.LoadGroup(Database, groupName); foreach (EntryPointGroup item in list) { item.PropertyChanged += ObjectModified; } groupList.Add(groupName, list); return(list); }
private void CheckGroupPoints(string text) { List <EntryPointGroup> groupPoints = EntryPointGroup.LoadGroup(Database, text); Dictionary <EntryPoint, bool> pointList = new Dictionary <EntryPoint, bool>(); foreach (EntryPointGroup item in groupPoints) { pointList.Add(item.EntryPoint, item.IsIncluded); } List <PermitPoint> permitPointList = (List <PermitPoint>)bsPoints.DataSource; foreach (PermitPoint item in permitPointList) { item.IsAllowed = pointList[item.Point]; } dataGridView1.Refresh(); }