Cep Telefonu Kayıt Takip Programı VB.Net

Cep Telefonu Kayıt Takip Programı VB.Net

Bu ve benzeri takip programlar veya bu programa artı özellikler ekletmek istiyorsanız gorselprogram@gmail.com adresine mail atın.

FORM1 İçerisine Yazılacak Kodlar…

[code lang=”vbnet”]
Imports System.Data.OleDb

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

Public Sub arizaara()
Dim adtr As New OleDbDataAdapter("select * From veri", baq)
If textBox1.Text = "" Then
kmt.Connection = baq
kmt.CommandText = "Select * from veri"
adtr.SelectCommand = kmt
adtr.Fill(dtst, "veri")
End If
If Convert.ToBoolean(baq.State) = False Then
baq.Open()
End If
adtr.SelectCommand.CommandText = (" Select * From veri" & " where(imei like ‘%") + textBox1.Text & "%’ )"
dtst.Clear()
adtr.Fill(dtst, "veri")
baq.Close()
End Sub

Public Sub arizaara2()
Dim adtr As New OleDbDataAdapter("select * From veri", baq)
If Form3.textBox8.Text = "" Then
kmt.Connection = baq
kmt.CommandText = "Select * from veri"
adtr.SelectCommand = kmt
adtr.Fill(dtst, "veri")
End If
If Convert.ToBoolean(baq.State) = False Then
baq.Open()
End If
adtr.SelectCommand.CommandText = " Select * From veri" & " where(imei like ‘%" & Convert.ToString(Form3.textBox8.Text) & "%’ )"
dtst.Clear()
adtr.Fill(dtst, "veri")
baq.Close()
End Sub

Public Sub arizalistele()
baq.Open()
Dim adtr As New OleDbDataAdapter("select * From veri", baq)
adtr.Fill(dtst, "veri")
dataGridView1.DataMember = "veri"
dataGridView1.DataSource = dtst
adtr.Dispose()
baq.Close()
End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
dataGridView1.Visible = False
dtst.Clear()
arizalistele()

End Sub

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

End Sub

Private Sub button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button4.Click
Me.Hide()
Form3.ShowDialog()

End Sub

Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click
arizaara()
dataGridView1.Visible = True

End Sub

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

End Sub
End Class

[/code]

FORM2 İçerisine Yazılacak Kodlar…

[code lang=”vbnet”]
Public Class Form2

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

End Sub

Private Sub button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button4.Click
Me.Hide()
Form3.ShowDialog()

End Sub

Private Sub textBox5_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles textBox5.TextChanged
Dim islem As Integer
Dim a As String
‘a diye string değişken tanımladık
a = String.Format(" {0:yyyy}", DateTime.Now)
‘Burda hangi yılda olduğumuzu bulup a değişkenine atadım
‘amacım garanti süresini bulmak genelde üretildiği tarihden 2 yıl sonra garanti biter bunu baz alarak yapcam kodları
If Integer.Parse(textBox5.Text) > Integer.Parse(a) Then
‘eğer üretim tarihi bugünün tarihinden büyükse tarihi doğru girmesi için mesaj yazdırdık
MessageBox.Show("Lütfen Üretim Tarihini Doğru Giriniz")
Else
‘eğer üretim tarihi bugünün tarihinden küçükse alttaki garantili olup olmadığını hesaplasın yani alttaki kodları uygulasın 🙂
islem = Integer.Parse(a) – Integer.Parse(textBox5.Text)
‘işlem değişkenine bugunun tarihi ile üretim tarihi farkını bulduk
If islem <= 2 Then
‘eğer 2 yıl ve 2 yıldan küçükse garantili yazsın
textBox7.Text = "GARANTİLİ"
Else
‘değilse garanti dışıdır desin:9
textBox7.Text = "GARANTİ DIŞI"
End If
End If

End Sub

Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click
Form1.baq.Open()
Form1.kmt.Connection = Form1.baq
Form1.kmt.CommandText = (((((("INSERT INTO veri(imei,model,marka,ulke,tarih,garanti,durum) VALUES (‘" + textBox1.Text & "’,’") + textBox2.Text & "’,’") + textBox3.Text & "’,’") + textBox4.Text & "’,’") + textBox5.Text & "’,’") + textBox7.Text & "’,’") + textBox6.Text & "’)"
Form1.kmt.ExecuteNonQuery()
Form1.kmt.Dispose()
Form1.baq.Close()
Form1.dtst.Clear()
textBox1.Text = ""
textBox2.Text = ""
textBox3.Text = ""
textBox4.Text = ""
textBox5.Text = ""
textBox7.Text = ""

End Sub

Private Sub button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button2.Click
Form1.baq.Open()
Form1.kmt.Connection = Form1.baq
Form1.kmt.CommandText = (((((("UPDATE veri SET model=’" + textBox2.Text & "’,marka=’") + textBox3.Text & "’,ulke=’") + textBox4.Text & "’,tarih=’") + textBox5.Text & "’,durum=’") + textBox6.Text & "’,garanti=’") + textBox7.Text & "’ WHERE imei=’") + textBox1.Text & "’"
Form1.kmt.ExecuteNonQuery()
Form1.baq.Close()
Form1.kmt.Dispose()
Form1.dtst.Clear()
textBox1.Text = ""
textBox2.Text = ""
textBox3.Text = ""
textBox4.Text = ""
textBox5.Text = ""
textBox7.Text = ""

End Sub

Private Sub button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button5.Click
Form1.baq.Open()
Form1.kmt.Connection = Form1.baq
Form1.kmt.CommandText = "DELETE FROM veri WHERE imei=’" + textBox1.Text & "’"
Form1.kmt.ExecuteNonQuery()
Form1.baq.Close()
Form1.kmt.Dispose()
Form1.dtst.Clear()
End Sub

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

End Sub
End Class
[/code]

Bu ve benzeri takip programlar veya bu programa artı özellikler ekletmek istiyorsanız gorselprogram@gmail.com adresine mail atın.

FORM3 İçerisine Yazılacak Kodlar…

[code lang=”vbnet”]

Public Class Form3

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

End Sub

Private Sub button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button4.Click
Me.Hide()
Form2.ShowDialog()

End Sub

Private Sub button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button5.Click
textBox1.DataBindings.Clear()
textBox2.DataBindings.Clear()
textBox3.DataBindings.Clear()
textBox4.DataBindings.Clear()
textBox5.DataBindings.Clear()
textBox7.DataBindings.Clear()
Form1.arizaara2()

textBox1.DataBindings.Add("Text", Form1.dtst, "veri.imei")
textBox2.DataBindings.Add("Text", Form1.dtst, "veri.model")
textBox3.DataBindings.Add("Text", Form1.dtst, "veri.marka")
textBox4.DataBindings.Add("Text", Form1.dtst, "veri.ulke")
textBox5.DataBindings.Add("Text", Form1.dtst, "veri.tarih")
textBox7.DataBindings.Add("Text", Form1.dtst, "veri.garanti")
textBox6.Text = "ÇALINTI"
button2.Enabled = True
button1.Enabled = False
End Sub

Private Sub button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button2.Click
Form1.baq.Open()
Form1.kmt.Connection = Form1.baq
Form1.kmt.CommandText = (((((("UPDATE veri SET model=’" + textBox2.Text & "’,marka=’") + textBox3.Text & "’,ulke=’") + textBox4.Text & "’,tarih=’") + textBox5.Text & "’,durum=’") + textBox6.Text & "’,garanti=’") + textBox7.Text & "’ WHERE imei=’") + textBox1.Text & "’"
Form1.kmt.ExecuteNonQuery()
Form1.baq.Close()
Form1.kmt.Dispose()
Form1.dtst.Clear()

End Sub

Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click
Form1.baq.Open()
Form1.kmt.Connection = Form1.baq
Form1.kmt.CommandText = (((((("INSERT INTO veri(imei,model,marka,ulke,tarih,garanti,durum) VALUES (‘" + textBox1.Text & "’,’") + textBox2.Text & "’,’") + textBox3.Text & "’,’") + textBox4.Text & "’,’") + textBox5.Text & "’,’") + textBox7.Text & "’,’") + textBox6.Text & "’)"
Form1.kmt.ExecuteNonQuery()
Form1.kmt.Dispose()
Form1.baq.Close()
Form1.dtst.Clear()
End Sub

Private Sub checkBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles checkBox1.CheckedChanged
If checkBox1.Checked = True Then

groupBox1.Visible = True
Else
groupBox1.Visible = False
End If

End Sub

Private Sub button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button7.Click
Form1.baq.Open()
Form1.kmt.Connection = Form1.baq
Form1.kmt.CommandText = "DELETE FROM veri WHERE imei=’" + textBox1.Text & "’"
Form1.kmt.ExecuteNonQuery()
Form1.baq.Close()
Form1.kmt.Dispose()
Form1.dtst.Clear()

End Sub

Private Sub button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button6.Click
Me.Close()

End Sub
End Class
[/code]

Bu ve benzeri takip programlar veya bu programa artı özellikler ekletmek istiyorsanız gorselprogram@gmail.com adresine mail atın.

Projeyi İNDİR


Yorumlar 4

Bir yanıt yazın

E-posta adresiniz yayınlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir