private void addPrepod_Click(object sender, EventArgs e)
 {
     editPrepod ep = new editPrepod("", "", "", "", "");
     ep.Show();
 }
 private void updPrepod_Click(object sender, EventArgs e)
 {
     if (dgPrepod.CurrentRow != null)
     {
         string id = dgPrepod.CurrentRow.Cells[0].Value.ToString();
         string surname = dgPrepod.CurrentRow.Cells[1].Value.ToString();
         string name = dgPrepod.CurrentRow.Cells[2].Value.ToString();
         string name2 = dgPrepod.CurrentRow.Cells[3].Value.ToString();
         editPrepod ep = new editPrepod(surname, name, name2, "update", id);
         ep.Show();
     }
     else
     {
         MessageBox.Show("Выберите преподавателя!");
     }
 }