27 lines
795 B
VB.net
27 lines
795 B
VB.net
Public Class LlenaCombo
|
|
Private Command As New Command()
|
|
|
|
Public Sub LlenaData(ByVal NombreCatalogo As String, ByVal Combo As ComboBox, ByVal Tabla As DataTable)
|
|
Try
|
|
Tabla.Clear()
|
|
Catch
|
|
End Try
|
|
Try
|
|
Command.spsql = NombreCatalogo
|
|
Combo.DataSource = Command.SeleccionCombo(Command.spsql, Tabla)
|
|
If Combo.Name = "cboClientes" Or Combo.Name = "cboEstado" Or Combo.Name = "cboSucursal" Or Combo.Name = "cboTipEmp" Then
|
|
Combo.ValueMember = "clave"
|
|
Else
|
|
Combo.ValueMember = "Id"
|
|
End If
|
|
Combo.DisplayMember = "nombre"
|
|
Catch
|
|
|
|
End Try
|
|
'Combo.ValueMember = "Id"
|
|
'Combo.DisplayMember = "nombre"
|
|
|
|
End Sub
|
|
|
|
End Class
|