Exemple #1
0
        public Form2()
        {
            Empresa e = new Empresa();

            e = e.carregarEmpresa(ConnectionFactory.getConnection(), Program.usuario.getIdEmpresa());
            InitializeComponent();
            nomeLabel.Text     = Program.usuario.getPrimeiroNome() + " " + Program.usuario.getSobrenome();
            dataNascLabel.Text = Program.usuario.getDataNascimento().ToString("dd/MM/yyyy");
            empresaLabel.Text  = e.getNomeEmpresa();
        }
Exemple #2
0
        private void carregarVoosButton_Click(object sender, EventArgs e)
        {
            Voo        voo  = new Voo();
            List <Voo> voos = voo.carregarVoosPorData(ConnectionFactory.getConnection(), monthCalendar1.SelectionEnd);

            voosComboBox.Items.Clear();
            foreach (Voo v in voos)
            {
                voosComboBox.Items.Add(v.getId());
            }
        }
Exemple #3
0
        private void preencherForm()
        {
            InfoVoo infoVooDAO = new InfoVoo();
            InfoVoo infoVoo    = infoVooDAO.CarregarVoo(ConnectionFactory.getConnection(), this.idVoo);

            aviaoLabel.Text           = infoVoo.getAviao();
            partidaLabel.Text         = infoVoo.getOrigem();
            horaPartidaLabel.Text     = infoVoo.getHoraDePartida().ToString("dd/MM/yyyy @ hh:mm tt", CultureInfo.InvariantCulture);
            chegadaLabel.Text         = infoVoo.getDestino();
            horaChegadaLabel.Text     = infoVoo.getHoraDeChegada().ToString("dd/MM/yyyy @ hh:mm tt", CultureInfo.InvariantCulture);
            pilotoLabel.Text          = infoVoo.getPiloto();
            copilotoLabel.Text        = infoVoo.getCopiloto();
            comissarioChefeLabel.Text = infoVoo.getComissarioChefe();
            comissarioUmLabel.Text    = infoVoo.getComissarioUm();
            comissarioDoisLabel.Text  = infoVoo.getComissarioDois();
        }
Exemple #4
0
 public Form1()
 {
     conexao = ConnectionFactory.getConnection();
     usuario = new Usuario();
     InitializeComponent();
 }