Buenas tareas

Solo disponible en BuenasTareas
  • Páginas : 4 (778 palabras )
  • Descarga(s) : 0
  • Publicado : 4 de noviembre de 2010
Leer documento completo
Vista previa del texto
BAJAS
Imports System.Data.SqlClient
Public Class Form4

Private Sub Form4_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub

Private SubButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim cadena As String
cadena = "Data Source = HOUSEHP\SQLEXPRESS; Initial Catalog =RCC_Project; Integrated Security = True"
Dim con As New SqlConnection(cadena)

Dim eliminar As String = "DELETE FROM Docentes WHERE doc_clave=" & TextBox1.Text
Dimmiconexion As New SqlConnection(cadena)
Dim delete As New SqlCommand(eliminar, miconexion)
miconexion.Open()
delete.ExecuteNonQuery()
miconexion.Close()MsgBox("El DOCENTE HA SIDO ELIMINADO CON EXITO", MsgBoxStyle.Information)
TextBox1.Text = ""
End Sub

Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e AsSystem.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If e.KeyChar.IsDigit(e.KeyChar) Then
e.Handled = False
ElseIf e.KeyChar.IsControl(e.KeyChar) Then
e.Handled =False
Else
e.Handled = True
End If
End Sub

Private Sub Form4_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize
IfMe.WindowState = vbNormal Then
Height = 378
Width = 499

End If
End Sub

Private Sub PictureBox2_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles PictureBox2.Click

End Sub
End Class

ALTAS
Imports System.Data.SqlClient
Public Class Form3

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button2.Click
Close()
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim cadena As...
tracking img