private void FormOpen(FrmMatricula obj) { if (ParentForm != null && ParentForm.GetType() == typeof(FrmPrincipal)) { ((FrmPrincipal)ParentForm).OpenForm(obj, "Cadastro de Matrículas"); } Close(); }
private void FormClose() { if (ParentForm != null && ParentForm.GetType() == typeof(FrmPrincipal)) { FrmMatricula frmMatricula = new FrmMatricula(); if (_objAluno != null) { frmMatricula = new FrmMatricula(_objAluno); } if (_objTurma != null) { frmMatricula = new FrmMatricula(_objTurma); } ((FrmPrincipal)ParentForm).OpenForm(frmMatricula, "Cadastro do Matrículas"); } Close(); }