private void ExcluiAcrescimo(int id, int linha) { DALConexao cx = new DALConexao(DadosDaConexao.StringDaConexao); BLLAcrescimos bll = new BLLAcrescimos(cx); if (dgvAcrescimos.Rows[linha].Cells[3].Value.ToString().Substring(1, 1) == ".") { txtValor.Text = (Convert.ToDouble(dgvAcrescimos.Rows[linha].Cells[2].Value) * -1).ToString("#,0.00"); } else { txtValor.Text = (Convert.ToDouble(dgvAcrescimos.Rows[linha].Cells[2].Value)).ToString("#,0.00"); } dpData.Value = Convert.ToDateTime(dgvAcrescimos.Rows[linha].Cells[1].Value); cbConta.Text = dgvAcrescimos.Rows[linha].Cells[3].Value.ToString(); txtObs.Text = dgvAcrescimos.Rows[linha].Cells[4].Value.ToString(); bll.Excluir(id); CarregaDGVs(); }