public void Listar() { CustoDao custoDao = new CustoDao(); string strMysql = custoDao.ListarCusto(); dataGridListar.DataSource = custoDao.ExibirNoDataGridView(strMysql); }
private void ToolStripButtonPesquisar_Click(object sender, EventArgs e) { int idCusto = Convert.ToInt32(txtPesquisa.Text); CustoDao custoDao = new CustoDao(); string strMysql = custoDao.PesquisarCusto(idCusto); dataGridListar.DataSource = custoDao.ExibirNoDataGridView(strMysql); }