예제 #1
0
        private void FCadastroCandidato_Load(object sender, EventArgs e)
        {
            lblCurso.Select();
            objRecrutador = new ClsRecrutador();
            carregaCursos();
            if (modoEdicao)
            {
                panel2.Visible = false;

                gbInformacoesPessoais.Location = new Point(gbInformacoesPessoais.Location.X, this.Height / 2 - (gbInformacoesPessoais.Location.Y + gbInformacoesPessoais.Height + 40 + gbEndereco.Height) / 2);

                gbEndereco.Location = new Point(gbEndereco.Location.X, gbInformacoesPessoais.Location.Y + gbInformacoesPessoais.Height + 40);

                gbCursoEtec.Location = new Point(gbCursoEtec.Location.X, this.Height / 2 - (gbCursoEtec.Location.Y + gbCursoEtec.Height + 40 + gbConta.Height) / 2);

                gbConta.Location = new Point(gbConta.Location.X, gbCursoEtec.Location.Y + gbCursoEtec.Height + 40);

                btnFinalizar.Location = new Point(gbConta.Location.X + gbConta.Width - btnFinalizar.Width, gbConta.Location.Y + gbConta.Height + 6);

                this.Text              = "Conta";
                objCandidato           = ClsCandidato.CarregaCandidato(dados, idCandidato);
                objCandidato.CursoEtec = ClsCursoEtec.CarregaCursoEtec(dados, idCandidato);
                btnFinalizar.Text      = "Alterar";
                atualizaTela();
                mudaCorCampos();
            }
            else
            {
                objCandidato = new ClsCandidato();
            }
        }
예제 #2
0
        public static ClsCursoEtec CarregaCursoEtec(Dados dados, int idCandidato)
        {
            var cursoEtec = new ClsCursoEtec(idCandidato);

            var tabela = dados.ConvertSqlToDataTable("select * from curso_etec where candidato_id = @id", new MySqlParameter("@id", cursoEtec.Candidato_id));

            cursoEtec.Curso   = tabela.Rows[0]["curso"].ToString();
            cursoEtec.Inicio  = DateTime.Parse(tabela.Rows[0]["inicio"].ToString());
            cursoEtec.Termino = DateTime.Parse(tabela.Rows[0]["termino"].ToString());
            cursoEtec.Periodo = tabela.Rows[0]["periodo"].ToString();
            cursoEtec.Modulo  = tabela.Rows[0]["modulo"].ToString();

            return(cursoEtec);
        }
 public void CriaCursoEtec(int Id)
 {
     CursoEtec = new ClsCursoEtec(Id);
 }