private void ChooseGroupsForm_Load(object sender, EventArgs e) { int i = 0; ListGroups.Items.Clear(); List <ScheduleGroup> Groups = DictionaryConverter.GroupsToList(ds); foreach (ScheduleGroup group in Groups) { ListGroups.Items.Add(group.Name); ListGroups.SetItemChecked(i, false); i++; } BindingSource bs = new BindingSource(); bs.DataSource = ScheduleView.BasicViews; // cmbProjection.DisplayMember = "Description"; // cmbProjection.ValueMember = "TypeCode"; // cmbProjection.DataSource = bs; // ChooseView = (View)Convert.ToInt32(cmbProjection.SelectedValue); // this.cmbProjection.SelectedIndexChanged += new EventHandler(cmbProjection_SelectedIndexChanged); }
private void tsbGroups_Click(object sender, EventArgs e) { GroupForm frmGroup = new GroupForm(); frmGroup.ds = ScheduleDataSet; frmGroup.ShowDialog(); Groups = DictionaryConverter.GroupsToList(frmGroup.ds); }
private void LoadDictionatyes() { ScheduleDataSet = new dsShedule(); Rooms = new List <ScheduleRoom>(); Teachers = new List <ScheduleTeacher>(); Groups = new List <ScheduleGroup>(); Disciplines = new List <ScheduleDiscipline>(); try { string filename = @"Data/Нагрузка.xml"; ScheduleDataSet.Education.ReadXml(filename); EducationAdapter = new EducationLoadAdapter(DictionaryConverter.EducationToList(ScheduleDataSet)); } catch (Exception) { MessageBox.Show("Не могу открыть файл c нагрузкой"); } try { string filename = @"Data/Аудитории.xml"; ScheduleDataSet.Room.ReadXml(filename); Rooms = DictionaryConverter.RoomsToList(ScheduleDataSet); } catch (Exception) { MessageBox.Show("Не могу открыть файл с аудиториями"); } try { string filename = @"Data/Преподаватели.xml"; ScheduleDataSet.Teacher.ReadXml(filename); Teachers = DictionaryConverter.TeachersToList(ScheduleDataSet); } catch (Exception) { MessageBox.Show("Не могу открыть файл с преподавателями"); } try { string filename = @"Data/Группы.xml"; ScheduleDataSet.Group.ReadXml(filename); Groups = DictionaryConverter.GroupsToList(ScheduleDataSet); } catch (Exception) { MessageBox.Show("Не могу открыть файл с группами"); } try { string filename = @"Data/Дисциплины.xml"; ScheduleDataSet.Discipline.ReadXml(filename); Disciplines = DictionaryConverter.DisciplinesToList(ScheduleDataSet); } catch (Exception) { MessageBox.Show("Не могу открыть файл с дисциплинами"); } }