validador si la consulta en um tiene contenido o no

This commit is contained in:
Antonio Gonzalez
2020-03-30 14:54:09 -07:00
parent e3bc31900b
commit 6b6947e569

View File

@@ -565,7 +565,11 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
DTUM = DTUM.Where((Function(a) a!ClaveNombre.ToString.ToLower Like ("*" + Name.ToLower + "*")))
End If
DtPSRetorno = New DataView(DTUM.OrderBy(Function(a) a!Nombre).CopyToDataTable).ToTable(True, {"CveSATUnidadMedida", "ClaveNombre"})
If DTUM.Count > 0 Then
DtPSRetorno = New DataView(DTUM.OrderBy(Function(a) a!Nombre).CopyToDataTable).ToTable(True, {"CveSATUnidadMedida", "ClaveNombre"})
Else
DtPSRetorno = Nothing
End If
If DtPSRetorno IsNot Nothing AndAlso DtPSRetorno.Rows.Count > 0 Then
DtPSRetorno.Columns("CveSATUnidadMedida").ColumnName = "id"