client/Reportes/FRMFraccionadas.vb

1087 lines
47 KiB
VB.net
Raw Permalink Normal View History

Imports System.Collections.Generic
Public Class FRMFraccionadas
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 gsidtran As String = ""
Dim BanCliente, BanCuenta, BanPatron, BanStatus, BanProducto As Boolean
'Friend WithEvents dgvFraccionada As System.Windows.Forms.DataGridView
Dim lgfila As Integer = 0
'Dim m_Excel As New Excel.Application
'Dim FILENAME As String = ("grids.xls")
Dim aPath As String
'Friend WithEvents cboEstatus As System.Windows.Forms.ComboBox
'Friend WithEvents lblEstatus As System.Windows.Forms.Label
'Friend WithEvents lblFrac As System.Windows.Forms.Label
'Friend WithEvents lblDetFra As System.Windows.Forms.Label
'Friend WithEvents txtTotFrac As System.Windows.Forms.TextBox
'Friend WithEvents txtTotFraccionada As System.Windows.Forms.TextBox
'Friend WithEvents Flgdetalle As C1.Win.C1TrueDBGrid.C1TrueDBGrid
'Friend WithEvents cmbCliente As System.Windows.Forms.ComboBox
'Friend WithEvents cmbCuenta As System.Windows.Forms.ComboBox
Dim aName As String
Dim clsVar As clsVaribles = New clsVaribles 'Para utilizar varibles publicas
Dim strVariables As clsVaribles = New clsVaribles
Private limpiando As Boolean = False
#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 Label5 As System.Windows.Forms.Label
'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 PersistentRepository1 As DevExpress.XtraEditors.Repository.PersistentRepository
'Friend WithEvents DateTimePicker1 As System.Windows.Forms.DateTimePicker
'Friend WithEvents DateTimePicker2 As System.Windows.Forms.DateTimePicker
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FRMFraccionadas))
Me.Label4 = New System.Windows.Forms.Label()
Me.Label3 = New System.Windows.Forms.Label()
Me.Label2 = New System.Windows.Forms.Label()
Me.dtpFechaInicial = New System.Windows.Forms.DateTimePicker()
Me.dtpFechaFinal = New System.Windows.Forms.DateTimePicker()
Me.dgvFraccionada = New System.Windows.Forms.DataGridView()
Me.cboEstatus = New System.Windows.Forms.ComboBox()
Me.lblEstatus = New System.Windows.Forms.Label()
Me.lblFrac = New System.Windows.Forms.Label()
Me.lblDetFra = New System.Windows.Forms.Label()
Me.txtTotFrac = New System.Windows.Forms.TextBox()
Me.txtTotFraccionada = New System.Windows.Forms.TextBox()
Me.Flgdetalle = New C1.Win.C1TrueDBGrid.C1TrueDBGrid()
Me.cmbCliente = New System.Windows.Forms.ComboBox()
Me.Label1 = New System.Windows.Forms.Label()
Me.cboProducto = New System.Windows.Forms.ComboBox()
Me.txtCuenta = New System.Windows.Forms.TextBox()
Me.Label6 = New System.Windows.Forms.Label()
Me.btnConsulta = New System.Windows.Forms.Button()
Me.BtnLimpiar1 = New System.Windows.Forms.Button()
Me.BtnImprimir = New System.Windows.Forms.Button()
Me.BntSalir = New System.Windows.Forms.Button()
Me.panel2 = New System.Windows.Forms.Panel()
Me.Img_logoCabecera = New System.Windows.Forms.PictureBox()
Me.Label17 = New System.Windows.Forms.Label()
Me.panel3 = New System.Windows.Forms.Panel()
Me.lblFooter = New System.Windows.Forms.Label()
CType(Me.dgvFraccionada, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Flgdetalle, System.ComponentModel.ISupportInitialize).BeginInit()
Me.panel2.SuspendLayout()
CType(Me.Img_logoCabecera, System.ComponentModel.ISupportInitialize).BeginInit()
Me.panel3.SuspendLayout()
Me.SuspendLayout()
'
'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(28, 96)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(52, 16)
Me.Label4.TabIndex = 7
Me.Label4.Text = "Cliente:"
Me.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
'
'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, 70)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(82, 13)
Me.Label3.TabIndex = 3
Me.Label3.Text = "Fecha Final:"
'
'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(28, 70)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(100, 16)
Me.Label2.TabIndex = 1
Me.Label2.Text = "Fecha Inicial:"
Me.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
'
'dtpFechaInicial
'
Me.dtpFechaInicial.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
Me.dtpFechaInicial.Location = New System.Drawing.Point(134, 66)
Me.dtpFechaInicial.Name = "dtpFechaInicial"
Me.dtpFechaInicial.Size = New System.Drawing.Size(120, 20)
Me.dtpFechaInicial.TabIndex = 2
'
'dtpFechaFinal
'
Me.dtpFechaFinal.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
Me.dtpFechaFinal.Location = New System.Drawing.Point(382, 65)
Me.dtpFechaFinal.Name = "dtpFechaFinal"
Me.dtpFechaFinal.Size = New System.Drawing.Size(120, 20)
Me.dtpFechaFinal.TabIndex = 4
'
'dgvFraccionada
'
Me.dgvFraccionada.AllowUserToAddRows = False
Me.dgvFraccionada.AllowUserToDeleteRows = False
Me.dgvFraccionada.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.dgvFraccionada.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
Me.dgvFraccionada.BackgroundColor = System.Drawing.Color.White
Me.dgvFraccionada.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing
Me.dgvFraccionada.Location = New System.Drawing.Point(31, 162)
Me.dgvFraccionada.Name = "dgvFraccionada"
Me.dgvFraccionada.RowTemplate.Height = 18
Me.dgvFraccionada.RowTemplate.ReadOnly = True
Me.dgvFraccionada.Size = New System.Drawing.Size(816, 157)
Me.dgvFraccionada.TabIndex = 11
'
'cboEstatus
'
Me.cboEstatus.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cboEstatus.FormattingEnabled = True
Me.cboEstatus.Location = New System.Drawing.Point(134, 122)
Me.cboEstatus.Name = "cboEstatus"
Me.cboEstatus.Size = New System.Drawing.Size(215, 21)
Me.cboEstatus.TabIndex = 6
'
'lblEstatus
'
Me.lblEstatus.AutoSize = True
Me.lblEstatus.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblEstatus.ForeColor = System.Drawing.Color.MidnightBlue
Me.lblEstatus.Location = New System.Drawing.Point(28, 126)
Me.lblEstatus.Name = "lblEstatus"
Me.lblEstatus.Size = New System.Drawing.Size(49, 13)
Me.lblEstatus.TabIndex = 5
Me.lblEstatus.Text = "Estatus"
'
'lblFrac
'
Me.lblFrac.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.lblFrac.AutoSize = True
Me.lblFrac.ForeColor = System.Drawing.Color.MidnightBlue
Me.lblFrac.Location = New System.Drawing.Point(31, 339)
Me.lblFrac.Name = "lblFrac"
Me.lblFrac.Size = New System.Drawing.Size(98, 13)
Me.lblFrac.TabIndex = 14
Me.lblFrac.Text = "Total Fraccionadas"
Me.lblFrac.TextAlign = System.Drawing.ContentAlignment.TopRight
'
'lblDetFra
'
Me.lblDetFra.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.lblDetFra.AutoSize = True
Me.lblDetFra.ForeColor = System.Drawing.Color.MidnightBlue
Me.lblDetFra.Location = New System.Drawing.Point(31, 532)
Me.lblDetFra.Name = "lblDetFra"
Me.lblDetFra.Size = New System.Drawing.Size(67, 13)
Me.lblDetFra.TabIndex = 16
Me.lblDetFra.Text = "Total Detalle"
'
'txtTotFrac
'
Me.txtTotFrac.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.txtTotFrac.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.txtTotFrac.Enabled = False
Me.txtTotFrac.Location = New System.Drawing.Point(132, 339)
Me.txtTotFrac.Name = "txtTotFrac"
Me.txtTotFrac.Size = New System.Drawing.Size(38, 13)
Me.txtTotFrac.TabIndex = 15
Me.txtTotFrac.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
'
'txtTotFraccionada
'
Me.txtTotFraccionada.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.txtTotFraccionada.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.txtTotFraccionada.Enabled = False
Me.txtTotFraccionada.Location = New System.Drawing.Point(132, 532)
Me.txtTotFraccionada.Name = "txtTotFraccionada"
Me.txtTotFraccionada.Size = New System.Drawing.Size(38, 13)
Me.txtTotFraccionada.TabIndex = 17
Me.txtTotFraccionada.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
'
'Flgdetalle
'
Me.Flgdetalle.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Flgdetalle.CaptionHeight = 17
Me.Flgdetalle.GroupByCaption = "AGRUPAR"
Me.Flgdetalle.Images.Add(CType(resources.GetObject("Flgdetalle.Images"), System.Drawing.Image))
Me.Flgdetalle.Location = New System.Drawing.Point(31, 364)
Me.Flgdetalle.Name = "Flgdetalle"
Me.Flgdetalle.PreviewInfo.Location = New System.Drawing.Point(0, 0)
Me.Flgdetalle.PreviewInfo.Size = New System.Drawing.Size(0, 0)
Me.Flgdetalle.PreviewInfo.ZoomFactor = 75.0R
Me.Flgdetalle.PrintInfo.PageSettings = CType(resources.GetObject("Flgdetalle.PrintInfo.PageSettings"), System.Drawing.Printing.PageSettings)
Me.Flgdetalle.RowHeight = 15
Me.Flgdetalle.Size = New System.Drawing.Size(816, 162)
Me.Flgdetalle.TabIndex = 13
Me.Flgdetalle.Text = "Resultados"
Me.Flgdetalle.PropBag = resources.GetString("Flgdetalle.PropBag")
'
'cmbCliente
'
Me.cmbCliente.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cmbCliente.DropDownWidth = 490
Me.cmbCliente.Location = New System.Drawing.Point(134, 95)
Me.cmbCliente.Name = "cmbCliente"
Me.cmbCliente.Size = New System.Drawing.Size(368, 21)
Me.cmbCliente.TabIndex = 8
'
'Label1
'
Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, 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(558, 69)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(67, 16)
Me.Label1.TabIndex = 18
Me.Label1.Text = "Producto:"
Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
'
'cboProducto
'
Me.cboProducto.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cboProducto.FormattingEnabled = True
Me.cboProducto.Location = New System.Drawing.Point(631, 65)
Me.cboProducto.Name = "cboProducto"
Me.cboProducto.Size = New System.Drawing.Size(216, 21)
Me.cboProducto.TabIndex = 19
'
'txtCuenta
'
Me.txtCuenta.Location = New System.Drawing.Point(632, 96)
Me.txtCuenta.Name = "txtCuenta"
Me.txtCuenta.Size = New System.Drawing.Size(215, 20)
Me.txtCuenta.TabIndex = 38
'
'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(558, 97)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(48, 16)
Me.Label6.TabIndex = 39
Me.Label6.Text = "Cuenta:"
Me.Label6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
'
'btnConsulta
'
Me.btnConsulta.BackColor = System.Drawing.Color.Black
Me.btnConsulta.Cursor = System.Windows.Forms.Cursors.Hand
Me.btnConsulta.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btnConsulta.ForeColor = System.Drawing.Color.White
Me.btnConsulta.Location = New System.Drawing.Point(865, 370)
Me.btnConsulta.Name = "btnConsulta"
Me.btnConsulta.Size = New System.Drawing.Size(106, 33)
Me.btnConsulta.TabIndex = 66
Me.btnConsulta.Text = "Buscar"
Me.btnConsulta.UseCompatibleTextRendering = True
Me.btnConsulta.UseVisualStyleBackColor = False
'
'BtnLimpiar1
'
Me.BtnLimpiar1.BackColor = System.Drawing.Color.Black
Me.BtnLimpiar1.Cursor = System.Windows.Forms.Cursors.Hand
Me.BtnLimpiar1.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.BtnLimpiar1.ForeColor = System.Drawing.Color.White
Me.BtnLimpiar1.Location = New System.Drawing.Point(865, 411)
Me.BtnLimpiar1.Name = "BtnLimpiar1"
Me.BtnLimpiar1.Size = New System.Drawing.Size(106, 33)
Me.BtnLimpiar1.TabIndex = 67
Me.BtnLimpiar1.Text = "Limpiar"
Me.BtnLimpiar1.UseCompatibleTextRendering = True
Me.BtnLimpiar1.UseVisualStyleBackColor = False
'
'BtnImprimir
'
Me.BtnImprimir.BackColor = System.Drawing.Color.Black
Me.BtnImprimir.Cursor = System.Windows.Forms.Cursors.Hand
Me.BtnImprimir.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.BtnImprimir.ForeColor = System.Drawing.Color.White
Me.BtnImprimir.Location = New System.Drawing.Point(865, 452)
Me.BtnImprimir.Name = "BtnImprimir"
Me.BtnImprimir.Size = New System.Drawing.Size(106, 33)
Me.BtnImprimir.TabIndex = 68
Me.BtnImprimir.Text = "Exportar"
Me.BtnImprimir.UseCompatibleTextRendering = True
Me.BtnImprimir.UseVisualStyleBackColor = False
'
'BntSalir
'
Me.BntSalir.BackColor = System.Drawing.Color.Black
Me.BntSalir.Cursor = System.Windows.Forms.Cursors.Hand
Me.BntSalir.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.BntSalir.ForeColor = System.Drawing.Color.White
Me.BntSalir.Location = New System.Drawing.Point(865, 493)
Me.BntSalir.Name = "BntSalir"
Me.BntSalir.Size = New System.Drawing.Size(106, 33)
Me.BntSalir.TabIndex = 69
Me.BntSalir.Text = "Cerrar"
Me.BntSalir.UseCompatibleTextRendering = True
Me.BntSalir.UseVisualStyleBackColor = False
'
'panel2
'
Me.panel2.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.panel2.BackColor = System.Drawing.Color.Black
Me.panel2.Controls.Add(Me.Img_logoCabecera)
Me.panel2.Controls.Add(Me.Label17)
Me.panel2.ForeColor = System.Drawing.Color.Navy
Me.panel2.Location = New System.Drawing.Point(-3, -2)
Me.panel2.Name = "panel2"
Me.panel2.Size = New System.Drawing.Size(994, 50)
Me.panel2.TabIndex = 186
'
'Img_logoCabecera
'
Me.Img_logoCabecera.Image = Global.CLIENTE.My.Resources.Resources.blackrock_logo
Me.Img_logoCabecera.Location = New System.Drawing.Point(868, 3)
Me.Img_logoCabecera.Name = "Img_logoCabecera"
Me.Img_logoCabecera.Size = New System.Drawing.Size(117, 50)
Me.Img_logoCabecera.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage
Me.Img_logoCabecera.TabIndex = 361
Me.Img_logoCabecera.TabStop = False
'
'Label17
'
Me.Label17.AutoSize = True
Me.Label17.BackColor = System.Drawing.Color.Transparent
Me.Label17.Font = New System.Drawing.Font("Century Gothic", 15.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label17.ForeColor = System.Drawing.SystemColors.Window
Me.Label17.Location = New System.Drawing.Point(21, 14)
Me.Label17.Name = "Label17"
Me.Label17.Size = New System.Drawing.Size(236, 23)
Me.Label17.TabIndex = 2
Me.Label17.Text = "Reportes Fraccionadas"
'
'panel3
'
Me.panel3.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.panel3.BackColor = System.Drawing.Color.Black
Me.panel3.Controls.Add(Me.lblFooter)
Me.panel3.ForeColor = System.Drawing.Color.Navy
Me.panel3.Location = New System.Drawing.Point(-3, 564)
Me.panel3.Name = "panel3"
Me.panel3.Size = New System.Drawing.Size(994, 34)
Me.panel3.TabIndex = 405
'
'lblFooter
'
Me.lblFooter.AutoSize = True
Me.lblFooter.BackColor = System.Drawing.Color.Transparent
Me.lblFooter.Font = New System.Drawing.Font("Century Gothic", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblFooter.ForeColor = System.Drawing.SystemColors.Window
Me.lblFooter.Location = New System.Drawing.Point(932, 3)
Me.lblFooter.Name = "lblFooter"
Me.lblFooter.Size = New System.Drawing.Size(42, 17)
Me.lblFooter.TabIndex = 2
Me.lblFooter.Text = "Minds"
'
'FRMFraccionadas
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.BackColor = System.Drawing.Color.White
Me.ClientSize = New System.Drawing.Size(983, 593)
Me.Controls.Add(Me.panel3)
Me.Controls.Add(Me.panel2)
Me.Controls.Add(Me.BntSalir)
Me.Controls.Add(Me.BtnImprimir)
Me.Controls.Add(Me.BtnLimpiar1)
Me.Controls.Add(Me.btnConsulta)
Me.Controls.Add(Me.Label6)
Me.Controls.Add(Me.txtCuenta)
Me.Controls.Add(Me.cboProducto)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.cmbCliente)
Me.Controls.Add(Me.Flgdetalle)
Me.Controls.Add(Me.txtTotFraccionada)
Me.Controls.Add(Me.txtTotFrac)
Me.Controls.Add(Me.lblDetFra)
Me.Controls.Add(Me.lblFrac)
Me.Controls.Add(Me.lblEstatus)
Me.Controls.Add(Me.cboEstatus)
Me.Controls.Add(Me.dgvFraccionada)
Me.Controls.Add(Me.dtpFechaFinal)
Me.Controls.Add(Me.dtpFechaInicial)
Me.Controls.Add(Me.Label4)
Me.Controls.Add(Me.Label3)
Me.Controls.Add(Me.Label2)
Me.ForeColor = System.Drawing.Color.MidnightBlue
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Name = "FRMFraccionadas"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "Reporte Fraccionadas"
CType(Me.dgvFraccionada, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.Flgdetalle, System.ComponentModel.ISupportInitialize).EndInit()
Me.panel2.ResumeLayout(False)
Me.panel2.PerformLayout()
CType(Me.Img_logoCabecera, System.ComponentModel.ISupportInitialize).EndInit()
Me.panel3.ResumeLayout(False)
Me.panel3.PerformLayout()
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)
Try
Select Case e.Button.Text
Case "Buscar"
sbBuscar()
Case "Exportar"
'MessageBox.Show("Realiza una consulta ", "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Information)
sbExportar()
Case "Limpiar"
'sbIniciaForma()
txtTotFraccionada.Text = ""
txtTotFrac.Text = ""
'cboProducto.SelectedIndex = -1
'cMBCliente.SelectedIndex = -1
cboProducto.SelectedIndex = -1
txtCuenta.Text = ""
cboEstatus.SelectedIndex = -1
cmbCliente.SelectedIndex = -1
cmbCliente.SelectedIndex = -1
'dtgFraccionadas.DataSource = Nothing
limpiando = True
dgvFraccionada.Columns.Clear()
Flgdetalle.DataSource = Nothing
limpiando = False
Case "Salir"
Me.Close()
End Select
Catch ex As Exception
MessageBox.Show("Error al Buscar datos", "Minds", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
End Try
End Sub
Private Sub RepFraccionadas_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Click
'Dim strsql As String
'Dim clcmj1 As New clsComplejo
'strsql = fsDefineSQL("spConFraccionadasCredito", 2)
'clcmj1.fdtDataSetTabla(strsql)
'Me.Flgdetalle.SetDataBinding(clcmj1.ds, "Tabla") 'Llena el grid
''FormatGrid(Me.Flgdetalle)
'txtTotFraccionada.Text = clcmj1.ds.Tables(0).Rows.Count
'Me.Flgdetalle.AutoSizeCols()
End Sub
Private Sub RepFraccionadas_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.dgvFraccionada.RowsDefaultCellStyle.BackColor = Color.White
Me.dgvFraccionada.AlternatingRowsDefaultCellStyle.BackColor = Color.LightSteelBlue
Dim clCmpCombo As clsComplejo = New clsComplejo
clCmpCombo = New clsComplejo
'LLENO COMBO de estatus de transaccion
clCmpCombo.sbLlenaCombo("spConProducto", Me.cboProducto)
cboProducto.SelectedIndex = -1
clCmpCombo = Nothing
clCmpCombo = New clsComplejo
'clCmpCombo.sbLlenaCombo("spLlenaComboEstatusTransaccionesRelevantesFraccionadas", Me.cboEstatus)
clCmpCombo.sbLlenaCombo("spLlenaComboEstatusTransacciones", Me.cboEstatus)
'Me.cboEstatus.Text = clsVaribles.Id_EstatusTransaccion
cboEstatus.SelectedIndex = -1
Cliente.sbLlenaCombo("spLlenaComboCliente 1 ", Me.cmbCliente)
'spLlenaComboCliente
cmbCliente.SelectedIndex = -1
'aName = _
' System.Reflection.Assembly.GetExecutingAssembly. _
' GetModules()(0).FullyQualifiedName
'aPath = System.IO.Path.GetDirectoryName(aName)
'FILENAME = aPath & "\" & FILENAME
End Sub
Private Sub sbIniciaForma()
'clCmpPro.sbLlenaCombo("spLlenaComboProductoAlias", Me.cboProducto)
End Sub
Public Sub sbBuscar()
Try
Dim clcmj1 As New clsComplejo
Dim varGlobales As New clsVaribles
Dim strsql As String = ""
Dim listaParametros As New List(Of String)
If Me.cboProducto.SelectedIndex = -1 Then
MessageBox.Show("Es necesario Seleccionar un Producto, favor de Validar", "Minds", MessageBoxButtons.OK, MessageBoxIcon.Information)
cboProducto.Focus()
Exit Sub
End If
dgvFraccionada.Columns.Clear()
listaParametros.Add(IIf(cboProducto.SelectedValue <> Nothing, cboProducto.SelectedValue, "NULL"))
listaParametros.Add(IIf(cmbCliente.SelectedValue <> Nothing, cmbCliente.SelectedValue, "NULL"))
listaParametros.Add(IIf(txtCuenta.Text.Trim <> "", "'" & txtCuenta.Text.Trim & "'", "NULL"))
listaParametros.Add(IIf(cboEstatus.SelectedValue <> Nothing, cboEstatus.SelectedValue, "NULL"))
listaParametros.Add("'" & dtpFechaInicial.Value.ToString("yyyy/MM/dd") & "'")
listaParametros.Add("'" & dtpFechaFinal.Value.ToString("yyyy/MM/dd") & "'")
Select Case cboProducto.Text
Case "BANCA INTERNACIONAL"
strsql = "sp_ReportFraccionadasBI " & String.Join(",", listaParametros.ToArray())
Case "BANCA TRADICIONAL"
strsql = "sp_ReportFraccionadasBT " & String.Join(",", listaParametros.ToArray())
Case "CREDITO"
strsql = "sp_ReportFraccionadasCDTO " & String.Join(",", listaParametros.ToArray())
Case "DIVISAS"
strsql = "sp_ReportFraccionadasDIVISAS " & String.Join(",", listaParametros.ToArray())
Case "MERCADO DE DINERO" '"MERCADO DE CAPITALES"
strsql = "sp_ReportFraccionadasMCAPITALES " & String.Join(",", listaParametros.ToArray())
Case Else
Exit Sub
End Select
'strsql = fsDefineSQL("spConFraccionadasCredito", 3)
varGlobales.varProceso = strsql
clcmj1.fdtDataSetTabla(strsql)
If clcmj1.ds.Tables(0).Rows.Count > 0 Then
txtTotFrac.Text = clcmj1.ds.Tables(0).Rows.Count
Me.dgvFraccionada.DataSource() = clcmj1.ds.Tables(0)
'this.dataGridView1.Columns["CustomerID"].Visible = false
Me.dgvFraccionada.Columns(7).DefaultCellStyle.Format = "c2"
'FormatGrid(Me.Flgdetalle)
dgvFraccionada.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells
For Each col As DataGridViewColumn In dgvFraccionada.Columns
If InStr(col.Name, "ID") = 1 Then
col.Visible = False
End If
Next
Else
txtTotFrac.Text = 0
txtTotFraccionada.Text = 0
'Me.Flgdetalle.DataSource = Nothing
'Flgdetalle.DataSource = Nothing
'Me.dgvFraccionada.DataSource = Nothing
'Flgdetalle.DataSource = Nothing
dgvFraccionada.Columns.Clear()
Flgdetalle.ClearFields()
End If
Catch ex As Exception
MsgBox(ex.Message)
Throw ex
End Try
'clCmpDev.sbLlenaDevExpress(lsSQL, Me.dveFraccionadas)
End Sub
Public Sub sbExportar()
Dim lsSQL As String
Dim clExc As New clsExcel
'Try
' Dim oApp As New Excel.Application()
' oApp.Visible = True
' oApp.UserControl = True
' Dim oldCI As System.Globalization.CultureInfo = _
' System.Threading.Thread.CurrentThread.CurrentCulture
' System.Threading.Thread.CurrentThread.CurrentCulture = _
' New System.Globalization.CultureInfo("en-US")
'If ChkExportar.Checked = True Then
' Dim clcmj1 As New clsComplejo
' Dim strsql As String = ""
' strsql = fsDefineSQL("spConFraccionadas", 3)
' clcmj1.fdtDataSetTabla(strsql)
' Me.Flgdetalle.SetDataBinding(clcmj1.ds, "Tabla") 'Llena el grid
' FormatGrid(Me.Flgdetalle)
' Me.Flgdetalle.AutoSizeCols()
'End If
' Me.Flgdetalle.SaveExcel(FILENAME, Me.Flgdetalle.Name, FileFlags.IncludeFixedCells)
' m_Excel = New Excel.Application
' m_Excel.Workbooks.Open(FILENAME)
' m_Excel.Visible = True
' System.Threading.Thread.CurrentThread.CurrentCulture = oldCI
'Catch EX As Exception
' MessageBox.Show(EX.Message)
' End Try
Dim fs1, f As Object
Try
'Dim ruta As String
'ruta = System.IO.Path.GetTempPath()
'Cursor = System.Windows.Forms.Cursors.WaitCursor
'If Dir(ruta & "Reporte.xls") = "" Then
'Else
' fs1 = CreateObject("Scripting.FileSystemObject")
' f = fs1.GetFile(ruta & "Reporte.xls")
' f.Delete()
'End If
'Me.Flgdetalle.ExportToDelimitedFile(ruta & "Reporte.xls", C1.Win.C1TrueDBGrid.RowSelectorEnum.AllRows, vbTab, "", "", True, "Unicode")
'System.Diagnostics.Process.Start(ruta & "Reporte.xls")
Exportar()
Catch ex As Exception
MessageBox.Show(ex.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
Cursor = System.Windows.Forms.Cursors.Default
End Sub
Private Sub Exportar()
If Flgdetalle.DataSource Is Nothing Then
MessageBox.Show("Presione primero el bot<6F>n de consultar y despues el boton de exportar.", "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Information)
Return
End If
''Preparo la tabla a exportar
''hago una copia por valor de la tabla
Dim copyDS As DataSet = Flgdetalle.DataSource.Copy() ''clCmp.ds.Copy()
If copyDS.Tables(0) Is Nothing Then
MessageBox.Show("Presione primero el bot<6F>n de consultar y despues el boton de exportar.", "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Information)
Return
End If
If copyDS.Tables(0).Rows.Count = 0 Then
MessageBox.Show("No existen datos para exportar", "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Information)
Return
End If
Dim Resul As DialogResult
Resul = MessageBox.Show("Este proceso puede tardar varios minutos, <20>Deseas continuar? ", "MINDS", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If Resul = DialogResult.No Then
Return
End If
''Quito las columnas ocultas del grid.
Dim i As Integer
For i = 0 To Flgdetalle.Columns.Count - 1
If Me.Flgdetalle.Splits(0).DisplayColumns(i).Visible = False Then
Dim j As Integer
For j = 0 To copyDS.Tables(0).Columns.Count - 1
If Me.Flgdetalle.Splits(0).DisplayColumns(i).Name = copyDS.Tables(0).Columns.Item(j).ColumnName Then
copyDS.Tables(0).Columns.Remove(copyDS.Tables(0).Columns.Item(j).ColumnName)
Exit For
End If
Next
End If
Next
Try
Dim sError As String = ""
''Inicia Exportacion
'Creo una instancia de la clase aExcel
Dim clsExcel As aExcel = New aExcel
'Obtenemos el nombre o el titulo del form
clsExcel.Titulo = "Rep. Oper. Inusuales Frac."
'Utilizo la funcion ExportDataset de la clase aExcel
clsExcel.ExportDataset(copyDS) 'Asigno el dataset a exportar
Catch ex As Exception
MessageBox.Show(ex.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
Cursor = System.Windows.Forms.Cursors.Default
End Sub
Private Function fsDefineSQL(ByVal SP As String, ByVal opcion As Integer) As String
Dim lsSQL As String
Dim lsIni As String
Dim lsFin As String
Dim lsCliente As String
Dim lsCuenta As String
Dim lsEstatus As String
Dim cls As clsComplejo
cls = New clsComplejo
Dim clsvariables As New clsVaribles
'Dim fechas As New clsvariables
lsIni = cls.ObtenFecha(Me.dtpFechaInicial.Value.Date, "YYYYMMDD")
lsIni = "'" & lsIni & "'"
lsFin = cls.ObtenFecha(Me.dtpFechaFinal.Value.Date, "YYYYMMDD")
If opcion = 1 Then
lsFin = "'" & lsFin & "',1,'0'"
ElseIf opcion = 2 Then
'dgvFraccionada.Columns(1)
lsFin = "'" & lsFin & "',2,'" & gsidtran & "',"
Else
lsFin = "'" & lsFin & "',3,''," ' & gsidtran & "',"
End If
If cboEstatus.SelectedIndex <> -1 Then
lsEstatus = CStr(cboEstatus.SelectedValue)
lsEstatus = "'" & lsEstatus & "'"
Else
lsEstatus = "''"
End If
If cmbCliente.SelectedIndex <> -1 Then
lsCliente = CStr(cmbCliente.SelectedValue)
lsCliente = "'" & lsCliente & "'"
Else
lsCliente = "''"
End If
If txtCuenta.Text.Trim <> "" Then
lsCuenta = txtCuenta.Text.Trim
lsCuenta = "'" & lsCuenta & "'"
Else
lsCuenta = "''"
End If
lsSQL = ""
lsSQL = lsSQL & SP & " "
lsSQL = lsSQL & lsIni & ", "
lsSQL = lsSQL & lsFin
lsSQL = lsSQL & lsCliente & ", "
lsSQL = lsSQL & lsCuenta & ", "
lsSQL = lsSQL & lsEstatus
'clsVaribles.varFecIni = lsIni
'clsvariables.varFecFin = Mid(lsFin, 1, 10) & ",2"
Return lsSQL
End Function
Private Sub dtgFraccionadas_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs)
'Dim clcmj1 As New clsComplejo
'Dim Classcom As New clsComplejo
'clcmj1 = New clsComplejo
'gsidtran = "0"
'With dtgFraccionadas
' gsidtran = CStr(.Item(.CurrentRowIndex, 0))
'End With
'Dim strsql As String = ""
'strsql = fsDefineSQL("spConFraccionadasCredito", 2)
'clcmj1.fdtDataSetTabla(strsql)
'Me.Flgdetalle.SetDataBinding(clcmj1.ds, "Tabla") 'Llena el grid
'--------------
'FormatGrid(Me.Flgdetalle)
'Me.Flgdetalle.AutoSizeCols()
End Sub
'Private Sub FormatGrid(ByVal grid As C1.Win.C1FlexGrid.C1FlexGrid)
' 'grid.Cols(0).Width = 20
' 'Dim s As CellStyleCollection = grid.Styles
' 's.Normal.Border.Color = SystemColors.InactiveBorder
' 's.Highlight.Clear()
' 's.Highlight.ForeColor = s.Normal.ForeColor
' 's.Highlight.BackColor = Color.FromArgb(238, 239, 247)
'End Sub
'Private Sub cboCuenta_DropDown(ByVal sender As Object, ByVal e As System.EventArgs)
' Try
' If Me.cmbCliente.Text = "" Then
' Me.cmbCliente.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(cmbCliente.SelectedValue)
' Cuenta.sbLlenaCombo1(cad, Me.cmbCuenta)
' 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)
'Limpia el combo de cuenta al seleccionar otro elemento en el combo de cliente
Try
BanCuenta = False
Catch ex As Exception
End Try
Dim Intcuenta As String
End Sub
Private Sub cmbCliente_DropDown(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbCliente.DropDown
'Try
' If BanCliente = False Then
' 'Lleno combo de clientes con el procedimiento alamcenado "spLlenaComboCliente"
' Cliente.sbLlenaCombo("spLlenaComboCliente", Me.cmbCliente)
' End If
' BanCliente = True
'Catch ex As Exception
'End Try
End Sub
Private Sub dgvFraccionada_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs)
Dim clcmj1 As New clsComplejo
clcmj1 = New clsComplejo
'Dim txtCuenta As String
Try
If dgvFraccionada.Rows.Count <= 0 Then
Exit Sub
End If
' aqui se condiciona si entra a calificar o ver el detalle
gsidtran = dgvFraccionada.Item(1, dgvFraccionada.CurrentRow.Index).Value
clsVaribles.No_Referencia = dgvFraccionada.Item(2, dgvFraccionada.CurrentRow.Index).Value
'clsVaribles.no_cuenta = dgvFraccionada.Item(5, dgvFraccionada.CurrentRow.Index).Value
clsVaribles.Id_EstatusTransaccion = dgvFraccionada.Item(6, dgvFraccionada.CurrentRow.Index).Value
' con este parametro trae las operaciones del producto y sirve cuando hay mas de uno
'txtCuenta = dgvFraccionada.Item(5, dgvFraccionada.CurrentRow.Index).Value
Dim strsql As String = ""
'Dim result1 As DialogResult = MessageBox.Show("Deseas Calificar la Fraccionada ?", _
'"Important Question", _
'MessageBoxButtons.YesNo)
'If result1 = Windows.Forms.DialogResult.Yes Then
'Dim Detalles As DetallesFracc = New DetallesFracc
'DetallesFracc.Text = "Califica Fraccionadas"
'DetallesFracc.ShowDialog()
sbBuscar()
'Dim clsVar As New clsVaribles
'Dim clcmj1 As New clsComplejo
'Dim strsql As String = ""
'strsql = "spConFraccionadas '', '', 3, '" & clsVAr.Id_Transaccion & "', ''"
'clcmj1.fdtDataSetTabla(clsVar.varProceso)
'If clcmj1.ds.Tables(0).Rows.Count > 0 Then
'txtTotFrac.Text = clcmj1.ds.Tables(0).Rows.Count
'Me.dgvFraccionada.DataSource = clcmj1.ds.Tables(0)
'FormatGrid(Me.Flgdetalle)
'dgvFraccionada.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells
'Else
'Me.dgvFraccionada.DataSource = Nothing
'End If
'Else
'End If
Catch ex As Exception
MessageBox.Show(ex.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub
'Private Sub dgvFraccionada_CellContentClick(sender As System.Object, e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgvFraccionada.CellContentClick
' Dim strsql As String
' Dim strValId As String
' Dim clcmj1 As New clsComplejo
' strValId = dgvFraccionada.Item(1, dgvFraccionada.CurrentCell.RowIndex).Value.ToString()
' 'strValId = dgvFraccionada.CurrentCell.RowIndex
' strsql = "spConFraccionadas '20120501', '20121129',2,'" & strValId & "','','',''"
' clcmj1.fdtDataSetTabla(strsql)
' Me.Flgdetalle.SetDataBinding(clcmj1.ds, "Tabla") 'Llena el grid
' FormatGrid(Me.Flgdetalle)
' txtTotFraccionada.Text = clcmj1.ds.Tables(0).Rows.Count
' Me.Flgdetalle.AutoSizeCols()
'End Sub
Private Function llenarDetalle() As Boolean
Dim strsql As String
Dim strValId As String
Dim clcmj1 As New clsComplejo
Dim ds As DataSet
Try
If Not dgvFraccionada.CurrentCell Is Nothing Then
strValId = dgvFraccionada.Item(0, dgvFraccionada.CurrentCell.RowIndex).Value.ToString()
Select Case cboProducto.SelectedValue
Case 1
strsql = "sp_ReportFraccionadasBT_Detalle "
Case 2
strsql = "sp_ReportFraccionadasMCAP_Detalle "
Case 7
strsql = "sp_ReportFraccionadasBI_Detalle "
Case 8
strsql = "sp_ReportFraccionadasCDTO_Detalle "
Case 11
strsql = "sp_ReportFraccionadasDIV_Detalle "
End Select
strsql += strValId
ds = clcmj1.fdtDataSetTabla(strsql)
clcmj1 = Nothing
If ds.Tables(0).Rows.Count > 0 Then
Me.Flgdetalle.SetDataBinding(ds, "Tabla") 'Llena el grid
'Me.Flgdetalle.Columns(7).NumberFormat = "Currency"
'Me.Flgdetalle.Columns(8).NumberFormat = "Currency"
txtTotFraccionada.Text = ds.Tables(0).Rows.Count
strVariables.Nombre = dgvFraccionada.Item(2, dgvFraccionada.CurrentCell.RowIndex).Value.ToString()
strVariables.Id_Transaccion = dgvFraccionada.Item(0, dgvFraccionada.CurrentCell.RowIndex).Value.ToString()
End If
End If
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Function
Private Sub dgvFraccionada_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles dgvFraccionada.SelectionChanged
If Not limpiando Then llenarDetalle()
End Sub
Private Sub BntSalir_Click(sender As Object, e As EventArgs) Handles BntSalir.Click
Me.Close()
End Sub
Private Sub BtnLimpiar1_Click(sender As Object, e As EventArgs) Handles BtnLimpiar1.Click
'sbIniciaForma()
txtTotFraccionada.Text = ""
txtTotFrac.Text = ""
'cboProducto.SelectedIndex = -1
'cMBCliente.SelectedIndex = -1
cboProducto.SelectedIndex = -1
txtCuenta.Text = ""
cboEstatus.SelectedIndex = -1
cmbCliente.SelectedIndex = -1
cmbCliente.SelectedIndex = -1
'dtgFraccionadas.DataSource = Nothing
limpiando = True
dgvFraccionada.Columns.Clear()
Flgdetalle.DataSource = Nothing
limpiando = False
End Sub
Private Sub Img_logoCabecera_Click(sender As Object, e As EventArgs) Handles Img_logoCabecera.Click
End Sub
Private Sub cmbCliente_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbCliente.SelectedIndexChanged
Try
BanCuenta = False
Catch ex As Exception
End Try
Dim Intcuenta As String
End Sub
Private Sub dgvFraccionada_RowHeaderMouseDoubleClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles dgvFraccionada.RowHeaderMouseDoubleClick
Try
Dim FilaActual As Integer
Dim IdTranMax As Integer
Dim Classcom As New clsComplejo
FilaActual = e.RowIndex
IdTranMax = dgvFraccionada.Rows(FilaActual).Cells(0).Value
'Classcom.fdtDataSet("spConsultaValoresFraccionadasCredito " & IdTranMax)
clsVaribles.ReportadoPor = "FRACCIONADA"
clsVaribles.Nombre = dgvFraccionada.Item("NOMBREORAZONS", FilaActual).Value.ToString()
clsVaribles.No_Referencia = dgvFraccionada.Item("NUMEROREFERENCIA", FilaActual).Value.ToString()
clsVaribles.Id_Transaccion = dgvFraccionada.Item("IDTRANSACCION", FilaActual).Value.ToString()
clsVaribles.Id_Producto = cboProducto.SelectedValue
clsVaribles.Id_SubProducto = dgvFraccionada.Item("IDSUBPRODUCTO", FilaActual).Value.ToString()
clsVaribles.Id_Patron = 3 'Classcom.ds.Tables(0).Rows(0).Item(5).ToString()
clsVaribles.Id_EstatusTransaccion = dgvFraccionada.Item("idestatusalarma", FilaActual).Value.ToString()
Dim frmDetalles As Detalles = New Detalles
frmDetalles.Text = "Detalle Operaci<63>n"
frmDetalles.chk24H.Visible = False
frmDetalles.ShowDialog()
'refrescar()
sbBuscar()
Catch ex As Exception
MessageBox.Show(ex.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub
Private Sub btnConsulta_Click(sender As Object, e As EventArgs) Handles btnConsulta.Click
sbBuscar()
End Sub
Private Sub BtnImprimir_Click(sender As Object, e As EventArgs) Handles BtnImprimir.Click
sbExportar()
End Sub
End Class