private void uc_cargo_Load(object sender, EventArgs e) { try { CargoDAO cdao = new CargoDAO(); dgv_cargo.DataSource = cdao.lista_cargo(); } catch (Exception) { } }
private void uc_funcionario_Load(object sender, EventArgs e) { try { FuncionarioDAO fdao = new FuncionarioDAO(); dgv_funcionario.DataSource = fdao.lista_funcionario(); CargoDAO cdao = new CargoDAO(); cb_cargo.DataSource = cdao.lista_cargo(); cb_cargo.DisplayMember = "tb_cargo_nome"; cb_cargo.ValueMember = "tb_cargo_id"; } catch (Exception) { } }
private void Cb_cargo_Click(object sender, EventArgs e) { try { CargoDAO cdao = new CargoDAO(); cb_cargo.DataSource = cdao.lista_cargo(); cb_cargo.DisplayMember = "tb_cargo_nome"; cb_cargo.ValueMember = "tb_cargo_id"; } catch (Exception) { } }