mejora en validación

This commit is contained in:
2023-10-27 10:34:27 -07:00
parent 295dc69416
commit c21d0641c9

View File

@@ -136,7 +136,7 @@ Partial Class Ventas_RepVentasUtilidadPadre
GvDatos.DataSource = ObjVentas.DtResultados
DtDatos = ObjVentas.DtResultados
End If
If DtDatos.Rows.Count > 0 Then
If DtDatos IsNot Nothing AndAlso DtDatos.Rows.Count > 0 Then
Dim Utilidad As Double = DtDatos.Rows(0)("Utilidad").ToString.ToDouble
Dim Perdida As Double = DtDatos.Rows(0)("Perdida").ToString.ToDouble
Dim Costo As Double = DtDatos.Rows(0)("Costo").ToString.ToDouble