Пример #1
0
        private void BtnCoursesAdd_Click(object sender, EventArgs e)
        {
            if (Program.CurrentUser.IsStudent || Program.CurrentUser.IsLecture)
            {
                MessageBox.Show("Нямате права за добавяне на курсове!", "Предупреждение", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }
            FormCourceAdd co = new FormCourceAdd();

            co.ShowDialog();
        }
Пример #2
0
        private void dataGridViewCourses_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex < 0)
            {
                return;
            }
            var x = (dataGridViewCourses.Rows[e.RowIndex].DataBoundItem as TCourse);

            if (Program.CurrentUser.IsStudent || Program.CurrentUser.IsLecture)
            {
                return;
            }
            FormCourceAdd course = new FormCourceAdd();

            course.course = x;
            course.ShowDialog();
        }