Software Project Information System
Coding
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text = "yuvaneeds" Then
If TextBox2.Text = "community" Then
Me.Hide()
Form2.Show()
End If
End If
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
TextBox3.Enabled = False
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If MessageBox.Show("do you really want to exit ?", "delete", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) = DialogResult.No Then
MsgBox("operation cancelled")
Exit Sub
Else
End
End If
End Sub
End Class
Coding
Public Class Form2
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form3.Show()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.Hide()
Form5.Show()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Me.Hide()
Form7.Show()
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Me.Hide()
Form9.Show()
End Sub
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Coding
Public Class Form3
Dim con As New OleDb.OleDbConnection
Dim pos As Integer
Dim ds As New DataSet
Dim da As OleDb.OleDbDataAdapter
Dim sql As String
Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
con.ConnectionString = "PROVIDER=Microsoft.jet.OLEDB.4.0;Data Source = C:\u1.mdb"
con.Open()
sql = "select * FROM c"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "g")
' MsgBox("FEES DETAIL IS NOW OPEN")
pos = 0
TextBox1.Text = ds.Tables("g").Rows(0).Item(0)
TextBox2.Text = ds.Tables("g").Rows(0).Item(1)
TextBox3.Text = ds.Tables("g").Rows(0).Item(2)
TextBox4.Text = ds.Tables("g").Rows(0).Item(3)
TextBox5.Text = ds.Tables("g").Rows(0).Item(4)
TextBox6.Text = ds.Tables("g").Rows(0).Item(5)
con.Close()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
pos = 0
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
TextBox5.Text = ds.Tables("g").Rows(pos).Item(4)
TextBox6.Text = ds.Tables("g").Rows(pos).Item(5)
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
If pos = 0 Then
MsgBox("you are at first record")
Else
pos = pos - 1
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
TextBox5.Text = ds.Tables("g").Rows(pos).Item(4)
TextBox6.Text = ds.Tables("g").Rows(pos).Item(5)
End If
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
If pos = ds.Tables("g").Rows.Count - 1 Then
MsgBox("you are at last record")
Else
pos = pos + 1
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
TextBox5.Text = ds.Tables("g").Rows(pos).Item(4)
TextBox6.Text = ds.Tables("g").Rows(pos).Item(5)
End If
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
pos = ds.Tables("g").Rows.Count - 1
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
TextBox5.Text = ds.Tables("g").Rows(pos).Item(4)
TextBox6.Text = ds.Tables("g").Rows(pos).Item(5)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
TextBox1.Clear()
TextBox2.Clear()
TextBox3.Clear()
TextBox4.Clear()
TextBox5.Clear()
TextBox6.Clear()
Button7.Enabled = False
Button8.Enabled = False
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
If pos >= 0 Then
Dim cb1 As New OleDb.OleDbCommandBuilder(da)
Dim dsrow As DataRow
dsrow = ds.Tables("g").NewRow()
dsrow.Item(0) = TextBox1.Text
dsrow.Item(1) = TextBox2.Text
dsrow.Item(2) = TextBox3.Text
dsrow.Item(3) = TextBox4.Text
dsrow.Item(4) = TextBox5.Text
dsrow.Item(5) = TextBox6.Text
ds.Tables("g").Rows.Add(dsrow)
da.Update(ds, "g")
MsgBox("new record added")
End If
Button7.Enabled = True
Button8.Enabled = True
End Sub
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
ds.Tables("g").Rows(pos).Item(0) = TextBox1.Text
ds.Tables("g").Rows(pos).Item(1) = TextBox2.Text
ds.Tables("g").Rows(pos).Item(2) = TextBox3.Text
ds.Tables("g").Rows(pos).Item(3) = TextBox4.Text
ds.Tables("g").Rows(pos).Item(4) = TextBox5.Text
ds.Tables("g").Rows(pos).Item(5) = TextBox6.Text
con.Open()
Dim cb As New OleDb.OleDbCommandBuilder(da)
da.Update(ds, "g")
MsgBox("data updated")
con.Close()
End Sub
Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
If pos >= 0 And pos <= ds.Tables("g").Rows.Count Then
If MessageBox.Show("do you really want to delete this record?", "delete", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) = DialogResult.No Then
MsgBox("operation cancelled")
Exit Sub
Else
Dim cb As New OleDb.OleDbCommandBuilder(da)
ds.Tables("g").Rows(pos).Delete()
pos = 0
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
TextBox5.Text = ds.Tables("g").Rows(pos).Item(4)
TextBox6.Text = ds.Tables("g").Rows(pos).Item(5)
da.Update(ds, "g")
End If
End If
End Sub
Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
pos = 0
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
TextBox5.Text = ds.Tables("g").Rows(pos).Item(4)
TextBox6.Text = ds.Tables("g").Rows(pos).Item(5)
Button7.Enabled = True
Button8.Enabled = True
End Sub
Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
Me.Hide()
Form4.Show()
End Sub
Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click
Me.Hide()
Form2.Show()
End Sub
End Class
Coding
Public Class Form4
Dim con As New OleDb.OleDbConnection
Dim pos As Integer
Dim ds As New DataSet
Dim da As OleDb.OleDbDataAdapter
Dim sql As String
Private Sub Form4_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'U1DataSet.c' table. You can move, or remove it, as needed.
Me.CTableAdapter.Fill(Me.U1DataSet.c)
con.ConnectionString = "PROVIDER=Microsoft.jet.OLEDB.4.0;Data Source = C:\u1.mdb"
con.Open()
sql = "select * FROM c"
da = New OleDb.OleDbDataAdapter(Sql, con)
da.Fill(ds, "g")
con.Close()
DataGridView1.DataSource = ds
DataGridView1.DataMember = "g"
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form3.Show()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
ds.Clear()
DataGridView1.Refresh()
Me.CTableAdapter.Fill(Me.U1DataSet.c)
con.ConnectionString = "PROVIDER=Microsoft.jet.OLEDB.4.0;Data Source = C:\u1.mdb"
con.Open()
sql = "select * FROM c"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "g")
con.Close()
DataGridView1.DataSource = ds
DataGridView1.DataMember = "g"
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
ds.Clear()
DataGridView1.Refresh()
Me.CTableAdapter.Fill(Me.U1DataSet.c)
con.ConnectionString = "PROVIDER=Microsoft.jet.OLEDB.4.0;Data Source = C:\u1.mdb"
con.Open()
sql = "select * FROM c where wprojectname like '" + TextBox1.Text + "'"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "g")
con.Close()
DataGridView1.DataSource = ds
DataGridView1.DataMember = "g"
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
End Sub
End Class
Coding
Public Class Form5
Dim con As New OleDb.OleDbConnection
Dim pos As Integer
Dim ds As New DataSet
Dim da As OleDb.OleDbDataAdapter
Dim sql As String
Private Sub Form5_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
con.ConnectionString = "PROVIDER=Microsoft.jet.OLEDB.4.0;Data Source = C:\fk1.mdb"
con.Open()
sql = "select * FROM n"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "g")
' MsgBox("FEES DETAIL IS NOW OPEN")
pos = 0
TextBox1.Text = ds.Tables("g").Rows(0).Item(0)
TextBox2.Text = ds.Tables("g").Rows(0).Item(1)
TextBox3.Text = ds.Tables("g").Rows(0).Item(2)
TextBox4.Text = ds.Tables("g").Rows(0).Item(3)
TextBox5.Text = ds.Tables("g").Rows(0).Item(4)
con.Close()
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
TextBox1.Clear()
TextBox2.Clear()
TextBox3.Clear()
TextBox4.Clear()
TextBox5.Clear()
Button7.Enabled = False
Button8.Enabled = False
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
If pos >= 0 Then
Dim cb1 As New OleDb.OleDbCommandBuilder(da)
Dim dsrow As DataRow
dsrow = ds.Tables("g").NewRow()
dsrow.Item(0) = TextBox1.Text
dsrow.Item(1) = TextBox2.Text
dsrow.Item(2) = TextBox3.Text
dsrow.Item(3) = TextBox4.Text
dsrow.Item(4) = TextBox5.Text
ds.Tables("g").Rows.Add(dsrow)
da.Update(ds, "g")
MsgBox("new record added")
End If
Button7.Enabled = True
Button8.Enabled = True
End Sub
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
ds.Tables("g").Rows(pos).Item(0) = TextBox1.Text
ds.Tables("g").Rows(pos).Item(1) = TextBox2.Text
ds.Tables("g").Rows(pos).Item(2) = TextBox3.Text
ds.Tables("g").Rows(pos).Item(3) = TextBox4.Text
ds.Tables("g").Rows(pos).Item(4) = TextBox5.Text
con.Open()
Dim cb As New OleDb.OleDbCommandBuilder(da)
da.Update(ds, "g")
MsgBox("data updated")
con.Close()
End Sub
Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
If pos >= 0 And pos <= ds.Tables("g").Rows.Count Then
If MessageBox.Show("do you really want to delete this record?", "delete", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) = DialogResult.No Then
MsgBox("operation cancelled")
Exit Sub
Else
Dim cb As New OleDb.OleDbCommandBuilder(da)
ds.Tables("g").Rows(pos).Delete()
pos = 0
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
TextBox5.Text = ds.Tables("g").Rows(pos).Item(4)
da.Update(ds, "g")
End If
End If
End Sub
Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
pos = 0
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
TextBox5.Text = ds.Tables("g").Rows(pos).Item(4)
Button7.Enabled = True
Button8.Enabled = True
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
pos = 0
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
TextBox5.Text = ds.Tables("g").Rows(pos).Item(4)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If pos = 0 Then
MsgBox("you are at first record")
Else
pos = pos - 1
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
TextBox5.Text = ds.Tables("g").Rows(pos).Item(4)
End If
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
If pos = ds.Tables("g").Rows.Count - 1 Then
MsgBox("you are at last record")
Else
pos = pos + 1
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
TextBox5.Text = ds.Tables("g").Rows(pos).Item(4)
End If
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
pos = ds.Tables("g").Rows.Count - 1
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
TextBox5.Text = ds.Tables("g").Rows(pos).Item(4)
End Sub
Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
Me.Hide()
Form2.Show()
End Sub
Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click
Me.Hide()
Form6.Show()
End Sub
End Class
Coding
Public Class Form6
Dim con As New OleDb.OleDbConnection
Dim pos As Integer
Dim ds As New DataSet
Dim da As OleDb.OleDbDataAdapter
Dim sql As String
Private Sub Form6_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'Fk1DataSet.n' table. You can move, or remove it, as needed.
Me.NTableAdapter.Fill(Me.Fk1DataSet.n)
con.ConnectionString = "PROVIDER=Microsoft.jet.OLEDB.4.0;Data Source = C:\fk1.mdb"
con.Open()
sql = "select * FROM n"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "g")
con.Close()
DataGridView1.DataSource = ds
DataGridView1.DataMember = "g"
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form5.Show()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
ds.Clear()
DataGridView1.Refresh()
Me.NTableAdapter.Fill(Me.Fk1DataSet.n)
con.ConnectionString = "PROVIDER=Microsoft.jet.OLEDB.4.0;Data Source = C:\fk1.mdb"
con.Open()
sql = "select * FROM n"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "g")
con.Close()
DataGridView1.DataSource = ds
DataGridView1.DataMember = "g"
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
ds.Clear()
DataGridView1.Refresh()
Me.NTableAdapter.Fill(Me.Fk1DataSet.n)
con.ConnectionString = "PROVIDER=Microsoft.jet.OLEDB.4.0;Data Source = C:\fk1.mdb"
con.Open()
sql = "select * FROM n where lprojectlist like '" + TextBox1.Text + "'"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "g")
con.Close()
DataGridView1.DataSource = ds
DataGridView1.DataMember = "g"
End Sub
End Class
Coding
Public Class Form7
Dim con As New OleDb.OleDbConnection
Dim pos As Integer
Dim ds As New DataSet
Dim da As OleDb.OleDbDataAdapter
Dim sql As String
Private Sub Form7_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
con.ConnectionString = "PROVIDER=Microsoft.jet.OLEDB.4.0;Data Source = C:\ns1.mdb"
con.Open()
sql = "select * FROM s"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "g")
' MsgBox("FEES DETAIL IS NOW OPEN")
pos = 0
TextBox1.Text = ds.Tables("g").Rows(0).Item(0)
TextBox2.Text = ds.Tables("g").Rows(0).Item(1)
TextBox3.Text = ds.Tables("g").Rows(0).Item(2)
TextBox4.Text = ds.Tables("g").Rows(0).Item(3)
TextBox5.Text = ds.Tables("g").Rows(0).Item(4)
con.Close()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox1.Clear()
TextBox2.Clear()
TextBox3.Clear()
TextBox4.Clear()
TextBox5.Clear()
Button3.Enabled = False
Button4.Enabled = False
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If pos >= 0 Then
Dim cb1 As New OleDb.OleDbCommandBuilder(da)
Dim dsrow As DataRow
dsrow = ds.Tables("g").NewRow()
dsrow.Item(0) = TextBox1.Text
dsrow.Item(1) = TextBox2.Text
dsrow.Item(2) = TextBox3.Text
dsrow.Item(3) = TextBox4.Text
dsrow.Item(4) = TextBox5.Text
ds.Tables("g").Rows.Add(dsrow)
da.Update(ds, "g")
MsgBox("new record added")
End If
Button3.Enabled = True
Button4.Enabled = True
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
ds.Tables("g").Rows(pos).Item(0) = TextBox1.Text
ds.Tables("g").Rows(pos).Item(1) = TextBox2.Text
ds.Tables("g").Rows(pos).Item(2) = TextBox3.Text
ds.Tables("g").Rows(pos).Item(3) = TextBox4.Text
ds.Tables("g").Rows(pos).Item(4) = TextBox5.Text
con.Open()
Dim cb As New OleDb.OleDbCommandBuilder(da)
da.Update(ds, "g")
MsgBox("data updated")
con.Close()
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
If pos >= 0 And pos <= ds.Tables("g").Rows.Count Then
If MessageBox.Show("do you really want to delete this record?", "delete", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) = DialogResult.No Then
MsgBox("operation cancelled")
Exit Sub
Else
Dim cb As New OleDb.OleDbCommandBuilder(da)
ds.Tables("g").Rows(pos).Delete()
pos = 0
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
TextBox5.Text = ds.Tables("g").Rows(pos).Item(4)
da.Update(ds, "g")
End If
End If
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
pos = 0
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
TextBox5.Text = ds.Tables("g").Rows(pos).Item(4)
Button3.Enabled = True
Button4.Enabled = True
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
pos = 0
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
TextBox5.Text = ds.Tables("g").Rows(pos).Item(4)
End Sub
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
If pos = 0 Then
MsgBox("you are at first record")
Else
pos = pos - 1
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
TextBox5.Text = ds.Tables("g").Rows(pos).Item(4)
End If
End Sub
Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
If pos = ds.Tables("g").Rows.Count - 1 Then
MsgBox("you are at last record")
Else
pos = pos + 1
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
TextBox5.Text = ds.Tables("g").Rows(pos).Item(4)
End If
End Sub
Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
pos = ds.Tables("g").Rows.Count - 1
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
TextBox5.Text = ds.Tables("g").Rows(pos).Item(4)
End Sub
Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
Me.Hide()
Form2.Show()
End Sub
Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click
Me.Hide()
Form8.Show()
End Sub
End Class
Coding
Public Class Form8
Dim con As New OleDb.OleDbConnection
Dim pos As Integer
Dim ds As New DataSet
Dim da As OleDb.OleDbDataAdapter
Dim sql As String
Private Sub Form8_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'Ns1DataSet.s' table. You can move, or remove it, as needed.
Me.STableAdapter.Fill(Me.Ns1DataSet.s)
con.ConnectionString = "PROVIDER=Microsoft.jet.OLEDB.4.0;Data Source = C:\ns1.mdb"
con.Open()
sql = "select * FROM s"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "g")
con.Close()
DataGridView1.DataSource = ds
DataGridView1.DataMember = "g"
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form7.Show()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
ds.Clear()
DataGridView1.Refresh()
Me.STableAdapter.Fill(Me.Ns1DataSet.s)
con.ConnectionString = "PROVIDER=Microsoft.jet.OLEDB.4.0;Data Source = C:\ns1.mdb"
con.Open()
sql = "select * FROM s"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "g")
con.Close()
DataGridView1.DataSource = ds
DataGridView1.DataMember = "g"
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
ds.Clear()
DataGridView1.Refresh()
Me.STableAdapter.Fill(Me.Ns1DataSet.s)
con.ConnectionString = "PROVIDER=Microsoft.jet.OLEDB.4.0;Data Source = C:\ns1.mdb"
con.Open()
sql = "select * FROM s where eprojectlist like '" + TextBox1.Text + "'"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "g")
con.Close()
DataGridView1.DataSource = ds
DataGridView1.DataMember = "g"
End Sub
End Class
Coding
Public Class Form9
Dim con As New OleDb.OleDbConnection
Dim pos As Integer
Dim ds As New DataSet
Dim da As OleDb.OleDbDataAdapter
Dim sql As String
Private Sub Form9_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
con.ConnectionString = "PROVIDER=Microsoft.jet.OLEDB.4.0;Data Source = C:\ppp1.mdb"
con.Open()
sql = "select * FROM k"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "g")
' MsgBox("FEES DETAIL IS NOW OPEN")
pos = 0
TextBox1.Text = ds.Tables("g").Rows(0).Item(0)
TextBox2.Text = ds.Tables("g").Rows(0).Item(1)
TextBox3.Text = ds.Tables("g").Rows(0).Item(2)
TextBox4.Text = ds.Tables("g").Rows(0).Item(3)
con.Close()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox1.Clear()
TextBox2.Clear()
TextBox3.Clear()
TextBox4.Clear()
Button3.Enabled = False
Button4.Enabled = False
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If pos >= 0 Then
Dim cb1 As New OleDb.OleDbCommandBuilder(da)
Dim dsrow As DataRow
dsrow = ds.Tables("g").NewRow()
dsrow.Item(0) = TextBox1.Text
dsrow.Item(1) = TextBox2.Text
dsrow.Item(2) = TextBox3.Text
dsrow.Item(3) = TextBox4.Text
ds.Tables("g").Rows.Add(dsrow)
da.Update(ds, "g")
MsgBox("new record added")
End If
Button3.Enabled = True
Button4.Enabled = True
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
ds.Tables("g").Rows(pos).Item(0) = TextBox1.Text
ds.Tables("g").Rows(pos).Item(1) = TextBox2.Text
ds.Tables("g").Rows(pos).Item(2) = TextBox3.Text
ds.Tables("g").Rows(pos).Item(3) = TextBox4.Text
con.Open()
Dim cb As New OleDb.OleDbCommandBuilder(da)
da.Update(ds, "g")
MsgBox("data updated")
con.Close()
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
If pos >= 0 And pos <= ds.Tables("g").Rows.Count Then
If MessageBox.Show("do you really want to delete this record?", "delete", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) = DialogResult.No Then
MsgBox("operation cancelled")
Exit Sub
Else
Dim cb As New OleDb.OleDbCommandBuilder(da)
ds.Tables("g").Rows(pos).Delete()
pos = 0
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
da.Update(ds, "g")
End If
End If
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
pos = 0
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
Button3.Enabled = True
Button4.Enabled = True
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
pos = 0
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
End Sub
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
If pos = 0 Then
MsgBox("you are at first record")
Else
pos = pos - 1
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
End If
End Sub
Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
If pos = ds.Tables("g").Rows.Count - 1 Then
MsgBox("you are at last record")
Else
pos = pos + 1
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
End If
End Sub
Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
pos = ds.Tables("g").Rows.Count - 1
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
End Sub
Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
Me.Hide()
Form10.Show()
End Sub
Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click
Me.Hide()
Form2.Show()
End Sub
End Class
Coding
Public Class Form10
Dim con As New OleDb.OleDbConnection
Dim pos As Integer
Dim ds As New DataSet
Dim da As OleDb.OleDbDataAdapter
Dim sql As String
Private Sub Form10_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'PPP1DataSet.K' table. You can move, or remove it, as needed.
Me.KTableAdapter.Fill(Me.PPP1DataSet.K)
con.ConnectionString = "PROVIDER=Microsoft.jet.OLEDB.4.0;Data Source = C:\ppp1.mdb"
con.Open()
sql = "select * FROM k"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "g")
con.Close()
DataGridView1.DataSource = ds
DataGridView1.DataMember = "g"
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form9.Show()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
ds.Clear()
DataGridView1.Refresh()
Me.KTableAdapter.Fill(Me.PPP1DataSet.K)
con.ConnectionString = "PROVIDER=Microsoft.jet.OLEDB.4.0;Data Source = C:\ppp1.mdb"
con.Open()
sql = "select * FROM k"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "g")
con.Close()
DataGridView1.DataSource = ds
DataGridView1.DataMember = "g"
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
ds.Clear()
DataGridView1.Refresh()
Me.KTableAdapter.Fill(Me.PPP1DataSet.K)
con.ConnectionString = "PROVIDER=Microsoft.jet.OLEDB.4.0;Data Source = C:\ppp1.mdb"
con.Open()
sql = "select * FROM k where VTEAM like '" + TextBox1.Text + "'"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "g")
con.Close()
DataGridView1.DataSource = ds
DataGridView1.DataMember = "g"
End Sub
End Class
Coding
Public Class Form4
Dim con As New OleDb.OleDbConnection
Dim pos As Integer
Dim ds As New DataSet
Dim da As OleDb.OleDbDataAdapter
Dim sql As String
Private Sub Form4_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'U1DataSet.c' table. You can move, or remove it, as needed.
Me.CTableAdapter.Fill(Me.U1DataSet.c)
con.ConnectionString = "PROVIDER=Microsoft.jet.OLEDB.4.0;Data Source = C:\u1.mdb"
con.Open()
sql = "select * FROM c"
da = New OleDb.OleDbDataAdapter(Sql, con)
da.Fill(ds, "g")
con.Close()
DataGridView1.DataSource = ds
DataGridView1.DataMember = "g"
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form3.Show()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
ds.Clear()
DataGridView1.Refresh()
Me.CTableAdapter.Fill(Me.U1DataSet.c)
con.ConnectionString = "PROVIDER=Microsoft.jet.OLEDB.4.0;Data Source = C:\u1.mdb"
con.Open()
sql = "select * FROM c"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "g")
con.Close()
DataGridView1.DataSource = ds
DataGridView1.DataMember = "g"
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
ds.Clear()
DataGridView1.Refresh()
Me.CTableAdapter.Fill(Me.U1DataSet.c)
con.ConnectionString = "PROVIDER=Microsoft.jet.OLEDB.4.0;Data Source = C:\u1.mdb"
con.Open()
sql = "select * FROM c where wprojectname like '" + TextBox1.Text + "'"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "g")
con.Close()
DataGridView1.DataSource = ds
DataGridView1.DataMember = "g"
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
End Sub
End Class
Coding
Public Class Form5
Dim con As New OleDb.OleDbConnection
Dim pos As Integer
Dim ds As New DataSet
Dim da As OleDb.OleDbDataAdapter
Dim sql As String
Private Sub Form5_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
con.ConnectionString = "PROVIDER=Microsoft.jet.OLEDB.4.0;Data Source = C:\fk1.mdb"
con.Open()
sql = "select * FROM n"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "g")
' MsgBox("FEES DETAIL IS NOW OPEN")
pos = 0
TextBox1.Text = ds.Tables("g").Rows(0).Item(0)
TextBox2.Text = ds.Tables("g").Rows(0).Item(1)
TextBox3.Text = ds.Tables("g").Rows(0).Item(2)
TextBox4.Text = ds.Tables("g").Rows(0).Item(3)
TextBox5.Text = ds.Tables("g").Rows(0).Item(4)
con.Close()
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
TextBox1.Clear()
TextBox2.Clear()
TextBox3.Clear()
TextBox4.Clear()
TextBox5.Clear()
Button7.Enabled = False
Button8.Enabled = False
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
If pos >= 0 Then
Dim cb1 As New OleDb.OleDbCommandBuilder(da)
Dim dsrow As DataRow
dsrow = ds.Tables("g").NewRow()
dsrow.Item(0) = TextBox1.Text
dsrow.Item(1) = TextBox2.Text
dsrow.Item(2) = TextBox3.Text
dsrow.Item(3) = TextBox4.Text
dsrow.Item(4) = TextBox5.Text
ds.Tables("g").Rows.Add(dsrow)
da.Update(ds, "g")
MsgBox("new record added")
End If
Button7.Enabled = True
Button8.Enabled = True
End Sub
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
ds.Tables("g").Rows(pos).Item(0) = TextBox1.Text
ds.Tables("g").Rows(pos).Item(1) = TextBox2.Text
ds.Tables("g").Rows(pos).Item(2) = TextBox3.Text
ds.Tables("g").Rows(pos).Item(3) = TextBox4.Text
ds.Tables("g").Rows(pos).Item(4) = TextBox5.Text
con.Open()
Dim cb As New OleDb.OleDbCommandBuilder(da)
da.Update(ds, "g")
MsgBox("data updated")
con.Close()
End Sub
Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
If pos >= 0 And pos <= ds.Tables("g").Rows.Count Then
If MessageBox.Show("do you really want to delete this record?", "delete", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) = DialogResult.No Then
MsgBox("operation cancelled")
Exit Sub
Else
Dim cb As New OleDb.OleDbCommandBuilder(da)
ds.Tables("g").Rows(pos).Delete()
pos = 0
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
TextBox5.Text = ds.Tables("g").Rows(pos).Item(4)
da.Update(ds, "g")
End If
End If
End Sub
Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
pos = 0
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
TextBox5.Text = ds.Tables("g").Rows(pos).Item(4)
Button7.Enabled = True
Button8.Enabled = True
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
pos = 0
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
TextBox5.Text = ds.Tables("g").Rows(pos).Item(4)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If pos = 0 Then
MsgBox("you are at first record")
Else
pos = pos - 1
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
TextBox5.Text = ds.Tables("g").Rows(pos).Item(4)
End If
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
If pos = ds.Tables("g").Rows.Count - 1 Then
MsgBox("you are at last record")
Else
pos = pos + 1
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
TextBox5.Text = ds.Tables("g").Rows(pos).Item(4)
End If
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
pos = ds.Tables("g").Rows.Count - 1
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
TextBox5.Text = ds.Tables("g").Rows(pos).Item(4)
End Sub
Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
Me.Hide()
Form2.Show()
End Sub
Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click
Me.Hide()
Form6.Show()
End Sub
End Class
Coding
Public Class Form6
Dim con As New OleDb.OleDbConnection
Dim pos As Integer
Dim ds As New DataSet
Dim da As OleDb.OleDbDataAdapter
Dim sql As String
Private Sub Form6_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'Fk1DataSet.n' table. You can move, or remove it, as needed.
Me.NTableAdapter.Fill(Me.Fk1DataSet.n)
con.ConnectionString = "PROVIDER=Microsoft.jet.OLEDB.4.0;Data Source = C:\fk1.mdb"
con.Open()
sql = "select * FROM n"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "g")
con.Close()
DataGridView1.DataSource = ds
DataGridView1.DataMember = "g"
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form5.Show()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
ds.Clear()
DataGridView1.Refresh()
Me.NTableAdapter.Fill(Me.Fk1DataSet.n)
con.ConnectionString = "PROVIDER=Microsoft.jet.OLEDB.4.0;Data Source = C:\fk1.mdb"
con.Open()
sql = "select * FROM n"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "g")
con.Close()
DataGridView1.DataSource = ds
DataGridView1.DataMember = "g"
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
ds.Clear()
DataGridView1.Refresh()
Me.NTableAdapter.Fill(Me.Fk1DataSet.n)
con.ConnectionString = "PROVIDER=Microsoft.jet.OLEDB.4.0;Data Source = C:\fk1.mdb"
con.Open()
sql = "select * FROM n where lprojectlist like '" + TextBox1.Text + "'"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "g")
con.Close()
DataGridView1.DataSource = ds
DataGridView1.DataMember = "g"
End Sub
End Class
Coding
Public Class Form7
Dim con As New OleDb.OleDbConnection
Dim pos As Integer
Dim ds As New DataSet
Dim da As OleDb.OleDbDataAdapter
Dim sql As String
Private Sub Form7_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
con.ConnectionString = "PROVIDER=Microsoft.jet.OLEDB.4.0;Data Source = C:\ns1.mdb"
con.Open()
sql = "select * FROM s"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "g")
' MsgBox("FEES DETAIL IS NOW OPEN")
pos = 0
TextBox1.Text = ds.Tables("g").Rows(0).Item(0)
TextBox2.Text = ds.Tables("g").Rows(0).Item(1)
TextBox3.Text = ds.Tables("g").Rows(0).Item(2)
TextBox4.Text = ds.Tables("g").Rows(0).Item(3)
TextBox5.Text = ds.Tables("g").Rows(0).Item(4)
con.Close()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox1.Clear()
TextBox2.Clear()
TextBox3.Clear()
TextBox4.Clear()
TextBox5.Clear()
Button3.Enabled = False
Button4.Enabled = False
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If pos >= 0 Then
Dim cb1 As New OleDb.OleDbCommandBuilder(da)
Dim dsrow As DataRow
dsrow = ds.Tables("g").NewRow()
dsrow.Item(0) = TextBox1.Text
dsrow.Item(1) = TextBox2.Text
dsrow.Item(2) = TextBox3.Text
dsrow.Item(3) = TextBox4.Text
dsrow.Item(4) = TextBox5.Text
ds.Tables("g").Rows.Add(dsrow)
da.Update(ds, "g")
MsgBox("new record added")
End If
Button3.Enabled = True
Button4.Enabled = True
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
ds.Tables("g").Rows(pos).Item(0) = TextBox1.Text
ds.Tables("g").Rows(pos).Item(1) = TextBox2.Text
ds.Tables("g").Rows(pos).Item(2) = TextBox3.Text
ds.Tables("g").Rows(pos).Item(3) = TextBox4.Text
ds.Tables("g").Rows(pos).Item(4) = TextBox5.Text
con.Open()
Dim cb As New OleDb.OleDbCommandBuilder(da)
da.Update(ds, "g")
MsgBox("data updated")
con.Close()
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
If pos >= 0 And pos <= ds.Tables("g").Rows.Count Then
If MessageBox.Show("do you really want to delete this record?", "delete", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) = DialogResult.No Then
MsgBox("operation cancelled")
Exit Sub
Else
Dim cb As New OleDb.OleDbCommandBuilder(da)
ds.Tables("g").Rows(pos).Delete()
pos = 0
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
TextBox5.Text = ds.Tables("g").Rows(pos).Item(4)
da.Update(ds, "g")
End If
End If
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
pos = 0
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
TextBox5.Text = ds.Tables("g").Rows(pos).Item(4)
Button3.Enabled = True
Button4.Enabled = True
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
pos = 0
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
TextBox5.Text = ds.Tables("g").Rows(pos).Item(4)
End Sub
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
If pos = 0 Then
MsgBox("you are at first record")
Else
pos = pos - 1
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
TextBox5.Text = ds.Tables("g").Rows(pos).Item(4)
End If
End Sub
Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
If pos = ds.Tables("g").Rows.Count - 1 Then
MsgBox("you are at last record")
Else
pos = pos + 1
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
TextBox5.Text = ds.Tables("g").Rows(pos).Item(4)
End If
End Sub
Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
pos = ds.Tables("g").Rows.Count - 1
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
TextBox5.Text = ds.Tables("g").Rows(pos).Item(4)
End Sub
Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
Me.Hide()
Form2.Show()
End Sub
Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click
Me.Hide()
Form8.Show()
End Sub
End Class
Coding
Public Class Form8
Dim con As New OleDb.OleDbConnection
Dim pos As Integer
Dim ds As New DataSet
Dim da As OleDb.OleDbDataAdapter
Dim sql As String
Private Sub Form8_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'Ns1DataSet.s' table. You can move, or remove it, as needed.
Me.STableAdapter.Fill(Me.Ns1DataSet.s)
con.ConnectionString = "PROVIDER=Microsoft.jet.OLEDB.4.0;Data Source = C:\ns1.mdb"
con.Open()
sql = "select * FROM s"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "g")
con.Close()
DataGridView1.DataSource = ds
DataGridView1.DataMember = "g"
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form7.Show()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
ds.Clear()
DataGridView1.Refresh()
Me.STableAdapter.Fill(Me.Ns1DataSet.s)
con.ConnectionString = "PROVIDER=Microsoft.jet.OLEDB.4.0;Data Source = C:\ns1.mdb"
con.Open()
sql = "select * FROM s"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "g")
con.Close()
DataGridView1.DataSource = ds
DataGridView1.DataMember = "g"
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
ds.Clear()
DataGridView1.Refresh()
Me.STableAdapter.Fill(Me.Ns1DataSet.s)
con.ConnectionString = "PROVIDER=Microsoft.jet.OLEDB.4.0;Data Source = C:\ns1.mdb"
con.Open()
sql = "select * FROM s where eprojectlist like '" + TextBox1.Text + "'"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "g")
con.Close()
DataGridView1.DataSource = ds
DataGridView1.DataMember = "g"
End Sub
End Class
Coding
Public Class Form9
Dim con As New OleDb.OleDbConnection
Dim pos As Integer
Dim ds As New DataSet
Dim da As OleDb.OleDbDataAdapter
Dim sql As String
Private Sub Form9_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
con.ConnectionString = "PROVIDER=Microsoft.jet.OLEDB.4.0;Data Source = C:\ppp1.mdb"
con.Open()
sql = "select * FROM k"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "g")
' MsgBox("FEES DETAIL IS NOW OPEN")
pos = 0
TextBox1.Text = ds.Tables("g").Rows(0).Item(0)
TextBox2.Text = ds.Tables("g").Rows(0).Item(1)
TextBox3.Text = ds.Tables("g").Rows(0).Item(2)
TextBox4.Text = ds.Tables("g").Rows(0).Item(3)
con.Close()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox1.Clear()
TextBox2.Clear()
TextBox3.Clear()
TextBox4.Clear()
Button3.Enabled = False
Button4.Enabled = False
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If pos >= 0 Then
Dim cb1 As New OleDb.OleDbCommandBuilder(da)
Dim dsrow As DataRow
dsrow = ds.Tables("g").NewRow()
dsrow.Item(0) = TextBox1.Text
dsrow.Item(1) = TextBox2.Text
dsrow.Item(2) = TextBox3.Text
dsrow.Item(3) = TextBox4.Text
ds.Tables("g").Rows.Add(dsrow)
da.Update(ds, "g")
MsgBox("new record added")
End If
Button3.Enabled = True
Button4.Enabled = True
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
ds.Tables("g").Rows(pos).Item(0) = TextBox1.Text
ds.Tables("g").Rows(pos).Item(1) = TextBox2.Text
ds.Tables("g").Rows(pos).Item(2) = TextBox3.Text
ds.Tables("g").Rows(pos).Item(3) = TextBox4.Text
con.Open()
Dim cb As New OleDb.OleDbCommandBuilder(da)
da.Update(ds, "g")
MsgBox("data updated")
con.Close()
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
If pos >= 0 And pos <= ds.Tables("g").Rows.Count Then
If MessageBox.Show("do you really want to delete this record?", "delete", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) = DialogResult.No Then
MsgBox("operation cancelled")
Exit Sub
Else
Dim cb As New OleDb.OleDbCommandBuilder(da)
ds.Tables("g").Rows(pos).Delete()
pos = 0
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
da.Update(ds, "g")
End If
End If
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
pos = 0
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
Button3.Enabled = True
Button4.Enabled = True
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
pos = 0
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
End Sub
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
If pos = 0 Then
MsgBox("you are at first record")
Else
pos = pos - 1
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
End If
End Sub
Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
If pos = ds.Tables("g").Rows.Count - 1 Then
MsgBox("you are at last record")
Else
pos = pos + 1
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
End If
End Sub
Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
pos = ds.Tables("g").Rows.Count - 1
TextBox1.Text = ds.Tables("g").Rows(pos).Item(0)
TextBox2.Text = ds.Tables("g").Rows(pos).Item(1)
TextBox3.Text = ds.Tables("g").Rows(pos).Item(2)
TextBox4.Text = ds.Tables("g").Rows(pos).Item(3)
End Sub
Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
Me.Hide()
Form10.Show()
End Sub
Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click
Me.Hide()
Form2.Show()
End Sub
End Class
Coding
Public Class Form10
Dim con As New OleDb.OleDbConnection
Dim pos As Integer
Dim ds As New DataSet
Dim da As OleDb.OleDbDataAdapter
Dim sql As String
Private Sub Form10_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'PPP1DataSet.K' table. You can move, or remove it, as needed.
Me.KTableAdapter.Fill(Me.PPP1DataSet.K)
con.ConnectionString = "PROVIDER=Microsoft.jet.OLEDB.4.0;Data Source = C:\ppp1.mdb"
con.Open()
sql = "select * FROM k"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "g")
con.Close()
DataGridView1.DataSource = ds
DataGridView1.DataMember = "g"
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form9.Show()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
ds.Clear()
DataGridView1.Refresh()
Me.KTableAdapter.Fill(Me.PPP1DataSet.K)
con.ConnectionString = "PROVIDER=Microsoft.jet.OLEDB.4.0;Data Source = C:\ppp1.mdb"
con.Open()
sql = "select * FROM k"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "g")
con.Close()
DataGridView1.DataSource = ds
DataGridView1.DataMember = "g"
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
ds.Clear()
DataGridView1.Refresh()
Me.KTableAdapter.Fill(Me.PPP1DataSet.K)
con.ConnectionString = "PROVIDER=Microsoft.jet.OLEDB.4.0;Data Source = C:\ppp1.mdb"
con.Open()
sql = "select * FROM k where VTEAM like '" + TextBox1.Text + "'"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "g")
con.Close()
DataGridView1.DataSource = ds
DataGridView1.DataMember = "g"
End Sub
End Class
0 comments:
Post a Comment