示例#1
0
 private void editBtn_Click(object sender, EventArgs e)
 {
     if (this.courseGrid.SelectedRows.Count > 0)
     {
         var courseId = (int)this.courseGrid.SelectedRows[0].Cells["ID"].Value;
         var editCourseForm = new EditCourseForm(this, courseId);
         editCourseForm.ShowDialog(this);
     }
 }
示例#2
0
 private void addBtn_Click(object sender, EventArgs e)
 {
     if (!schedulePeriodlist.Any())
     {
         MessageBox.Show(this, "Nie można dodać kursu ponieważ w systemie nie ma zdefiniowanych okresów rozkładu jazdy!", "Błąd", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     else if (!this.lineList.Any())
     {
         MessageBox.Show(this, "Nie można dodać kursu ponieważ w systemie nie ma zdefiniowanych lini!", "Błąd", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     else
     {
         var editCourseForm = new EditCourseForm(this);
         editCourseForm.ShowDialog(this);
     }
 }