From 80729fb54eba977d497f3bf35fb39f93c072939b Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 10 Jun 2020 12:58:53 -0700 Subject: [PATCH] -- si tiene una sola seccion de almacen, que este inactiva la seleccion --- Inventarios/RecepcionAlmacen.aspx | 2 +- Inventarios/RecepcionAlmacen.aspx.vb | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Inventarios/RecepcionAlmacen.aspx b/Inventarios/RecepcionAlmacen.aspx index 9b96fab08..c0e7de431 100644 --- a/Inventarios/RecepcionAlmacen.aspx +++ b/Inventarios/RecepcionAlmacen.aspx @@ -453,7 +453,7 @@ - + diff --git a/Inventarios/RecepcionAlmacen.aspx.vb b/Inventarios/RecepcionAlmacen.aspx.vb index d63df0d6a..97c27073b 100644 --- a/Inventarios/RecepcionAlmacen.aspx.vb +++ b/Inventarios/RecepcionAlmacen.aspx.vb @@ -1264,11 +1264,19 @@ Partial Class Inventarios_RecepcionAlmacen 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 dtsec As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero) + e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = dtsec e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind() + If dtsec.Rows.Count = 1 Then + e.Row.FCDropDownList("DdlSeccionAlmacen").SelectedIndex = 0 + e.Row.FCDropDownList("DdlSeccionAlmacen").Enabled = False + End If + e.Row.FCDropDownList("DdlSeccionAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1")) - End If - e.Row.FCTextBox("TxtDividir").Visible = True + + dtsec.Dispose() + End If + e.Row.FCTextBox("TxtDividir").Visible = True Else e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = False