Commit inicial Ventas Productivo
This commit is contained in:
65
AIMMGM/VentasPS.aspx.vb
Normal file
65
AIMMGM/VentasPS.aspx.vb
Normal file
@@ -0,0 +1,65 @@
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class AIMMGM_Ventas
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
txtFechaI.Text = "01/01/" & Now.Year
|
||||
txtFechaF.Text = Now.ToShortDateString
|
||||
|
||||
Dim dt As DataTable
|
||||
|
||||
Dim PS As New ClsProductosServicios
|
||||
|
||||
If PS.GetPS(-1, -1, 43) Then
|
||||
dt = PS.DtResultados.FiltraParametros("CveClasificacion IN (4361,4362,4363,4364,4365,5585)")
|
||||
DdlSubTipo.DataSource = dt
|
||||
DdlSubTipo.DataBind()
|
||||
DdlSubTipo.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
PS.Dispose()
|
||||
|
||||
|
||||
CargaDatos()
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim AIM As New ClsAIMMGM
|
||||
|
||||
If AIM.RepVentasPS(DdlTipo.SelectedValue.ToEntero, DdlSubTipo.SelectedValue.ToEntero, DdlPagado.SelectedValue.ToEntero, DdlComprobado.SelectedValue.ToEntero, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, UsuarioActual.CveEmpresa) Then
|
||||
Gv.DataSource = AIM.DtResultados
|
||||
LblRegistros.Text = String.Format("Registros:{0}", AIM.DtResultados.Rows.Count)
|
||||
End If
|
||||
AIM.Dispose()
|
||||
Gv.DataBind()
|
||||
UPPDatos.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles ImgExcel.Click
|
||||
Gv.ExportToExcelx("ListadoVentas")
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlTipo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipo.SelectedIndexChanged
|
||||
If DdlTipo.SelectedValue = "1" Then
|
||||
DdlSubTipo.Visible = True
|
||||
Else
|
||||
DdlSubTipo.Visible = False
|
||||
DdlSubTipo.SelectedValue = "-1"
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user