client/Reportes/DetalleDormantAccount.vb

116 lines
4.2 KiB
VB.net
Raw Permalink Normal View History

Public Class DetalleDormantAccount
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 GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents DataGrid1 As System.Windows.Forms.DataGrid
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.GroupBox1 = New System.Windows.Forms.GroupBox
Me.DataGrid1 = New System.Windows.Forms.DataGrid
Me.GroupBox1.SuspendLayout()
CType(Me.DataGrid1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'GroupBox1
'
Me.GroupBox1.Controls.Add(Me.DataGrid1)
Me.GroupBox1.Location = New System.Drawing.Point(8, 8)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(640, 122)
Me.GroupBox1.TabIndex = 0
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "Detalles"
'
'DataGrid1
'
Me.DataGrid1.BackgroundColor = System.Drawing.Color.White
Me.DataGrid1.DataMember = ""
Me.DataGrid1.Dock = System.Windows.Forms.DockStyle.Fill
Me.DataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText
Me.DataGrid1.Location = New System.Drawing.Point(3, 16)
Me.DataGrid1.Name = "DataGrid1"
Me.DataGrid1.Size = New System.Drawing.Size(634, 103)
Me.DataGrid1.TabIndex = 0
'
'DetalleDormantAccount
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.BackColor = System.Drawing.Color.White
Me.ClientSize = New System.Drawing.Size(652, 133)
Me.Controls.Add(Me.GroupBox1)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D
Me.MaximizeBox = False
Me.Name = "DetalleDormantAccount"
Me.Text = "Detalle Dormant Account"
Me.GroupBox1.ResumeLayout(False)
CType(Me.DataGrid1, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
End Sub
#End Region
Dim frmDA As DormatAccount = New DormatAccount 'Instancia del formulaio domant account
Dim clCmpDDA As clsComplejo = New clsComplejo
Private Sub DetalleDormantAccount_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
sbBuscar()
End Sub
Public Sub sbBuscar()
'realiza una consulta en base al procedimiento almacenado
Try
'Formo el query de consulta
Dim SQL As String
SQL = ""
SQL = fsDefineSQL("spDetalleDormantAcount ")
clCmpDDA.fdtDataSetTabla(SQL)
' OcultaColums() 'Oculto columas en el datagrid
Me.DataGrid1.SetDataBinding(clCmpDDA.ds, "Tabla")
Catch er As Exception
End Try
End Sub
Private Function fsDefineSQL(ByVal SP As String) As String
'Defino mi cadena para el procedimiento almacenado
Try
Dim lsSQL As String = ""
'********Formo el query
lsSQL = ""
lsSQL = lsSQL & SP
lsSQL = lsSQL & frmDA._IdProducto
lsSQL = lsSQL & " , '" & frmDA._NoCuenta & "'"
lsSQL = lsSQL & " , " & frmDA._IdTransaccion
Return lsSQL
Catch ex As Exception
MessageBox.Show(ex.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Function
End Class