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

@@ -2,9 +2,11 @@
Option Explicit On
Imports System.Data
Imports System.Security.Cryptography.Pkcs
Imports ADSNetLibrary.SIGAPI.Models.CGame
Imports Extensiones
Imports Microsoft.Reporting.WebForms
Imports Telerik.Web.UI
Partial Class Inventarios_Kardex
Inherits ClsPaginas
@@ -569,7 +571,10 @@ Partial Class Inventarios_Kardex
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
@@ -609,6 +614,34 @@ Partial Class Inventarios_Kardex
ObjInventarios.Dispose()
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
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()
UPDatos.Update()
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
dt = GlobalDTPS(UsuarioActual.CveEmpresa, Codigo:=TxtCodigoInicio.Text.Trim)
End If
Else
If TxtCodigoFinal.Text.Trim.Length > 0 Then
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
@@ -617,7 +650,9 @@ Partial Class Inventarios_Kardex
UPFiltros.Update()
UPDatos.Update()
End If
End Sub
Return CvePSRespuesta
End Function
End Class