Boton en visual 2008

Cerrado
JENNY - 3 oct 2010 a las 22:34
 asdsad - 9 oct 2010 a las 16:33
Hola,
NECESITO SABER COMO HAGO PARA CREAR UN BOTON GUARDAR Y QUE ESTE ME GUARDE LA INFORMACION EN CADA UNA DE LAS TABLAS

ADEMAS NECESTITO SABER COMO HACER UN BOTON ELIMINAR, MORDIFICAR
EL CODIGO DE ESTOS BOTONES LO NECESITO EN VISUAL BASIC 2008
GRACIAS

Consulta también:

3 respuestas

Dim strUsuario As String = Trim(txtUsuario.Text)
Dim TotalFilas As Integer = tblUsuario.Rows.Count - 1

For i As Integer = 0 To TotalFilas
bolGuardar = (strUsuario = tblUsuario.Rows(i).Item(2))
Next
If bolGuardar Then
MsgBox("Usuario ya registrado")
txtUsuario.Text = ""
txt
1
Function NuevoCodigo(ByVal strCodigo As String) As String

Dim strIndice As String = ""
Dim Fila As Integer = Val(strCodigo) - 1
Dim Indice As Integer = tblVarios.Rows(Fila).Item(1) + 1
strIndice = IIf(Indice < 10, "0", "") & Indice
tblVarios.Rows(Fila).Item(1) = strIndice
Return strIndice

End Function

Sub LLenarCombo(ByRef combo As ComboBox, ByVal strCodigo As String)

Dim TotalFilas As Integer = tblVarios.Rows.Count() - 1
For i As Integer = 0 To TotalFilas
If (tblVarios.Rows(i).Item(0) = strCodigo) Then
combo.Items.Add(tblVarios.Rows(i).Item(2))
End If
Next

End Sub

Function CompletarCeros(ByVal Numero As Integer, ByVal Cifras As Integer) As String
Dim strNumero As String = ""
' 1 , 2 -> "01"
' 1 , 3 -> "001"
strNumero = "02"
Return strNumero
End Function
0
Function NuevoCodigo(ByVal strCodigo As String) As String

Dim strIndice As String = ""
Dim Fila As Integer = Val(strCodigo) - 1
Dim Indice As Integer = tblVarios.Rows(Fila).Item(1) + 1
strIndice = IIf(Indice < 10, "0", "") & Indice
tblVarios.Rows(Fila).Item(1) = strIndice
Return strIndice

End Function

Sub LLenarCombo(ByRef combo As ComboBox, ByVal strCodigo As String)

Dim TotalFilas As Integer = tblVarios.Rows.Count() - 1
For i As Integer = 0 To TotalFilas
If (tblVarios.Rows(i).Item(0) = strCodigo) Then
combo.Items.Add(tblVarios.Rows(i).Item(2))
End If
Next

End Sub

Function CompletarCeros(ByVal Numero As Integer, ByVal Cifras As Integer) As String
Dim strNumero As String = ""
' 1 , 2 -> "01"
' 1 , 3 -> "001"
strNumero = "02"
Return strNumero
End Function
0