- mejora vista

This commit is contained in:
2023-12-10 15:12:47 -07:00
parent 180937c978
commit d5235cde01
2 changed files with 26 additions and 28 deletions

View File

@@ -96,8 +96,8 @@
<label class="col-md-1 v-center truncate" runat="server" id="LblModalidad" visible="false" style="width: 80px;">Modalidad:</label>
<div class="col-md-2 v-center" runat="server" id="DivModalidad" visible="false">
<asp:DropDownList ID="DdlModalidad" runat="server" AppendDataBoundItems="true" Width="100%" CssClass="select2me" AutoPostBack="true" OnSelectedIndexChanged="DdlModalidad_SelectedIndexChanged">
<asp:ListItem Selected="True" Value="1" Text="Seleccionar por lista de precio"></asp:ListItem>
<asp:ListItem Value="2" Text="Seleccionar multiples listas de precio"></asp:ListItem>
<asp:ListItem Selected="True" Value="1" Text="lista de precio"></asp:ListItem>
<asp:ListItem Value="2" Text="múltiples listas de precio"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
@@ -285,7 +285,7 @@
<asp:CheckBox runat="server" ID="chkPS" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="CodigoPS" HeaderText="Producto/Servicio" />
<asp:BoundField DataField="CodigoPS" HeaderText="Producto/Servicio" ItemStyle-Width="350px" />
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_1" runat="server"></asp:Label>

View File

@@ -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"))