private void ButtonEdit_Click(object sender, EventArgs e, ClassModel model)
        {
            var editClass = new EditClassPopupForm(faculty, model);

            editClass.FormClosed += new FormClosedEventHandler(dash_FormClosed);
            editClass.ShowDialog();
        }
 private void Edit_Click(object sender, EventArgs e, ClassModel model)
 {
     if (DateTime.Parse(model.ClassDate) >= DateTime.Today)
     {
         var editClass = new EditClassPopupForm(faculty, model);
         editClass.FormClosed += new FormClosedEventHandler(dash_FormClosed);
         editClass.ShowDialog();
     }
     else
     {
         MessageBox.Show("Can't edit past classes");
     }
 }