Filtros de código inicial y final.
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports ADSNetLibrary.SIGAPI.Models.CGame
|
||||
Imports Extensiones
|
||||
Imports GemBox.Spreadsheet
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Inventarios_KardexAlmacen
|
||||
Partial Class Inventarios_KardexAlmacenHorizontal
|
||||
Inherits ClsPaginas
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
@@ -35,7 +36,12 @@ Partial Class Inventarios_KardexAlmacen
|
||||
End If
|
||||
|
||||
If IfNull(Request("CvePS"), "-1").ToString.ToEntero > 0 Then CargarKardex(Request("CvePS").ToString.ToEntero)
|
||||
ddlProducto2.SelectedValue = If(Request("CvePS") IsNot Nothing, Request("CvePS").ToString, "-1")
|
||||
ddlProducto2.SelectedValue = If(Request("CvePS") IsNot Nothing, Request("CvePS").ToString, "-1")
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(574).ToEntero = 1 Then
|
||||
DVFiltroCodigo.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Private Sub CargaCombos()
|
||||
@@ -151,11 +157,16 @@ Partial Class Inventarios_KardexAlmacen
|
||||
Dim CveProveedorCompra As Integer = If(DdlProveedor.SelectedValue.ToEntero > 0, DdlProveedor.SelectedValue.ToEntero, -1)
|
||||
Dim Marcas As String = If(DdlMarca.GetSelectedValuesM = "", "-1", DdlMarca.GetSelectedValuesM)
|
||||
Dim GPO As Integer = Ddlgrupo.SelectedValue.ToEntero
|
||||
Dim IncluyeTransitorios As Integer = DdlIncluyeTransitorios.SelectedValue.ToEntero
|
||||
Dim IncluyeTransitorios As Integer = DdlIncluyeTransitorios.SelectedValue.ToEntero
|
||||
|
||||
|
||||
Dim CodigoInicio As String = If(TxtCodigoInicio.Text.Trim.Length = 0, "-1", TxtCodigoInicio.Text.Trim)
|
||||
Dim CodigoFin As String = If(TxtCodigoFinal.Text.Trim.Length = 0, "-1", TxtCodigoFinal.Text.Trim)
|
||||
|
||||
If ObjMovimientos.GetKardexAlmacenHorizontal(CvePS, FechaF, -1, DdlUnidadMedida.SelectedValue.ToEntero, CveProveedorCompra, DdlTipoAlmacen.SelectedValue.ToEntero(), IncluyeTransitorios,
|
||||
DdlClasificacion.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CondicionExistencias:=DdlExistencia.SelectedValue.ToEntero,
|
||||
Orden:=DdlOrden.SelectedValue.ToEntero(), Marcas:=Marcas, IncluyeProyectado:=DdlProyeccionFiltro.SelectedValue.ToEntero, CveAlmacenes:=CveAlmacenes, GPO:=GPO, CodigoPS:=TxtPS.Text) Then
|
||||
Orden:=DdlOrden.SelectedValue.ToEntero(), Marcas:=Marcas, IncluyeProyectado:=DdlProyeccionFiltro.SelectedValue.ToEntero, CveAlmacenes:=CveAlmacenes, GPO:=GPO, CodigoPS:=TxtPS.Text,
|
||||
CodigoInicio:=CodigoInicio, CodigoFin:=CodigoFin) Then
|
||||
If ObjMovimientos.DtResultados IsNot Nothing AndAlso ObjMovimientos.DtResultados.Rows.Count > 0 Then
|
||||
dt = ObjMovimientos.DtResultados
|
||||
Dim ListaBorrar As New List(Of DataColumn)
|
||||
@@ -525,4 +536,67 @@ Partial Class Inventarios_KardexAlmacen
|
||||
End Using
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub LnkPSAntyerior_Click(sender As Object, e As EventArgs)
|
||||
NavegacionPS(Siguiente:=False)
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkPSSiguiente_Click(sender As Object, e As EventArgs)
|
||||
NavegacionPS(Siguiente:=True)
|
||||
End Sub
|
||||
Private Sub NavegacionPS(Siguiente As Boolean)
|
||||
Dim CvePS As Integer = ddlProducto2.SelectedValue.ToEntero
|
||||
|
||||
If Not CvePS > 0 Then
|
||||
Exit Sub
|
||||
End If
|
||||
Dim dt As DataTable = New DataTable
|
||||
|
||||
Dim Entrada As Boolean = True
|
||||
Dim Salida As Boolean = True
|
||||
|
||||
Dim FechaI As String = "-1"
|
||||
Dim FechaF As String = If(TxtFechaF.Text <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text, "-1")
|
||||
Dim CveAlmacen As Integer = If(ddlAlmacen.SelectedValue.ToEntero = 0, -1, ddlAlmacen.SelectedValue.ToEntero)
|
||||
Dim CveAlmacenes As String = ddlAlmacen.GetSelectedValues()
|
||||
If CveAlmacenes.Contains(",") Then
|
||||
CveAlmacen = -1
|
||||
End If
|
||||
If CvePS > 0 Then
|
||||
Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
||||
If dr IsNot Nothing Then
|
||||
ddlProducto2.SelectedText = dr("PSCodigo").ToString
|
||||
ddlProducto2.SelectedValue = CvePS.ToString
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Dim CveTiposAlmacen As String = "-1"
|
||||
|
||||
|
||||
Dim CodigoInicio As String = If(TxtCodigoInicio.Text.Trim.Length = 0, "-1", TxtCodigoInicio.Text.Trim)
|
||||
Dim CodigoFin As String = If(TxtCodigoFinal.Text.Trim.Length = 0, "-1", TxtCodigoFinal.Text.Trim)
|
||||
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
If ObjInventarios.GetKardexPSNavegacion(Entrada, Salida, CvePS, FechaI, FechaF, CveAlmacen, CveTiposAlmacen, DdlUnidadMedida.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||
CveAlmacenes, Siguiente:=Siguiente, CodigoInicio:=CodigoInicio, CodigoFin:=CodigoFin) Then
|
||||
dt = ObjInventarios.DtResultados.Copy
|
||||
End If
|
||||
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
|
||||
CargarKardex(dt.Rows(0)("CvePS").ToString.ToEntero)
|
||||
UPFiltros.Update()
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user