Public Class FrmCartas 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 Panel1 As System.Windows.Forms.Panel Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents BTCerrar As System.Windows.Forms.Button Friend WithEvents GrdBusqueda As System.Windows.Forms.DataGrid Friend WithEvents BTOtros As System.Windows.Forms.Button Friend WithEvents BTAutorizacion2 As System.Windows.Forms.Button Friend WithEvents BTBajas As System.Windows.Forms.Button Friend WithEvents ChkClientes As System.Windows.Forms.CheckedListBox Friend WithEvents BTSel As System.Windows.Forms.Button Friend WithEvents BTGen As System.Windows.Forms.Button Private Sub InitializeComponent() Me.Panel1 = New System.Windows.Forms.Panel() Me.BTSel = New System.Windows.Forms.Button() Me.ChkClientes = New System.Windows.Forms.CheckedListBox() Me.BTGen = New System.Windows.Forms.Button() Me.BTCerrar = New System.Windows.Forms.Button() Me.GrdBusqueda = New System.Windows.Forms.DataGrid() Me.BTOtros = New System.Windows.Forms.Button() Me.BTAutorizacion2 = New System.Windows.Forms.Button() Me.BTBajas = New System.Windows.Forms.Button() Me.Label1 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() Me.Panel1.SuspendLayout() CType(Me.GrdBusqueda, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' 'Panel1 ' Me.Panel1.BackColor = System.Drawing.Color.WhiteSmoke Me.Panel1.Controls.Add(Me.BTSel) Me.Panel1.Controls.Add(Me.ChkClientes) Me.Panel1.Controls.Add(Me.BTGen) Me.Panel1.Controls.Add(Me.BTCerrar) Me.Panel1.Controls.Add(Me.GrdBusqueda) Me.Panel1.Controls.Add(Me.BTOtros) Me.Panel1.Controls.Add(Me.BTAutorizacion2) Me.Panel1.Controls.Add(Me.BTBajas) Me.Panel1.Controls.Add(Me.Label1) Me.Panel1.Controls.Add(Me.Label2) Me.Panel1.Location = New System.Drawing.Point(8, 8) Me.Panel1.Name = "Panel1" Me.Panel1.Size = New System.Drawing.Size(728, 448) Me.Panel1.TabIndex = 0 ' 'BTSel ' Me.BTSel.BackColor = System.Drawing.Color.MidnightBlue Me.BTSel.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTSel.ForeColor = System.Drawing.Color.White Me.BTSel.Location = New System.Drawing.Point(359, 416) Me.BTSel.Name = "BTSel" Me.BTSel.Size = New System.Drawing.Size(131, 24) Me.BTSel.TabIndex = 36 Me.BTSel.Text = "Seleccionar Todo" Me.BTSel.UseVisualStyleBackColor = False ' 'ChkClientes ' Me.ChkClientes.ForeColor = System.Drawing.Color.MidnightBlue Me.ChkClientes.FormattingEnabled = True Me.ChkClientes.Location = New System.Drawing.Point(29, 148) Me.ChkClientes.Name = "ChkClientes" Me.ChkClientes.Size = New System.Drawing.Size(676, 259) Me.ChkClientes.TabIndex = 35 ' 'BTGen ' Me.BTGen.BackColor = System.Drawing.Color.MidnightBlue Me.BTGen.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTGen.ForeColor = System.Drawing.Color.White Me.BTGen.Location = New System.Drawing.Point(496, 416) Me.BTGen.Name = "BTGen" Me.BTGen.Size = New System.Drawing.Size(104, 24) Me.BTGen.TabIndex = 34 Me.BTGen.Text = "Generar" Me.BTGen.UseVisualStyleBackColor = False ' 'BTCerrar ' Me.BTCerrar.BackColor = System.Drawing.Color.MidnightBlue Me.BTCerrar.ForeColor = System.Drawing.Color.White Me.BTCerrar.Location = New System.Drawing.Point(616, 416) Me.BTCerrar.Name = "BTCerrar" Me.BTCerrar.Size = New System.Drawing.Size(96, 24) Me.BTCerrar.TabIndex = 33 Me.BTCerrar.Text = "Cerrar" Me.BTCerrar.UseVisualStyleBackColor = False ' 'GrdBusqueda ' Me.GrdBusqueda.BackColor = System.Drawing.Color.AliceBlue Me.GrdBusqueda.BackgroundColor = System.Drawing.Color.White Me.GrdBusqueda.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.GrdBusqueda.CaptionText = "Resultados" Me.GrdBusqueda.DataMember = "" Me.GrdBusqueda.FlatMode = True Me.GrdBusqueda.HeaderBackColor = System.Drawing.Color.WhiteSmoke Me.GrdBusqueda.HeaderForeColor = System.Drawing.SystemColors.ControlText Me.GrdBusqueda.Location = New System.Drawing.Point(20, 91) Me.GrdBusqueda.Name = "GrdBusqueda" Me.GrdBusqueda.PreferredColumnWidth = 200 Me.GrdBusqueda.PreferredRowHeight = 8 Me.GrdBusqueda.ReadOnly = True Me.GrdBusqueda.Size = New System.Drawing.Size(696, 43) Me.GrdBusqueda.TabIndex = 32 Me.GrdBusqueda.Visible = False ' 'BTOtros ' Me.BTOtros.BackColor = System.Drawing.Color.MidnightBlue Me.BTOtros.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTOtros.ForeColor = System.Drawing.Color.White Me.BTOtros.Location = New System.Drawing.Point(408, 112) Me.BTOtros.Name = "BTOtros" Me.BTOtros.Size = New System.Drawing.Size(104, 24) Me.BTOtros.TabIndex = 31 Me.BTOtros.Text = "Otros Estatus" Me.BTOtros.UseVisualStyleBackColor = False Me.BTOtros.Visible = False ' 'BTAutorizacion2 ' Me.BTAutorizacion2.BackColor = System.Drawing.Color.MidnightBlue Me.BTAutorizacion2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTAutorizacion2.ForeColor = System.Drawing.Color.White Me.BTAutorizacion2.Location = New System.Drawing.Point(288, 112) Me.BTAutorizacion2.Name = "BTAutorizacion2" Me.BTAutorizacion2.Size = New System.Drawing.Size(104, 24) Me.BTAutorizacion2.TabIndex = 30 Me.BTAutorizacion2.Text = "Autorizacion" Me.BTAutorizacion2.UseVisualStyleBackColor = False Me.BTAutorizacion2.Visible = False ' 'BTBajas ' Me.BTBajas.BackColor = System.Drawing.Color.MidnightBlue Me.BTBajas.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTBajas.ForeColor = System.Drawing.Color.White Me.BTBajas.Location = New System.Drawing.Point(168, 112) Me.BTBajas.Name = "BTBajas" Me.BTBajas.Size = New System.Drawing.Size(104, 24) Me.BTBajas.TabIndex = 29 Me.BTBajas.Text = "Bajas" Me.BTBajas.UseVisualStyleBackColor = False Me.BTBajas.Visible = False ' 'Label1 ' Me.Label1.BackColor = System.Drawing.Color.White 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(168, 88) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(352, 16) Me.Label1.TabIndex = 3 Me.Label1.Text = "Selecciones el Estatus de los Clientes que desea ver:" Me.Label1.Visible = False ' 'Label2 ' Me.Label2.BackColor = System.Drawing.Color.White Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 15.75!, 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(8, 8) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(712, 61) Me.Label2.TabIndex = 2 Me.Label2.Text = "Generacion de Cartas para Verificacion de Expedientes" Me.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'FrmCartas ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.White Me.ClientSize = New System.Drawing.Size(744, 469) Me.Controls.Add(Me.Panel1) Me.Name = "FrmCartas" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Panel1.ResumeLayout(False) CType(Me.GrdBusqueda, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) End Sub #End Region Private Sub BTCancelar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTAutorizacion2.Click Dim ClassCom As New clsComplejo Dim strBusqueda As String Dim SQLSuma As String Dim VarTipoPersona As Long Dim VarSumaDoc As Long Dim Fila As DataRow 'autorizacion 2 strBusqueda = "SELECT x.idcliente,x.clientenom as Nombre,x.apaterno as 'A. Paterno', x.amaterno as 'A. Materno',x.domicilio as Calle ," strBusqueda = strBusqueda & " x.colonia as Colonia," strBusqueda = strBusqueda & " a.cp as CP,p.nombreplaza as Plaza,e.nombreestado as Estado,x.idcliente,x.tipopersona " strBusqueda = strBusqueda & " FROM cliente x ,kyc_datosgenerales a, plaza p, estado e" strBusqueda = strBusqueda & " WHERE isnull(x.id_plaza,0) = p.id_plaza AND a.id_estado = e.id_estado " strBusqueda = strBusqueda & " AND a.idcliente = x.idcliente " strBusqueda = strBusqueda & " AND a.id_estatusKYC = 6 " strBusqueda = strBusqueda & " order by X.clientenom " 'strBusqueda = "SELECT cli.idcliente as 'Numero de Cliente',cli.clientenom as Nombre,cli.apaterno as 'Apellido Paterno',cli.amaterno as 'Apellido Materno'" 'strBusqueda = strBusqueda & " FROM CLIENTE cli,kyc_datosgenerales dat" 'strBusqueda = strBusqueda & " WHERE dat.id_estatusKYC = 10 " 'strBusqueda = strBusqueda & " AND dat.idcliente = cli.idcliente" 'strBusqueda = strBusqueda & " ORDER BY cli.CLIENTENOM" ClassCom = New clsComplejo ClassCom.fdtDataSetTabla(strBusqueda) If ClassCom.ds.Tables(0).Rows.Count <> 0 Then GrdBusqueda.DataSource = Nothing GrdBusqueda.SetDataBinding(ClassCom.ds, "Tabla") End If End Sub Private Sub BTCerrar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTCerrar.Click Me.Close() End Sub Private Sub BTActuaizar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTBajas.Click Dim ClassCom As New clsComplejo Dim strBusqueda As String Dim SQLSuma As String Dim VarTipoPersona As Long Dim VarSumaDoc As Long Dim Fila As DataRow 'BAJA strBusqueda = "SELECT x.idcliente,x.clientenom as Nombre,x.apaterno as 'A. Paterno', x.amaterno as 'A. Materno',x.domicilio as Calle ," strBusqueda = strBusqueda & " x.colonia as Colonia," strBusqueda = strBusqueda & " a.cp as CP,p.nombreplaza as Plaza,e.nombreestado as Estado,x.idcliente,x.tipopersona " strBusqueda = strBusqueda & " FROM cliente x ,kyc_datosgenerales a, plaza p, estado e" strBusqueda = strBusqueda & " WHERE isnull(x.id_plaza,0) = p.id_plaza AND a.id_estado = e.id_estado " strBusqueda = strBusqueda & " AND a.idcliente = x.idcliente " strBusqueda = strBusqueda & " AND a.id_estatusKYC = 7 " strBusqueda = strBusqueda & " order by X.clientenom " 'strBusqueda = "SELECT cli.idcliente as 'Numero de Cliente',cli.clientenom as Nombre,cli.apaterno as 'Apellido Paterno',cli.amaterno as 'Apellido Materno'" 'strBusqueda = strBusqueda & " FROM CLIENTE cli,kyc_datosgenerales dat" 'strBusqueda = strBusqueda & " WHERE dat.id_estatusKYC = 7 " 'strBusqueda = strBusqueda & " AND dat.idcliente = cli.idcliente" 'strBusqueda = strBusqueda & " ORDER BY cli.CLIENTENOM" ClassCom = New clsComplejo ClassCom.fdtDataSetTabla(strBusqueda) If ClassCom.ds.Tables(0).Rows.Count <> 0 Then GrdBusqueda.DataSource = Nothing GrdBusqueda.SetDataBinding(ClassCom.ds, "Tabla") Else GrdBusqueda.DataSource = Nothing End If End Sub Private Sub BTActuaizar_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTBajas.MouseLeave Dim Etiqueta As Button Etiqueta = sender Etiqueta.BackColor = System.Drawing.Color.MidnightBlue End Sub Private Sub BTCancelar_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTAutorizacion2.MouseLeave Dim Etiqueta As Button Etiqueta = sender Etiqueta.BackColor = System.Drawing.Color.MidnightBlue End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTOtros.Click Dim ClassCom As New clsComplejo Dim strBusqueda As String Dim SQLSuma As String Dim VarTipoPersona As Long Dim VarSumaDoc As Long Dim Fila As DataRow 'otros strBusqueda = "SELECT x.idcliente,x.clientenom as Nombre,x.apaterno as 'A. Paterno', x.amaterno as 'A. Materno',x.domicilio as Calle ," strBusqueda = strBusqueda & " x.colonia as Colonia," strBusqueda = strBusqueda & " a.cp as CP,p.nombreplaza as Plaza,e.nombreestado as Estado,x.idcliente,x.tipopersona " strBusqueda = strBusqueda & " FROM cliente x ,kyc_datosgenerales a, plaza p, estado e" strBusqueda = strBusqueda & " WHERE isnull(x.id_plaza,0) = p.id_plaza AND a.id_estado = e.id_estado " strBusqueda = strBusqueda & " AND a.idcliente = x.idcliente " strBusqueda = strBusqueda & " AND a.id_estatusKYC <> 6 and a.id_estatusKYC <> 7 " strBusqueda = strBusqueda & " order by X.clientenom " 'strBusqueda = "SELECT cli.idcliente as 'Numero de Cliente',cli.clientenom as Nombre,cli.apaterno as 'Apellido Paterno',cli.amaterno as 'Apellido Materno'" 'strBusqueda = strBusqueda & " FROM CLIENTE cli,kyc_datosgenerales dat" 'strBusqueda = strBusqueda & " WHERE dat.id_estatusKYC <> 7 and dat.id_estatusKYC <> 10 " 'strBusqueda = strBusqueda & " AND dat.idcliente = cli.idcliente" 'strBusqueda = strBusqueda & " ORDER BY cli.CLIENTENOM" ClassCom = New clsComplejo ClassCom.fdtDataSetTabla(strBusqueda) If ClassCom.ds.Tables(0).Rows.Count <> 0 Then GrdBusqueda.DataSource = Nothing GrdBusqueda.SetDataBinding(ClassCom.ds, "Tabla") End If End Sub Private Sub Button1_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTOtros.MouseLeave Dim Etiqueta As Button Etiqueta = sender Etiqueta.BackColor = System.Drawing.Color.MidnightBlue End Sub Private Sub BTCerrar_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTCerrar.MouseLeave Dim Etiqueta As Button Etiqueta = sender Etiqueta.BackColor = System.Drawing.Color.MidnightBlue End Sub Private Sub BTBajas_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles BTBajas.MouseMove Dim Etiqueta As Button Etiqueta = sender Etiqueta.BackColor = System.Drawing.Color.Blue End Sub Private Sub BTAutorizacion2_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles BTAutorizacion2.MouseMove Dim Etiqueta As Button Etiqueta = sender Etiqueta.BackColor = System.Drawing.Color.Blue End Sub Private Sub BTOtros_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles BTOtros.MouseMove Dim Etiqueta As Button Etiqueta = sender Etiqueta.BackColor = System.Drawing.Color.Blue End Sub Private Sub BTCerrar_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles BTCerrar.MouseMove Dim Etiqueta As Button Etiqueta = sender Etiqueta.BackColor = System.Drawing.Color.Blue End Sub Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTGen.Click ' Dim ClassCom As clsComplejo ' Dim fechacomodin As String ' Dim fechacomodin1 As String ' Dim fechacomodin2 As String ' Dim NombreArchivo As String ' Dim FechaDia As String ' Dim FechaMes As String ' Dim FechaAno As String ' Dim Rp As Word.WdReplace ' Dim Wp As Word.WdFindWrap ' Dim NomCliente As String ' Dim i As Long ' Dim varClientes As Object ' Dim VarIDCliente As Long ' Dim VarDireccion As String ' Dim FileOutPut As String ' Dim varComodin As Object ' Dim varComodin2 As Object ' Dim strMes As String ' Dim Tiempo1 As Object ' Dim Tiempo2 As Object ' Dim TSpan As TimeSpan ' Dim DTInicio As DateTime ' Dim DtFinal As DateTime ' Dim lngVarConttador As Long ' FileOutPut = "" ' Dim ObjWord As Word.Application ' Try ' ClassCom = New clsComplejo ' varComodin2 = ClassCom.BuscaValores("rutadestino", "paramcartas", "") ' If IsDBNull(varComodin2) Then ' varComodin2 = "" ' End If ' If varComodin2 = "" Then ' MsgBox("No se ha Configurado la ruta Destino para los Documentos") ' Exit Sub ' End If ' 'For i As Integer = 0 To Lst0Importa.CheckedIndices.Count - 1 ' ' SQLinsert = "INSERT INTO KYC_PaisImpExp (idcliente,id_pais,impexp) " ' ' SQLinsert = SQLinsert & " VALUES ( " & ClsVariables.VarIdCliente & "," & Lst0Importa.CheckedIndices(i) & "," & "2)" ' ' ClassCom.sbInserta(SQLinsert) ' 'Next ' ClassCom = New clsComplejo ' For i = 0 To ChkClientes.CheckedItems.Count - 1 ' My.Application.DoEvents() ' ChkClientes.SelectedItem = i ' VarIDCliente = ClassCom.BuscaValores("idcliente", "CLIENTE", "CLIENTENOM = '" & ChkClientes.CheckedItems(i).ToString & "'") ' ClassCom = New clsComplejo ' If clsVaribles.TipoPersona = 2 Then ' NombreArchivo = CurDir() & "\" & "Prueba Carta Nueva Funcionalidad.doc" ' Else ' NombreArchivo = CurDir() & "\" & "Prueba Carta Nueva Funcionalidad.doc" ' End If ' ClassCom = New clsComplejo ' ObjWord = New Word.Application ' If ObjWord Is Nothing Then ' ObjWord = CreateObject("word.application") ' Else ' ObjWord = GetObject(, "word.application") ' End If ' ObjWord.Documents.Open(NombreArchivo, ReadOnly:=True) ' ObjWord.Selection.Find.ClearFormatting() ' ObjWord.Selection.Find.Replacement.ClearFormatting() ' ClassCom = New clsComplejo ' 'NOMBRE DEL CLIENTE ' varClientes = "" ' varClientes = ClassCom.BuscaValores("clientenom", "cliente", "idcliente = " & VarIDCliente) ' If IsDBNull(varClientes) Then ' varClientes = "" ' End If ' ClassCom.ReemplazaTexto(ObjWord, "", varClientes) ' 'DIRECCION ' VarDireccion = "" ' VarDireccion = ClassCom.BuscaValores("isnull(domicilio,'') + ' ' + 'COLONIA ' + isnull(colonia,'')", "cliente", "idcliente = '" & VarIDCliente & "'") ' ClassCom.ReemplazaTexto(ObjWord, "", VarDireccion) ' 'DIA ' ClassCom.ReemplazaTexto(ObjWord, "", Microsoft.VisualBasic.Day(Now())) ' 'MES ' strMes = Microsoft.VisualBasic.MonthName(Microsoft.VisualBasic.Month(Now()), False) ' strMes = UCase(Mid(strMes, 1, 1)) & Mid(strMes, 2, Len(strMes)) ' ClassCom.ReemplazaTexto(ObjWord, "", strMes) ' 'ANO ' ClassCom.ReemplazaTexto(ObjWord, "", Microsoft.VisualBasic.Year(Now())) ' ClassCom = New clsComplejo ' varComodin = ClassCom.BuscaValores("nic", "cuenta", "idcliente = " & VarIDCliente) ' If IsDBNull(varComodin) Then varComodin = "" ' FileOutPut = varComodin2 & "\ReqRef" & varComodin & ".doc" ' ObjWord.ActiveDocument.SaveAs(FileName:=FileOutPut) ' ObjWord.Documents.Close() ' ObjWord.Application.Quit() ' DTInicio = DateTime.Parse(Now()) 'sig: ' DtFinal = DateTime.Parse(Now()) ' lngVarConttador = DTInicio.Subtract(DtFinal).Duration.Seconds ' If lngVarConttador >= 5 Then ' Else ' GoTo sig ' End If ' Next ' MsgBox("Proceso Terminado") ' Catch ex As Exception ' MessageBox.Show("error en ClsComplejo; sbLlenaLista: " & ex.Message, "MINDS", MessageBoxButtons.OK, MessageBoxIcon.Error) ' If Not ObjWord Is Nothing Then ' 'ObjWord.Documents.Close() ' ObjWord.Application.Quit() ' ObjWord = Nothing ' Exit Sub ' End If ' End Try End Sub Private Sub GrdBusqueda_Navigate(ByVal sender As System.Object, ByVal ne As System.Windows.Forms.NavigateEventArgs) Handles GrdBusqueda.Navigate End Sub Private Sub GrdBusqueda_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles GrdBusqueda.Click Dim Classcom As New clsComplejo Try clsVaribles.IDCliente = GrdBusqueda.Item(GrdBusqueda.CurrentRowIndex, 0) clsVaribles.TipoPersona = Classcom.BuscaValores("tipopersona", "cliente", "idcliente = " & clsVaribles.IDCliente) Catch ex As Exception End Try End Sub Private Sub GrdBusqueda_Move(ByVal sender As Object, ByVal e As System.EventArgs) Handles GrdBusqueda.Move If GrdBusqueda.DataSource <> Nothing Then clsVaribles.IDCliente = GrdBusqueda.Item(GrdBusqueda.CurrentRowIndex, 0) End If End Sub Private Sub FrmCartas_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim ClassCom As New clsComplejo Dim strBusqueda As String Dim SQLSuma As String Dim VarTipoPersona As Long Dim VarSumaDoc As Long Dim Fila As DataRow 'autorizacion 2 'x.idcliente, Try If clsVaribles.lngFiltroIDCliente <> 0 Then If clsVaribles.strSQL <> "" Then ClassCom.LLenaCheckLisESP(ChkClientes, clsVaribles.strSQL, False, 1) Else strBusqueda = "SELECT x.clientenom as Nombre" strBusqueda = strBusqueda & " FROM cliente x ,kyc_datosgenerales a,cuenta ct" strBusqueda = strBusqueda & " WHERE a.idcliente = x.idcliente " strBusqueda = strBusqueda & " and a.idcliente = ct.idcliente " strBusqueda = strBusqueda & " and ct.no_cuenta = '" & clsVaribles.lngFiltroIDCliente & "'" strBusqueda = strBusqueda & " order by X.clientenom " End If Else strBusqueda = "SELECT x.clientenom as Nombre" strBusqueda = strBusqueda & " FROM cliente x ,kyc_datosgenerales a" strBusqueda = strBusqueda & " WHERE a.idcliente = x.idcliente " strBusqueda = strBusqueda & " order by X.clientenom " End If If strBusqueda <> "" Then ClassCom = New clsComplejo ClassCom.fdtDataSet(strBusqueda) If ClassCom.ds.Tables(0).Rows.Count <> 0 Then 'GrdBusqueda.DataSource = Nothing 'GrdBusqueda.SetDataBinding(ClassCom.ds, "Tabla") ClassCom.LLenaCheckLis(ChkClientes, strBusqueda, False) End If End If Catch ex As Exception End Try End Sub Private Sub BTSel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTSel.Click For i As Integer = 0 To ChkClientes.Items.Count - 1 ChkClientes.SetItemChecked(i, True) Next End Sub Private Sub ChkClientes_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub End Class