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(); }
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()); } }
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(); }
public Form1() { conexao = ConnectionFactory.getConnection(); usuario = new Usuario(); InitializeComponent(); }