131 lines
4.5 KiB
VB.net
131 lines
4.5 KiB
VB.net
|
Public Class FechaGrafica
|
||
|
Inherits System.Windows.Forms.Form
|
||
|
|
||
|
#Region " Windows Form Designer generated code "
|
||
|
|
||
|
Public Sub New()
|
||
|
MyBase.New()
|
||
|
|
||
|
'This call is required by the Windows Form Designer.
|
||
|
InitializeComponent()
|
||
|
|
||
|
'Add any initialization after the InitializeComponent() call
|
||
|
|
||
|
End Sub
|
||
|
|
||
|
'Form overrides dispose to clean up the component list.
|
||
|
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
|
||
|
If disposing Then
|
||
|
If Not (components Is Nothing) Then
|
||
|
components.Dispose()
|
||
|
End If
|
||
|
End If
|
||
|
MyBase.Dispose(disposing)
|
||
|
End Sub
|
||
|
|
||
|
'Required by the Windows Form Designer
|
||
|
Private components As System.ComponentModel.IContainer
|
||
|
|
||
|
'NOTE: The following procedure is required by the Windows Form Designer
|
||
|
'It can be modified using the Windows Form Designer.
|
||
|
'Do not modify it using the code editor.
|
||
|
Friend WithEvents Chart1 As SoftwareFX.ChartFX.Chart
|
||
|
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
|
||
|
Me.Chart1 = New SoftwareFX.ChartFX.Chart
|
||
|
Me.SuspendLayout()
|
||
|
'
|
||
|
'Chart1
|
||
|
'
|
||
|
Me.Chart1.DesignTimeData = ""
|
||
|
Me.Chart1.Dock = System.Windows.Forms.DockStyle.Fill
|
||
|
Me.Chart1.Gallery = SoftwareFX.ChartFX.Gallery.Lines
|
||
|
Me.Chart1.Location = New System.Drawing.Point(0, 0)
|
||
|
Me.Chart1.MarkerSize = CType(4, Short)
|
||
|
Me.Chart1.Name = "Chart1"
|
||
|
Me.Chart1.NSeries = 3
|
||
|
Me.Chart1.NValues = 10
|
||
|
Me.Chart1.Size = New System.Drawing.Size(757, 370)
|
||
|
Me.Chart1.TabIndex = 0
|
||
|
'
|
||
|
'FechaGrafica
|
||
|
'
|
||
|
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
|
||
|
Me.AutoSize = True
|
||
|
Me.ClientSize = New System.Drawing.Size(757, 370)
|
||
|
Me.Controls.Add(Me.Chart1)
|
||
|
Me.Name = "FechaGrafica"
|
||
|
Me.Text = "Tendencia del Patron Fecha"
|
||
|
Me.ResumeLayout(False)
|
||
|
|
||
|
End Sub
|
||
|
|
||
|
#End Region
|
||
|
Dim clCmp As clsComplejo = New clsComplejo
|
||
|
|
||
|
Private Sub FechaGrafica_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
|
||
|
confChart()
|
||
|
cargaGrafica()
|
||
|
End Sub
|
||
|
|
||
|
Private Sub confChart()
|
||
|
Try
|
||
|
With Chart1
|
||
|
'Configuracion del CHART
|
||
|
.ToolBar = True
|
||
|
.SerLegBox = True
|
||
|
.AllowDrag = False
|
||
|
.AllowEdit = False
|
||
|
.ContextMenus = False
|
||
|
.ShowTips = True
|
||
|
.Scrollable = True
|
||
|
.DataEditor = True
|
||
|
End With
|
||
|
'Configuro los ejes del chart
|
||
|
Chart1.Axis(2).AutoScale = True
|
||
|
Chart1.Titles(0).Text = "Cuenta - " & clCmp._NoCuenta
|
||
|
Chart1.Grid = SoftwareFX.ChartFX.ChartGrid.Horz Or SoftwareFX.ChartFX.ChartGrid.Vert
|
||
|
Chart1.AxisY.Title.Text = "Operatividad"
|
||
|
Catch ex As Exception
|
||
|
MessageBox.Show(ex.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error)
|
||
|
End Try
|
||
|
End Sub
|
||
|
|
||
|
Private Sub cargaGrafica()
|
||
|
'Declaro mis variables, (parametros para el stroe procedure)
|
||
|
Try
|
||
|
Dim _FechaInicio As String
|
||
|
Dim _FechaFin As String
|
||
|
Dim _NoCuenta As String
|
||
|
Dim _TipoReporte As Integer
|
||
|
Dim Classcom As New clsComplejo
|
||
|
|
||
|
'Asigancion de valores
|
||
|
_TipoReporte = clCmp.TipoReporte 'Asignacion para ver que tipo de prodcuto se carga
|
||
|
_NoCuenta = clCmp._NoCuenta
|
||
|
_FechaInicio = clCmp._FechaIni
|
||
|
_FechaFin = clCmp._FechaFin
|
||
|
|
||
|
'Formo el query
|
||
|
Dim cadSQL As String
|
||
|
cadSQL = ""
|
||
|
cadSQL = "spFechaGrafica "
|
||
|
cadSQL = cadSQL & "'" & Classcom.ObtenFecha(_FechaInicio, "yyyymmdd") & "', "
|
||
|
cadSQL = cadSQL & "'" & Classcom.ObtenFecha(_FechaFin, "yyyymmdd") & "', "
|
||
|
cadSQL = cadSQL & "'" & _NoCuenta & "', "
|
||
|
cadSQL = cadSQL & _TipoReporte
|
||
|
'MessageBox.Show(cadSQL, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Information)
|
||
|
|
||
|
'Ejecuto el query
|
||
|
'MsgBox(cadSQL)
|
||
|
clCmp.fdDataReader(cadSQL)
|
||
|
Chart1.DataSourceSettings.DataSource = clCmp.dr
|
||
|
Catch ex As Exception
|
||
|
MessageBox.Show(ex.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error)
|
||
|
End Try
|
||
|
End Sub
|
||
|
|
||
|
Private Sub Chart1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Chart1.Load
|
||
|
|
||
|
End Sub
|
||
|
End Class
|