private void FillCboxSelection() { cboxSelection.Items.Clear(); cboxSelection.Items.Add("Снять все"); cboxSelection.Items.Add("Разрешить все"); List <string> groupList = EntryPointGroup.LoadGroupList(Database); foreach (string groupName in groupList) { cboxSelection.Items.Add(groupName); } }
private void Save() { EntryPointGroup.Save(Database, modifiedObjects); modifiedObjects.Clear(); foreach (string group in removedObjects) { EntryPointGroup.ClearGroup(Database, group); } removedObjects.Clear(); OnPropertyChanged("IsModified"); }
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(); }
private void LoadGroups() { bsGroups.DataSource = EntryPointGroup.LoadGroupList(Database); }