Kardex siguiente siguiente PS con movimientos (Ajustes)

This commit is contained in:
rakcsle
2024-04-19 08:41:30 -07:00
parent 44c9edd60a
commit cd62f9a238
3 changed files with 112 additions and 4 deletions

View File

@@ -212,8 +212,12 @@ Partial Class Inventarios_KardexAlmacen
Dim CvePS As Integer = ddlProducto2.SelectedValue.ToEntero
If Not CvePS > 0 Then
Exit Sub
CvePS = ObtenerInicioPSNavegacion(Siguiente:=Siguiente)
If Not CvePS > 0 Then
Exit Sub
End If
End If
Dim dt As DataTable = New DataTable
Dim Entrada As Boolean = True
@@ -261,4 +265,37 @@ Partial Class Inventarios_KardexAlmacen
End If
End Sub
Private Function ObtenerInicioPSNavegacion(Siguiente As Boolean) As Integer
Dim CvePSRespuesta As Integer = -1
Dim dt As DataTable = New DataTable
If Siguiente Then
If TxtCodigoInicio.Text.Trim.Length > 0 Then
'CvePSRespuesta = GlobalDTPS(UsuarioActual.CveEmpresa, Codigo:=TxtCodigoInicio.Text.Trim).FiltroPrimeroValor("CvePS").ToEntero
dt = GlobalDTPS(UsuarioActual.CveEmpresa, Codigo:=TxtCodigoInicio.Text.Trim)
End If
Else
If TxtCodigoFinal.Text.Trim.Length > 0 Then
'CvePSRespuesta = GlobalDTPS(UsuarioActual.CveEmpresa, Codigo:=TxtCodigoFinal.Text.Trim).FiltroPrimeroValor("CvePS").ToEntero
dt = GlobalDTPS(UsuarioActual.CveEmpresa, Codigo:=TxtCodigoFinal.Text.Trim)
End If
End If
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
CvePSRespuesta = dt.Rows(0)("CvePS").ToString.ToEntero
ddlProducto2.SelectedValue = dt.Rows(0)("CvePS").ToString
ddlProducto2.SelectedText = dt.Rows(0)("CodigoPS").ToString
ddlProducto2.txtValue.Value = dt.Rows(0)("CvePS").ToString
ddlProducto2.txtText.Value = dt.Rows(0)("CodigoPS").ToString
UPFiltros.Update()
End If
Return CvePSRespuesta
End Function
End Class