This commit is contained in:
2024-12-31 06:32:36 -07:00
parent 45ea3f7b44
commit da53652af6
2 changed files with 53 additions and 56 deletions

View File

@@ -142,14 +142,6 @@ Partial Class ProductosyServicios
End Set
End Property
Private Property DtPreciosMultiple As DataTable
Get
Return If(IsNothing(ViewState("DtPreciosMultiple")), Nothing, CType(ViewState("DtPreciosMultiple"), DataTable))
End Get
Set(value As DataTable)
ViewState("DtPreciosMultiple") = value
End Set
End Property
#End Region
Private ReadOnly Property PermiteClasificacion2 As Boolean
@@ -2984,14 +2976,12 @@ Partial Class ProductosyServicios
Private Sub CargaListaPrecios()
If UsuarioActual.TienePermisoProceso(389) Then 'si puede actualizar precios se muestra
Dim objPS As New ClsProductosServicios
If objPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, -1, CveClasificacion:=-1, CvePS:=CvePS,
CveProveedor:=-1, Estado:=-1, Marcas:="-1", CveModelo:=-1) Then
DtPreciosMultiple = objPS.DtResultados.Copy()
GvMultiple.DataSource = DtPreciosMultiple
If objPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, -1, CvePS:=CvePS) Then
GvPLMultiple.DataSource = objPS.DtResultados
End If
objPS.Dispose()
DivListaPrecios.Visible = True
GvMultiple.DataBind()
GvPLMultiple.DataBind()
End If
End Sub
@@ -2999,9 +2989,9 @@ Partial Class ProductosyServicios
Protected Sub GvMultiple_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
Dim Valor As Decimal = DtPreciosMultiple.Rows(e.Row.RowIndex)(2).ToString().ToDecimal()
' Dim Valor As Decimal = DtPreciosMultiple.Rows(e.Row.RowIndex)(2).ToString().ToDecimal()
e.Row.FCTextBox("TxtPrecio").Text = Valor.FormatoNumero(2)
' e.Row.FCTextBox("TxtPrecio").Text = Valor.FormatoNumero(2)
End If
End Sub
@@ -3010,7 +3000,7 @@ Partial Class ProductosyServicios
Dim TieneError As Boolean = False
Try
For Each GvRow As GridViewRow In GvMultiple.Rows
For Each GvRow As GridViewRow In GvPLMultiple.Rows
Dim CvePrecioLista As Integer = GvRow.DataKey("CvePrecioLista").ToEntero()
Dim Precio As Decimal = GvRow.FCTextBox("TxtPrecio").Text.ToDecimal()
@@ -3865,4 +3855,8 @@ Partial Class ProductosyServicios
End Sub
Protected Sub BtnConsultaCodigo_Click(sender As Object, e As EventArgs)
Alert(TxtCodigo.Text)
End Sub
End Class