Exemple #1
0
 private void DiscipineListView_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
 {
     var discId = ((List<DisciplineView>)DiscipineListView.DataSource)[e.RowIndex].DisciplineId;
     var tefd = _repo.GetFirstFiltredTeacherForDiscipline(tfd => tfd.Discipline.DisciplineId == discId);
     if (tefd != null)
     {
         var addLessonForm = new AddLesson(_repo, tefd.TeacherForDisciplineId);
         addLessonForm.Show();
     }
     else
     {
         var addLessonForm = new AddLesson(_repo);
         addLessonForm.Show();
     }
 }
Exemple #2
0
 private void Button1Click(object sender, EventArgs e)
 {
     var addLessonForm = new AddLesson(_repo);
     addLessonForm.Show();
 }