client/Reportes/RepFraccionadas.vb

642 lines
27 KiB
VB.net
Raw Normal View History

Public Class RepFraccionadas
Inherits System.Windows.Forms.Form
Dim clCmpCte As New clsComplejo()
Dim clCmpCta As New clsComplejo()
Dim clCmpPro As New clsComplejo()
Dim clCmp As New clsComplejo
Dim Estatus As clsComplejo = New clsComplejo 'para llenar combo estatus
Dim clCmpDev As New clsComplejo
Dim Cuenta As clsComplejo = New clsComplejo 'para llenar el combo de cuenta
Dim Cliente As clsComplejo = New clsComplejo 'para llenar combo cliente
Dim BanCliente, BanCuenta, BanPatron, BanStatus, BanProducto As Boolean
#Region " C<>digo generado por el Dise<73>ador de Windows Forms "
Public Sub New()
MyBase.New()
'El Dise<73>ador de Windows Forms requiere esta llamada.
InitializeComponent()
'Agregar cualquier inicializaci<63>n despu<70>s de la llamada a InitializeComponent()
End Sub
'Form reemplaza a Dispose para limpiar la lista de componentes.
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
'Requerido por el Dise<73>ador de Windows Forms
Private components As System.ComponentModel.IContainer
'NOTA: el Dise<73>ador de Windows Forms requiere el siguiente procedimiento
'Puede modificarse utilizando el Dise<73>ador de Windows Forms.
'No lo modifique con el editor de c<>digo.
Friend WithEvents btnSalir As System.Windows.Forms.ToolBarButton
Friend WithEvents ImageList1 As System.Windows.Forms.ImageList
Friend WithEvents tlbCliente As System.Windows.Forms.ToolBar
Friend WithEvents btnBuscar As System.Windows.Forms.ToolBarButton
Friend WithEvents btnExportar As System.Windows.Forms.ToolBarButton
Friend WithEvents btnLimpiar As System.Windows.Forms.ToolBarButton
Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents cboProducto As System.Windows.Forms.ComboBox
Friend WithEvents Label6 As System.Windows.Forms.Label
Friend WithEvents cboCuenta As System.Windows.Forms.ComboBox
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents cboCliente As System.Windows.Forms.ComboBox
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents dtpFin As AxMSComCtl2.AxDTPicker
Friend WithEvents dtpInicio As AxMSComCtl2.AxDTPicker
Friend WithEvents dtgFraccionadas As System.Windows.Forms.DataGrid
Friend WithEvents Label7 As System.Windows.Forms.Label
Friend WithEvents Label8 As System.Windows.Forms.Label
Friend WithEvents Label9 As System.Windows.Forms.Label
Friend WithEvents Label11 As System.Windows.Forms.Label
Friend WithEvents Label13 As System.Windows.Forms.Label
Friend WithEvents Label15 As System.Windows.Forms.Label
Friend WithEvents Label17 As System.Windows.Forms.Label
Friend WithEvents Label19 As System.Windows.Forms.Label
Friend WithEvents Label10 As System.Windows.Forms.Label
Friend WithEvents Label12 As System.Windows.Forms.Label
Friend WithEvents Label14 As System.Windows.Forms.Label
Friend WithEvents Label16 As System.Windows.Forms.Label
Friend WithEvents Label18 As System.Windows.Forms.Label
Friend WithEvents Label20 As System.Windows.Forms.Label
Friend WithEvents PersistentRepository1 As DevExpress.XtraEditors.Repository.PersistentRepository
Friend WithEvents DateTimePicker1 As System.Windows.Forms.DateTimePicker
Friend WithEvents DateTimePicker2 As System.Windows.Forms.DateTimePicker
Friend WithEvents Label21 As System.Windows.Forms.Label
Friend WithEvents cmbStatus As System.Windows.Forms.ComboBox
Friend WithEvents Label22 As System.Windows.Forms.Label
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(RepFraccionadas))
Me.tlbCliente = New System.Windows.Forms.ToolBar()
Me.btnBuscar = New System.Windows.Forms.ToolBarButton()
Me.btnExportar = New System.Windows.Forms.ToolBarButton()
Me.btnLimpiar = New System.Windows.Forms.ToolBarButton()
Me.btnSalir = New System.Windows.Forms.ToolBarButton()
Me.ImageList1 = New System.Windows.Forms.ImageList(Me.components)
Me.GroupBox2 = New System.Windows.Forms.GroupBox()
Me.Label20 = New System.Windows.Forms.Label()
Me.Label18 = New System.Windows.Forms.Label()
Me.Label16 = New System.Windows.Forms.Label()
Me.Label14 = New System.Windows.Forms.Label()
Me.Label12 = New System.Windows.Forms.Label()
Me.Label10 = New System.Windows.Forms.Label()
Me.Label19 = New System.Windows.Forms.Label()
Me.Label17 = New System.Windows.Forms.Label()
Me.Label15 = New System.Windows.Forms.Label()
Me.Label13 = New System.Windows.Forms.Label()
Me.Label11 = New System.Windows.Forms.Label()
Me.Label9 = New System.Windows.Forms.Label()
Me.Label8 = New System.Windows.Forms.Label()
Me.Label7 = New System.Windows.Forms.Label()
Me.Label1 = New System.Windows.Forms.Label()
Me.cboProducto = New System.Windows.Forms.ComboBox()
Me.Label6 = New System.Windows.Forms.Label()
Me.cboCuenta = New System.Windows.Forms.ComboBox()
Me.Label5 = New System.Windows.Forms.Label()
Me.cboCliente = New System.Windows.Forms.ComboBox()
Me.Label4 = New System.Windows.Forms.Label()
Me.Label3 = New System.Windows.Forms.Label()
Me.Label2 = New System.Windows.Forms.Label()
Me.dtgFraccionadas = New System.Windows.Forms.DataGrid()
Me.PersistentRepository1 = New DevExpress.XtraEditors.Repository.PersistentRepository()
Me.DateTimePicker1 = New System.Windows.Forms.DateTimePicker()
Me.DateTimePicker2 = New System.Windows.Forms.DateTimePicker()
Me.Label21 = New System.Windows.Forms.Label()
Me.cmbStatus = New System.Windows.Forms.ComboBox()
Me.Label22 = New System.Windows.Forms.Label()
Me.GroupBox2.SuspendLayout()
CType(Me.dtgFraccionadas, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'tlbCliente
'
Me.tlbCliente.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.tlbCliente.Buttons.AddRange(New System.Windows.Forms.ToolBarButton() {Me.btnBuscar, Me.btnExportar, Me.btnLimpiar, Me.btnSalir})
Me.tlbCliente.ButtonSize = New System.Drawing.Size(75, 40)
Me.tlbCliente.DropDownArrows = True
Me.tlbCliente.ImageList = Me.ImageList1
Me.tlbCliente.Location = New System.Drawing.Point(0, 0)
Me.tlbCliente.Name = "tlbCliente"
Me.tlbCliente.ShowToolTips = True
Me.tlbCliente.Size = New System.Drawing.Size(846, 43)
Me.tlbCliente.TabIndex = 6
'
'btnBuscar
'
Me.btnBuscar.ImageIndex = 2
Me.btnBuscar.Name = "btnBuscar"
Me.btnBuscar.Text = "Buscar"
'
'btnExportar
'
Me.btnExportar.ImageIndex = 7
Me.btnExportar.Name = "btnExportar"
Me.btnExportar.Text = "Exportar"
'
'btnLimpiar
'
Me.btnLimpiar.ImageIndex = 5
Me.btnLimpiar.Name = "btnLimpiar"
Me.btnLimpiar.Text = "Limpiar"
'
'btnSalir
'
Me.btnSalir.ImageIndex = 4
Me.btnSalir.Name = "btnSalir"
Me.btnSalir.Text = "Salir"
'
'ImageList1
'
Me.ImageList1.ImageStream = CType(resources.GetObject("ImageList1.ImageStream"), System.Windows.Forms.ImageListStreamer)
Me.ImageList1.TransparentColor = System.Drawing.Color.Turquoise
Me.ImageList1.Images.SetKeyName(0, "")
Me.ImageList1.Images.SetKeyName(1, "")
Me.ImageList1.Images.SetKeyName(2, "")
Me.ImageList1.Images.SetKeyName(3, "")
Me.ImageList1.Images.SetKeyName(4, "")
Me.ImageList1.Images.SetKeyName(5, "")
Me.ImageList1.Images.SetKeyName(6, "")
Me.ImageList1.Images.SetKeyName(7, "")
'
'GroupBox2
'
Me.GroupBox2.Controls.Add(Me.Label20)
Me.GroupBox2.Controls.Add(Me.Label18)
Me.GroupBox2.Controls.Add(Me.Label16)
Me.GroupBox2.Controls.Add(Me.Label14)
Me.GroupBox2.Controls.Add(Me.Label12)
Me.GroupBox2.Controls.Add(Me.Label10)
Me.GroupBox2.Controls.Add(Me.Label19)
Me.GroupBox2.Controls.Add(Me.Label17)
Me.GroupBox2.Controls.Add(Me.Label15)
Me.GroupBox2.Controls.Add(Me.Label13)
Me.GroupBox2.Controls.Add(Me.Label11)
Me.GroupBox2.Controls.Add(Me.Label9)
Me.GroupBox2.Controls.Add(Me.Label8)
Me.GroupBox2.Controls.Add(Me.Label7)
Me.GroupBox2.Location = New System.Drawing.Point(552, 64)
Me.GroupBox2.Name = "GroupBox2"
Me.GroupBox2.Size = New System.Drawing.Size(208, 128)
Me.GroupBox2.TabIndex = 10
Me.GroupBox2.TabStop = False
Me.GroupBox2.Text = "Identificaci<EFBFBD>n de Productos:"
'
'Label20
'
Me.Label20.BackColor = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
Me.Label20.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.Label20.Location = New System.Drawing.Point(32, 48)
Me.Label20.Name = "Label20"
Me.Label20.Size = New System.Drawing.Size(24, 16)
Me.Label20.TabIndex = 19
'
'Label18
'
Me.Label18.BackColor = System.Drawing.Color.Lime
Me.Label18.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.Label18.Location = New System.Drawing.Point(32, 96)
Me.Label18.Name = "Label18"
Me.Label18.Size = New System.Drawing.Size(24, 16)
Me.Label18.TabIndex = 18
'
'Label16
'
Me.Label16.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
Me.Label16.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.Label16.Location = New System.Drawing.Point(32, 72)
Me.Label16.Name = "Label16"
Me.Label16.Size = New System.Drawing.Size(24, 16)
Me.Label16.TabIndex = 17
'
'Label14
'
Me.Label14.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
Me.Label14.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.Label14.Location = New System.Drawing.Point(208, 48)
Me.Label14.Name = "Label14"
Me.Label14.Size = New System.Drawing.Size(24, 16)
Me.Label14.TabIndex = 16
Me.Label14.Visible = False
'
'Label12
'
Me.Label12.BackColor = System.Drawing.Color.Yellow
Me.Label12.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.Label12.Location = New System.Drawing.Point(208, 72)
Me.Label12.Name = "Label12"
Me.Label12.Size = New System.Drawing.Size(24, 16)
Me.Label12.TabIndex = 15
Me.Label12.Visible = False
'
'Label10
'
Me.Label10.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
Me.Label10.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.Label10.Location = New System.Drawing.Point(208, 24)
Me.Label10.Name = "Label10"
Me.Label10.Size = New System.Drawing.Size(24, 16)
Me.Label10.TabIndex = 14
Me.Label10.Visible = False
'
'Label19
'
Me.Label19.ForeColor = System.Drawing.Color.MidnightBlue
Me.Label19.Location = New System.Drawing.Point(64, 48)
Me.Label19.Name = "Label19"
Me.Label19.Size = New System.Drawing.Size(112, 16)
Me.Label19.TabIndex = 13
Me.Label19.Text = "Mercado de Dinero"
'
'Label17
'
Me.Label17.ForeColor = System.Drawing.Color.MidnightBlue
Me.Label17.Location = New System.Drawing.Point(64, 96)
Me.Label17.Name = "Label17"
Me.Label17.Size = New System.Drawing.Size(136, 16)
Me.Label17.TabIndex = 11
Me.Label17.Text = "Operaciones Comerciales"
'
'Label15
'
Me.Label15.ForeColor = System.Drawing.Color.MidnightBlue
Me.Label15.Location = New System.Drawing.Point(64, 72)
Me.Label15.Name = "Label15"
Me.Label15.Size = New System.Drawing.Size(104, 16)
Me.Label15.TabIndex = 9
Me.Label15.Text = "Divisas (Tesorer<65>a)"
'
'Label13
'
Me.Label13.Location = New System.Drawing.Point(232, 24)
Me.Label13.Name = "Label13"
Me.Label13.Size = New System.Drawing.Size(72, 16)
Me.Label13.TabIndex = 7
Me.Label13.Text = "Derivados"
Me.Label13.Visible = False
'
'Label11
'
Me.Label11.Location = New System.Drawing.Point(232, 72)
Me.Label11.Name = "Label11"
Me.Label11.Size = New System.Drawing.Size(104, 16)
Me.Label11.TabIndex = 5
Me.Label11.Text = "Banca Internacional"
Me.Label11.Visible = False
'
'Label9
'
Me.Label9.Location = New System.Drawing.Point(232, 48)
Me.Label9.Name = "Label9"
Me.Label9.Size = New System.Drawing.Size(72, 16)
Me.Label9.TabIndex = 3
Me.Label9.Text = "Fideicomiso"
Me.Label9.Visible = False
'
'Label8
'
Me.Label8.ForeColor = System.Drawing.Color.MidnightBlue
Me.Label8.Location = New System.Drawing.Point(64, 24)
Me.Label8.Name = "Label8"
Me.Label8.Size = New System.Drawing.Size(56, 16)
Me.Label8.TabIndex = 1
Me.Label8.Text = "Cr<EFBFBD>dito"
'
'Label7
'
Me.Label7.BackColor = System.Drawing.Color.Red
Me.Label7.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.Label7.Location = New System.Drawing.Point(32, 24)
Me.Label7.Name = "Label7"
Me.Label7.Size = New System.Drawing.Size(24, 16)
Me.Label7.TabIndex = 0
'
'Label1
'
Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label1.ForeColor = System.Drawing.Color.MidnightBlue
Me.Label1.Location = New System.Drawing.Point(560, 200)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(152, 16)
Me.Label1.TabIndex = 11
Me.Label1.Text = "Total de Transacciones:"
Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'cboProducto
'
Me.cboProducto.Location = New System.Drawing.Point(136, 168)
Me.cboProducto.Name = "cboProducto"
Me.cboProducto.Size = New System.Drawing.Size(344, 21)
Me.cboProducto.TabIndex = 4
'
'Label6
'
Me.Label6.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label6.ForeColor = System.Drawing.Color.MidnightBlue
Me.Label6.Location = New System.Drawing.Point(72, 176)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(56, 16)
Me.Label6.TabIndex = 21
Me.Label6.Text = "Producto:"
Me.Label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'cboCuenta
'
Me.cboCuenta.Location = New System.Drawing.Point(136, 136)
Me.cboCuenta.Name = "cboCuenta"
Me.cboCuenta.Size = New System.Drawing.Size(344, 21)
Me.cboCuenta.TabIndex = 3
'
'Label5
'
Me.Label5.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label5.ForeColor = System.Drawing.Color.MidnightBlue
Me.Label5.Location = New System.Drawing.Point(80, 144)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(48, 16)
Me.Label5.TabIndex = 19
Me.Label5.Text = "Cuenta:"
Me.Label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'cboCliente
'
Me.cboCliente.Location = New System.Drawing.Point(136, 104)
Me.cboCliente.Name = "cboCliente"
Me.cboCliente.Size = New System.Drawing.Size(344, 21)
Me.cboCliente.TabIndex = 2
'
'Label4
'
Me.Label4.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label4.ForeColor = System.Drawing.Color.MidnightBlue
Me.Label4.Location = New System.Drawing.Point(80, 112)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(48, 16)
Me.Label4.TabIndex = 17
Me.Label4.Text = "Cliente:"
Me.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'Label3
'
Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label3.ForeColor = System.Drawing.Color.MidnightBlue
Me.Label3.Location = New System.Drawing.Point(282, 78)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(72, 16)
Me.Label3.TabIndex = 16
Me.Label3.Text = "Fecha Fin:"
'
'Label2
'
Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label2.ForeColor = System.Drawing.Color.MidnightBlue
Me.Label2.Location = New System.Drawing.Point(56, 80)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(72, 16)
Me.Label2.TabIndex = 15
Me.Label2.Text = "Fecha Inicio:"
Me.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'dtgFraccionadas
'
Me.dtgFraccionadas.BackgroundColor = System.Drawing.Color.White
Me.dtgFraccionadas.DataMember = ""
Me.dtgFraccionadas.HeaderForeColor = System.Drawing.SystemColors.ControlText
Me.dtgFraccionadas.Location = New System.Drawing.Point(16, 240)
Me.dtgFraccionadas.Name = "dtgFraccionadas"
Me.dtgFraccionadas.ReadOnly = True
Me.dtgFraccionadas.Size = New System.Drawing.Size(816, 160)
Me.dtgFraccionadas.TabIndex = 5
'
'DateTimePicker1
'
Me.DateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
Me.DateTimePicker1.Location = New System.Drawing.Point(136, 72)
Me.DateTimePicker1.Name = "DateTimePicker1"
Me.DateTimePicker1.Size = New System.Drawing.Size(120, 20)
Me.DateTimePicker1.TabIndex = 23
'
'DateTimePicker2
'
Me.DateTimePicker2.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
Me.DateTimePicker2.Location = New System.Drawing.Point(360, 72)
Me.DateTimePicker2.Name = "DateTimePicker2"
Me.DateTimePicker2.Size = New System.Drawing.Size(120, 20)
Me.DateTimePicker2.TabIndex = 24
'
'Label21
'
Me.Label21.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label21.ForeColor = System.Drawing.Color.MidnightBlue
Me.Label21.Location = New System.Drawing.Point(728, 200)
Me.Label21.Name = "Label21"
Me.Label21.Size = New System.Drawing.Size(48, 16)
Me.Label21.TabIndex = 25
Me.Label21.Text = "0"
Me.Label21.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Label21.Visible = False
'
'cmbStatus
'
Me.cmbStatus.Location = New System.Drawing.Point(136, 200)
Me.cmbStatus.Name = "cmbStatus"
Me.cmbStatus.Size = New System.Drawing.Size(344, 21)
Me.cmbStatus.TabIndex = 40
'
'Label22
'
Me.Label22.BackColor = System.Drawing.Color.Transparent
Me.Label22.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label22.ForeColor = System.Drawing.Color.MidnightBlue
Me.Label22.Location = New System.Drawing.Point(56, 200)
Me.Label22.Name = "Label22"
Me.Label22.Size = New System.Drawing.Size(70, 20)
Me.Label22.TabIndex = 39
Me.Label22.Text = "Estatus:"
Me.Label22.TextAlign = System.Drawing.ContentAlignment.BottomRight
'
'RepFraccionadas
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(846, 411)
Me.Controls.Add(Me.cmbStatus)
Me.Controls.Add(Me.Label22)
Me.Controls.Add(Me.Label21)
Me.Controls.Add(Me.DateTimePicker2)
Me.Controls.Add(Me.DateTimePicker1)
Me.Controls.Add(Me.dtgFraccionadas)
Me.Controls.Add(Me.cboProducto)
Me.Controls.Add(Me.Label6)
Me.Controls.Add(Me.cboCuenta)
Me.Controls.Add(Me.Label5)
Me.Controls.Add(Me.cboCliente)
Me.Controls.Add(Me.Label4)
Me.Controls.Add(Me.Label3)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.GroupBox2)
Me.Controls.Add(Me.tlbCliente)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D
Me.Name = "RepFraccionadas"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "RepFraccionadas"
Me.GroupBox2.ResumeLayout(False)
CType(Me.dtgFraccionadas, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
#End Region
Private Sub tlbCliente_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles tlbCliente.ButtonClick
Select Case e.Button.Text
Case "Buscar"
Label21.Visible = True
'sbBuscar()
Case "Exportar"
MessageBox.Show("Realiza una consulta ", "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Information)
'sbExportar()
Case "Limpiar"
Label21.Visible = False
'sbIniciaForma()
Case "Salir"
Me.Close()
End Select
End Sub
Private Sub RepFraccionadas_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
sbIniciaForma()
End Sub
Private Sub sbIniciaForma()
clCmpPro.sbLlenaCombo("splistaProducto", Me.cboProducto)
Estatus.sbLlenaCombo("spLlenaComboEstatusTransacciones", Me.cmbStatus)
End Sub
Public Sub sbBuscar()
Dim lsSQL As String
lsSQL = fsDefineSQL("spGridFraccionadas")
clCmp.sbLlenaDataGrid(lsSQL, Me.dtgFraccionadas)
'clCmpDev.sbLlenaDevExpress(lsSQL, Me.dveFraccionadas)
End Sub
Public Sub sbExportar()
Dim lsSQL As String
Dim clExc As New clsExcel
lsSQL = fsDefineSQL("spGridFraccionadas")
'clExc.sbExportaDataReader(lsSQL)
End Sub
Private Function fsDefineSQL(ByVal SP As String) As String
Dim lsSQL As String
Dim lsIni As String
Dim lsFin As String
Dim lsCliente As String
Dim lsCuenta As String
Dim lsProducto As String
lsIni = CDate(Me.DateTimePicker1.Value.Date)
lsIni = "'" & lsIni & "'"
lsFin = CDate(Me.DateTimePicker2.Value.Date)
lsFin = "'" & lsFin & "'"
If cboCliente.SelectedIndex <> -1 Then
lsCliente = CStr(cboCliente.SelectedValue)
Else
lsCliente = "NULL"
End If
If cboCuenta.SelectedIndex <> -1 Then
lsCuenta = CStr(cboCuenta.SelectedText)
lsCuenta = "'" & lsCuenta & "'"
Else
lsCuenta = "NULL"
End If
If cboProducto.SelectedIndex <> -1 Then
lsProducto = CStr(cboProducto.SelectedValue)
Else
lsProducto = "NULL"
End If
lsSQL = ""
lsSQL = lsSQL & SP & " "
lsSQL = lsSQL & lsIni & ", "
lsSQL = lsSQL & lsFin & ", "
lsSQL = lsSQL & lsCliente & ", "
lsSQL = lsSQL & lsCuenta & ", "
lsSQL = lsSQL & lsProducto
Return lsSQL
End Function
Private Sub dtgFraccionadas_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles dtgFraccionadas.DoubleClick
'Dim Indice As Integer
'Dim ltFecha As Date
'Dim lsCuenta As String
'Dim Detalle As New RepDetalle
'With dtgFraccionadas
' Indice = .CurrentRowIndex
' lsCuenta = CStr(.Item(Indice, 1))
' ltFecha = CDate(.Item(Indice, 3))
'End With
'Detalle.sbBuscaDetalle(lsCuenta, ltFecha)
'Detalle.Text = "Detalle de inusuales fraccionadas"
'Detalle.dtgDetalle.CaptionText = "Detalle de cuenta " & lsCuenta & " para el d<>a " & ltFecha
'Detalle.Show()
End Sub
Private Sub cboCuenta_DropDown(ByVal sender As Object, ByVal e As System.EventArgs) Handles cboCuenta.DropDown
Try
If Me.cboCliente.Text = "" Then
Me.cboCliente.Focus()
MessageBox.Show("Debes de seleccionar un cliente ", "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Information)
Else
If BanCuenta = False Then
Dim cad As String
cad = "spLlenaComboCuenta "
cad = cad & CInt(cboCliente.SelectedValue)
Cuenta.sbLlenaCombo1(cad, Me.cboCuenta)
BanCuenta = True
End If
End If
Catch ex As Exception
MessageBox.Show(ex.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub
Private Sub cboCliente_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cboCliente.SelectedIndexChanged
'Limpia el combo de cuenta al seleccionar otro elemento en el combo de cliente
Try
BanCuenta = False
Me.cboCuenta.DataSource = Nothing
Me.cboCuenta.Items.Clear()
Catch ex As Exception
End Try
End Sub
Private Sub cboCliente_DropDown(ByVal sender As Object, ByVal e As System.EventArgs) Handles cboCliente.DropDown
Try
If BanCliente = False Then
'Lleno combo de clientes con el procedimiento alamcenado "spLlenaComboCliente"
Cliente.sbLlenaCombo("spLlenaComboCliente", Me.cboCliente)
End If
BanCliente = True
Catch ex As Exception
End Try
End Sub
End Class