Filtros de código inicial y final.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
Imports System.Data
|
||||
Imports ADSNetLibrary.SIGAPI.Models.CGame
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
@@ -112,7 +113,10 @@ Partial Class Inventarios_KardexAlmacen
|
||||
Dim FechaF As String = If(TxtFechaF.Text <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text, "-1")
|
||||
Dim CveAlmacen As Integer = ddlAlmacen.SelectedValue.ToEntero
|
||||
|
||||
If ObjMovimientos.GetKardexAlmacen(CvePS, FechaI, FechaF, CveAlmacen, DdlUnidadMedida.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
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.GetKardexAlmacen(CvePS, FechaI, FechaF, CveAlmacen, DdlUnidadMedida.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CodigoInicio:=CodigoInicio, CodigoFin:=CodigoFin) Then
|
||||
dt = ObjMovimientos.DtResultados
|
||||
GvDatos.DataSource = ObjMovimientos.DtResultados
|
||||
End If
|
||||
@@ -146,6 +150,11 @@ Partial Class Inventarios_KardexAlmacen
|
||||
GvDatos.Columns(8).Visible = False
|
||||
tdImportes.Visible = False
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(574).ToEntero = 1 Then
|
||||
DVFiltroCodigo.Visible = True
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -195,4 +204,65 @@ Partial Class Inventarios_KardexAlmacen
|
||||
|
||||
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 = If(TxtFechaI.Text <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text, "-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 = "-1" '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"
|
||||
'For Each item As ListItem In CBLTiposAlmacen.Items
|
||||
' CveTiposAlmacen += If(item.Selected, $"{item.Value},", "")
|
||||
'Next
|
||||
|
||||
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, "-1", 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()
|
||||
' UpDatos.Update()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user