Exemplo n.º 1
0
 public FormCadastroEdicaoCurso(Curso curso, FormCursosInicio form, EscolaDeFormacaoEntities dbContext)
 {
     InitializeComponent();
     if (curso != null)
     {
         this.curso = curso;
         PreencherTela();
     }
     else
     {
         this.curso = new Curso();
     }
     this.form      = form;
     this.dbContext = dbContext;
 }
 public FormCadastroEdicaoAluno(Persistencia.Aluno aluno, FormAlunosInicio form, EscolaDeFormacaoEntities dbContext)
 {
     InitializeComponent();
     if (aluno != null)
     {
         this.aluno        = aluno;
         btnLimpar.Enabled = false;
         PreencherTela();
     }
     else
     {
         this.aluno             = new Aluno();
         this.aluno.Responsavel = new Responsavel();
     }
     this.form      = form;
     this.dbContext = dbContext;
 }
Exemplo n.º 3
0
 public FormDetalhesCurso(Curso curso, EscolaDeFormacaoEntities dbContext)
 {
     InitializeComponent();
     if (curso != null)
     {
         if (dbContext != null)
         {
             this.dbContext = dbContext;
         }
         else
         {
             this.dbContext = new EscolaDeFormacaoEntities();
         }
         this.curso = curso;
         PreencherTela();
     }
     else
     {
         new Exception("Curso inválido");
     }
 }