Professional Documents
Culture Documents
Cliente Vendelo
Cliente Vendelo
FillGrid()
End Sub
Private Sub FillGrid()
Try
Dim objCLIENTE As New CLIENTE2
With objCLIENTE
DGVCLIENTE.DataSource = .ListarCLIENTE
End With
Catch ex As Exception
MsgBox("Mensaje: " & ex.Message)
End Try
End Sub
Try
Dim objcliente As New CLIENTE2
With objcliente
.fidcli = Txtcodigo.Text
.fnombcli = Txtnombre.Text
.ftipocli = Txttipo.Text
.RegistrarCLIENTE()
End With
MsgBox("clienteRegistrado !!!!")
LimpiarForm() 'Invocar al mtodo limpiar formulario
FillGrid() 'Llenar el Grid
Catch ex As Exception
MsgBox("Mensaje: " & ex.Message)
End Try
End Sub
With objcliente
.fidcli = Txtcodigo.Text
.fnombcli = Txtnombre.Text
.ftipocli = Txttipo.Text
.ActualizarCLIENTE()
End With
MsgBox("Datos Actualizados !!!!")
LimpiarForm()
FillGrid()
Catch ex As Exception
MsgBox("Mensaje: " & ex.Message)
End Try
End Sub
End With
MsgBox("Datos Eliminados !!!!")
LimpiarForm()
FillGrid()
Catch ex As Exception
MsgBox("Mensaje: " & ex.Message)
End Try
End Sub
.fidcli = Txtcodigo.Text
.BuscarCLIENTExId()
Txtnombre.Text = .fnombcli
Txttipo.Text = .ftipocli
End With
Catch ex As Exception
MsgBox("Mensaje: " & ex.Message)
End Try
End Sub
End Class
Imports System.Data.SqlClient
Public Class CLIENTE2
Sub New(ByVal tid As String, ByVal tnombre As String, ByVal ttipo As String)
Me.idcli = tid
Me.nombcli = tnombre
Me.tipocli = ttipo
cmd.ExecuteNonQuery()
Catch ex As Exception
Throw New Exception(ex.Message)
Finally
conn.Close()
End Try
End Sub
End Class
End Sub
End Class