client/Reportes/RepRelevantes.vb

802 lines
35 KiB
VB.net
Raw Normal View History

Public Class RepRelevantes
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
Friend WithEvents dtgFraccionadas As C1.Win.C1TrueDBGrid.C1TrueDBGrid
#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 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 DTMInicio As System.Windows.Forms.DateTimePicker
Friend WithEvents DTMFinal 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(RepRelevantes))
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.PersistentRepository1 = New DevExpress.XtraEditors.Repository.PersistentRepository()
Me.DTMInicio = New System.Windows.Forms.DateTimePicker()
Me.DTMFinal = 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.dtgFraccionadas = New C1.Win.C1TrueDBGrid.C1TrueDBGrid()
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 = "Derivados"
'
'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(70, 176)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(59, 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(296, 80)
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
'
'DTMInicio
'
Me.DTMInicio.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
Me.DTMInicio.Location = New System.Drawing.Point(136, 72)
Me.DTMInicio.Name = "DTMInicio"
Me.DTMInicio.Size = New System.Drawing.Size(120, 20)
Me.DTMInicio.TabIndex = 23
'
'DTMFinal
'
Me.DTMFinal.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
Me.DTMFinal.Location = New System.Drawing.Point(360, 72)
Me.DTMFinal.Name = "DTMFinal"
Me.DTMFinal.Size = New System.Drawing.Size(120, 20)
Me.DTMFinal.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.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
'
'dtgFraccionadas
'
Me.dtgFraccionadas.GroupByCaption = "AGRUPAR"
Me.dtgFraccionadas.Images.Add(CType(resources.GetObject("dtgFraccionadas.Images"), System.Drawing.Image))
Me.dtgFraccionadas.Location = New System.Drawing.Point(47, 229)
Me.dtgFraccionadas.Name = "dtgFraccionadas"
Me.dtgFraccionadas.PreviewInfo.Location = New System.Drawing.Point(0, 0)
Me.dtgFraccionadas.PreviewInfo.Size = New System.Drawing.Size(0, 0)
Me.dtgFraccionadas.PreviewInfo.ZoomFactor = 75.0R
Me.dtgFraccionadas.PrintInfo.PageSettings = CType(resources.GetObject("dtgFraccionadas.PrintInfo.PageSettings"), System.Drawing.Printing.PageSettings)
Me.dtgFraccionadas.Size = New System.Drawing.Size(760, 170)
Me.dtgFraccionadas.TabIndex = 41
Me.dtgFraccionadas.Text = "C1TrueDBGrid1"
Me.dtgFraccionadas.Visible = False
Me.dtgFraccionadas.PropBag = resources.GetString("dtgFraccionadas.PropBag")
'
'RepRelevantes
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(846, 411)
Me.Controls.Add(Me.dtgFraccionadas)
Me.Controls.Add(Me.cmbStatus)
Me.Controls.Add(Me.Label22)
Me.Controls.Add(Me.Label21)
Me.Controls.Add(Me.DTMFinal)
Me.Controls.Add(Me.DTMInicio)
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 = "RepRelevantes"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "Reporte Relevantes"
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
Dim lngCliente As Long
Dim strNoCuenta As String
Dim lngProducto As Long
Dim lngSt As Long
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
Dim strSQL As String
Try
strSQL = "spGridRelevantes "
strSQL = " SELECT f.idtransaccion AS TRANSACCION,prod.nombreproducto AS PRODUCTO,"
strSQL = strSQL & " c.nombre as CLIENTE,f.fecha AS FECHA ,f.monto AS MONTO,div.nombre AS DIVISA ,f.nota AS NOTA "
strSQL = strSQL & " FROM reporterelevantes f,moneda div,cuenta ct,PRODUCTO PROD,cliente c "
strSQL = strSQL & " WHERE fecha BETWEEN convert(datetime,'" & Me.DTMInicio.Value.Date & "',112) AND convert(datetime,'" & Me.DTMFinal.Value.Date & "',112)"
strSQL = strSQL & " AND f.idproducto = prod.idproducto "
strSQL = strSQL & " AND f.idmoneda = div.idmoneda "
strSQL = strSQL & " AND f.no_cuenta = ct.no_cuenta "
strSQL = strSQL & " AND ct.idcliente = c.idcliente "
If cboCliente.Text <> "" Then
strSQL = strSQL & " AND ct.idcliente = " & cboCliente.SelectedValue
If cboCuenta.Text = "" Then
MessageBox.Show("Seleccione Una Cuenta", "Validacion", MessageBoxButtons.OK, MessageBoxIcon.Error)
Exit Sub
Else
strSQL = strSQL & " AND ct.no_cuenta = '" & cboCuenta.Text & "'"
End If
End If
If cboProducto.Text <> "" Then
strSQL = strSQL & " AND f.idproducto = " & cboProducto.SelectedValue
End If
If cmbStatus.Text <> "" Then
strSQL = strSQL & " AND f.id_estatus = " & cmbStatus.SelectedValue
End If
'lsSQL = fsDefineSQL("spGridRelevantes ")
'clCmp.sbLlenaDataGrid(lsSQL, Me.dtgFraccionadas)
clCmp.fdtDataSetTabla(strSQL)
'f.idtransaccion AS TRANSACCION,prod.nombreproducto AS PRODUCTO,f.fecha AS FECHA ,
'f.monto AS MONTO,div.nombre AS DIVISA ,f.nota AS NOTA
Me.dtgFraccionadas.SetDataBinding(clCmp.ds, "Tabla")
'Me.dtgFraccionadas.Splits(0).DisplayColumns(0).Visible = False
'Me.dtgFraccionadas.Splits(0).DisplayColumns(1).Visible = False
'Me.dtgFraccionadas.Splits(0).DisplayColumns(2).Visible = False
'Me.dtgFraccionadas.Splits(0).DisplayColumns(3).Visible = False
'Me.dtgFraccionadas.Splits(0).DisplayColumns(4).Visible = False
Me.dtgFraccionadas.Splits(0).DisplayColumns(1).AutoSize()
Me.dtgFraccionadas.Splits(0).DisplayColumns(2).AutoSize()
Me.dtgFraccionadas.Splits(0).DisplayColumns(3).AutoSize()
Me.dtgFraccionadas.Splits(0).DisplayColumns(4).AutoSize()
Me.dtgFraccionadas.Splits(0).DisplayColumns(5).AutoSize()
Me.dtgFraccionadas.Splits(0).DisplayColumns(6).AutoSize()
Me.dtgFraccionadas.Columns(4).NumberFormat = "Currency"
Me.dtgFraccionadas.Splits(0).DisplayColumns(1).FetchStyle = True
'Me.dtgFraccionadas.Splits(0).DisplayColumns(5).Style.VerticalAlignment = C1.Win.C1TrueDBGrid.AlignVertEnum.Center
Me.dtgFraccionadas.Visible = True
Dim Cont As Integer
Cont = clCmp.ds.Tables(0).Rows.Count
Label21.Text = Cont
Catch ex As Exception
MessageBox.Show(ex.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
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
'Defino mi cadena para el procedimiento almacenado
Try
Dim lsSQL As String = ""
Dim _Opcion As String = ", NULL,"
Dim lsIni As String = ", NULL,"
Dim lsFin As String = " NULL,"
Dim lsCliente As String = " NULL, "
Dim lsCuenta As String = " NULL, "
Dim lsProducto As String = " NULL, "
Dim lsEstatus As String = ", NULL "
'Dim Relevantes As New RepRelevantes
' ************ Fechas ****************
lsIni = CDate(DTMInicio.Value.Date)
lsIni = "'" & lsIni & "', "
lsFin = CDate(DTMFinal.Value.Date)
lsFin = "'" & lsFin & "', "
'*******************************************************************************
If Me.cboCliente.Text <> "" And Me.cboCuenta.Text = "" Then
MessageBox.Show("Selecciona una cuenta", "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Information)
Else
'*************************
If cboCliente.Text = "" And cboCuenta.Text = "" And cboProducto.Text = "" Then 'And Me.cboProducto.Text = "" And Me.cmbStatus.Text = "" Then
_Opcion = 1
ElseIf cmbStatus.Text <> "" And cboProducto.Text = "" Then
_Opcion = 2
lsEstatus = CInt(Me.cmbStatus.SelectedValue)
ElseIf Me.cboProducto.Text <> "" Then
_Opcion = 5
lsProducto = cboProducto.SelectedValue
ElseIf Me.cboCliente.Text <> "" Then
_Opcion = 3
lsCliente = "'" & Me.cboCliente.Text & "', "
ElseIf Me.cboCliente.Text <> "" And Me.cboCuenta.Text <> "" And Me.cboProducto.Text <> "" Then
_Opcion = 6
lsCliente = CInt(Me.cboCliente.SelectedValue) & ", "
lsCuenta = "'" & CStr(Me.cboCuenta.SelectedValue) & "', "
lsProducto = cboProducto.SelectedValue
ElseIf Me.cboCliente.Text <> "" And Me.cboCuenta.Text <> "" And Me.cmbStatus.Text <> "" And Me.cboProducto.Text <> "" Then
_Opcion = 7
lsCliente = CInt(Me.cboCliente.SelectedValue) & ", "
lsCuenta = "'" & CStr(Me.cboCuenta.SelectedValue) & "', "
lsProducto = cboProducto.SelectedValue
lsEstatus = CInt(Me.cmbStatus.SelectedValue)
ElseIf Me.cboCliente.Text <> "" And Me.cboCuenta.Text <> "" And Me.cmbStatus.Text = "" Then
_Opcion = 4
lsCliente = CInt(Me.cboCliente.SelectedValue) & ", "
lsCuenta = "'" & CStr(Me.cboCuenta.SelectedValue) & "', "
ElseIf Me.cboCliente.Text <> "" And Me.cboCuenta.Text <> "" And Me.cmbStatus.Text <> "" Then
_Opcion = 8
lsCliente = CInt(Me.cboCliente.SelectedValue) & ", "
lsCuenta = "'" & CStr(Me.cboCuenta.SelectedValue) & "', "
lsEstatus = CInt(Me.cmbStatus.SelectedValue)
End If
End If
lsSQL = ""
lsSQL = lsSQL & SP
lsSQL = lsSQL & lsIni
lsSQL = lsSQL & lsFin
lsSQL = lsSQL & lsCliente
lsSQL = lsSQL & lsCuenta
lsSQL = lsSQL & lsProducto
lsSQL = lsSQL & _Opcion
lsSQL = lsSQL & lsEstatus
Return lsSQL
Catch ex As Exception
MessageBox.Show(ex.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Function
Private Sub dtgFraccionadas_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs)
'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
Private Sub dtgFraccionadas_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dtgFraccionadas.Click
End Sub
Private Sub dtgFraccionadas_DoubleClick1(ByVal sender As Object, ByVal e As System.EventArgs) Handles dtgFraccionadas.DoubleClick
Dim clsVar As clsVaribles = New clsVaribles 'Para tener acceso a varibales publicas
Dim BanCliente, BanCuenta, BanPatron, BanStatus As Boolean
Dim FilaActual As Integer
FilaActual = Me.dtgFraccionadas.Row
Dim fila As DataRow
fila = clCmp.ds.Tables(0).Rows(FilaActual)
'clsVaribles.ReportadoPor = fila("ReportadoPor")
clsVaribles.Nombre = fila("cliente")
'clsVaribles.No_Referencia = fila("No_Referencia")
clsVaribles.idtransaccion = fila("Transaccion")
'clsVaribles.idproducto = fila("idproducto")
'clsVaribles.Id_SubProducto = fila("Id_Subproducto")
'clsVaribles.Id_Patron = fila("Id_Patron")
'clsVaribles.Id_EstatusTransaccion = fila("Id_EstatusTransaccion")
Dim frmDetalles As Detalles = New Detalles
frmDetalles.Text = "Detalle Divisas"
frmDetalles.ShowDialog()
'refrescar()
End Sub
Private Sub dtgFraccionadas_FetchCellStyle(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.FetchCellStyleEventArgs) Handles dtgFraccionadas.FetchCellStyle
Dim S As String = Me.dtgFraccionadas(e.Row, e.Col)
If S = "BANCATRADICIONAL" Then
e.CellStyle.BackColor = Label18.BackColor
e.CellStyle.ForeColor = System.Drawing.Color.Black
End If
If S = "MERCADODEDINERO" Then
e.CellStyle.BackColor = Label20.BackColor
e.CellStyle.ForeColor = System.Drawing.Color.Black
End If
If S = "TESORERIA" Then
e.CellStyle.BackColor = Label16.BackColor
e.CellStyle.ForeColor = System.Drawing.Color.White
End If
If S = "DERIVADOS" Then
e.CellStyle.BackColor = Label7.BackColor
e.CellStyle.ForeColor = System.Drawing.Color.White
End If
End Sub
End Class