private void btnAdd_Click(object sender, EventArgs e) { var addEditStudent = new AddEditStudents(); addEditStudent.FormClosing += AddEditStudent_FormClosing; addEditStudent.ShowDialog(); }
private void btnEdit_Click(object sender, EventArgs e) { if (dgvDiary.SelectedRows.Count == 0) { MessageBox.Show("Zaznacz ucznia do edycji"); return; } var addEditStudent = new AddEditStudents (Convert.ToInt32(dgvDiary.SelectedRows[0].Cells[0].Value)); addEditStudent.FormClosing += AddEditStudent_FormClosing; addEditStudent.ShowDialog(); }
private void btnAdd_Click(object sender, EventArgs e) { var addEditStudents = new AddEditStudents(); addEditStudents.ShowDialog(); }