Example #1
0
 private void редактироватьToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (curEmpl.Appointment.accessModifier == (int)accessModifiers.acc_adm)
     {
         FormEditEmplSet formEmplSet = new FormEditEmplSet(curEmpl);
         bindCloseEvent(formEmplSet);
         formEmplSet.ShowDialog();
     }
     else
     {
         MessageBox.Show("Ваш уровень доступа не позволяет совершить это действие", "Ошибка аутентификации", MessageBoxButtons.OK);
     }
 }
Example #2
0
 private void сотрудникToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (DGV.SelectedRows.Count == 1)
     {
         int selID = (int)DGV.SelectedRows[0].Cells["Номер"].Value;
         Order selOrder = (from ord in database.OrderSet where ord.id == selID select ord).Single();
         FormEditEmplSet formempl = new FormEditEmplSet(selOrder.Employee);
         bindCloseEvent(formempl);
         formempl.ShowDialog();
     }
     this.cb_table_SelectedIndexChanged(this, null);
 }
Example #3
0
 private void изменитьToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     if (DGV.SelectedRows.Count > 0)
     {
         foreach (DataGridViewRow row in DGV.SelectedRows)
         {
             int id = (int)row.Cells["Номер"].Value;
             Employee selEmpl = (from emp in database.EmployeeSet where emp.id == id select emp).Single();
             FormEditEmplSet formEmpl = new FormEditEmplSet(selEmpl, curEmpl);
             bindCloseEvent(formEmpl);
             formEmpl.ShowDialog();
         }
     }
     this.cb_table_SelectedIndexChanged(this, null);
 }