private void btnEdit_Click(object sender, EventArgs e) { FormFichaProduto ficha = new FormFichaProduto(); ficha.Registro = (modelo.produto)bs.Current; ficha.ShowDialog(); if (ficha.Registro != null) { controle.ProdutoDB tabela = new controle.ProdutoDB(); tabela.consultar(bs); bs.ResetBindings(false); } }
private void btnAdd_Click(object sender, EventArgs e) { FormFichaProduto ficha = new FormFichaProduto(); ficha.Registro = null; ficha.ShowDialog(); if (ficha.Registro != null) { controle.ProdutoDB tabela = new controle.ProdutoDB(); tabela.consultar(bs); bs.MoveLast(); bs.ResetBindings(false); } }