From ff1e3af3ccc1486f4639cba39ef0fbcb1dff6b6e Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Tue, 17 Dec 2019 16:41:28 -0700 Subject: [PATCH] =?UTF-8?q?Se=20agreg=C3=B3=20un=20label=20del=20total=20d?= =?UTF-8?q?e=20importe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bancos/DepositosCaja.aspx | 7 +++++-- Bancos/DepositosCaja.aspx.vb | 17 +++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/Bancos/DepositosCaja.aspx b/Bancos/DepositosCaja.aspx index aba1c1776..db3f0d7a9 100644 --- a/Bancos/DepositosCaja.aspx +++ b/Bancos/DepositosCaja.aspx @@ -110,14 +110,17 @@

- +
+ Importe seleccionado: $00.00 +
+
- + diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index 3d6394fca..b6f7ace0e 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -48,6 +48,7 @@ Partial Class Bancos_DepositosCaja UpGvFacturas.Update() GvFacturas.DataBind() + divLabelTotal.Visible = True End Sub Private Sub BtnDepositar_Click(sender As Object, e As EventArgs) Handles BtnDepositar.Click @@ -157,4 +158,20 @@ Partial Class Bancos_DepositosCaja ObjContabilidad.Dispose() End Sub + Private Sub ObtenerTotalImporta() + + Dim Total As Double = 0 + For Each Gvr As GridViewRow In GvFacturas.Rows + If Gvr.FCCheckBox("ChkFactura").Checked Then + Total += Gvr.DataKey("Importe").ToDouble + End If + Next + lblValorTotal.Text = Total.ToString + UpGvFacturas.Update() + End Sub + + Public Sub ChkFactura_Click(sender As Object, e As EventArgs) + ObtenerTotalImporta() + End Sub + End Class \ No newline at end of file