Gorsel Programlama | Görsel Programlama | C#.Net | VB.Net | C# Console

ana sayfa > Görsel Programlama, VB.NET > Otel Takip Programı VB.Net

Otel Takip Programı VB.Net

Pazartesi, 07 Haz 2010 yorum ekle yorumlara git

Otel Takip Programı VB.Net

Bu ve benzeri takip programlar veya bu programa artı özellikler ekletmek istiyorsanız [email protected] adresine mail atın.


FORM1 İçerisine Yazılacak Kodlar…


Imports System.Data.OleDb

Public Class Form1
Public bag As New OleDbConnection("Provider=Microsoft.Jet.Oledb.4.0;Data Source=data.mdb")
Public kmt As New OleDbCommand()
Public adtr As New OleDbDataAdapter()
Public dtst As New DataSet()

Public Sub combo()
bag.Open()
kmt.Connection = bag
kmt.CommandText = "Select * from bos"
Dim ODA As OleDbDataReader
ODA = kmt.ExecuteReader()
While ODA.Read()
comboBox1.Items.Add(ODA(0).ToString())
End While
bag.Close()
ODA.Dispose()
comboBox1.Sorted = True
End Sub
Public Sub combo2()
bag.Open()
kmt.Connection = bag
kmt.CommandText = "Select * from dolu"
Dim ODA As OleDbDataReader
ODA = kmt.ExecuteReader()
While ODA.Read()
form3.comboBox1.Items.Add(ODA(0).ToString())
End While
bag.Close()
ODA.Dispose()
form3.comboBox1.Sorted = True

End Sub
Public Sub listele()
dtst.Clear()
bag.Open()
Dim adtr As New OleDbDataAdapter("select * From musbil", bag)
adtr.Fill(dtst, "musbil")
form3.dataView1.Table = dtst.Tables(0)
form3.dataGrid1.DataSource = form3.dataView1
adtr.Dispose()
bag.Close()

End Sub
Public Sub sahayaz()
bag.Open()
kmt.Connection = bag
kmt.CommandText = "Select * from musbil"
Dim ODA As OleDbDataReader
ODA = kmt.ExecuteReader()
While ODA.Read()
Select Case ODA(7).ToString()
Case "ODA1"
If True Then
form2.button1.Text = ODA(0).ToString()
form2.button1.BackColor = System.Drawing.Color.Green
Exit Select
End If
Case "ODA2"
If True Then
form2.button2.Text = ODA(0).ToString()
form2.button2.BackColor = System.Drawing.Color.Green
Exit Select
End If
Case "ODA3"
If True Then
form2.button3.Text = ODA(0).ToString()
form2.button3.BackColor = System.Drawing.Color.Green
Exit Select
End If
Case "ODA4"
If True Then
form2.button4.Text = ODA(0).ToString()
form2.button4.BackColor = System.Drawing.Color.Green
Exit Select
End If
Case "ODA5"
If True Then
form2.button5.Text = ODA(0).ToString()
form2.button5.BackColor = System.Drawing.Color.Green
Exit Select
End If
Case "ODA6"
If True Then
form2.button6.Text = ODA(0).ToString()
form2.button6.BackColor = System.Drawing.Color.Green
Exit Select
End If
Case "ODA7"
If True Then
form2.button7.Text = ODA(0).ToString()
form2.button7.BackColor = System.Drawing.Color.Green
Exit Select
End If
Case "ODA8"
If True Then
form2.button8.Text = ODA(0).ToString()
form2.button8.BackColor = System.Drawing.Color.Green
Exit Select
End If
Case "ODA9"
If True Then
form2.button9.Text = ODA(0).ToString()
form2.button9.BackColor = System.Drawing.Color.Green
Exit Select
End If
Case "ODA10"
If True Then
form2.button10.Text = ODA(0).ToString()
form2.button10.BackColor = System.Drawing.Color.Green
Exit Select
End If
End Select
End While
bag.Close()
ODA.Dispose()

End Sub
Public Sub sahasil()

Select Case form3.comboBox1.Text

Case "ODA1"
If True Then
form2.button1.Text = "ODA1"
form2.button1.BackColor = System.Drawing.Color.Red
Exit Select
End If
Case "ODA2"
If True Then
form2.button2.Text = "ODA2"
form2.button2.BackColor = System.Drawing.Color.Red
Exit Select
End If
Case "ODA3"
If True Then
form2.button3.Text = "ODA3"
form2.button3.BackColor = System.Drawing.Color.Red
Exit Select
End If
Case "ODA4"
If True Then
form2.button4.Text = "ODA4"
form2.button4.BackColor = System.Drawing.Color.Red
Exit Select
End If
Case "ODA5"
If True Then
form2.button5.Text = "ODA5"
form2.button5.BackColor = System.Drawing.Color.Red
Exit Select
End If

Case "ODA6"
If True Then
form2.button6.Text = "ODA6"
form2.button6.BackColor = System.Drawing.Color.Red
Exit Select
End If
Case "ODA7"
If True Then
form2.button7.Text = "ODA7"
form2.button7.BackColor = System.Drawing.Color.Red
Exit Select
End If
Case "ODA8"
If True Then
form2.button8.Text = "ODA8"
form2.button8.BackColor = System.Drawing.Color.Red
Exit Select
End If
Case "ODA9"
If True Then
form2.button9.Text = "ODA9"
form2.button9.BackColor = System.Drawing.Color.Red
Exit Select
End If
Case "ODA10"
If True Then
form2.button10.Text = "ODA10"
form2.button10.BackColor = System.Drawing.Color.Red
Exit Select
End If
End Select

End Sub

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

End Sub

Private Sub button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button7.Click
Close()

End Sub

Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click
If textBox3.Text <> "" AndAlso textBox1.Text <> "" AndAlso comboBox1.Text <> "" Then
bag.Open()
kmt.Connection = bag
kmt.CommandText = ((((((("INSERT INTO musbil(TcKimlik,Ad,Soyad,CepTel,OdaTuru,Cephe,Konumu,KiralamaSuresi) VALUES ('" + textBox1.Text & "','") + textBox2.Text & "','") + textBox3.Text & "','") + textBox4.Text & "','") + comboBox2.Text & "','") + comboBox3.Text & "','") + comboBox1.Text & "','") + textBox5.Text &; "') "
kmt.ExecuteNonQuery()
kmt.CommandText = "INSERT INTO dolu(doluyerler) VALUES ('" + comboBox1.Text & "') "
kmt.ExecuteNonQuery()
kmt.CommandText = "DELETE from bos WHERE bosyerler='" + comboBox1.Text & "'"
kmt.ExecuteNonQuery()
kmt.Dispose()
bag.Close()
comboBox1.Items.Clear()
textBox1.Clear()
textBox2.Clear()
textBox3.Clear()
textBox2.Clear()
comboBox1.Text = ""
combo()
sahayaz()
listele()

MessageBox.Show("Odanız Ayrılmıştır!!! ")
Else
MessageBox.Show("Boş Alanları Doldurunuz!!!")
End If

End Sub

Private Sub button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button3.Click
Form3.Show()
Me.Hide()

End Sub

Private Sub button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button2.Click
Form2.Show()
Me.Hide()

End Sub
End Class

Bu ve benzeri takip programlar veya bu programa artı özellikler ekletmek istiyorsanız [email protected] adresine mail atın.

FORM2 İçerisine Yazılacak Kodlar…


Public Class Form2

Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Form1.sahayaz()

End Sub

Private Sub button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button11.Click
Form1.Show()
Me.Hide()
End Sub

Private Sub button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button12.Click
Close()

End Sub
End Class

Bu ve benzeri takip programlar veya bu programa artı özellikler ekletmek istiyorsanız [email protected] adresine mail atın.

FORM3 İçerisine Yazılacak Kodlar…

Public Class Form3
Private Sub texteyaz()
textBox6.Text = (Me.BindingContext(Form1.dtst, "musbil").Position + 1) & " / " & Me.BindingContext(Form1.dtst, "musbil").Count
End Sub

Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Form1.listele()
Form1.combo2()

textBox1.DataBindings.Add("Text", Form1.dtst, "musbil.TcKimlik")
textBox2.DataBindings.Add("Text", Form1.dtst, "musbil.Ad")
textBox3.DataBindings.Add("Text", Form1.dtst, "musbil.Soyad")
textBox4.DataBindings.Add("Text", Form1.dtst, "musbil.CepTel")
textBox5.DataBindings.Add("Text", Form1.dtst, "musbil.KiralamaSuresi")
comboBox1.DataBindings.Add("Text", Form1.dtst, "musbil.Konumu")
comboBox2.DataBindings.Add("Text", Form1.dtst, "musbil.Cephe")
comboBox3.DataBindings.Add("Text", Form1.dtst, "musbil.OdaTuru")
texteyaz()

End Sub

Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click
Close()

End Sub

Private Sub button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button7.Click
Me.BindingContext(Form1.dtst, "musbil").Position = Me.BindingContext(Form1.dtst, "musbilg").Count
texteyaz()

End Sub

Private Sub button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button4.Click
Me.BindingContext(Form1.dtst, "musbil").Position = 0
texteyaz()

End Sub

Private Sub button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button6.Click
Me.BindingContext(Form1.dtst, "musbil").Position += 1
texteyaz()

End Sub

Private Sub button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button5.Click
Me.BindingContext(Form1.dtst, "musbil").Position -= 1
texteyaz()

End Sub

Private Sub button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button3.Click
If textBox3.Text <> "" AndAlso textBox2.Text <> "" AndAlso comboBox1.Text <> "" Then
Dim cevap As DialogResult
cevap = MessageBox.Show("Oda çıkışı yapmak istediğinizden eminmisiniz...", "Uyarı", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If cevap = DialogResult.Yes Then
Form1.sahasil()
Form1.bag.Open()
Form1.kmt.Connection = Form1.bag
Form1.kmt.CommandText = "DELETE from musbil WHERE TcKimlik='" + textBox1.Text &"'"
Form1.kmt.ExecuteNonQuery()
Form1.kmt.CommandText = "INSERT INTO bos(bosyerler) VALUES ('" + comboBox1.Text & "') "
Form1.kmt.ExecuteNonQuery()
Form1.kmt.CommandText = "DELETE from dolu WHERE doluyerler='" + comboBox1.Text & "'"
Form1.kmt.ExecuteNonQuery()
Form1.kmt.Dispose()
Form1.bag.Close()
comboBox1.Items.Clear()
Form1.comboBox1.Items.Clear()
comboBox1.Text = ""
Form1.combo()
Form1.combo2()
Form1.dtst.Clear()

Form1.listele()
End If
End If

End Sub

Private Sub button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button2.Click
Form1.Show()
Me.Hide()

End Sub
End Class

Bu ve benzeri takip programlar veya bu programa artı özellikler ekletmek istiyorsanız [email protected] adresine mail atın.

Projeyi İNDİR








Rica: Sitemizin Google'da Ön Sıralarda Çıkması İçin Lütfen Alttaki Google+ Butonuna Tıklayınız , Sayfamızı Facebookta Beğeniniz veya yazıları Twitter,Facebookta paylaşınız.
Paylaş :



Böyle bir web sayfam olsun diyorsanız iletişim bölümünden veya [email protected] mail adresinden bize ulaşabilirsiniz.


Tüm cep telefonu aksesuar fırsatları için tıklayın !

  1. şimdilik yorum yok.
  1. şimdilik geri bağlantı yok