Public Class ClientesBol 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 lblOrganismo As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents lblPorcentaje As System.Windows.Forms.Label Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox Friend WithEvents lblNombreFigura As System.Windows.Forms.Label Friend WithEvents txtCliente As System.Windows.Forms.TextBox Friend WithEvents cmbPorcentaje As System.Windows.Forms.ComboBox Friend WithEvents cmbPais As System.Windows.Forms.ComboBox Friend WithEvents cmbOrganismo As System.Windows.Forms.ComboBox Friend WithEvents ImageList1 As System.Windows.Forms.ImageList Friend WithEvents lblfecha As System.Windows.Forms.Label Friend WithEvents lblStatus As System.Windows.Forms.Label Friend WithEvents cmbStatus As System.Windows.Forms.ComboBox Friend WithEvents dataGrid1 As C1.Win.C1TrueDBGrid.C1TrueDBGrid Friend WithEvents btnCerrar As System.Windows.Forms.Button Friend WithEvents BTExportar As System.Windows.Forms.Button Friend WithEvents BTLimpiar As System.Windows.Forms.Button Friend WithEvents BTConsultar As System.Windows.Forms.Button Private WithEvents panel2 As Panel Private WithEvents Img_logoCabecera As PictureBox Friend WithEvents label4 As Label Friend WithEvents Label1 As Label Friend WithEvents Panel1 As Panel Friend WithEvents dtpFechaFinal As DateTimePicker Friend WithEvents Label5 As Label Friend WithEvents dtpFechaInicio As DateTimePicker Friend WithEvents Label3 As Label Friend WithEvents Label7 As Label Friend WithEvents Label6 As Label Friend WithEvents cboListaProveedor As ComboBox Friend WithEvents lblResultados As System.Windows.Forms.Label Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(ClientesBol)) Me.GroupBox1 = New System.Windows.Forms.GroupBox() Me.dtpFechaFinal = New System.Windows.Forms.DateTimePicker() Me.Label5 = New System.Windows.Forms.Label() Me.dtpFechaInicio = New System.Windows.Forms.DateTimePicker() Me.Label3 = New System.Windows.Forms.Label() Me.lblStatus = New System.Windows.Forms.Label() Me.cmbStatus = New System.Windows.Forms.ComboBox() Me.lblfecha = New System.Windows.Forms.Label() Me.txtCliente = New System.Windows.Forms.TextBox() Me.cmbPorcentaje = New System.Windows.Forms.ComboBox() Me.lblPorcentaje = New System.Windows.Forms.Label() Me.cmbOrganismo = New System.Windows.Forms.ComboBox() Me.lblOrganismo = New System.Windows.Forms.Label() Me.lblNombreFigura = New System.Windows.Forms.Label() Me.cmbPais = New System.Windows.Forms.ComboBox() Me.Label2 = New System.Windows.Forms.Label() Me.GroupBox2 = New System.Windows.Forms.GroupBox() Me.dataGrid1 = New C1.Win.C1TrueDBGrid.C1TrueDBGrid() Me.lblResultados = New System.Windows.Forms.Label() Me.ImageList1 = New System.Windows.Forms.ImageList(Me.components) Me.btnCerrar = New System.Windows.Forms.Button() Me.BTExportar = New System.Windows.Forms.Button() Me.BTLimpiar = New System.Windows.Forms.Button() Me.BTConsultar = New System.Windows.Forms.Button() Me.panel2 = New System.Windows.Forms.Panel() Me.Img_logoCabecera = New System.Windows.Forms.PictureBox() Me.label4 = New System.Windows.Forms.Label() Me.Label1 = New System.Windows.Forms.Label() Me.Panel1 = New System.Windows.Forms.Panel() Me.Label6 = New System.Windows.Forms.Label() Me.Label7 = New System.Windows.Forms.Label() Me.cboListaProveedor = New System.Windows.Forms.ComboBox() Me.GroupBox1.SuspendLayout() Me.GroupBox2.SuspendLayout() CType(Me.dataGrid1, System.ComponentModel.ISupportInitialize).BeginInit() Me.panel2.SuspendLayout() CType(Me.Img_logoCabecera, System.ComponentModel.ISupportInitialize).BeginInit() Me.Panel1.SuspendLayout() Me.SuspendLayout() ' 'GroupBox1 ' Me.GroupBox1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.GroupBox1.Controls.Add(Me.cboListaProveedor) Me.GroupBox1.Controls.Add(Me.dtpFechaFinal) Me.GroupBox1.Controls.Add(Me.Label5) Me.GroupBox1.Controls.Add(Me.dtpFechaInicio) Me.GroupBox1.Controls.Add(Me.Label3) Me.GroupBox1.Controls.Add(Me.lblStatus) Me.GroupBox1.Controls.Add(Me.cmbStatus) Me.GroupBox1.Controls.Add(Me.lblfecha) Me.GroupBox1.Controls.Add(Me.txtCliente) Me.GroupBox1.Controls.Add(Me.cmbPorcentaje) Me.GroupBox1.Controls.Add(Me.Label7) Me.GroupBox1.Controls.Add(Me.Label6) Me.GroupBox1.Controls.Add(Me.lblPorcentaje) Me.GroupBox1.Controls.Add(Me.cmbOrganismo) Me.GroupBox1.Controls.Add(Me.lblOrganismo) Me.GroupBox1.Controls.Add(Me.lblNombreFigura) Me.GroupBox1.Location = New System.Drawing.Point(12, 54) Me.GroupBox1.Name = "GroupBox1" Me.GroupBox1.Size = New System.Drawing.Size(879, 100) Me.GroupBox1.TabIndex = 0 Me.GroupBox1.TabStop = False Me.GroupBox1.Text = "Parámetros de búsqueda" ' 'dtpFechaFinal ' Me.dtpFechaFinal.Format = System.Windows.Forms.DateTimePickerFormat.[Short] Me.dtpFechaFinal.Location = New System.Drawing.Point(288, 23) Me.dtpFechaFinal.Name = "dtpFechaFinal" Me.dtpFechaFinal.Size = New System.Drawing.Size(94, 20) Me.dtpFechaFinal.TabIndex = 11 ' 'Label5 ' Me.Label5.AutoSize = True Me.Label5.Location = New System.Drawing.Point(216, 26) Me.Label5.Name = "Label5" Me.Label5.Size = New System.Drawing.Size(62, 13) Me.Label5.TabIndex = 10 Me.Label5.Text = "Fecha Final" ' 'dtpFechaInicio ' Me.dtpFechaInicio.Format = System.Windows.Forms.DateTimePickerFormat.[Short] Me.dtpFechaInicio.Location = New System.Drawing.Point(85, 23) Me.dtpFechaInicio.Name = "dtpFechaInicio" Me.dtpFechaInicio.Size = New System.Drawing.Size(94, 20) Me.dtpFechaInicio.TabIndex = 11 ' 'Label3 ' Me.Label3.AutoSize = True Me.Label3.Location = New System.Drawing.Point(13, 26) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(65, 13) Me.Label3.TabIndex = 10 Me.Label3.Text = "Fecha Inicio" ' 'lblStatus ' Me.lblStatus.AutoSize = True Me.lblStatus.ForeColor = System.Drawing.Color.MidnightBlue Me.lblStatus.Location = New System.Drawing.Point(188, 52) Me.lblStatus.Name = "lblStatus" Me.lblStatus.Size = New System.Drawing.Size(42, 13) Me.lblStatus.TabIndex = 9 Me.lblStatus.Text = "Estatus" ' 'cmbStatus ' Me.cmbStatus.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList Me.cmbStatus.FormattingEnabled = True Me.cmbStatus.Location = New System.Drawing.Point(191, 67) Me.cmbStatus.Name = "cmbStatus" Me.cmbStatus.Size = New System.Drawing.Size(191, 21) Me.cmbStatus.TabIndex = 8 ' 'lblfecha ' Me.lblfecha.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.lblfecha.AutoSize = True Me.lblfecha.ForeColor = System.Drawing.Color.MidnightBlue Me.lblfecha.Location = New System.Drawing.Point(881, 76) Me.lblfecha.Name = "lblfecha" Me.lblfecha.Size = New System.Drawing.Size(39, 13) Me.lblfecha.TabIndex = 16 Me.lblfecha.Text = "Label4" Me.lblfecha.Visible = False ' 'txtCliente ' Me.txtCliente.Location = New System.Drawing.Point(443, 24) Me.txtCliente.Name = "txtCliente" Me.txtCliente.Size = New System.Drawing.Size(430, 20) Me.txtCliente.TabIndex = 6 ' 'cmbPorcentaje ' Me.cmbPorcentaje.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList Me.cmbPorcentaje.Location = New System.Drawing.Point(13, 68) Me.cmbPorcentaje.Name = "cmbPorcentaje" Me.cmbPorcentaje.Size = New System.Drawing.Size(166, 21) Me.cmbPorcentaje.TabIndex = 5 ' 'lblPorcentaje ' Me.lblPorcentaje.AutoSize = True Me.lblPorcentaje.ForeColor = System.Drawing.Color.MidnightBlue Me.lblPorcentaje.Location = New System.Drawing.Point(10, 52) Me.lblPorcentaje.Name = "lblPorcentaje" Me.lblPorcentaje.Size = New System.Drawing.Size(58, 13) Me.lblPorcentaje.TabIndex = 4 Me.lblPorcentaje.Text = "Porcentaje" ' 'cmbOrganismo ' Me.cmbOrganismo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList Me.cmbOrganismo.Location = New System.Drawing.Point(395, 68) Me.cmbOrganismo.Name = "cmbOrganismo" Me.cmbOrganismo.Size = New System.Drawing.Size(211, 21) Me.cmbOrganismo.TabIndex = 1 ' 'lblOrganismo ' Me.lblOrganismo.ForeColor = System.Drawing.Color.MidnightBlue Me.lblOrganismo.Location = New System.Drawing.Point(783, 23) Me.lblOrganismo.Name = "lblOrganismo" Me.lblOrganismo.Size = New System.Drawing.Size(62, 16) Me.lblOrganismo.TabIndex = 0 Me.lblOrganismo.Text = "Organismo" Me.lblOrganismo.Visible = False ' 'lblNombreFigura ' Me.lblNombreFigura.AutoSize = True Me.lblNombreFigura.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.lblNombreFigura.ForeColor = System.Drawing.Color.MidnightBlue Me.lblNombreFigura.Location = New System.Drawing.Point(392, 26) Me.lblNombreFigura.Name = "lblNombreFigura" Me.lblNombreFigura.Size = New System.Drawing.Size(49, 16) Me.lblNombreFigura.TabIndex = 7 Me.lblNombreFigura.Text = "Cliente" Me.lblNombreFigura.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'cmbPais ' Me.cmbPais.Location = New System.Drawing.Point(836, 82) Me.cmbPais.Name = "cmbPais" Me.cmbPais.Size = New System.Drawing.Size(122, 21) Me.cmbPais.TabIndex = 3 Me.cmbPais.Visible = False ' 'Label2 ' Me.Label2.AutoSize = True Me.Label2.ForeColor = System.Drawing.Color.MidnightBlue Me.Label2.Location = New System.Drawing.Point(801, 85) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(29, 13) Me.Label2.TabIndex = 2 Me.Label2.Text = "País" Me.Label2.Visible = False ' 'GroupBox2 ' Me.GroupBox2.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ Or System.Windows.Forms.AnchorStyles.Left) _ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.GroupBox2.Controls.Add(Me.dataGrid1) Me.GroupBox2.Controls.Add(Me.lblResultados) Me.GroupBox2.Location = New System.Drawing.Point(12, 159) Me.GroupBox2.Name = "GroupBox2" Me.GroupBox2.Size = New System.Drawing.Size(879, 288) Me.GroupBox2.TabIndex = 1 Me.GroupBox2.TabStop = False Me.GroupBox2.Text = "Resultados" ' 'dataGrid1 ' Me.dataGrid1.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ Or System.Windows.Forms.AnchorStyles.Left) _ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.dataGrid1.CaptionHeight = 17 Me.dataGrid1.FetchRowStyles = True Me.dataGrid1.FilterBar = True Me.dataGrid1.GroupByCaption = "AGRUPAR" Me.dataGrid1.Images.Add(CType(resources.GetObject("dataGrid1.Images"), System.Drawing.Image)) Me.dataGrid1.Location = New System.Drawing.Point(9, 21) Me.dataGrid1.Name = "dataGrid1" Me.dataGrid1.PreviewInfo.Location = New System.Drawing.Point(0, 0) Me.dataGrid1.PreviewInfo.Size = New System.Drawing.Size(0, 0) Me.dataGrid1.PreviewInfo.ZoomFactor = 75.0R Me.dataGrid1.PrintInfo.PageSettings = CType(resources.GetObject("dataGrid1.PrintInfo.PageSettings"), System.Drawing.Printing.PageSettings) Me.dataGrid1.RowHeight = 15 Me.dataGrid1.Size = New System.Drawing.Size(864, 260) Me.dataGrid1.TabIndex = 61 Me.dataGrid1.Text = "C1TrueDBGrid1" Me.dataGrid1.PropBag = resources.GetString("dataGrid1.PropBag") ' 'lblResultados ' Me.lblResultados.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) Me.lblResultados.Location = New System.Drawing.Point(6, 269) Me.lblResultados.Name = "lblResultados" Me.lblResultados.Size = New System.Drawing.Size(134, 12) Me.lblResultados.TabIndex = 2 Me.lblResultados.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'ImageList1 ' Me.ImageList1.ImageStream = CType(resources.GetObject("ImageList1.ImageStream"), System.Windows.Forms.ImageListStreamer) Me.ImageList1.TransparentColor = System.Drawing.Color.Transparent Me.ImageList1.Images.SetKeyName(0, "") Me.ImageList1.Images.SetKeyName(1, "") Me.ImageList1.Images.SetKeyName(2, "") Me.ImageList1.Images.SetKeyName(3, "") ' 'btnCerrar ' Me.btnCerrar.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.btnCerrar.BackColor = System.Drawing.Color.Black Me.btnCerrar.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btnCerrar.ForeColor = System.Drawing.Color.White Me.btnCerrar.Location = New System.Drawing.Point(896, 413) Me.btnCerrar.Name = "btnCerrar" Me.btnCerrar.Size = New System.Drawing.Size(89, 30) Me.btnCerrar.TabIndex = 20 Me.btnCerrar.Text = "Cerrar" Me.btnCerrar.UseVisualStyleBackColor = False ' 'BTExportar ' Me.BTExportar.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.BTExportar.BackColor = System.Drawing.Color.Black Me.BTExportar.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTExportar.ForeColor = System.Drawing.Color.White Me.BTExportar.Location = New System.Drawing.Point(896, 375) Me.BTExportar.Name = "BTExportar" Me.BTExportar.Size = New System.Drawing.Size(89, 32) Me.BTExportar.TabIndex = 19 Me.BTExportar.Text = "Exportar" Me.BTExportar.UseVisualStyleBackColor = False ' 'BTLimpiar ' Me.BTLimpiar.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.BTLimpiar.BackColor = System.Drawing.Color.Black Me.BTLimpiar.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTLimpiar.ForeColor = System.Drawing.Color.White Me.BTLimpiar.Location = New System.Drawing.Point(896, 335) Me.BTLimpiar.Name = "BTLimpiar" Me.BTLimpiar.Size = New System.Drawing.Size(89, 34) Me.BTLimpiar.TabIndex = 18 Me.BTLimpiar.Text = "Limpiar" Me.BTLimpiar.UseVisualStyleBackColor = False ' 'BTConsultar ' Me.BTConsultar.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.BTConsultar.BackColor = System.Drawing.Color.Black Me.BTConsultar.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTConsultar.ForeColor = System.Drawing.Color.White Me.BTConsultar.Location = New System.Drawing.Point(896, 293) Me.BTConsultar.Name = "BTConsultar" Me.BTConsultar.Size = New System.Drawing.Size(89, 36) Me.BTConsultar.TabIndex = 17 Me.BTConsultar.Text = "Buscar" Me.BTConsultar.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.label4) Me.panel2.ForeColor = System.Drawing.Color.Navy Me.panel2.Location = New System.Drawing.Point(-2, -1) Me.panel2.Name = "panel2" Me.panel2.Size = New System.Drawing.Size(1002, 51) Me.panel2.TabIndex = 160 ' 'Img_logoCabecera ' Me.Img_logoCabecera.Anchor = System.Windows.Forms.AnchorStyles.Right Me.Img_logoCabecera.Image = Global.CLIENTE.My.Resources.Resources.blackrock_logo Me.Img_logoCabecera.Location = New System.Drawing.Point(882, 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 = 360 Me.Img_logoCabecera.TabStop = False ' 'label4 ' Me.label4.AutoSize = True Me.label4.BackColor = System.Drawing.Color.Transparent Me.label4.Font = New System.Drawing.Font("Century Gothic", 14.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.label4.ForeColor = System.Drawing.SystemColors.Window Me.label4.Location = New System.Drawing.Point(21, 8) Me.label4.Name = "label4" Me.label4.Size = New System.Drawing.Size(193, 22) Me.label4.TabIndex = 2 Me.label4.Text = "Clientes boletinados" ' 'Label1 ' Me.Label1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.Label1.AutoSize = True Me.Label1.BackColor = System.Drawing.Color.Transparent Me.Label1.Font = New System.Drawing.Font("Century Gothic", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.White Me.Label1.Location = New System.Drawing.Point(945, 4) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(42, 17) Me.Label1.TabIndex = 161 Me.Label1.Text = "Minds" ' 'Panel1 ' Me.Panel1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.Panel1.BackColor = System.Drawing.Color.Black Me.Panel1.Controls.Add(Me.Label1) Me.Panel1.Location = New System.Drawing.Point(-2, 453) Me.Panel1.Name = "Panel1" Me.Panel1.Size = New System.Drawing.Size(1001, 35) Me.Panel1.TabIndex = 162 ' 'Label6 ' Me.Label6.ForeColor = System.Drawing.Color.MidnightBlue Me.Label6.Location = New System.Drawing.Point(392, 52) Me.Label6.Name = "Label6" Me.Label6.Size = New System.Drawing.Size(58, 16) Me.Label6.TabIndex = 4 Me.Label6.Text = "Organismo" ' 'Label7 ' Me.Label7.AutoSize = True Me.Label7.ForeColor = System.Drawing.Color.MidnightBlue Me.Label7.Location = New System.Drawing.Point(650, 52) Me.Label7.Name = "Label7" Me.Label7.Size = New System.Drawing.Size(87, 13) Me.Label7.TabIndex = 4 Me.Label7.Text = "Organismo QesQ" ' 'cboListaProveedor ' Me.cboListaProveedor.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList Me.cboListaProveedor.Enabled = False Me.cboListaProveedor.FormattingEnabled = True Me.cboListaProveedor.Location = New System.Drawing.Point(649, 68) Me.cboListaProveedor.Name = "cboListaProveedor" Me.cboListaProveedor.Size = New System.Drawing.Size(150, 21) Me.cboListaProveedor.TabIndex = 17 ' 'ClientesBol ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.White Me.ClientSize = New System.Drawing.Size(998, 483) Me.Controls.Add(Me.Panel1) Me.Controls.Add(Me.panel2) Me.Controls.Add(Me.btnCerrar) Me.Controls.Add(Me.BTExportar) Me.Controls.Add(Me.BTLimpiar) Me.Controls.Add(Me.BTConsultar) Me.Controls.Add(Me.GroupBox2) Me.Controls.Add(Me.GroupBox1) Me.Controls.Add(Me.cmbPais) Me.Controls.Add(Me.Label2) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) Me.Name = "ClientesBol" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Clientes boletinados" Me.GroupBox1.ResumeLayout(False) Me.GroupBox1.PerformLayout() Me.GroupBox2.ResumeLayout(False) CType(Me.dataGrid1, System.ComponentModel.ISupportInitialize).EndInit() Me.panel2.ResumeLayout(False) Me.panel2.PerformLayout() CType(Me.Img_logoCabecera, System.ComponentModel.ISupportInitialize).EndInit() Me.Panel1.ResumeLayout(False) Me.Panel1.PerformLayout() Me.ResumeLayout(False) Me.PerformLayout() End Sub #End Region Dim clCmp1 As clsComplejo = New clsComplejo Dim clCmp2 As clsComplejo = New clsComplejo Dim clCmp3 As clsComplejo = New clsComplejo Dim clCmp4 As clsComplejo = New clsComplejo Dim clCmp5 As clsComplejo = New clsComplejo Dim clGrid As clsComplejo = New clsComplejo Dim BanOrg, BanPais, BanPorc, BanStatus As Boolean Private Sub ClientesBol_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load BanOrg = False BanPais = False BanOrg = False BanStatus = False label4.Text = Me.Text dtpFechaInicio.Value = Date.Now.Date dtpFechaFinal.Value = Date.Now.Date 'cboListaProveedor 'clCmp5.sbLlenaCombo("sp_ConsultarOrganismosInter ", Me.cmbOrganismo) 'Select distinct lista From ListaRestringida order by 1 asc Dim dt As New DataTable dt = clCmp5.fdtDataTable("SP_ConsultarListaQesQ") For Each dr As DataRow In dt.Rows cboListaProveedor.Items.Add(dr(0)) Next End Sub 'Private Sub tlbInusualesDivisas_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles tlbInusualesDivisas.ButtonClick ' 'Botones de la toolbar ' Select Case e.Button.Text ' Case "Consultar" ' Me.Cursor = Cursors.WaitCursor ' sbBuscar() ' Me.Cursor = Cursors.Default ' Case "Exportar" ' Exportar() ' Case "Refrescar" ' Refrescar() ' Case "Salir" ' Me.Close() ' End Select 'End Sub Private Sub Exportar() 'llama a las rutinas para exportar el grid a excel Try If clGrid.dt.Rows.Count = 0 Then MessageBox.Show("Realiza una consulta ", "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Information) Else If clGrid.dt.Rows.Count = 0 Then MessageBox.Show("No hay datos para exportar ", "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Information) Else Dim Resul As DialogResult Resul = MessageBox.Show("Este proceso puede tardar varios minutos, ¿Deseas continuar? ", "MINDS", MessageBoxButtons.YesNo, MessageBoxIcon.Question) If Resul = DialogResult.Yes Then 'Creo una instancia de la clase aExcel Dim clsExcel As aExcel = New aExcel 'Utilizo la funcion ExportDataset de la clase aExcel clsExcel.ExportDataset(clGrid.ds) 'Asigno el dataset a exportar End If End If End If Catch ex As Exception MessageBox.Show(ex.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error) End Try End Sub Private Sub Exportar2() 'llama a las rutinas para exportar el grid a excel Try If clGrid.ds.Tables(0).Rows.Count = 0 Then MessageBox.Show("Debe Realizarse una consulta ", "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Information) Else If clGrid.ds.Tables(0).Rows.Count = 0 Then MessageBox.Show("No hay datos para exportar ", "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Information) Else Dim Resul As DialogResult Resul = MessageBox.Show("Este proceso puede tardar varios minutos, ¿Deseas continuar? ", "MINDS", MessageBoxButtons.YesNo, MessageBoxIcon.Question) If Resul = DialogResult.Yes Then 'Creo una instancia de la clase aExcel Dim clsExcel As aExcel = New aExcel 'Utilizo la funcion ExportDataset de la clase aExcel 'clsExcel.ExportCSV(clGrid.ds) 'Asigno el dataset a exportar 'clsExcel.ExportExcel(clGrid.ds) 'Asigno el dataset a exportar clsExcel.ExportToExcel(clGrid.ds) 'Asigno el dataset a exportar End If End If End If Catch ex As Exception MessageBox.Show(ex.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error) End Try End Sub Private Sub sbBuscar() Try 'Se utiliza el procedimiento almacenado "spBuscaClienteBol" para buscar Dim SQL, Where As String Dim varfecha As Object = 0 Dim CLasscom As New clsComplejo Dim ClassAud As New ClassMyUtils Dim sAuditoria As String Dim intCuenta As Integer 'JLL 27-08-2013 oculto las columnas con la funcion clocultarcolumna Dim OcultarCol As clOcultarColumna = New clOcultarColumna() dataGrid1.DataSource = Nothing 'dataGrid1.DataBindings.Clear() BTConsultar.Enabled = False SQL = "" Where = "" intCuenta = 0 SQL = "sp_ConsultarLRClt " & IIf(cmbOrganismo.SelectedValue <> Nothing, cmbOrganismo.SelectedValue, "NULL") SQL = SQL & "," & IIf(cmbPorcentaje.Text <> "", "'" & cmbPorcentaje.Text.Replace("%", "") & "'", "NULL") SQL = SQL & "," & IIf(cmbStatus.SelectedValue <> Nothing, cmbStatus.SelectedValue, "NULL") SQL = SQL & "," & IIf(txtCliente.Text <> "", "'" & txtCliente.Text.Trim & "'", "NULL") SQL = SQL & ",'" & dtpFechaInicio.Value.ToString("yyyy-MM-dd") & "','" & dtpFechaFinal.Value.ToString("yyyy-MM-dd") & "'" SQL = SQL & "," & IIf(cboListaProveedor.Text <> "", "'" & cboListaProveedor.Text & "'", "NULL") 'SQL = "Select IdOrganismoInternacional,IdPais,IdComunicado,NombreCompleto,Observaciones,Estatus,FechaActualiza,Alias,Pais,Puesto,Dependencia,FechaCarga,IdListaRestringida,Reference,Type,Address,City,State,SearchCode,NationalID,Passport,BICCode,DOB,Category,Comments,Source,RFC From ListaRestringida" clGrid = Nothing clGrid = New clsComplejo clGrid.dt = New DataTable 'clGrid.fdtDataTable(SQL) clGrid.fdtDataSet(SQL) 'dataGrid1.DataSource = clGrid.dt dataGrid1.DataSource = clGrid.ds.Tables(0) If dataGrid1.RowCount > 0 Then For Each col As C1.Win.C1TrueDBGrid.C1DisplayColumn In dataGrid1.Splits(0).DisplayColumns col.AutoSize() Next For i As Integer = 0 To dataGrid1.Columns.Count - 1 dataGrid1.Columns(i).Caption = dataGrid1.Columns(i).Caption.ToString.ToUpper Next dataGrid1.Splits(0).DisplayColumns(17).Visible = False dataGrid1.Splits(0).DisplayColumns(18).Visible = False dataGrid1.Splits(0).DisplayColumns(19).Visible = False dataGrid1.Splits(0).DisplayColumns(20).Visible = False dataGrid1.Splits(0).DisplayColumns(21).Visible = False End If Dim cont As Integer 'cont = clGrid.ds.Tables(0).Rows.Count cont = clGrid.ds.Tables(0).Rows.Count 'clGrid.dt.Rows.Count lblResultados.Text = "Elementos: " & cont varfecha = CLasscom.BuscaValores("dFechaRegistro", "listacliente", "") 'If Not IsDBNull(varfecha) Then ' lblfecha.Text = "Coincidencias al " & CLasscom.ObtenFecha(varfecha, "dd/mm/yyyy") ' lblfecha.AutoSize = True ' lblfecha.Visible = True 'Else ' lblfecha.Visible = False 'End If sAuditoria = "" If cmbOrganismo.Text.Trim <> "" Then sAuditoria = sAuditoria & " Organismo=" & cmbOrganismo.Text.Trim If cmbPais.Text.Trim <> "" Then sAuditoria = sAuditoria & " Pais=" & cmbPais.Text.Trim If cmbPorcentaje.Text.Trim <> "" Then sAuditoria = sAuditoria & " Porcentaje=" & cmbPorcentaje.Text.Trim If cmbStatus.Text.Trim <> "" Then sAuditoria = sAuditoria & " Status=" & cmbStatus.Text.Trim If txtCliente.Text.Trim <> "" Then sAuditoria = sAuditoria & " Cliente=" & txtCliente.Text.Trim If txtCliente.Text.Trim <> "" Then sAuditoria = sAuditoria & " IdFigura=" & txtCliente.Text.Trim If sAuditoria.Trim = "" Then sAuditoria = "Consulta lista restringida Clientes" sAuditoria = Mid(sAuditoria.Trim, 1, 8000) ClassAud.RT_Auditoria(clsVaribles.varUsuario, 113, My.Computer.Name, "Minds Cliente", sAuditoria) Catch ex As Exception BTConsultar.Enabled = True MessageBox.Show(ex.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error) End Try BTConsultar.Enabled = True End Sub Private Function fsDefineSQL(ByVal SP As String) As String 'Defino mi cadena para el procedimiento almacenado 'Declaro variables para pasar los parametros al procedimiento almacenado Dim lsSQL As String Dim _Opcion As Integer Dim _Organismo As String = ", NULL, " Dim _Pais As String = " NULL, " Dim _Porcentaje As String = " NULL, " Dim _DescStatus As String = " NULL, " Dim _Cliente As String = " NULL " If Me.cmbOrganismo.Text = "" And Me.cmbPais.Text = "" And Me.cmbPorcentaje.Text = "" And Me.cmbStatus.Text = "" And Me.txtCliente.Text = "" Then _Opcion = 1 ElseIf Me.cmbOrganismo.Text = "" And Me.cmbPais.Text = "" And Me.cmbPorcentaje.Text = "" And Me.cmbStatus.Text = "" And Me.txtCliente.Text <> "" Then _Opcion = 2 _Cliente = "'%" & Me.txtCliente.Text & "%'" ElseIf Me.cmbOrganismo.Text = "" And Me.cmbPais.Text = "" And Me.cmbPorcentaje.Text = "" And Me.cmbStatus.Text <> "" And Me.txtCliente.Text = "" Then _Opcion = 3 _DescStatus = Me.cmbStatus.SelectedValue & ", " ElseIf Me.cmbOrganismo.Text = "" And Me.cmbPais.Text = "" And Me.cmbPorcentaje.Text = "" And Me.cmbStatus.Text <> "" And Me.txtCliente.Text <> "" Then _Opcion = 4 _DescStatus = Me.cmbStatus.SelectedValue & ", " _Cliente = "'%" & Me.txtCliente.Text & "%'" ElseIf Me.cmbOrganismo.Text = "" And Me.cmbPais.Text = "" And Me.cmbPorcentaje.Text <> "" And Me.cmbStatus.Text = "" And Me.txtCliente.Text = "" Then _Opcion = 5 _Porcentaje = "'" & Replace(Me.cmbPorcentaje.Text, "%", "") & "', " ElseIf Me.cmbOrganismo.Text = "" And Me.cmbPais.Text = "" And Me.cmbPorcentaje.Text <> "" And Me.cmbStatus.Text = "" And Me.txtCliente.Text <> "" Then _Opcion = 6 _Porcentaje = "'" & Replace(Me.cmbPorcentaje.Text, "%", "") & "', " _Cliente = "'%" & Me.txtCliente.Text & "%'" ElseIf Me.cmbOrganismo.Text = "" And Me.cmbPais.Text = "" And Me.cmbPorcentaje.Text <> "" And Me.cmbStatus.Text <> "" And Me.txtCliente.Text = "" Then _Opcion = 7 _Porcentaje = "'" & Me.cmbPorcentaje.Text & "', " _DescStatus = Me.cmbStatus.SelectedValue & ", " ElseIf Me.cmbOrganismo.Text = "" And Me.cmbPais.Text = "" And Me.cmbPorcentaje.Text <> "" And Me.cmbStatus.Text <> "" And Me.txtCliente.Text <> "" Then _Opcion = 8 _Porcentaje = Me.cmbPorcentaje.Text & "', " _DescStatus = Me.cmbStatus.SelectedValue & ", " _Cliente = "'%" & Me.txtCliente.Text & "%'" ElseIf Me.cmbOrganismo.Text = "" And Me.cmbPais.Text <> "" And Me.cmbPorcentaje.Text = "" And Me.cmbStatus.Text = "" And Me.txtCliente.Text = "" Then _Opcion = 9 _Pais = Me.cmbPais.SelectedValue & ", " ElseIf Me.cmbOrganismo.Text = "" And Me.cmbPais.Text <> "" And Me.cmbPorcentaje.Text = "" And Me.cmbStatus.Text = "" And Me.txtCliente.Text <> "" Then _Opcion = 10 _Pais = Me.cmbPais.SelectedValue & ", " _Cliente = "'%" & Me.txtCliente.Text & "%'" ElseIf Me.cmbOrganismo.Text = "" And Me.cmbPais.Text <> "" And Me.cmbPorcentaje.Text = "" And Me.cmbStatus.Text <> "" And Me.txtCliente.Text = "" Then _Opcion = 11 _Pais = Me.cmbPais.SelectedValue & ", " _DescStatus = Me.cmbStatus.SelectedValue & ", " ElseIf Me.cmbOrganismo.Text = "" And Me.cmbPais.Text <> "" And Me.cmbPorcentaje.Text = "" And Me.cmbStatus.Text <> "" And Me.txtCliente.Text <> "" Then _Opcion = 12 _Pais = Me.cmbPais.SelectedValue & ", " _DescStatus = Me.cmbStatus.SelectedValue & ", " _Cliente = "'%" & Me.txtCliente.Text & "%'" ElseIf Me.cmbOrganismo.Text = "" And Me.cmbPais.Text <> "" And Me.cmbPorcentaje.Text <> "" And Me.cmbStatus.Text = "" And Me.txtCliente.Text = "" Then _Opcion = 13 _Pais = Me.cmbPais.SelectedValue & ", " _Porcentaje = "'" & Replace(Me.cmbPorcentaje.Text, "%", "") & "', " ElseIf Me.cmbOrganismo.Text = "" And Me.cmbPais.Text <> "" And Me.cmbPorcentaje.Text <> "" And Me.cmbStatus.Text = "" And Me.txtCliente.Text <> "" Then _Opcion = 14 _Pais = Me.cmbPais.SelectedValue & ", " _Porcentaje = "'" & Replace(Me.cmbPorcentaje.Text, "%", "") & "', " _Cliente = "'%" & Me.txtCliente.Text & "%'" ElseIf Me.cmbOrganismo.Text = "" And Me.cmbPais.Text <> "" And Me.cmbPorcentaje.Text <> "" And Me.cmbStatus.Text <> "" And Me.txtCliente.Text = "" Then _Opcion = 15 _Pais = Me.cmbPais.SelectedValue & ", " _Porcentaje = "'" & Replace(Me.cmbPorcentaje.Text, "%", "") & "', " _DescStatus = Me.cmbStatus.SelectedValue & ", " ElseIf Me.cmbOrganismo.Text = "" And Me.cmbPais.Text <> "" And Me.cmbPorcentaje.Text <> "" And Me.cmbStatus.Text <> "" And Me.txtCliente.Text <> "" Then _Opcion = 16 _Pais = Me.cmbPais.SelectedValue & ", " _Porcentaje = "'" & Replace(Me.cmbPorcentaje.Text, "%", "") & "', " _DescStatus = Me.cmbStatus.SelectedValue & ", " _Cliente = "'%" & Me.txtCliente.Text & "%'" ElseIf Me.cmbOrganismo.Text <> "" And Me.cmbPais.Text = "" And Me.cmbPorcentaje.Text = "" And Me.cmbStatus.Text = "" And Me.txtCliente.Text = "" Then _Opcion = 17 _Organismo = ", " & Me.cmbOrganismo.SelectedValue & ", " ElseIf Me.cmbOrganismo.Text <> "" And Me.cmbPais.Text = "" And Me.cmbPorcentaje.Text = "" And Me.cmbStatus.Text = "" And Me.txtCliente.Text <> "" Then _Opcion = 18 _Organismo = ", " & Me.cmbOrganismo.SelectedValue & ", " _Cliente = "'%" & Me.txtCliente.Text & "%'" ElseIf Me.cmbOrganismo.Text <> "" And Me.cmbPais.Text = "" And Me.cmbPorcentaje.Text = "" And Me.cmbStatus.Text <> "" And Me.txtCliente.Text = "" Then _Opcion = 19 _Organismo = ", " & Me.cmbOrganismo.SelectedValue & ", " _DescStatus = Me.cmbStatus.SelectedValue & ", " ElseIf Me.cmbOrganismo.Text <> "" And Me.cmbPais.Text = "" And Me.cmbPorcentaje.Text = "" And Me.cmbStatus.Text <> "" And Me.txtCliente.Text <> "" Then _Opcion = 20 _Organismo = ", " & Me.cmbOrganismo.SelectedValue & ", " _DescStatus = Me.cmbStatus.SelectedValue & ", " _Cliente = "'%" & Me.txtCliente.Text & "%'" ElseIf Me.cmbOrganismo.Text <> "" And Me.cmbPais.Text = "" And Me.cmbPorcentaje.Text <> "" And Me.cmbStatus.Text = "" And Me.txtCliente.Text = "" Then _Opcion = 21 _Organismo = ", " & Me.cmbOrganismo.SelectedValue & ", " _Porcentaje = "'" & Replace(Me.cmbPorcentaje.Text, "%", "") & "', " ElseIf Me.cmbOrganismo.Text <> "" And Me.cmbPais.Text = "" And Me.cmbPorcentaje.Text <> "" And Me.cmbStatus.Text = "" And Me.txtCliente.Text <> "" Then _Opcion = 22 _Organismo = ", " & Me.cmbOrganismo.SelectedValue & ", " _Porcentaje = "'" & Replace(Me.cmbPorcentaje.Text, "%", "") & "', " _Cliente = "'%" & Me.txtCliente.Text & "%'" ElseIf Me.cmbOrganismo.Text <> "" And Me.cmbPais.Text = "" And Me.cmbPorcentaje.Text <> "" And Me.cmbStatus.Text <> "" And Me.txtCliente.Text = "" Then _Opcion = 23 _Organismo = ", " & Me.cmbOrganismo.SelectedValue & ", " _Porcentaje = "'" & Replace(Me.cmbPorcentaje.Text, "%", "") & "', " _DescStatus = Me.cmbStatus.SelectedValue & ", " ElseIf Me.cmbOrganismo.Text <> "" And Me.cmbPais.Text = "" And Me.cmbPorcentaje.Text <> "" And Me.cmbStatus.Text <> "" And Me.txtCliente.Text <> "" Then _Opcion = 24 _Organismo = ", " & Me.cmbOrganismo.SelectedValue & ", " _Porcentaje = "'" & Replace(Me.cmbPorcentaje.Text, "%", "") & "', " _DescStatus = Me.cmbStatus.SelectedValue & ", " _Cliente = "'%" & Me.txtCliente.Text & "%'" ElseIf Me.cmbOrganismo.Text <> "" And Me.cmbPais.Text <> "" And Me.cmbPorcentaje.Text = "" And Me.cmbStatus.Text = "" And Me.txtCliente.Text = "" Then _Opcion = 25 _Organismo = ", " & Me.cmbOrganismo.SelectedValue & ", " _Pais = Me.cmbPais.SelectedValue & ", " ElseIf Me.cmbOrganismo.Text <> "" And Me.cmbPais.Text <> "" And Me.cmbPorcentaje.Text = "" And Me.cmbStatus.Text = "" And Me.txtCliente.Text <> "" Then _Opcion = 26 _Organismo = ", " & Me.cmbOrganismo.SelectedValue & ", " _Pais = Me.cmbPais.SelectedValue & ", " _Cliente = "'%" & Me.txtCliente.Text & "%'" ElseIf Me.cmbOrganismo.Text <> "" And Me.cmbPais.Text <> "" And Me.cmbPorcentaje.Text = "" And Me.cmbStatus.Text <> "" And Me.txtCliente.Text = "" Then _Opcion = 27 _Organismo = ", " & Me.cmbOrganismo.SelectedValue & ", " _Pais = Me.cmbPais.SelectedValue & ", " _DescStatus = Me.cmbStatus.SelectedValue & ", " ElseIf Me.cmbOrganismo.Text <> "" And Me.cmbPais.Text <> "" And Me.cmbPorcentaje.Text = "" And Me.cmbStatus.Text <> "" And Me.txtCliente.Text <> "" Then _Opcion = 28 _Organismo = ", " & Me.cmbOrganismo.SelectedValue & ", " _Pais = Me.cmbPais.SelectedValue & ", " _DescStatus = Me.cmbStatus.SelectedValue & ", " _Cliente = "'%" & Me.txtCliente.Text & "%'" ElseIf Me.cmbOrganismo.Text <> "" And Me.cmbPais.Text <> "" And Me.cmbPorcentaje.Text <> "" And Me.cmbStatus.Text = "" And Me.txtCliente.Text = "" Then _Opcion = 29 _Organismo = ", " & Me.cmbOrganismo.SelectedValue & ", " _Pais = Me.cmbPais.SelectedValue & ", " _Porcentaje = "'" & Replace(Me.cmbPorcentaje.Text, "%", "") & "', " ElseIf Me.cmbOrganismo.Text <> "" And Me.cmbPais.Text <> "" And Me.cmbPorcentaje.Text <> "" And Me.cmbStatus.Text = "" And Me.txtCliente.Text <> "" Then _Opcion = 30 _Organismo = ", " & Me.cmbOrganismo.SelectedValue & ", " _Pais = Me.cmbPais.SelectedValue & ", " _Porcentaje = "'" & Replace(Me.cmbPorcentaje.Text, "%", "") & "', " _Cliente = "'%" & Me.txtCliente.Text & "%'" ElseIf Me.cmbOrganismo.Text <> "" And Me.cmbPais.Text <> "" And Me.cmbPorcentaje.Text <> "" And Me.cmbStatus.Text <> "" And Me.txtCliente.Text = "" Then _Opcion = 31 _Organismo = ", " & Me.cmbOrganismo.SelectedValue & ", " _Pais = Me.cmbPais.SelectedValue & ", " _Porcentaje = "'" & Replace(Me.cmbPorcentaje.Text, "%", "") & "', " _DescStatus = Me.cmbStatus.SelectedValue & ", " ElseIf Me.cmbOrganismo.Text <> "" And Me.cmbPais.Text = "" And Me.cmbPorcentaje.Text = "" And Me.cmbStatus.Text <> "" And Me.txtCliente.Text <> "" Then _Opcion = 32 _Organismo = ", " & Me.cmbOrganismo.SelectedValue & ", " _Pais = Me.cmbPais.SelectedValue & ", " _Porcentaje = "'" & Replace(Me.cmbPorcentaje.Text, "%", "") & "', " _DescStatus = Me.cmbStatus.SelectedValue & ", " _Cliente = "'%" & Me.txtCliente.Text & "%'" End If 'Formo el query lsSQL = lsSQL & SP & " " lsSQL = lsSQL & _Opcion lsSQL = lsSQL & _Organismo lsSQL = lsSQL & _Pais lsSQL = lsSQL & _Porcentaje lsSQL = lsSQL & _DescStatus lsSQL = lsSQL & _Cliente Return lsSQL End Function Private Sub Refrescar() 'Limpia los combos, datagrid y la caja de texto Me.cmbPais.DataSource = Nothing Me.cmbPais.Items.Clear() Me.cmbOrganismo.DataSource = Nothing Me.cmbOrganismo.Items.Clear() Me.cmbPorcentaje.Items.Clear() Me.cmbPorcentaje.Text = "" Me.cmbStatus.DataSource = Nothing Me.cmbStatus.Items.Clear() Me.txtCliente.Text = "" Me.lblResultados.Text = "" Me.dataGrid1.DataSource = Nothing Me.dataGrid1.DataBindings.Clear() clGrid.dt.Clear() 'Para que se puedan a llenar otra vez los combos BanPais = False BanOrg = False BanPorc = False BanStatus = False cmbOrganismo.SelectedText = -1 cboListaProveedor.SelectedIndex = -1 cboListaProveedor.Enabled = False End Sub Private Sub cmbOrganismo_DropDown(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbOrganismo.DropDown 'Llena combo organismo If BanOrg = False Then 'Para llenar el combo de organismo se utiliza el procedimiento almacenado "spLlenaComboOrgInt" 'clCmp1.sbLlenaCombo("spLlenaComboOrgInt", Me.cmbOrganismo) clCmp1.sbLlenaCombo("sp_ConsultarOrganismosInter ", Me.cmbOrganismo) End If BanOrg = True End Sub Private Sub cmbPais_DropDown(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbPais.DropDown 'Llena comboPais If BanPais = False Then 'Para llenar el combo de Pais se utiliza el porcedimiento almacenado "spListaPais" clCmp2.sbLlenaCombo("spListaPais", Me.cmbPais) End If BanPais = True End Sub Private Sub cmbPorcentaje_DropDown(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbPorcentaje.DropDown 'Llena combo porcentaje If BanPorc = False Then Me.cmbPorcentaje.Items.Add("60%") Me.cmbPorcentaje.Items.Add("70%") Me.cmbPorcentaje.Items.Add("80%") Me.cmbPorcentaje.Items.Add("90%") Me.cmbPorcentaje.Items.Add("95%") End If BanPorc = True End Sub Private Sub cmbStatus_DropDown(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbStatus.DropDown 'Llena combo status If BanStatus = False Then 'Para llenar el combo de status se utiliza el procedimiento almacenado "spListastatus" 'clCmp4.sbLlenaCombo("select descstatus as nombre, id_status as clave from Status", Me.cmbStatus) clCmp4.sbLlenaCombo("sp_ConsultarListaStatusClt 0 ", cmbStatus) End If BanStatus = True End Sub Private Sub DataGrid1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles dataGrid1.DoubleClick 'Jesus López López 23-09-13 'JMVD 2014-08-20 AGREGO VARIABLE Dim iRow As Integer Dim iRowCount As Integer 'Se asigna los valores seleccionados del DataGrid hacia la forma CatStatus Try Dim dat As String ''----Revisar Dim FrmCalStatus As New FrmCalStatus FrmCalStatus.pb9 = IIf(IsDBNull(dataGrid1.Columns("Registro en Lista").CellValue(dataGrid1.Row)), "", dataGrid1.Columns("Registro en Lista").CellValue(dataGrid1.Row)) ''id_lista rest FrmCalStatus.pb = IIf(IsDBNull(dataGrid1.Columns("CLIENTE").CellValue(dataGrid1.Row)), "", dataGrid1.Columns("CLIENTE").CellValue(dataGrid1.Row)) ''persona boletinada FrmCalStatus.pb1 = IIf(IsDBNull(dataGrid1.Columns("Porcentaje Nombre").CellValue(dataGrid1.Row)), "", dataGrid1.Columns("Porcentaje Nombre").CellValue(dataGrid1.Row)) ''porcentaje FrmCalStatus.pb2 = IIf(IsDBNull(dataGrid1.Columns("Organismo").CellValue(dataGrid1.Row)), "", dataGrid1.Columns("Organismo").CellValue(dataGrid1.Row)) ''organismo 'FrmCalStatus.pb3 = IIf(IsDBNull(dataGrid1.Columns(4).CellValue(dataGrid1.Row)), "", dataGrid1.Columns(4).CellValue(dataGrid1.Row)) ''pais FrmCalStatus.pb4 = IIf(IsDBNull(dataGrid1.Columns("NIC").CellValue(dataGrid1.Row)), "", dataGrid1.Columns("NIC").CellValue(dataGrid1.Row)) ''contrato FrmCalStatus.pb8 = IIf(IsDBNull(dataGrid1.Columns("Estatus").CellValue(dataGrid1.Row)), "", dataGrid1.Columns("Estatus").CellValue(dataGrid1.Row)) ''estado de coincidencia No Revisado FrmCalStatus.fecha = IIf(IsDBNull(dataGrid1.Columns("Fecha Coincidencia").CellValue(dataGrid1.Row)), "", dataGrid1.Columns("Fecha Coincidencia").CellValue(dataGrid1.Row)) ''Fecha coincidencia FrmCalStatus.Comentario = IIf(IsDBNull(dataGrid1.Columns("Comentario").CellValue(dataGrid1.Row)), "", dataGrid1.Columns("Comentario").CellValue(dataGrid1.Row)) ''ListCli.Comentario FrmCalStatus.pbIdFigura = IIf(IsDBNull(dataGrid1.Columns("Id_Figura").CellValue(dataGrid1.Row)), "", dataGrid1.Columns("Id_Figura").CellValue(dataGrid1.Row)) ''id_figura FrmCalStatus.pbNomFigura = IIf(IsDBNull(dataGrid1.Columns("Tipo Figura").CellValue(dataGrid1.Row)), "", dataGrid1.Columns("Tipo Figura").CellValue(dataGrid1.Row)) ''descripcion figura FrmCalStatus.pb5 = IIf(IsDBNull(dataGrid1.Columns("id_status").CellValue(dataGrid1.Row)), "0", dataGrid1.Columns("id_status").CellValue(dataGrid1.Row)) ''id estatus FrmCalStatus.pb7 = IIf(IsDBNull(dataGrid1.Columns("Nombre Figura").CellValue(dataGrid1.Row)), "", dataGrid1.Columns("Nombre Figura").CellValue(dataGrid1.Row)) ''nombre de la figura 'FrmCalStatus.pb10 = IIf(IsDBNull(dataGrid1.Columns("id_status").CellValue(dataGrid1.Row)), "", dataGrid1.Columns("id_status").CellValue(dataGrid1.Row)) ''ACTIVO FrmCalStatus.ShowDialog() 'sbBuscar() 'DataGrid1.CurrentRowIndex = iRow 'iRowCount = clGrid.ds.Tables(0).Rows.Count - 1 'If iRowCount > 0 Then ' If iRowCount < iRow Then ' DataGrid1.CurrentRowIndex = iRowCount ' Else ' DataGrid1.CurrentRowIndex = iRow ' End If 'End If Catch ex As Exception MessageBox.Show(ex.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error) End Try End Sub Private Sub cmbOrganismo_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles cmbOrganismo.SelectedIndexChanged End Sub Private Sub cmbStatus_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles cmbStatus.SelectedIndexChanged End Sub Private Sub tlbInusualesDivisas_ButtonClick(sender As System.Object, e As System.Windows.Forms.ToolBarButtonClickEventArgs) 'BOTONES DE LA TOOLBAR Select Case UCase(e.Button.Text) Case "BUSCAR" Me.Cursor = Cursors.WaitCursor sbBuscar() Me.Cursor = Cursors.Default Case "EXPORTAR" Exportar() Case "REFRESCAR" Refrescar() Case "CERRAR" Me.Close() End Select End Sub Private Sub BTConsultar_Click(sender As System.Object, e As System.EventArgs) Handles BTConsultar.Click Me.Cursor = Cursors.WaitCursor sbBuscar() Me.Cursor = Cursors.Default End Sub Private Sub dataGrid1_FetchCellStyle(sender As Object, e As C1.Win.C1TrueDBGrid.FetchCellStyleEventArgs) Handles dataGrid1.FetchCellStyle End Sub Private Sub dataGrid1_AfterFilter(sender As Object, e As C1.Win.C1TrueDBGrid.FilterEventArgs) Handles dataGrid1.AfterFilter lblResultados.Text = "Elementos: " & dataGrid1.Splits(0).Rows.Count.ToString() End Sub Private Sub cmbOrganismo_SelectionChangeCommitted(sender As Object, e As EventArgs) Handles cmbOrganismo.SelectionChangeCommitted If Not cmbOrganismo.SelectedValue Is Nothing Then If cmbOrganismo.SelectedValue.ToString() = "17" Then cboListaProveedor.Enabled = True Else cboListaProveedor.Enabled = False : cboListaProveedor.SelectedIndex = -1 Else cboListaProveedor.Enabled = False End If End Sub Private Sub BTLimpiar_Click(sender As System.Object, e As System.EventArgs) Handles BTLimpiar.Click Refrescar() End Sub Private Sub BTExportar_Click(sender As System.Object, e As System.EventArgs) Handles BTExportar.Click 'Exportar() BTConsultar.Enabled = False BTExportar.Enabled = False Exportar2() BTConsultar.Enabled = True BTExportar.Enabled = True End Sub Private Sub btnCerrar_Click(sender As System.Object, e As System.EventArgs) Handles btnCerrar.Click Me.Close() End Sub End Class