private void btnEducationAdd_Click(object sender, EventArgs e) { if (Program.CurrentUser.IsStudent || Program.CurrentUser.IsLecture) { MessageBox.Show("Нямате права за добавяне на образователна степен!", "Предупреждение", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } FormAddLevelEducation form = new FormAddLevelEducation(); form.ShowDialog(); this.LoadEducationLevel(); }
private void DgLevelEducation_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex < 0) { return; } var c = dgLevelEducation.Rows[e.RowIndex].DataBoundItem as TEducationLevel; if (c == null) { return; } if (Program.CurrentUser.IsStudent || Program.CurrentUser.IsLecture) { MessageBox.Show("Нямате права за редактиране на образователна степен!", "Предупреждение", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } FormAddLevelEducation form = new FormAddLevelEducation(c); form.ShowDialog(); }