From 09bf8eb2da88c59ccb2080880a5f0c388d66d8fd Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 15 May 2020 10:53:38 -0700 Subject: [PATCH] -- condicion para que no marque error --- CGame/OrdenProduccion.aspx.vb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CGame/OrdenProduccion.aspx.vb b/CGame/OrdenProduccion.aspx.vb index 15c4bd98d..f3f5fe229 100644 --- a/CGame/OrdenProduccion.aspx.vb +++ b/CGame/OrdenProduccion.aspx.vb @@ -314,8 +314,11 @@ Partial Class CGame_OrdenProduccion If ObjCGame.GetOrdenProduccionDetalle(CveOrdenProduccion, UsuarioActual.CveEmpresa) Then DtDetalle = ObjCGame.DtResultados GvOP.DataSource = DtDetalle - Tipo = DtDetalle.Rows(0)("Tipo").ToString.ToEntero - If Tipo = 2 Then GvLiquidacion.Columns(6).Visible = True : GvLiquidacion.Columns(7).Visible = True : DivPesoPagado.Visible = True : GvLiquidacionModal.Columns(2).Visible = True : RFVPesoPagado.Enabled = True + If DtDetalle IsNot Nothing AndAlso DtDetalle.Rows.Count > 0 Then + Tipo = DtDetalle.Rows(0)("Tipo").ToString.ToEntero + If Tipo = 2 Then GvLiquidacion.Columns(6).Visible = True : GvLiquidacion.Columns(7).Visible = True : DivPesoPagado.Visible = True : GvLiquidacionModal.Columns(2).Visible = True : RFVPesoPagado.Enabled = True + End If + End If End Sub