diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index 7ef8db2d1..1fda0e0ee 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -886,9 +886,13 @@ Partial Class Inventarios_EntregaAlmacen If CBool(e.Row.DBCampo("AplicaSeccion")) Then e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = True If DdlAlmacen.SelectedValue.ToEntero > 0 Then - e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero) + Dim dtt As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero) + e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = dtt e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind() - e.Row.FCDropDownList("DdlSeccionAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1")) + If dtt.Rows.Count > 1 Then + e.Row.FCDropDownList("DdlSeccionAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1")) + End If + dtt.Dispose() End If Else