- mejora vista
This commit is contained in:
@@ -114,37 +114,35 @@ Partial Class Ventas_ActualizarPrecios
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(404).ToEntero > 0 Then 'si manneja precios de lista
|
||||
|
||||
Dim ObjVta As New ClsVentas
|
||||
Dim primerItem As String = ""
|
||||
If ObjVta.GetPrecioListas(UsuarioActual.CveEmpresa) Then
|
||||
DtListasPrecios = ObjVta.DtResultados.Copy()
|
||||
DdlPrecioLista.DataSource = DtListasPrecios
|
||||
DdlPrecioListaCarga.DataSource = DtListasPrecios
|
||||
DdlMultiplePrecioLista.DataSource = DtListasPrecios
|
||||
primerItem = ObjVta.DtResultados.FiltroPrimeroValor("CvePrecioLista")
|
||||
End If
|
||||
ObjVta.Dispose()
|
||||
|
||||
|
||||
Dim primerItem As String = ""
|
||||
|
||||
DtListasPrecios = GlobalDTPrecioListas(UsuarioActual.CveEmpresa).Copy()
|
||||
DdlPrecioLista.DataSource = DtListasPrecios
|
||||
DdlPrecioListaCarga.DataSource = DtListasPrecios
|
||||
DdlMultiplePrecioLista.DataSource = DtListasPrecios
|
||||
primerItem = DtListasPrecios.FiltroPrimeroValor("CvePrecioLista")
|
||||
|
||||
DdlPrecioLista.DataBind()
|
||||
DdlPrecioListaCarga.DataBind()
|
||||
DdlMultiplePrecioLista.DataBind()
|
||||
|
||||
Dim SeleccionMaxima As Integer = 14
|
||||
If (DtListasPrecios.Rows.Count - 1) < 14 Then
|
||||
SeleccionMaxima = DtListasPrecios.Rows.Count - 1
|
||||
End If
|
||||
|
||||
Dim sbMultiple As New StringBuilder
|
||||
For Each Row As DataRow In DtListasPrecios.FiltraPorIndices(0, SeleccionMaxima).Rows
|
||||
sbMultiple.AppendFormat("{0},", Row("CvePrecioLista"))
|
||||
Next
|
||||
If DtListasPrecios IsNot Nothing Then
|
||||
If (DtListasPrecios.Rows.Count - 1) < 14 Then
|
||||
SeleccionMaxima = DtListasPrecios.Rows.Count - 1
|
||||
End If
|
||||
|
||||
Dim sbMultiple As New StringBuilder
|
||||
For Each Row As DataRow In DtListasPrecios.FiltraPorIndices(0, SeleccionMaxima).Rows
|
||||
sbMultiple.AppendFormat("{0},", Row("CvePrecioLista"))
|
||||
Next
|
||||
DdlMultiplePrecioLista.SelectedValuesIfExistM(sbMultiple.ToString(), True)
|
||||
|
||||
If (DdlPrecioLista.Items.Count = 1) Then
|
||||
DdlPrecioLista.Items.FindByValue(primerItem).Selected = True
|
||||
End If
|
||||
End If
|
||||
|
||||
DdlMultiplePrecioLista.SelectedValuesIfExistM(sbMultiple.ToString(), True)
|
||||
|
||||
If (DdlPrecioLista.Items.Count = 1) Then
|
||||
DdlPrecioLista.Items.FindByValue(primerItem).Selected = True
|
||||
End If
|
||||
Else
|
||||
DdlPrecioLista.Items.Insert(0, New ListItem("Sin Precio Lista", "-2"))
|
||||
DdlPrecioListaCarga.Items.Insert(0, New ListItem("Sin Precio Lista", "-2"))
|
||||
|
||||
Reference in New Issue
Block a user