private void BtnFormSpecialityAdd_Click(object sender, EventArgs e) { if (Program.CurrentUser.IsStudent || Program.CurrentUser.IsLecture) { MessageBox.Show("Нямате права за добавяне на специалности!", "Предупреждение", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } FormАddSpecialities sp = new FormАddSpecialities(); sp.ShowDialog(); }
private void DataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex < 0) { return; } var st = (dgSpecialities.Rows[e.RowIndex].DataBoundItem as TSpeciality); if (e.ColumnIndex == Column1.Index) { return; } FormАddSpecialities sc = new FormАddSpecialities(); sc.speciality = st; sc.ShowDialog(); }