private void txtPesquisaPecas_TextChanged(object sender, EventArgs e) { PecasDAO pecasDAO = new PecasDAO(); List <Pecas> pecas; pecas = pecasDAO.Listar(txtPesquisaPecas.Text); dgvPecasP.Rows.Clear(); foreach (Pecas p in pecas) { dgvPecasP.Rows.Add(p.Codigo, p.Descricao, p.Preco, p.Fabricante, p.Tipo, p.Compatibilidade, p.AddPeso, p.AddPotencia, p.AddTorque); } }
private void FillPeca() { PecasDAO pecasDAO = new PecasDAO(); List <Pecas> pecas; pecas = pecasDAO.Carregar(); dgvPecasP.Rows.Clear(); foreach (Pecas p in pecas) { dgvPecasP.Rows.Add(p.Codigo, p.Descricao, p.Preco, p.Fabricante, p.Tipo, p.Compatibilidade, p.AddPeso, p.AddPotencia, p.AddTorque); } }
private void FormRelatorio_Load(object sender, EventArgs e) { List <Carro> listaCarro = new CarroDAO().Carregar(); CrCarro relatorio = new CrCarro(); relatorio.SetDataSource(listaCarro); crvCarro.ReportSource = relatorio; List <Cliente> listaClientes = new ClienteDAO().Carregar(); crCliente crCliente = new crCliente(); crCliente.SetDataSource(listaClientes); crvCliente.ReportSource = crCliente; List <Pecas> listaPecas = new PecasDAO().Carregar(); CrPeca crPecas = new CrPeca(); crPecas.SetDataSource(listaPecas); crvPeca.ReportSource = crPecas; List <NotaF> f = new RelatorioDAO().RankVendas(); crFuncionario crFuncionario = new crFuncionario(); crFuncionario.SetDataSource(f); crvFuncionario.ReportSource = crFuncionario; List <NotaF> pecaRel = new RelatorioDAO().ListaPecaVenda(); CrVendaPeca crVendaPeca = new CrVendaPeca(); crVendaPeca.SetDataSource(pecaRel); crvVendapeca.ReportSource = crVendaPeca; List <NotaF> Serv = new RelatorioDAO().ListaVendas(); CrServico crServico = new CrServico(); crServico.SetDataSource(Serv); crvServico.ReportSource = crServico; }