示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            Database.Entity.tb_forncedor tbs = cboConsultarFornecedor.SelectedItem as Database.Entity.tb_forncedor;

            Business.BusinessEstoque            business = new Business.BusinessEstoque();
            List <Database.Entity.tb_forncedor> forr     = business.ConsultarFornecedor(tbs);

            dtvConsulta.DataSource = forr;
        }
示例#2
0
        private void button1_Click(object sender, EventArgs e)
        {
            Database.Entity.tb_forncedor tbs = new Database.Entity.tb_forncedor();
            tbs.id_Forncedor = Convert.ToInt32(cboDeletarFornecedor.Text);
            int id = tbs.id_Forncedor;

            Business.BusinessEstoque business = new Business.BusinessEstoque();
            business.DeletarFornecedor(id);
            List <Database.Entity.tb_forncedor> forr = business.ConsultarFornecedor(tbs);

            dtvConsulta.DataSource = forr;
        }
示例#3
0
        private void btnAdicionar_Click(object sender, EventArgs e)
        {
            Database.Entity.tb_forncedor tbs = new Database.Entity.tb_forncedor();
            tbs.nm_Fornecedor = txtFornecedor.Text;
            tbs.nm_endereco   = txtEndereco.Text;
            tbs.nm_email      = txtEmail.Text;
            tbs.nm_cidade     = txtCidade.Text;
            tbs.cpf           = txtCPF.Text;
            tbs.cnpj          = txtCNPJ.Text;
            tbs.vl_tel        = Convert.ToInt32(txtTel.Text);

            Business.BusinessEstoque bussiness = new Business.BusinessEstoque();
            bussiness.InserirForncecedor(tbs);

            Database.Entity.tb_forncedor tbss = cboConsultarFornecedor.SelectedItem as Database.Entity.tb_forncedor;

            Business.BusinessEstoque            business = new Business.BusinessEstoque();
            List <Database.Entity.tb_forncedor> forr     = business.ConsultarFornecedor(tbss);

            dtvConsulta.DataSource = forr;
        }