public EditLesson(ScheduleRepository repo, int groupId, int dow, string time) { InitializeComponent(); _repo = repo; _dow = dow; _ring = _repo.FindRing(DateTime.ParseExact(time, "H:mm", CultureInfo.InvariantCulture)); var sStarts = _repo.GetSemesterStarts(); var gl = _repo.GetGroupedGroupLessons(groupId, sStarts); _curLessons = new Dictionary<int, Tuple<string, List<Lesson>>>(); if (gl.ContainsKey(dow + " " + time)) { _curLessons = gl[dow + " " + time]; _curTFDIndex = 0; } else { _curTFDIndex = -1; tfdIndex.Text = "Пусто тут барин!"; } DisplayTFD(_curTFDIndex); }