Example #1
0
 private void gridLookUpEdit1_Properties_ButtonPressed(object sender, ButtonPressedEventArgs e)
 {
     if (e.Button.Index == 1)
     {
         var department = new FormAddDepartment();
         department.ShowDialog();
         LoadGirdLookUpDepartment();
     }
 }
        private void button1_Click(object sender, EventArgs e)
        {
            if (Program.CurrentUser.IsStudent || Program.CurrentUser.IsLecture)
            {
                MessageBox.Show("Нямате права за добавяне на катедри!", "Предупреждение", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }
            FormAddDepartment dp = new FormAddDepartment();

            dp.ShowDialog();
        }
        private void DataGridViewFormDepartments_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex < 0)
            {
                return;
            }
            var d = (dgDepartments.Rows[e.RowIndex].DataBoundItem as TDepartments);

            if (Program.CurrentUser.IsStudent || Program.CurrentUser.IsLecture)
            {
                return;
            }
            FormAddDepartment dep = new FormAddDepartment();

            dep.department = d;
            dep.ShowDialog();
        }