Commit inicial Ventas Productivo
This commit is contained in:
75
Inventarios/PopUpBuscarMovto.aspx.vb
Normal file
75
Inventarios/PopUpBuscarMovto.aspx.vb
Normal file
@@ -0,0 +1,75 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports Extensiones
|
||||
Partial Class PopUpBuscarFolio
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private ReadOnly Property Ruta As String
|
||||
Get
|
||||
Return AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\"
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
|
||||
CType(Me.Master, BaseMasterPage).EsPopup = True
|
||||
CType(Me.Master, BaseMasterPage).PopupWidth = 850
|
||||
RegistraScript("if($get('tdContenido')){$get('tdContenido').style.height='600px'}")
|
||||
|
||||
InicializaValores()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " Inicializa Valores "
|
||||
Private Sub InicializaValores()
|
||||
TxtFechaF.Text = Date.Now.ToShortDateString
|
||||
TxtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString
|
||||
|
||||
TxtFechaIngFin.Text = Date.Now.ToShortDateString
|
||||
TxtFechaIngInicio.Text = Now.FirstDayOfMonth.ToShortDateString
|
||||
|
||||
DdlTipoMovimiento.DataSource = GlobalDTInvConceptos()
|
||||
DdlTipoMovimiento.DataBind()
|
||||
DdlTipoMovimiento.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("") 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||
DdlAlmacen.DataBind()
|
||||
DdlAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region " CARGA DATOS "
|
||||
Private Sub BtnBuscar_Click(sender As Object, e As EventArgs) Handles BtnBuscar.Click
|
||||
CargaDatos()
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
Dim Reporte As New ClsInventarios
|
||||
|
||||
Dim FechaInicial = If(TxtFechaI.Text.Trim <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text.ToDate, MinFecha)
|
||||
Dim FechaFinal = If(TxtFechaF.Text.Trim <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text.ToDate, MaxFecha)
|
||||
Dim FechaIngI = If(TxtFechaIngInicio.Text.Trim <> "" AndAlso TxtFechaIngInicio.Text <> "__/__/____", TxtFechaIngInicio.Text.ToDate, MinFecha)
|
||||
Dim FechaIngF = If(TxtFechaIngFin.Text.Trim <> "" AndAlso TxtFechaIngFin.Text <> "__/__/____", TxtFechaIngFin.Text.ToDate, MaxFecha)
|
||||
|
||||
If Reporte.GetMovimientosRep(DdlAlmacen.SelectedValue.ToEntero, DdlTipoMovimiento.SelectedValue.ToEntero, If(TxtFolio.Text = "", "-1", TxtFolio.Text.Trim).ToEntero, FechaIngI, FechaIngF, FechaInicial, FechaFinal, -1, UsuarioActual.CveEmpresa) Then
|
||||
GvM.DataSource = Reporte.DtResultados
|
||||
LtlTotalRegistros.Text = Reporte.DtResultados.Rows.Count.ToString.FormatoNumero(0)
|
||||
Else
|
||||
GvM.DataSource = Nothing
|
||||
End If
|
||||
|
||||
GvM.DataBind()
|
||||
|
||||
UPDatos.Update()
|
||||
TblBusqueda.Visible = True
|
||||
Reporte.Dispose()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user