NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

Imports System.Data
Imports System.Data.OleDb
Public Class hastakayit

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim baglanti As New OleDbConnection("Provider=Microsoft.JET.OleDb.4.0;Data Source=hastane1.mdb")
Dim komut1 As New OleDbCommand("Select * from hastalar where tc='" & TextBox1.Text & "'", baglanti)
baglanti.Open()
Dim dr As OleDbDataReader
dr = komut1.ExecuteReader
If dr.HasRows Then
MsgBox("TC zaten kayıtlı")
baglanti.Close()
Else
baglanti.Close()
Dim tc, ad, soyad, tel, sosguv, cinsiyet As String
tc = TextBox1.Text
ad = TextBox2.Text
soyad = TextBox3.Text
Dim d_tar As String = DateTimePicker1.Value.ToString
tel = MaskedTextBox1.Text
cinsiyet = ComboBox2.Text
sosguv = ComboBox1.Text
Dim komut As New OleDbCommand
komut.Connection = baglanti
komut.CommandText = "insert into hastalar (tc,ad,soyad,d_tar,tel,sosguv,cinsiyet) values ('" & tc & "','" & ad & "','" & soyad & "','" & d_tar & "','" & tel & "','" & sosguv & "','" & cinsiyet & "')"
baglanti.Open()
komut.ExecuteNonQuery()
baglanti.Close()
MsgBox("Kayıt Başarılı")
End If
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim tc, ad, soyad, tel, sosguv, cinsiyet As String
Dim d_tar As String = DateTimePicker1.Value.ToString
tc = TextBox1.Text
ad = TextBox2.Text
soyad = TextBox3.Text
tel = MaskedTextBox1.Text
cinsiyet = ComboBox2.SelectedItem
sosguv = ComboBox1.SelectedItem
Dim baglanti As New OleDbConnection("Provider=microsoft.jet.oledb.4.0;Data Source=hastane1.mdb")
Dim komut As New OleDbCommand
komut.Connection = baglanti
komut.CommandText = "update hastalar set ad='" & ad & "',soyad='" & soyad & "',d_tar='" & d_tar & "',tel='" & tel & "',sosguv='" & sosguv & "',cinsiyet='" & cinsiyet & "' where tc='" & tc & "'"
baglanti.Open()
komut.ExecuteNonQuery()
baglanti.Close()
MsgBox("güncelleme tamamlandı")
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim tc As String
tc = TextBox1.Text
Dim baglanti As New OleDbConnection("Provider=microsoft.jet.oledb.4.0;Data Source=hastane1.mdb")
Dim komut As New OleDbCommand
komut.Connection = baglanti
komut.CommandText = "Delete * from hastalar where tc='" & tc & "'"
baglanti.Open()
komut.ExecuteNonQuery()
baglanti.Close()
MsgBox("kişi silme başarılı")
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Dim baglanti As New OleDbConnection("Provider=microsoft.jet.oledb.4.0;Data Source=hastane1.mdb")
Dim komut As New OleDbCommand("select * from hastalar where tc= '" & TextBox1.Text & "'", baglanti)
baglanti.Open()
Dim dr As OleDbDataReader
dr = komut.ExecuteReader
If dr.HasRows Then
Do While dr.Read()
TextBox2.Text = dr("ad")
TextBox3.Text = dr("soyad")
DateTimePicker1.Value = dr("d_tar")
MaskedTextBox1.Text = dr("tel")
ComboBox1.Text = dr("sosguv")
ComboBox2.Text = dr("cinsiyet")
Loop
baglanti.Close()
Else
baglanti.Close()
MsgBox("TC Bulunamadı.")
End If
End Sub

Private Sub HastaKayıtToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles HastaKayıtToolStripMenuItem.Click
Me.Show()
doktorkayit.Hide()

End Sub

Private Sub DoktorKayıtToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DoktorKayıtToolStripMenuItem.Click
Me.Hide()
doktorkayit.Show()

End Sub

Private Sub ÇıkışToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ÇıkışToolStripMenuItem.Click
Me.Hide()

End Sub
End Class
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.