public _mainForm() { InitializeComponent(); _faculty = new List <Faculty>(); _addAssignment = new addAssign(); _assignFalculty = new addFaculty(); }
private void _onClickAddFaculty(object sender, EventArgs e) { Faculty faculty = new Faculty(); addFaculty frmcustomer = new addFaculty(faculty); DialogResult dr = frmcustomer.ShowDialog(); if (dr == DialogResult.OK) { _lstFaculty.Items.Add(faculty); Saved.Add(faculty); } if (dr == DialogResult.Cancel) { Faculty.IdCount--; } }