REAL ESTATE MANAGEMENT SYSTEM Report
REAL ESTATE MANAGEMENT SYSTEM Report
REAL ESTATE MANAGEMENT SYSTEM Report
1. About project
2. Modules and I/O forms
3. Hardware & Software specification
4. Table Structure
5. Data Flow Diagram
a. 0 level
b. 1st level
6. ER Diagram
7. About VB.net
8. About .net structure
9. About Microsoft Access
10. Conclusion
11. Coding
12. References
Minimum System Qualification for user
Hardware Requirements
Software Requirements
Hardware Requirements
Software Requirements
BOOKING_INFOMATION
CUSTOMER_INFORMATION
EMPLOYEE_INFORMATION
SALARY_INFORMATION
SALES INFORMATION
‘0’ LEVEL DATA FLOW DESIGN
INPUT/
REAL ESTATE
CUSTOMER REQUEST
MANAGEMEN RESPONSE
OUTPUT
T SYSTEM
RESPONSE
‘1’ LEVEL DATA FLOW DESIGN
INVALID
INPUT/
OUTPUT
About vb.net
VISUAL BASIC is a high level programming language which evolved
from the earlier DOS version called BASIC. BASIC means Beginners'
All-purpose Symbolic Instruction Code. It is a very easy
programming language to learn. The code look a lot like English
Language. Different software companies produced different
versions of BASIC, such as Microsoft QBASIC, QUICKBASIC,
GWBASIC, IBM BASICA and so on. However, people prefer to use
Microsoft Visual Basic today, as it is a well developed programming
language and supporting resources are available everywhere. Now,
there are many versions of VB exist in the market, the most popular
one and still widely used by many VB programmers is none other
than Visual Basic 6. We also have VB.net, VB2005, VB2008 and the
latest VB2010. Both Vb2008 and VB2010 are fully object oriented
programming (OOP) language.
On the other hand, because the user may click on a certain object
randomly, so each object has to be programmed independently to
be able to response to those actions (events). Therefore, a VB
Program is made up of many subprograms, each has its own
program code, and each can be executed independently and at the
same time each can be linked together in one way or another.
The .net Framework
architecture
When we write a program using any of the .NET languages like C#,
VB or C++, the source code doesn’t get compiled to machine code.
Each language specific compiler (VB compiler, C# compiler etc)
converts the source code to an intermediate language code which is
known as IL code. The IL code then is converted to machine specific
code by the CLR engine at runtime.
FUNCTIONAL MODEL
The functional model shows how output values in a
computation are derived from input values, without regard for the
order in which the values are computed. The functional model
consists of multiple data flow diagrams, which show the flow from
external inputs, through operations and internal data stores, to
external outputs. The functional model also includes constraints
among values within an object model.
CUSTOMER
EMPLOYEE
SALARY
SALES
CODING
BOOKING_INFO.VB
Imports System.Data.OleDb
End Sub
End Sub
End Sub
Sub refresh_all()
bnotxt.Clear()
cntxt.Clear()
frntxt.Clear()
agetxt.Clear()
rbm.Checked = False
rbf.Checked = False
addtxt.Clear()
connotxt.Clear()
sitecombo.Text = ""
typecombo.Text = ""
totaltxt.Clear()
booktxt.Clear()
dtp.Value = Date.Today
End Sub
Private Sub addbtn_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles addbtn.Click
If rbm.Checked = True Then
sex = True
ElseIf rbf.Checked = True Then
sex = False
Else
MsgBox("Plz select Sex")
End If
ds.Reset()
da = New OleDbDataAdapter("insert into Booking_info values (" &
Val(bnotxt.Text) & ",'" & cntxt.Text & "','" & frntxt.Text & "','" & sex &
"','" & addtxt.Text & "'," & Val(connotxt.Text) & ",'" & sitecombo.Text &
"','" & typecombo.Text & "', " & Val(totaltxt.Text) & ", " &
Val(booktxt.Text) & ",# " & dtp.Value.Date & " #)", con)
da.Fill(ds)
MsgBox("Data Saved", MsgBoxStyle.Information)
Call refresh_all()
End Sub
Dim src_id As Short
Dim rc As Short
Dim ind As Short
ds.Reset()
da = New OleDbDataAdapter("select * from salary_info where
Emp_id=" & src_id, con)
da.Fill(ds)
rc = ds.Tables(0).Rows.Count
MsgBox(rc)
If rc = 0 Then
MsgBox("No records found", MsgBoxStyle.Critical)
Else
ind = 0
MsgBox("Records found", MsgBoxStyle.Information)
bnotxt.Text = ds.Tables(0).Rows(ind)(0)
cntxt.Text = ds.Tables(0).Rows(ind)(1)
frntxt.Text = ds.Tables(0).Rows(ind)(2)
agetxt.Text = ds.Tables(0).Rows(ind)(3)
GroupBox1.Text = ds.Tables(0).Rows(ind)(4)
addtxt.Text = ds.Tables(0).Rows(ind)(5)
connotxt.Text = ds.Tables(0).Rows(ind)(6)
sitecombo.Text = ds.Tables(0).Rows(ind)(7)
typecombo.Text = ds.Tables(0).Rows(ind)(8)
totaltxt.Text = ds.Tables(0).Rows(ind)(9)
booktxt.Text = ds.Tables(0).Rows(ind)(10)
dtp.Value = ds.Tables(0).Rows(ind)(11)
updatebtn.Text = "Save Data"
End If
ElseIf updatebtn.Text = "Save Data" Then
ds.Reset()
da.Fill(ds)
MsgBox("Record updated", MsgBoxStyle.Information)
backbtn.Enabled = True
addbtn.Enabled = True
delbtn.Enabled = True
nextbtn.Enabled = True
serbtn.Enabled = True
serbbtn.Enabled = True
serfbtn.Enabled = True
closebtn.Enabled = True
bnotxt.Clear()
cntxt.Clear()
frntxt.Clear()
agetxt.Clear()
rbm.Checked = False
rbf.Checked = False
addtxt.Clear()
connotxt.Clear()
sitecombo.Text = ""
typecombo.Text = ""
totaltxt.Clear()
booktxt.Clear()
dtp.Value = Date.Today
End If
End Sub
End If
ElseIf delbtn.Text = "Delete" Then
ds.Reset()
da = New OleDbDataAdapter("delete from Booking_info where
Booking_No = " & src_id, con)
da.Fill(ds)
MsgBox("Record Deleted", MsgBoxStyle.Information)
backbtn.Enabled = True
addbtn.Enabled = True
nextbtn.Enabled = True
serbtn.Enabled = True
serbbtn.Enabled = True
serfbtn.Enabled = True
closebtn.Enabled = True
updatebtn.Enabled = True
bnotxt.Clear()
cntxt.Clear()
frntxt.Clear()
agetxt.Clear()
rbm.Checked = False
rbf.Checked = False
addtxt.Clear()
connotxt.Clear()
sitecombo.Text = ""
typecombo.Text = ""
totaltxt.Clear()
booktxt.Clear()
dtp.Value = Date.Today
delbtn.Text = "Delete Data"
End If
End Sub
End If
If ind = rc - 1 Then
serbtn.Enabled = False
End If
If ind <= rc - 1 Then
bnotxt.Text = ds.Tables(0).Rows(ind)(0)
cntxt.Text = ds.Tables(0).Rows(ind)(1)
frntxt.Text = ds.Tables(0).Rows(ind)(2)
agetxt.Text = ds.Tables(0).Rows(ind)(3)
GroupBox1.Text = ds.Tables(0).Rows(ind)(4)
addtxt.Text = ds.Tables(0).Rows(ind)(5)
connotxt.Text = ds.Tables(0).Rows(ind)(6)
sitecombo.Text = ds.Tables(0).Rows(ind)(7)
typecombo.Text = ds.Tables(0).Rows(ind)(8)
totaltxt.Text = ds.Tables(0).Rows(ind)(9)
booktxt.Text = ds.Tables(0).Rows(ind)(10)
dtp.Value = ds.Tables(0).Rows(ind)(11)
End If
End Sub
da.Fill(ds)
rc = ds.Tables(0).Rows.Count
MsgBox(rc)
If rc = 0 Then
MsgBox("No records found", MsgBoxStyle.Critical)
Else
ind = 0
serbtn.Visible = True
serbbtn.Visible = True
MsgBox("Record found", MsgBoxStyle.Information)
bnotxt.Text = ds.Tables(0).Rows(ind)(0)
cntxt.Text = ds.Tables(0).Rows(ind)(1)
frntxt.Text = ds.Tables(0).Rows(ind)(2)
agetxt.Text = ds.Tables(0).Rows(ind)(3)
GroupBox1.Text = ds.Tables(0).Rows(ind)(4)
addtxt.Text = ds.Tables(0).Rows(ind)(5)
connotxt.Text = ds.Tables(0).Rows(ind)(6)
sitecombo.Text = ds.Tables(0).Rows(ind)(7)
typecombo.Text = ds.Tables(0).Rows(ind)(8)
totaltxt.Text = ds.Tables(0).Rows(ind)(9)
booktxt.Text = ds.Tables(0).Rows(ind)(10)
dtp.Value = ds.Tables(0).Rows(ind)(11)
End If
End Sub
End Sub
End Class
CUSTOMER_INFO.VB
Imports System.Data.OleDb
End Sub
End Sub
End Sub
Sub refresh_all()
idtxt.Clear()
dtp.Value = Date.Today
nametxt.Clear()
frntxt.Clear()
rbm.Checked = False
rbf.Checked = False
agetxt.Clear()
addtxt.Clear()
citytxt.Clear()
connotxt.Clear()
etxt.Clear()
pcb.Checked = False
dcb.Checked = False
fhcb.Checked = False
amtxt.Clear()
End Sub
Private Sub addbtn_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles addbtn.Click
If rbm.Checked = True Then
sex = True
ElseIf rbf.Checked = True Then
sex = False
Else
MsgBox("Plz select Sex")
End If
If pcb.Checked = True Then
type = "Plot"
ElseIf dcb.Checked = True Then
type = "Duplex"
ElseIf fhcb.Checked = True Then
type = "Farm House"
End If
Call refresh_all()
End Sub
Dim srch_id As Short
Dim rc As Short
Dim ind As Short
backbtn.Enabled = True
addbtn.Enabled = True
delbtn.Enabled = True
nextbtn.Enabled = True
serbtn.Enabled = True
serbbtn.Enabled = True
serfbtn.Enabled = True
closebtn.Enabled = True
idtxt.Clear()
nametxt.Clear()
frntxt.Clear()
rbm.Checked = False
rbf.Checked = False
agetxt.Clear()
addtxt.Clear()
citytxt.Clear()
connotxt.Clear()
etxt.Clear()
pcb.Checked = False
dcb.Checked = False
fhcb.Checked = False
amtxt.Clear()
dtp.Value = Date.Today
End If
End Sub
da.Fill(ds)
rc = ds.Tables(0).Rows.Count
MsgBox(rc)
If rc = 0 Then
MsgBox("No records found", MsgBoxStyle.Critical)
Else
ind = 0
MsgBox("Records found", MsgBoxStyle.Information)
idtxt.Text = ds.Tables(0).Rows(ind)(0)
dtp.Value = ds.Tables(0).Rows(ind)(1)
nametxt.Text = ds.Tables(0).Rows(ind)(2)
frntxt.Text = ds.Tables(0).Rows(ind)(3)
GroupBox1.Text = ds.Tables(0).Rows(ind)(4)
agetxt.Text = ds.Tables(0).Rows(ind)(5)
addtxt.Text = ds.Tables(0).Rows(ind)(6)
citytxt.Text = ds.Tables(0).Rows(ind)(7)
connotxt.Text = ds.Tables(0).Rows(ind)(8)
etxt.Text = ds.Tables(0).Rows(ind)(9)
GroupBox2.Text = ds.Tables(0).Rows(ind)(10)
amtxt.Text = ds.Tables(0).Rows(ind)(11)
delbtn.Text = "Delete"
End If
ds.Reset()
da = New OleDbDataAdapter("delete from Customer_info where
idtxt= " & srch_id, con)
da.Fill(ds)
MsgBox("Record Deleted", MsgBoxStyle.Information)
backbtn.Enabled = True
addbtn.Enabled = True
updatebtn.Enabled = True
nextbtn.Enabled = True
serbtn.Enabled = True
serbbtn.Enabled = True
serfbtn.Enabled = True
closebtn.Enabled = True
idtxt.Clear()
nametxt.Clear()
frntxt.Clear()
rbm.Checked = False
rbf.Checked = False
agetxt.Clear()
addtxt.Clear()
citytxt.Clear()
connotxt.Clear()
etxt.Clear()
pcb.Checked = False
dcb.Checked = False
fhcb.Checked = False
amtxt.Clear()
dtp.Value = Date.Today
End If
End Sub
End If
If ind = rc - 1 Then
serbtn.Enabled = False
End If
If ind <= rc - 1 Then
idtxt.Text = ds.Tables(0).Rows(ind)(0)
dtp.Value = ds.Tables(0).Rows(ind)(1)
nametxt.Text = ds.Tables(0).Rows(ind)(2)
frntxt.Text = ds.Tables(0).Rows(ind)(3)
GroupBox1.Text = ds.Tables(0).Rows(ind)(4)
agetxt.Text = ds.Tables(0).Rows(ind)(5)
addtxt.Text = ds.Tables(0).Rows(ind)(6)
citytxt.Text = ds.Tables(0).Rows(ind)(7)
connotxt.Text = ds.Tables(0).Rows(ind)(8)
etxt.Text = ds.Tables(0).Rows(ind)(9)
GroupBox2.Text = ds.Tables(0).Rows(ind)(10)
amtxt.Text = ds.Tables(0).Rows(ind)(11)
End If
End Sub
da.Fill(ds)
rc = ds.Tables(0).Rows.Count
MsgBox(rc)
If rc = 0 Then
MsgBox("No records found", MsgBoxStyle.Critical)
Else
ind = 0
serbtn.Visible = True
serbbtn.Visible = True
MsgBox("Record found", MsgBoxStyle.Information)
idtxt.Text = ds.Tables(0).Rows(ind)(0)
dtp.Value = ds.Tables(0).Rows(ind)(1)
nametxt.Text = ds.Tables(0).Rows(ind)(2)
frntxt.Text = ds.Tables(0).Rows(ind)(3)
GroupBox1.Text = ds.Tables(0).Rows(ind)(4)
agetxt.Text = ds.Tables(0).Rows(ind)(5)
addtxt.Text = ds.Tables(0).Rows(ind)(6)
citytxt.Text = ds.Tables(0).Rows(ind)(7)
connotxt.Text = ds.Tables(0).Rows(ind)(8)
etxt.Text = ds.Tables(0).Rows(ind)(9)
GroupBox2.Text = ds.Tables(0).Rows(ind)(10)
amtxt.Text = ds.Tables(0).Rows(ind)(11)
End If
End Sub
End If
If ind = 0 Then
serbbtn.Enabled = False
End If
If ind = rc - 2 Then
serbtn.Enabled = True
End If
End Sub
End Class
EMPLOYEE_INFO.VB
Imports System.Data.OleDb
End Sub
End Sub
End Sub
Sub refresh_all()
eidtxt.clear()
dtp.value = Date.today
enametxt.clear()
frtxt.clear()
agetxt.clear()
mrbtn.checked = False
frbtn.checked = False
addtxt.clear()
contxt.clear()
emailtxt.clear()
End Sub
Private Sub addbtn_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles addbtn.Click
End If
Call refresh_all()
End Sub
Dim srch_id As Short
Dim rc As Short
Dim ind As Short
backbtn.Enabled = True
addbtn.Enabled = True
delbtn.Enabled = True
nextbtn.Enabled = True
serbtn.Enabled = True
serbbtn.Enabled = True
serfbtn.Enabled = True
closebtn.Enabled = True
eidtxt.Clear()
dtp.Value = Date.Today
enametxt.Clear()
frtxt.Clear()
agetxt.Clear()
mrbtn.Checked = False
frbtn.Checked = False
addtxt.Clear()
contxt.Clear()
emailtxt.Clear()
End If
End Sub
ds.Reset()
da = New OleDbDataAdapter("delete from salary_info where
Employee_id = " & srch_id, con)
da.Fill(ds)
MsgBox("Record Deleted", MsgBoxStyle.Information)
backbtn.Enabled = True
addbtn.Enabled = True
nextbtn.Enabled = True
serbtn.Enabled = True
serbbtn.Enabled = True
serfbtn.Enabled = True
closebtn.Enabled = True
updatebtn.Enabled = True
eidtxt.Clear()
dtp.Value = Date.Today
enametxt.Clear()
frtxt.Clear()
agetxt.Clear()
mrbtn.Checked = False
frbtn.Checked = False
addtxt.Clear()
contxt.Clear()
emailtxt.Clear()
delbtn.Text = "Delete Data"
End If
End Sub
End If
If ind = rc - 1 Then
serbtn.Enabled = False
End If
If ind <= rc - 1 Then
eidtxt.Text = ds.Tables(0).Rows(ind)(0)
dtp.Value = ds.Tables(0).Rows(ind)(1)
frtxt.Text = ds.Tables(0).Rows(ind)(2)
agetxt.Text = ds.Tables(0).Rows(ind)(3)
groupbox1.Text = ds.Tables(0).Rows(ind)(4)
addtxt.Text = ds.Tables(0).Rows(ind)(5)
contxt.Text = ds.Tables(0).Rows(ind)(6)
emailtxt.Text = ds.Tables(0).Rows(ind)(7)
End If
End Sub
da.Fill(ds)
rc = ds.Tables(0).Rows.Count
MsgBox(rc)
If rc = 0 Then
MsgBox("No records found", MsgBoxStyle.Critical)
Else
ind = 0
serbtn.Visible = True
serbbtn.Visible = True
MsgBox("Record found", MsgBoxStyle.Information)
eidtxt.Text = ds.Tables(0).Rows(ind)(0)
dtp.Value = ds.Tables(0).Rows(ind)(1)
frtxt.Text = ds.Tables(0).Rows(ind)(2)
agetxt.Text = ds.Tables(0).Rows(ind)(3)
groupbox1.Text = ds.Tables(0).Rows(ind)(4)
addtxt.Text = ds.Tables(0).Rows(ind)(5)
contxt.Text = ds.Tables(0).Rows(ind)(6)
emailtxt.Text = ds.Tables(0).Rows(ind)(7)
End If
End Sub
End If
If ind = 0 Then
serbbtn.Enabled = False
End If
If ind = rc - 2 Then
serbtn.Enabled = True
End If
End Sub
End Class
SALARY_INFO.VB
Imports System.Data.OleDb
End Sub
End Sub
Sub refresh_all()
empidtxt.Clear()
empntxt.Clear()
postcombo.Text = ""
CheckBox1.Checked = False
CheckBox2.Checked = False
paymtxt.Clear()
End Sub
Private Sub addbtn_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles addbtn.Click
If CheckBox1.Checked = True Then
pay = "commision"
ElseIf CheckBox2.Checked = True Then
pay = "salary"
Else
MsgBox("Plz select payment detail")
End If
Try
da = New OleDbDataAdapter("insert into Salary_info values (" &
Val(empidtxt.Text) & ",'" & empntxt.Text & "','" & postcombo.Text & "','" &
pay & "'," & Val(paymtxt.Text) & ")", con)
da.Fill(ds)
ds.Reset()
Call refresh_all()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Dim srch_id As Short
Dim rc As Short
Dim ind As Short
backbtn.Enabled = True
addbtn.Enabled = True
delbtn.Enabled = True
nextbtn.Enabled = True
serbtn.Enabled = True
closebtn.Enabled = True
empidtxt.Clear()
empntxt.Clear()
postcombo.Text = ""
CheckBox1.Checked = False
CheckBox2.Checked = False
paymtxt.Clear()
End If
End Sub
ds.Reset()
da = New OleDbDataAdapter("delete from salary_info where
Employee_id = " & srch_id, con)
da.Fill(ds)
MsgBox("Record Deleted", MsgBoxStyle.Information)
backbtn.Enabled = True
addbtn.Enabled = True
nextbtn.Enabled = True
serbtn.Enabled = True
closebtn.Enabled = True
empidtxt.Clear()
empntxt.Clear()
postcombo.Text = ""
CheckBox1.Checked = False
CheckBox2.Checked = False
paymtxt.Clear()
delbtn.Text = "Delete Data"
End If
End Sub
End If
If ind = rc - 1 Then
serbtn.Enabled = False
End If
If ind <= rc - 1 Then
empidtxt.Text = ds.Tables(0).Rows(ind)(0)
empntxt.Text = ds.Tables(0).Rows(ind)(1)
postcombo.Text = ds.Tables(0).Rows(ind)(2)
GroupBox1.Text = ds.Tables(0).Rows(ind)(3)
paymtxt.Text = ds.Tables(0).Rows(ind)(4)
End If
End Sub
Private Sub serfbtn_click()
ds.Reset()
da = New OleDbDataAdapter("select * from salary_info", con)
da.Fill(ds)
rc = ds.Tables(0).Rows.Count
MsgBox(rc)
If rc = 0 Then
MsgBox("No records found", MsgBoxStyle.Critical)
Else
ind = 0
serbtn.Visible = True
serbbtn.Visible = True
MsgBox("Record found", MsgBoxStyle.Information)
empidtxt.Text = ds.Tables(0).Rows(ind)(0)
empntxt.Text = ds.Tables(0).Rows(ind)(1)
postcombo.Text = ds.Tables(0).Rows(ind)(2)
GroupBox1.Text = ds.Tables(0).Rows(ind)(3)
paymtxt.Text = ds.Tables(0).Rows(ind)(4)
End If
End Sub
Private Sub serbbtn_click()
ind = ind - 1
If ind > rc - 1 Then
Else
empidtxt.Text = ds.Tables(0).Rows(ind)(0)
empntxt.Text = ds.Tables(0).Rows(ind)(1)
postcombo.Text = ds.Tables(0).Rows(ind)(2)
GroupBox1.Text = ds.Tables(0).Rows(ind)(3)
paymtxt.Text = ds.Tables(0).Rows(ind)(4)
End If
If ind = 0 Then
serbbtn.Enabled = False
End If
If ind = rc - 2 Then
serbtn.Enabled = True
End If
End Sub
End Class
SALES_INFO.VB
Imports System.Data.OleDb
End Sub
End Sub
Sub refresh_all()
rectxt.Clear()
proidtxt.Clear()
cntxt.Clear()
addtxt.Clear()
contxt.Clear()
emailtxt.Clear()
noscombo.Text = ""
ptxt.Checked = False
dtxt.Checked = False
ftxt.Checked = False
tatxt.Clear()
dtp.Value = Date.Today
End Sub
Private Sub addbtn_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles addbtn.Click
If ptxt.Checked = True Then
pro = "Plot"
Else
MsgBox("Plz Select detaile")
End If
da = New OleDbDataAdapter(" insert into Sales_info values (# " &
dtp.Value.Date & " #," & Val(rectxt.Text) & "," & Val(proidtxt.Text) & ",'"
& cntxt.Text & "','" & addtxt.Text & "'," & Val(contxt.Text) & ",'" &
emailtxt.Text & "','" & noscombo.Text & "','" & pro & "'," &
Val(tatxt.Text) & ")", con)
da.Fill(ds)
Call refresh_all()
End Sub
ds.Reset()
da = New OleDbDataAdapter("select * from salary_info where
Emp_id=" & src_id, con)
da.Fill(ds)
rc = ds.Tables(0).Rows.Count
MsgBox(rc)
If rc = 0 Then
MsgBox("No records found", MsgBoxStyle.Critical)
Else
ind = 0
MsgBox("Records found", MsgBoxStyle.Information)
rectxt = ds.Tables(0).Rows(ind)(0)
proidtxt.Text = ds.Tables(0).Rows(ind)(1)
cntxt.Text = ds.Tables(0).Rows(ind)(2)
addtxt = ds.Tables(0).Rows(ind)(3)
contxt.Text = ds.Tables(0).Rows(ind)(4)
emailtxt.Text = ds.Tables(0).Rows(ind)(5)
noscombo.Text = ds.Tables(0).Rows(ind)(6)
GroupBox1.Text = ds.Tables(0).Rows(ind)(7)
tatxt.Text = ds.Tables(0).Rows(ind)(8)
dtp.Value = ds.Tables(0).Rows(ind)(9)
updatebtn.Text = "Save Data"
End If
backbtn.Enabled = True
addbtn.Enabled = True
delbtn.Enabled = True
nextbtn.Enabled = True
serbtn.Enabled = True
serbbtn.Enabled = True
serfbtn.Enabled = True
closebtn.Enabled = True
rectxt.Clear()
proidtxt.Clear()
cntxt.Clear()
addtxt.Clear()
contxt.Clear()
emailtxt.Clear()
noscombo.Text = ""
ptxt.Checked = False
dtxt.Checked = False
ftxt.Checked = False
tatxt.Clear()
dtp.Value = Date.Today
End If
End Sub
da.Fill(ds)
rc = ds.Tables(0).Rows.Count
MsgBox(rc)
If rc = 0 Then
MsgBox("No records found", MsgBoxStyle.Critical)
Else
ind = 0
MsgBox("Records found", MsgBoxStyle.Information)
rectxt.Text = ds.Tables(0).Rows(ind)(0)
proidtxt.Text = ds.Tables(0).Rows(ind)(1)
cntxt.Text = ds.Tables(0).Rows(ind)(2)
addtxt.Text = ds.Tables(0).Rows(ind)(3)
contxt.Text = ds.Tables(0).Rows(ind)(4)
emailtxt.Text = ds.Tables(0).Rows(ind)(5)
noscombo.Text = ds.Tables(0).Rows(ind)(6)
GroupBox1.Text = ds.Tables(0).Rows(ind)(7)
tatxt.Text = ds.Tables(0).Rows(ind)(8)
dtp.Value = ds.Tables(0).Rows(ind)(9)
delbtn.Text = "Delete"
End If
ElseIf delbtn.Text = "Delete" Then
ds.Reset()
da = New OleDbDataAdapter("delete from sales_info where
Receipt_no = " & src_id, con)
da.Fill(ds)
MsgBox("Record Deleted", MsgBoxStyle.Information)
backbtn.Enabled = True
addbtn.Enabled = True
updatebtn.Enabled = True
nextbtn.Enabled = True
serbtn.Enabled = True
serbbtn.Enabled = True
serfbtn.Enabled = True
closebtn.Enabled = True
rectxt.Clear()
proidtxt.Clear()
cntxt.Clear()
addtxt.Clear()
contxt.Clear()
emailtxt.Clear()
noscombo.Text = ""
ptxt.Checked = False
dtxt.Checked = False
ftxt.Checked = False
tatxt.Clear()
dtp.Value = Date.Today
End If
End Sub
End If
If ind = rc - 1 Then
serbtn.Enabled = False
End If
If ind <= rc - 1 Then
rectxt.Text = ds.Tables(0).Rows(ind)(0)
proidtxt.Text = ds.Tables(0).Rows(ind)(1)
cntxt.Text = ds.Tables(0).Rows(ind)(2)
addtxt.Text = ds.Tables(0).Rows(ind)(3)
contxt.Text = ds.Tables(0).Rows(ind)(4)
emailtxt.Text = ds.Tables(0).Rows(ind)(5)
noscombo.Text = ds.Tables(0).Rows(ind)(6)
GroupBox1.Text = ds.Tables(0).Rows(ind)(7)
tatxt.Text = ds.Tables(0).Rows(ind)(8)
dtp.Value = ds.Tables(0).Rows(ind)(9)
End If
End Sub
Private Sub btnfbtn_click()
ds.Reset()
da = New OleDbDataAdapter("select * from sales_info", con)
da.Fill(ds)
rc = ds.Tables(0).Rows.Count
MsgBox(rc)
If rc = 0 Then
MsgBox("No records found", MsgBoxStyle.Critical)
Else
ind = 0
serbtn.Visible = True
serbbtn.Visible = True
MsgBox("Record found", MsgBoxStyle.Information)
rectxt.Text = ds.Tables(0).Rows(ind)(0)
proidtxt.Text = ds.Tables(0).Rows(ind)(1)
cntxt.Text = ds.Tables(0).Rows(ind)(2)
addtxt.Text = ds.Tables(0).Rows(ind)(3)
contxt.Text = ds.Tables(0).Rows(ind)(4)
emailtxt.Text = ds.Tables(0).Rows(ind)(5)
noscombo.Text = ds.Tables(0).Rows(ind)(6)
GroupBox1.Text = ds.Tables(0).Rows(ind)(7)
tatxt.Text = ds.Tables(0).Rows(ind)(8)
dtp.Value = ds.Tables(0).Rows(ind)(9)
End If
End Sub
Private Sub serbbtn_click()
ind = ind - 1
If ind > rc - 1 Then
Else
rectxt.Text = ds.Tables(0).Rows(ind)(0)
proidtxt.Text = ds.Tables(0).Rows(ind)(1)
cntxt.Text = ds.Tables(0).Rows(ind)(2)
addtxt.Text = ds.Tables(0).Rows(ind)(3)
contxt.Text = ds.Tables(0).Rows(ind)(4)
emailtxt.Text = ds.Tables(0).Rows(ind)(5)
noscombo.Text = ds.Tables(0).Rows(ind)(6)
GroupBox1.Text = ds.Tables(0).Rows(ind)(7)
tatxt.Text = ds.Tables(0).Rows(ind)(8)
dtp.Value = ds.Tables(0).Rows(ind)(9)
End If
If ind = 0 Then
serbbtn.Enabled = False
End If
If ind = rc - 2 Then
serbtn.Enabled = True
End If
End Sub
End Class
References
Beginnig VB.net 2005
By Thearon Willis
Black book
By Steven Hozner