private static void LoadGroups(Schedule schedule, SQLiteCommand command) { command.CommandText = "select * from groups"; var reader = command.ExecuteReader(); while (reader.Read()) { var grp = new Group { Name = (string) reader["name"], Specialization = schedule.Specializations[(int) reader["spec"]], YearOfStudy = schedule.YearsOfStudy[(int) reader["year"]] }; schedule.Groups.Add(grp); } reader.Close(); }
public void RemoveGroup(Group @group) { _groupClasses.RemoveGroup(@group); _titlesMarkup = new TitlesMarkup(_groupClasses.Subjects); InitializeTitles(); InitLectureCards(); if (UpdateTableViewDelegate != null) { UpdateTableViewDelegate(this); } }
public void RemoveGroup(Group @group) { var lastSelectedYearOfStudy = Tables.Count != 0 ? Tables[SelectedIndex].YearOfStudy : null; Project.Schedule.RemoveGroup(group); var table = Tables.First(t => t.YearOfStudy == group.YearOfStudy); var index = Tables.IndexOf(table); Tables[index].RemoveGroup(group); if (Tables.Count > 0) { if (lastSelectedYearOfStudy != null) { var table1 = Tables.First(t => t.YearOfStudy == lastSelectedYearOfStudy); SelectedIndex = Tables.IndexOf(table1); } else { SelectedIndex = 0; } } }
protected bool Equals(Group other) { return Equals(_specialization, other._specialization) && Equals(_yearOfStudy, other._yearOfStudy); }
public void RemoveGroup(Group group) { Groups.Remove(group); foreach (var classRecord in ClassRecords) { if (classRecord.Group == group) { classRecord.Group = null; } } }
public void RemoveGroup(Group @group) { UpdateStatus("Удаление группы..."); Mouse.OverrideCursor = Cursors.Wait; _tableController.RemoveGroup(group); Mouse.OverrideCursor = Cursors.Arrow; UpdateStatus("Группа удалена"); }
/// <summary> /// Add new Specialization and Group to given new YearOfStudy /// </summary> /// <param name="year"></param> public void AddYSG(YearOfStudy year) { var spec = new Specialization { Name = "Специальность" }; var group = new Group { Name = "Группа", YearOfStudy = year, Specialization = spec }; AddYearOfStudy(year); AddSpecialization(spec); AddGroup(group); }
/// <summary> /// Add new YearOfStudy, Specialization and Group /// </summary> public Group AddYSG() { var year = new YearOfStudy { Name = "Новый курс" }; var spec = new Specialization { Name = "Специальность" }; var group = new Group { Name = "Группа", YearOfStudy = year, Specialization = spec }; AddYearOfStudy(year); AddSpecialization(spec); AddGroup(group); return group; }
public Group AddNewGroup(YearOfStudy year, Specialization spec) { var group = new Group { Name = "Новая группа", YearOfStudy = year, Specialization = spec }; AddGroup(group); return group; }
public void AddGroup(Group group) { Groups.Add(group); }
public GroupCardViewModel(Group group) { Group = group; }