Commit inicial Ventas Productivo
This commit is contained in:
70
OC/RepImprimirC.aspx.vb.exclude
Normal file
70
OC/RepImprimirC.aspx.vb.exclude
Normal file
@@ -0,0 +1,70 @@
|
||||
Imports CrystalDecisions.Shared
|
||||
Imports CrystalDecisions.CrystalReports.Engine
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
|
||||
|
||||
Partial Class RepImprimirC
|
||||
Inherits ClsPaginas
|
||||
Dim rpt As ReportDocument = New ReportDocument()
|
||||
Dim Path As String = AppDomain.CurrentDomain.BaseDirectory
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
Master.EsPopup = True
|
||||
End If
|
||||
|
||||
Dim Reporte As String = IfNull(Request("Reporte"), "").ToString
|
||||
If Reporte = "OC" Then
|
||||
ImprimirOC(IfNull(Request("OC"), 0).ToString.ToEntero)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub ImprimirOC(CveOC As Integer)
|
||||
|
||||
Dim dt As DataTable
|
||||
Dim Solicita, Estatus, Autoriza, Proyecto, SubProyecto As String
|
||||
Dim OC As New ClsOC
|
||||
dt = OC.GetOrdenesDetalle(CveOC)
|
||||
OC.GetOC(CveOC)
|
||||
Solicita = OC.NombreSolicita
|
||||
Autoriza = OC.NombreAutoriza
|
||||
Proyecto = OC.Proyecto
|
||||
SubProyecto = OC.SubProyecto
|
||||
Estatus = OC.EstatusOrdenCompra
|
||||
OC.Dispose()
|
||||
|
||||
Path &= "\OC\Reportes\OC.rpt"
|
||||
rpt.Load(Path)
|
||||
|
||||
|
||||
rpt.SetDataSource(dt.DefaultView.ToTable)
|
||||
|
||||
|
||||
rpt.ParameterFields(0).CurrentValues.AddValue(CveOC.ToString())
|
||||
rpt.ParameterFields(1).CurrentValues.AddValue(Proyecto)
|
||||
rpt.ParameterFields(2).CurrentValues.AddValue(SubProyecto)
|
||||
rpt.ParameterFields(3).CurrentValues.AddValue(Solicita)
|
||||
rpt.ParameterFields(4).CurrentValues.AddValue(Autoriza)
|
||||
rpt.ParameterFields(5).CurrentValues.AddValue(Estatus.ToUpper)
|
||||
|
||||
CRViewer.ReportSource = rpt
|
||||
|
||||
|
||||
|
||||
'.Add(New ReportParameter("CveOrdenCompra", CveOC.ToString, True))
|
||||
'.Add(New ReportParameter("FechaSolicitud", Now.ToShortDateString, True))
|
||||
'.Add(New ReportParameter("pSolicita", Solicita, True))
|
||||
'.Add(New ReportParameter("pSupervisa", Supervisa, True))
|
||||
'.Add(New ReportParameter("pAutoriza", Autoriza, True))
|
||||
|
||||
|
||||
dt.Dispose()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user