-usados
This commit is contained in:
66
Acumuladores/EntradasUsadosResumenRep.aspx.vb
Normal file
66
Acumuladores/EntradasUsadosResumenRep.aspx.vb
Normal file
@@ -0,0 +1,66 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Acumuladores_RepEntradasUsados
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private DiasSemana(7) As String
|
||||
Private Meses(12) As String
|
||||
|
||||
Private Property DatosEntradasUsados() As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DatosEntradasUsados"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DatosEntradasUsados") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load() Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
txtFechaI.Text = Today.AddDays((-1) * (Today.Day - 1))
|
||||
txtFechaF.Text = Today
|
||||
CargarDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub CargarDatos()
|
||||
DdlAlmacenes.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1)
|
||||
DdlAlmacenes.DataBind()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjAcum As New ClsAcumuladores
|
||||
|
||||
If ObjAcum.EntradasUsadosGet(DdlAlmacenes.SelectedValue.ToEntero, txtFechaI.Text, txtFechaF.Text) Then
|
||||
GvAcum.DataSource = ObjAcum.DtResultados
|
||||
DatosEntradasUsados = ObjAcum.DtResultados
|
||||
|
||||
End If
|
||||
ObjAcum.Dispose()
|
||||
GvAcum.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
Dim Dia As String = {"lunes", "martes", "miércoles", "jueves", "viernes", "sábado", "domingo"}(If((Weekday(Today) - 2) = -1, 7, Weekday(Today) - 2))
|
||||
Dim Mes As String = {"enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}(Month(Today))
|
||||
|
||||
Dim FechaConFormato As String = String.Format("{0}, {1} de {2} de {3}", Dia, Month(Today), Mes, Year(Today))
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
|
||||
params.Add(New ReportParameter("Direccion", "asdfasdfasdf"))
|
||||
params.Add(New ReportParameter("FechaConFormato", FechaConFormato))
|
||||
params.Add(New ReportParameter("FechaInicial", txtFechaI.Text))
|
||||
params.Add(New ReportParameter("FechaFinal", txtFechaF.Text))
|
||||
|
||||
Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = DatosEntradasUsados}
|
||||
|
||||
ImprimirPDF(String.Format("Empresas/{0}/Formatos/RepEntradasUsados2.rdlc", UsuarioActual.CveEmpresa), DatosEntradasUsados, params, "prueba", "PDF")
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user