private void identificarCuentasBancoDgvBancos() { dTotalDebe = dTotalHaber = dDiferencia = 0.00; foreach (DataGridViewRow row in DgvLibroBancos.Rows) { if (logic.ConsultaLogicaCuentaBanco(lIdBanco[Cbo_bancos.SelectedIndex].ToString(), row.Cells[1].Value.ToString())) { row.Cells[1].Style.BackColor = Color.DarkGray; dTotalDebe = dTotalDebe + Double.Parse(row.Cells[3].Value.ToString()); } if (logic.ConsultaLogicaCuentaBanco(lIdBanco[Cbo_bancos.SelectedIndex].ToString(), row.Cells[2].Value.ToString())) { row.Cells[2].Style.BackColor = Color.DarkGray; dTotalHaber = dTotalHaber + Double.Parse(row.Cells[3].Value.ToString()); } } dDiferencia = dTotalHaber - dTotalDebe; LblDebe.Text = lIdMoneda[CboMonedas.SelectedIndex] + " " + dTotalDebe.ToString(); LblHaber.Text = lIdMoneda[CboMonedas.SelectedIndex] + " " + dTotalHaber.ToString(); LblDiferencia.Text = lIdMoneda[CboMonedas.SelectedIndex] + " " + dDiferencia.ToString(); }