Kardex siguiente siguiente PS con movimientos (Ajustes)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -586,7 +586,10 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
||||
Dim CvePS As Integer = DdlPS.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
|
||||
@@ -636,6 +639,39 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
||||
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
|
||||
DdlPS.SelectedValue = dt.Rows(0)("CvePS").ToString
|
||||
DdlPS.SelectedText = dt.Rows(0)("CodigoPS").ToString
|
||||
DdlPS.txtValue.Value = dt.Rows(0)("CvePS").ToString
|
||||
DdlPS.txtText.Value = dt.Rows(0)("CodigoPS").ToString
|
||||
'UPFiltros.Update()
|
||||
UPPMov.Update()
|
||||
End If
|
||||
|
||||
|
||||
Return CvePSRespuesta
|
||||
|
||||
End Function
|
||||
|
||||
'Protected Sub Lnkcompuxlsinventarios_Click(sender As Object, e As EventArgs)
|
||||
' Dim continuar = True
|
||||
' Try
|
||||
|
||||
Reference in New Issue
Block a user