120 lines
4.3 KiB
VB.net
120 lines
4.3 KiB
VB.net
Public Class GeografiaGrafica
|
||
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()
|
||
Dim TitleDockable1 As SoftwareFX.ChartFX.TitleDockable = New SoftwareFX.ChartFX.TitleDockable
|
||
Me.Chart1 = New SoftwareFX.ChartFX.Chart
|
||
Me.SuspendLayout()
|
||
'
|
||
'Chart1
|
||
'
|
||
Me.Chart1.BorderEffect = SoftwareFX.ChartFX.BorderEffect.Raised
|
||
Me.Chart1.Chart3D = True
|
||
Me.Chart1.Dock = System.Windows.Forms.DockStyle.Fill
|
||
Me.Chart1.Location = New System.Drawing.Point(0, 0)
|
||
Me.Chart1.Name = "Chart1"
|
||
Me.Chart1.NSeries = 3
|
||
Me.Chart1.NValues = 3
|
||
Me.Chart1.Size = New System.Drawing.Size(616, 445)
|
||
Me.Chart1.TabIndex = 0
|
||
Me.Chart1.Titles.AddRange(New SoftwareFX.ChartFX.TitleDockable() {TitleDockable1})
|
||
Me.Chart1.ToolBar = True
|
||
'
|
||
'GeografiaGrafica
|
||
'
|
||
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
|
||
Me.BackColor = System.Drawing.Color.White
|
||
Me.ClientSize = New System.Drawing.Size(616, 445)
|
||
Me.Controls.Add(Me.Chart1)
|
||
Me.Name = "GeografiaGrafica"
|
||
Me.Text = "Tendencia del patron de Geograf<61>a"
|
||
Me.ResumeLayout(False)
|
||
|
||
End Sub
|
||
|
||
#End Region
|
||
Dim clCmp As clsComplejo = New clsComplejo
|
||
|
||
Private Sub GeografiaGrafica_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
|
||
.DataEditor = True
|
||
End With
|
||
'Configuro los ejes del chart
|
||
Chart1.Axis(2).AutoScale = True
|
||
Chart1.Grid = SoftwareFX.ChartFX.ChartGrid.Horz Or SoftwareFX.ChartFX.ChartGrid.Vert
|
||
Chart1.BottomGap = 20
|
||
Catch ex As Exception
|
||
MessageBox.Show(ex.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error)
|
||
End Try
|
||
End Sub
|
||
Private Sub cargaGrafica()
|
||
Try
|
||
Dim No_Cuenta As String
|
||
If clCmp.TipoReporte = 1 Then 'Oper comer
|
||
'declaro uns instancia del fromulario de ?? checar con quien
|
||
' y validar si se usa aun este metodo
|
||
Else
|
||
'If clCmp.TipoReporte = 5 Then 'divisas
|
||
' 'declaracion de una isntacia del formulario de divisas
|
||
' Dim frmDivisas As InusualesDivisas = New InusualesDivisas
|
||
' No_Cuenta = frmDivisas.No_Cuenta
|
||
'Else
|
||
' If clCmp.TipoReporte = 7 Then ' credito
|
||
' 'declaracion de una isntacio del fomrulario de credito
|
||
' Dim frmCredito As InusualesCredito = New InusualesCredito
|
||
' No_Cuenta = frmCredito.No_cuenta
|
||
' End If
|
||
'End If
|
||
End If
|
||
|
||
'formo mi query (se utliza un store procedure)
|
||
Dim cadSQL As String
|
||
cadSQL = ""
|
||
cadSQL = "spGeografiaGrafica "
|
||
cadSQL = cadSQL & "'" & No_Cuenta & "'"
|
||
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
|
||
End Class
|