Project Report On Blood Donation System PDF
Project Report On Blood Donation System PDF
SUBMITTED BY:
YASHVEER SINGH
ENROLMENT NO:836086
ROLL NO: 802271
SUBMITTED TO
MR. PRABHAT RANJAN SHARMA
(H.O.D.)
Department of computer science
1
2008-2011
ACKNOWLEDGEMENT
college Mr. D.S. Mahalwar and Dean S.K.N. Singh. Our facility
members and all our friends. We pay our thanks to Mr. Mohit
We like to pay our wish and love to our all supporting friends who
2
thanks to our family members for providing moral support and
from all of the above in our future to accomplish all our endeavors.
YASHVEER SINGH
(B.C. A. VI Sem)
DECLARATION
th
I Yashveer Singh Roll No. 802271 student of BCA 6 semester in
3
DONATION SYSTEM” is not submitted for the award of any
Place: Name
Document information:
4
Project code B.C.A.
5
Table of contents:
1. INTRODUCTION
2. SYSTEM DEVELOPMENT
6
3.3.3) Software Interface
6.) CODING
7.) CONCLUSION
7
8.) FUTURE SCOPE
9.) BIBLIOGRAPHY
8
HISTORY OF VISUAL BASIC
VB 1.0 was introduced in 1991. The drag and drop design for
creating the user interface is derived from a prototype form
generator developed by Alan Cooper and his company called
Tripod. Microsoft contracted with Cooper and his associates to
develop Tripod into a programmable form system for Windows 3.0,
under the code name Ruby.
9
engine designed for Microsoft's abandoned "Omega" database
system. Ruby also provided the ability to load dynamic link libraries
containing additional controls (then called "gizmos"), which later
became the VBX interface
10
Visual Basic is a "visual programming" environment for developing
from the Visual Basic Toolbox and writes basic code for each element.
automatically when the end user chooses menu items, clicks the
11
CHARACTERSTICS OF VISUAL BASIC
evolved from the earlier DOS version called BASIC. BASIC means
12
Language. Different software companies produced different versions
many versions of VB exist in the market, the most popular one and
13
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.
and actions are defined for the components, a simple program can be
faster computers and native code compilation this has become less of
an issue.
14
Forms are created using drag-and-drop techniques. A tool is used to
place controls (e.g., text boxes, buttons, etc.) on the form (window).
Controls have attributes and event handlers associated with them.
Default values are provided when the control is created, but may be
changed by the programmer. Many attribute values can be modified
during run time based on user actions or changes in the
environment, providing a dynamic application. For example, code
can be inserted into the form resize event handler to reposition a
control so that it remains centered on the form, expands to fill up the
form, etc. By inserting code into the event handler for a keypress in
a text box, the program can automatically translate the case of the
text being entered, or even prevent certain characters from being
inserted.
15
perform some action based on which element was selected, such as
populating a related list.
1.) INTRODUCTION
16
1.2) PURPOSE:
1.3) SCOPE:
1.6) CONSTRAINT:
17
1.9.1) Usability:
1.9.2) Efficiency:
1.9.3) Maintainability:
1.9.4) Security:
1.9.5) Reliability:
1.9.6) Performance:
18
1. INTRODUCTION
1.5) PURPOSE:
Information.
19
1.6) SCOPE:
and effectively.
used in the other systems which need to manage the quick data
processing.(more)
2. Faculty members
3. Administrative staff
20
The system requires he user to be familiar with the basic
operations of computer.
1.6) CONSTRAINT:
describe any other books that will limit the developer’s options.
These include:
Develop a system
Like this.
2) Developers should have known about all the main devices and
there
Specification.
1) Project will work for a long time and user will adopt it.
21
3) The database update made by the system will always leave
4) There may be some small problems, which will not affect the
Preferences
This project is based upon Visual Basic user interfaces. The user
22
Login Process
This system interface is used to give access to the user for the
23
The user will use the system if it is giving the functionality it
daily records)
1.9.1) Usability:
The system is fully usable and does not require any pre-specified
1.9.2) Efficiency:
1.9.3) Maintainability:
24
In case of any change in policies and rule of the institution using
developer.
1.9.4) Security:
Only the super user can enter the system to use it.
1.9.5) Reliability:
1.9.6) Performance:
25
2.) SYSTEM DEVELOPMENT
26
2.1) Initial investigation
27
In this system the data, which is about the student , maintaining
28
The existing system can be replaced by computer-
29
3.1) what is the problem?
30
3.) SYSTEM ANALYSIS
31
There is the following information required to store for
student
32
software technology, and available personnel? If new technology
environment.
Microsoft access is chosen that is not free of cost but it is fit in the
33
The key question of the economical feasibility is ”Are there
acceptable? Are the cost of not creating the system so that the
Access that is not free of cost but it is fit in the expenditure of the
organization.
34
implemented? Will there be resistance from users that
35
The Library is the system developed for the students
the owner and other workers. The user interface to the system is
Key Board
Mouse
database.
36
Verbal communication takes place between the
easy and user will get correct information. Student will not
37
Problem statement of our project is as follows:
information and this should provide for the entries of new student
The sole user of the system will also enter records for the students
38
1) Object Modeling
2) Dynamic modeling
3) Functional Modeling
etc.)
system.
39
• Following associations are found in this system.
Student.
40
Dynamic model show the time dependent behavior of
consistency
41
occupies an interval of time. A state is often associated with a
continuous activity.
42
5.) FORM DESIGNING
43
44
45
46
47
48
49
50
51
6.) Coding:
52
Coding:
FOR FORM-1
FOR PASSWORD:-
Private Sub command1_Click()
If txtpassword = "" Then
Form2.Show
Form1.Hide
Else
MsgBox "Sorry!!Invalid Password,Try Again"
txtpassword = ""
txtpassword.SetFocus
End If
End Sub
53
FOR FORM-2C:\Documents and Settings\GARIMA\My
Documents\Session 3 Ex-2_files
TO SHOW FORM’S:-
Private Sub mnubgwise_Click()
Form2.Hide
Form6.Show
End Sub
Private Sub mnudd_Click()
Form2.Hide
Form5.Show
End Sub
Private Sub mnudeleted_Click()
Form2.Hide
frmDeleteDeptt.Show
End Sub
Private Sub mnudu_Click()
Form2.Hide
Form4.Show
End Sub
Private Sub mnuexit_Click()
End
End Sub
Private Sub mnunr_Click()
Form2.Hide
Form3.Show
End Sub
54
FOR FORM-3
55
rs.Fields("Enrollment no/Employee ID") = Text5.Text
rs.Update
End If
rs.Close
myerror:
Call error
End Sub
FOR CANCEL:-
Private Sub command2_Click()
text2.Text = Clear
Text3.Text = Clear
Text4.Text = Clear
Text5.Text = Clear
Text6.Text = Clear
Combo1.Text = Clear
Combo2.Text = Clear
Combo3.Text = Clear
Combo4.Text = Clear
Combo5.Text = Clear
text2.SetFocus
End Sub
FOR BACK:-
Private Sub Command3_Click()
text2.Text = Clear
Text3.Text = Clear
Text4.Text = Clear
56
Text5.Text = Clear
Text6.Text = Clear
Combo1.Text = Clear
Combo2.Text = Clear
Combo3.Text = Clear
Combo4.Text = Clear
Combo5.Text = Clear
text2.SetFocus
Form3.Hide
Form2.Show
End Sub
57
Wend
rs.Close
Dim strsql1 As String
strsql1 = "Select distinct Department from registration"
Set rs1 = New ADODB.Recordset
rs1.Open strsql1, con, adOpenForwardOnly, adLockOptimistic
While Not rs1.EOF
Combo4.AddItem rs1.Fields("Department")
rs1.MoveNext
Wend
rs1.Close
Dim strsql2 As String
strsql2 = "Select distinct Hall from registration"
Set rs2 = New ADODB.Recordset
rs2.Open strsql2, con, adOpenForwardOnly, adLockOptimistic
While Not rs2.EOF
Combo5.AddItem rs2.Fields("Hall")
rs2.MoveNext
Wend
rs2.Close
text1.Enabled = False
'Blood Group setting
Combo2.AddItem "A+"
Combo2.AddItem "A-"
Combo2.AddItem "B+"
Combo2.AddItem "B-"
Combo2.AddItem "O+"
Combo2.AddItem "O-"
58
Combo2.AddItem "AB+"
Combo2.AddItem "AB-"
myerror:
Call error
End Sub
Private Sub Form_Unload(Cancel As Integer)
con.Close
End Sub
Private Sub Text2_GotFocus()
On Error GoTo myerror:
Set rs3 = New ADODB.Recordset
rs3.Open "registration", con, adOpenForwardOnly, adLockOptimistic
If rs3.EOF = True Then
text1.Text = "D" & 1
GoTo ext:
End If
rs3.MoveLast
Dim strcode As String
strcode = rs3.Fields("Donor ID")
text1.Text = "D" & Val(Mid$(strcode, 2, Len(strcode) - 1)) + 1
ext:
rs3.Close
myerror:
Call error
End Sub
Private Sub error()
If Err.Number <> 0 Then
MsgBox ("Error: " & Err.Description)
59
Exit Sub
End If
End Sub
FOR FORM-4
GENERAL DECLARATION:-
Dim con As ADODB.Connection
FOR UPDATION:-
Private Sub command1_Click()
On Error GoTo myerror:
If text1 = "" Or text2 = "" Or Text3 = "" Or Text4 = "" Or Text5 = ""
Or Text6 = "" Or Combo1 = "" Or Combo2 = "" Or Combo3 = "" Or
Combo4 = "" Or Combo5 = "" Then
MsgBox "Fill up all fields"
Exit Sub
End If
Dim strsql As String
strsql = "Select * from registration where [Donor ID]='" & text1.Text
& "'"
Set rs = New ADODB.Recordset
rs.Open strsql, con, adOpenForwardOnly, adLockOptimistic
If MsgBox(" Are you sure(Y/N)???", 4) = 7 Then Exit Sub
rs.Update("Name") = text2.Text
rs.Update("Phone no") = Text3.Text
rs.Update("E-mail ID") = Text4.Text
rs.Update("Address") = Text5.Text
rs.Update("Occupation") = Combo1.Text
60
rs.Update("Blood Group") = Combo2.Text
rs.Close
MsgBox "Your change has been saved!!"
myerror:
Call error
End Sub
FOR CANCEL:-
Private Sub command2_Click()
text1.Text = Clear
text2.Text = Clear
Text3.Text = Clear
Text4.Text = Clear
Text5.Text = Clear
Combo1.Text = Clear
Combo2.Text = Clear
text1.SetFocus
Form4.Hide
Form2.Show
End Sub
FOR BACK:-
Private Sub Command3_Click()
text1.Text = Clear
text2.Text = Clear
Text3.Text = Clear
Text4.Text = Clear
Text5.Text = Clear
61
Combo1.Text = Clear
Combo2.Text = Clear
End Sub
FOR FORM:-
Private Sub Form_Load()
On Error GoTo myerror:
Set con = CreateObject("Adodb.connection")
con.Provider = "Microsoft.jet.oledb.4.0"
con.Open App.Path & "\db1.mdb"
Dim strsql As String
strsql = "Select distinct Faculty from registration"
Set rs = New ADODB.Recordset
rs.Open strsql, con, adOpenForwardOnly, adLockOptimistic
Combo1.AddItem "Student"
Combo1.AddItem "Employee"
Combo1.AddItem "Others"
While Not rs.EOF
Combo3.AddItem rs.Fields("Faculty")
rs.MoveNext
Wend
rs.Close
Dim strsql1 As String
strsql1 = "Select distinct Department from registration"
Set rs1 = New ADODB.Recordset
rs1.Open strsql1, con, adOpenForwardOnly, adLockOptimistic
While Not rs1.EOF
Combo4.AddItem rs1.Fields("Department")
62
rs1.MoveNext
Wend
rs1.Close
Dim strsql2 As String
strsql2 = "Select distinct Hall from registration"
Set rs2 = New ADODB.Recordset
rs2.Open strsql2, con, adOpenForwardOnly, adLockOptimistic
While Not rs2.EOF
Combo5.AddItem rs2.Fields("Hall")
rs2.MoveNext
Wend
rs2.Close
'Blood Group setting
Combo2.AddItem "A+"
Combo2.AddItem "A-"
Combo2.AddItem "B+"
Combo2.AddItem "B-"
Combo2.AddItem "O+"
Combo2.AddItem "O-"
Combo2.AddItem "AB+"
Combo2.AddItem "AB-"
myerror:
Call error
End Sub
Private Sub error()
If Err.Number <> 0 Then
MsgBox ("Error: " & Err.Description)
Exit Sub
63
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
con.Close
End Sub
Private Sub Text1_Change()
text2.Enabled = True
Text3.Enabled = True
Text4.Enabled = True
Text5.Enabled = True
Combo1.Enabled = True
Combo2.Enabled = True
command1.Enabled = True
Label4.Enabled = True
Label5.Enabled = True
Label6.Enabled = True
Label7.Enabled = True
Label8.Enabled = True
Label9.Enabled = True
Label10.Enabled = True
Label11.Enabled = True
Label12.Enabled = True
64
If Not rs10.EOF Then
text2.Text = rs10.Fields("Name")
Text3.Text = rs10.Fields("Phone no")
Text4.Text = rs10.Fields("E-mail ID")
Text5.Text = rs10.Fields("Address")
Combo1.Text = rs10.Fields("Occupation")
Combo2.Text = rs10.Fields("Blood Group")
End†f
rs10.Close
End Sub
Private Sub Text6_Change()
text1.Enabled = True
text2.Enabled = True
Text3.Enabled = True
Text4.Enabled = True
Combo1.Enabled = True
Combo2.Enabled = True
command1.Enabled = True
Label4.Enabled = True
Label5.Enabled = True
Label6.Enabled = True
Label7.Enabled = True
label3.Enabled = True
Label10.Enabled = True
Label11.Enabled = True
Label12.Enabled = True
Dim strsql11 As String
65
strsql11 = "Select * from registration where [Enrollment no/Employee
ID]='" & Text6.Text & "'"
Set rs11 = New ADODB.Recordset
rs11.Open strsql11, con, adOpenForwardOnly, adLockOptimistic
If Not rs11.EOF Then
text1.Text = rs11.Fields("Donor ID")
text2.Text = rs11.Fields("Name")
Text3.Text = rs11.Fields("Phone no")
Text4.Text = rs11.Fields("E-mail ID")
Combo1.Text = rs11.Fields("Occupation")
Combo2.Text = rs11.Fields("Blood Group")
End If
rs11.Close
End Sub
FOR FORM-5
GENERAL DECLARATION:-
Dim con As ADODB.Connection
FOR DELETION:-
Private Sub command1_Click()
On Error GoTo myerror:
Dim strsql As String
strsql = "Select * from registration where [Donor ID]='" & text1.Text
& "'"
Set rs = New ADODB.Recordset
rs.CursorLocation = adUseClient
66
rs.Open strsql, con, adOpenForwardOnly, adLockOptimistic
If MsgBox(" Are you sure(Y/N)???", 4) = 7 Then Exit Sub
rs.Delete
rs.Close
MsgBox "Record Deleted!!"
Form2.Show
Form5.Hide
myerror:
End Sub
FOR BACK:-
Private Sub Command3_Click()
text1.Text = Clear
text2.Text = Clear
Text3.Text = Clear
Text4.Text = Clear
Text6.Text = Clear
Combo1.Text = Clear
Combo2.Text = Clear
text1.SetFocus
Form4.Hide
Form2.Show
End Sub
FOR CANCEL:-
Private Sub command2_Click()
text1.Text = Clear
text2.Text = Clear
Text3.Text = Clear
67
Text4.Text = Clear
Text5.Text = Clear
Combo1.Text = Clear
Combo2.Text = Clear
End Sub
Private Sub Form_Load()
On Error GoTo myerror:
Set con = CreateObject("Adodb.connection")
con.Provider = "Microsoft.jet.oledb.4.0"
con.Open App.Path & "\db1.mdb"
myerror:
Call error
End Sub
Private Sub error()
If Err.Number <> 0 Then
MsgBox ("Error: " & Err.Description)
Exit Sub
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
con.Close
End Sub
Private Sub Image2_Click()
End Sub
Private Sub Text1_Change()
text2.Enabled = True
Text3.Enabled = True
Text4.Enabled = True
68
Text5.Enabled = True
Combo1.Enabled = True
Combo2.Enabled = True
command1.Enabled = True
Label4.Enabled = True
Label5.Enabled = True
Label6.Enabled = True
Label7.Enabled = True
Label8.Enabled = True
Label9.Enabled = True
Label10.Enabled = True
Label11.Enabled = True
Label12.Enabled = True
69
rs10.Close
End Sub
Private Sub Text6_Change()
text1.Enabled = True
text2.Enabled = True
Text3.Enabled = True
Text4.Enabled = True
Text5.Enabled = True
Combo1.Enabled = True
Combo2.Enabled = True
command1.Enabled = True
Label4.Enabled = True
Label5.Enabled = True
Label6.Enabled = True
Label7.Enabled = True
Label8.Enabled = True
label3.Enabled = True
Label10.Enabled = True
Label11.Enabled = True
Label12.Enabled = True
Dim strsql11 As String
strsql11 = "Select * from registration where [Enrollment no/Employee
ID]='" & Text6.Text & "'"
Set rs11 = New ADODB.Recordset
rs11.Open strsql11, con, adOpenForwardOnly, adLockOptimistic
If Not rs11.EOF Then
text1.Text = rs11.Fields("Donor ID")
text2.Text = rs11.Fields("Name")
70
Text3.Text = rs11.Fields("Phone no")
Text4.Text = rs11.Fields("E-mail ID")
Text5.Text = rs11.Fields("Address")
Combo1.Text = rs11.Fields("Occupation")
Combo2.Text = rs11.Fields("Blood Group")
End If
rs11.Close
End Sub
FOR FORM-6
Dim con As ADODB.Connection
Dim selec As Integer
FOR SEARCH:-
Private Sub command1_Click()
On Error GoTo myerror:
Dim strsql As String
If Not Combo1.Text = "" Then
strsql = "SELECT registration.[Donor ID], registration.Name,
registration.[Phone no],registration.[E-mail
ID],registration.Address,registration.Occupation,registration.[Blood
Group] FROM registration WHERE [Blood Group]='" &
Combo1.Text & "'"
End If
Set rs = New ADODB.Recordset
rs.CursorLocation = adUseClient
rs.Open strsql, con, adOpenForwardOnly, adLockOptimistic
Set DataGrid1.DataSource = rs
71
DataGrid1.Columns(0).Caption = "D.ID"
DataGrid1.Columns(0).Width = 500
DataGrid1.Columns(1).Width = 700
DataGrid1.Columns(2).Width = 1500
DataGrid1.Columns(3).Width = 2500
DataGrid1.Columns(4).Width = 2500
DataGrid1.Columns(5).Width = 500
DataGrid1.Columns(6).Width = 900
DataGrid1.Columns(7).Width = 2200
DataGrid1.Columns(8).Width = 2200
DataGrid1.Columns(9).Width = 1500
DataGrid1.Columns(10).Width = 900
DataGrid1.Refresh
'rs.Close
myerror:
Call error
End Sub
FOR BACK:-
Private Sub Command3_Click()
Form8.Show
End Sub
72
Private Sub DataGrid1_DblClick()
Form4.Show
Call datashow
End Sub
Private Sub Form_Load()
Call datashow
End Sub
Private Sub error()
If Err.Number <> 0 Then
MsgBox ("Error: " & Err.Description)
Exit Sub
End If
End Sub
Sub datashow()
On Error GoTo myerror:
Set con = CreateObject("Adodb.connection")
con.Provider = "Microsoft.jet.oledb.4.0"
con.Open App.Path & "\db1.mdb"
'Blood Group setting
Combo1.AddItem "A+"
Combo1.AddItem "A-"
Combo1.AddItem "B+"
Combo1.AddItem "B-"
Combo1.AddItem "O+"
Combo1.AddItem "O-"
Combo1.AddItem "AB+"
Combo1.AddItem "AB-"
Dim strsql As String
73
strsql = "SELECT registration.[Donor ID], registration.Name,
registration.[Phone no],registration.[E-mail
ID],registration.Address,registration.Occupation,registration.[Blood
Group],registration.[Enrollment no/Employee
ID],registration.Department,registration.Faculty,registration.Hall
FROM registration "
Set rs = New ADODB.Recordset
rs.CursorLocation = adUseClient
rs.Open strsql, con, adOpenForwardOnly, adLockOptimistic
Set DataGrid1.DataSource = rs
DataGrid1.Columns(0).Caption = "D.ID"
DataGrid1.Columns(0).Width = 500
DataGrid1.Columns(1).Width = 700
DataGrid1.Columns(2).Width = 1500
DataGrid1.Columns(3).Width = 2500
DataGrid1.Columns(4).Width = 2500
DataGrid1.Columns(5).Width = 500
DataGrid1.Columns(6).Width = 900
DataGrid1.Columns(7).Width = 2200
DataGrid1.Columns(8).Width = 2200
DataGrid1.Columns(9).Width = 1500
DataGrid1.Columns(10).Width = 900
DataGrid1.Refresh
'rs.Close
selec = 0
myerror:
Call error
End Sub
74
Private Sub Form_Unload(Cancel As Integer)
con.Close
End Sub
75
7.) CONCLUSION
76
Conclusion:
Overall conclusion is that the efficiency and quality are bet served by
through the each phases. Proper testing of the project, its modularity &
This project has been developed to enable users to manage their daily
work efficiency.
77
78
8.) FUTURE SCOPE
FUTURE SCOPE:
to handle and anyone can operate it. It will not only reduce the cost of
79
maintenance of records but it will be also. Improve the efficiency of
work.
80
9.) BIBLIOGRAPHY:
81
BIBLIOGRAPHY:
• www.bloodbank.com
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154