public frmNewSubject(Form form) { InitializeComponent(); this.form = form; switch (form.Name) { case "frmSubjects": sub = form as frmSubjects; break; case "frmNewClass": newClass = form as frmNewClass; break; case "frmEditClass": editClass = form as frmEditClass; break; } }
private void btnSubjects_Click(object sender, EventArgs e) { frmSubjects subject = new frmSubjects(uid); subject.ShowDialog(); }