public void SaveSettings() { //DbLocation lc = new DbLocation(); //DbCourse cc = new DbCourse(); //if (cs == true) //{ DbStudyGroup sgc = new DbStudyGroup(); foreach (fagområdeSetting setting in varslerSettings) { //gets the name and setting from string setName = setting.Name; bool setSwitch = setting.IsSelected; foreach (StudyGroup studygroup in studyGroupsFilter) { if (studygroup.name == setName) { studygroup.name = setName; studygroup.filterChecked = setSwitch; break; } } } sgc.UpdateStudyGroups(studyGroupsFilter); //cs = false; //} }
public void SaveSettings() { //DbLocation lc = new DbLocation(); //DbCourse cc = new DbCourse(); //if (cs == true) //{ DbStudyGroup sgc = new DbStudyGroup(); foreach (fagområdeSetting setting in stillingerSettings) { //gets the name and setting from string setName = setting.Name; bool setSwitch = setting.IsSelected; foreach (StudyGroup studygroup in studyGroupsFilter) { if (studygroup.name == setName) { studygroup.name = setName; studygroup.filterChecked = setSwitch; break; } } } sgc.UpdateStudyGroups(studyGroupsFilter); //cs = false; //set changedsetting to false after saving //CarouselStillinger.pullList = true; //set pullList to true, meaning that any refresh action will reload the list according to new settings //} }