Exemplo n.º 1
0
        //------CONFIG DE EXIBIÇÃO DO DGV ------//
        private void btnPesquisar_Click(object sender, EventArgs e)
        {
            ConexaoDAL conexao = new ConexaoDAL(DadosConexaoDAL.StringDeConexão);
            EspecieBLL bll     = new EspecieBLL(conexao);

            dgv_esp.DataSource = bll.Pesquisar(txtValor.Text);
        }
Exemplo n.º 2
0
        private void form_ConsEspecie_Load(object sender, EventArgs e)
        {
            ConexaoDAL conexao = new ConexaoDAL(DadosConexaoDAL.StringDeConexão);
            EspecieBLL bll     = new EspecieBLL(conexao);

            dgv_esp.DataSource = bll.Pesquisar(txtValor.Text);

            //------CONFIG DO PESQUISAR ------//
            btnPesquisar_Click(sender, e);

            //------  DEFINE DGV COR TEXTO E FUNDO----- //
            this.dgv_esp.DefaultCellStyle.Font      = new Font("Verdana", 11);
            this.dgv_esp.DefaultCellStyle.ForeColor = Color.Black;
            this.dgv_esp.DefaultCellStyle.BackColor = Color.White;
        }
Exemplo n.º 3
0
        //-------- LOAD DO FORM + INICIA CONFIG BOTOES --------------//
        private void form_CadAnimal_CadRaça_Load(object sender, EventArgs e)
        {
            //this.tbEspecieTableAdapter.Fill(this.dbSistemaDataSet.tbEspecie);

            //----------INICIA CONFIG BOTOES ---------------- //
            this.alterarBotoes(1);

            // IMPORTANTE !!! - sem isso não carrega os cbox
            ConexaoDAL conexao = new ConexaoDAL(DadosConexaoDAL.StringDeConexão);
            //cb especie
            EspecieBLL ebll = new EspecieBLL(conexao);

            raç_especieComboBox.DataSource    = ebll.Pesquisar("");
            raç_especieComboBox.DisplayMember = "esp_descriçao";
            raç_especieComboBox.ValueMember   = "esp_id";

            this.LimpaTela();
        }
Exemplo n.º 4
0
        //-------- LOAD DO FORM + INICIA CONFIG BOTOES --------------//
        private void form_CadAnimal_Load(object sender, EventArgs e)
        {
            //----------INICIA CONFIG BOTOES ---------------- //
            this.alterarBotoes(1);


            // ----------COMBOBOX's -----------------------------//
            ConexaoDAL conexao = new ConexaoDAL(DadosConexaoDAL.StringDeConexão);

            // cb sexo
            SexoBLL sbll = new SexoBLL(conexao);

            ani_sexoComboBox.DataSource    = sbll.Pesquisar("");
            ani_sexoComboBox.DisplayMember = "sex_descriçao";
            ani_sexoComboBox.ValueMember   = "sex_id";

            //cb especie
            EspecieBLL ebll = new EspecieBLL(conexao);

            ani_especieComboBox.DataSource    = ebll.Pesquisar("");
            ani_especieComboBox.DisplayMember = "esp_descriçao";
            ani_especieComboBox.ValueMember   = "esp_id";

            //cb raça
            RaçaBLL rbll = new RaçaBLL(conexao);

            ani_raçaComboBox.DataSource    = rbll.Pesquisar("");
            ani_raçaComboBox.DisplayMember = "raç_descriçao";
            ani_raçaComboBox.ValueMember   = "raç_id";

            //cb status
            STAnimalBLL stabll = new STAnimalBLL(conexao);

            ani_statusComboBox.DataSource    = stabll.Pesquisar("");
            ani_statusComboBox.DisplayMember = "sta_descriçao";
            ani_statusComboBox.ValueMember   = "sta_id";

            this.LimpaTela();
        }