Академический Документы
Профессиональный Документы
Культура Документы
PROJECT REPORT
ON
Submitted by
Monika Sharma
Roll no. 062119505
CONTENTS
1. Acknowledgement... 3
2. Study Center Certificate.. 4
3. Introduction. 5
4. Preface.. 6
5. Hardware, Software Specification 7
Hardware requirement 10
Software requirement. 11
Database design.. 12
Dataflow diagram.. 16
ER-Diagram .. 22
5. System analysis. 23
6. Software Planning. 27
7. System design 29
8. Testing & Debugging.... 36
9. Security of the system 45
10. Coding.. 46
11. Output.. 61
11. Bibliography.... 89
INTRODUCTION
The aim of this project i.e Medical Agency Management System is to
maintain the Medicine data, Purchase, Sales, and most important Stock data.
There is only one type of user in this system, known as registered user. The
user first insert the data of all the students whse attendance is to be maintained
and then can use attendance window. In this project, we can maintain the
Student and attendance data Month wise. This software provides you we can
search the attendance details of a particular student quickly which helps in
time saving.
Introduction Description
Information Description
Function Description
Behavioral Description
Validation checks and criteria
Bibliography
Appendix
Introduction
The introduction states the goals and objectives of the software describing it
in the context of the computer -based system. Actually the introduction may
be nothing more than the software people of the planning document.
Functional description
The project also provides the facility to contact the registered user easily
without any admin interaction. If you find an existing entry meeting your
requirement, then you can contact the concerned party directly.
If there is no entry, which meets your requirement, you can register your
details on the site, so that others can find you. The project improves the
efficiency and effectiveness of the whole system.
Behavioral description
IT Examine the operations of the software as a consequence of external
events and internally generated control characteristics. Here the Admin
checks the classified entered by the registered users. Admin is the only
person who can activate or deactivate the classified entered by the
registered users.
HARDWARE REQUIREMENT
RAM
256 MB
HDD
40 GB
FDD
1.44 MB
CD-ROM
52X
SOFTWARE REQUIREMENT
To use this software, some software are required. Software means a
collection of program where the objective is to enhance the capabilities of
the hardware machine.
Minimum Software Requirement Of Client Side:
Operating System
Database
MS-ACCESS
DATABASE DESIGN
Introduction to data dictionary:
Data dictionaries are an integral component of structured analysis, since data
flow diagrams by themselves do not fully describe the subject of the
investigation. The data flow diagrams provide the additional details about
the project/system.
Each entry in the data dictionary consists of a set of details describing the
data used or produced in the system. Each item is identified by a data name,
description, alias, and length and has specific values that are permissible for
it in the system being studied.
List of Tables:
Table Structure
1. User table
2. Student table
3. Attendance table
1.
Login table
Field Name
Data Type
Loginname
Text
Password
Text
2.
Supplier Table
Field Name
Data Type
SNO
SName
ADDRESS
PHONE
Number
Text
Text
Text
10
3.
Purchase Table
Field Name
Data Type
SNO
SName
ADDRESS
MNAME
MEDICINETYPE
COMPNAME
ORDERNO
PURCHASEDATE
MDATE
EXPDATE
QTY
RATE
BILL
Number
Text
Text
TEXT
TEXT
TEXT
NUMBER
DATE
DATE
DATE
NUMBER
NUMBER
NUMBER
11
4.
Sale Table
Field Name
Data Type
CNO
CName
ADDRESS
MNAME
MEDICINETYPE
COMPNAME
ORDERNO
SALEDATE
MDATE
EXPDATE
QTY
RATE
BILL
Number
Text
Text
TEXT
TEXT
TEXT
NUMBER
DATE
DATE
DATE
NUMBER
NUMBER
NUMBER
5.
Stock Table
Field Name
Data Type
MEDICINNAME
COMPANY
QTY
RATE
TEXT
Text
NUMBER
NUMBER
12
End-Users are not alike. Some are intermittent users. The end-user can also
be a competitor, not an employee of the firm.
User managers have management responsibilities for application systems.
Definition of System:
In the broad sense, a system is simply a set of components that interact to
accomplish some purpose. Systems are all around us. As computers are
used more and more by persons who are not computer professionals ,
the face of systems development is taking on an additional dimension.
Users themselves are undertaking development of some of the systems
they use , as the executive in the vignette emphasized.
These different situations are represented by three distinct approaches to
the development of computer information systems:
Systems Development Life Cycle.
Structured Analysis Development Method.
Systems Prototype Method.
Systems Development Life Cycle:
14
Preliminary investigation.
Determination of system requirements.
Design of system.
Development of software.
System testing.
Implementation and evaluation.
Two main steps of development are:
Analysis
Design
15
ANALYSIS:
Objectives:
System analysis is conducted with the following objectives in mind:
Create a system definition that forms the foundation for all subsequent
engineering work. Both hardware and software expertise are required to
successfully attain the objectives listed above.
16
USER1
Username
User Detail
Searched
data
Password
USER2
CHECK
THE
VALID
USER
Invalid
message
17
STOCK
SUPPLIER
Medicine data
Supplier data
Medicin data
SALE
&
PURCHASE
PURCHAS
E AND
SALES
REGISTER
CUSTOMER
Customer data
18
E-R DIAGRAM
Year
Month
User
Total
absent
User
name
U_pass
Login
Purchase
& Sale
medicine
Suppno
Stock
Phone
Supplier
&
Customer
Name
Addres
s
19
SYSTEM ANALYSIS
The analysis model must achieve three primary objectives:1. To describe the requirements of the customer.
2. To establish a basis for the creation of a software design.
3. To define a set of requirements that can be validated once software is
built.
An Overview to system analysis
The system analysis phase is considered to be one of the most important
phases in the system development life cycle. It is immensely important that
the software developer make through study of the existing system.
Thorough study of the system is made and need i.e. features that are critical
to system success and users wants (i.e. features that would be good but not
essential) are brought out. The study will enable the developer to know the
intricacies of the existing system.
Requirement analysis is done in order to understand the problem which the
S/W system is to solve e.g., the problem could be automating the existing
manual system or developing a completely new automated system or a
combination of the two. For large systems having a large number of
features and the need to perform many different tasks, understanding the
requirement of the system is a major task. The emphasis in requirement
20
analysis is on identifying what is needed from the system, and not how the
system achieves its goal.
The main objective behind any business organization is to maximize its
profit besides maintaining quality and strategic norms.
This can be
objective behind automation is not only to maximize profit but also to take
care of students interest by providing coaching of latest courses benefiting
students, in turn the country.
The most important objective behind automation is to minimize Paper
Work. Paper Work/Registers are replaced by a Centralized Data Bank,
which is well equipped to store / provide information as and when required.
Data Bank also helps speed up the communication between various depts. /
outside agencies, as there is no need of making request against different
departments for a specific data and to wait for it for a long period. This also
improves the efficiency as it saves time and human resources.
By making the manual system computerized, we can ensure complete
utilization of our existing resources. Automation helps in generating the
reports / information in a consistent way, which saves time and labour if
done manually.
21
NEED OF COMPUTERIZATION
In the area of information technology, it is need of hour to have a fast
information processing system capable of providing processed data at right
time and to right person which appropriately justified by the following
limitation of manual system:
IMPORTANCE OF COMPUTERIZATION
After computerization of the system, it will be helpful for
giving correct information in a short period of time. This will provide:
23
SOFTWARE PLANNING
I was assigned the duty for developing a computerized system known as
Online Attendance Management System. Working in team reinstates the
team for some common guidelines and standard to be followed by all the
team members across all team. For the optimum use of practical time it is
necessary that every session is planned. Planning of this project will include
the following things:
Topic Understanding.
Modular Break Up Of The System.
Processor Logic For Each Module.
Database Requirements.
Topic Understanding:
It is vital that the field of application as introduced in the project may be
totally a new field. I carefully went through the project to identify the
requirements of the project.
Modular Break Up Of The System:
Identify The Various Modules In The System.
List Them In The Right Hierarchy.
Identify Their Priority Of Development.
24
25
SYSTEM DESIGN
Introduction:
System design is a solution, How to approach to the creation of a new
system. This important phase is composed of several steps. It
provides the understanding and procedural feasibility study.
Design gose through a logical and physical stage of
development. Logical design reviews the present physical
system, prepares input output specification, makes edit,
security and control specification, detail implementation plans,
prepares a logical design walkthrough. The physical design maps
out the details of the physical system, plans the system
implementation and specifies any new hardware and software.
Input Design
The most common cause of errors in data processing is inaccurate input data
errors entered by the data entry operator. It can be controlled by the input
26
design. Input design is the process of converting user oriented inputs to the
computer based formats. The goal of the input design is to make data entry
as easy, logical and free from as many errors as possible.
Output Design
Computers are the most important sources of information to the users are fed
into the computers to acquire the necessary outputs. The computers can
provide the well enough output in the form of information regarding various
items to the users. The major form of output is a hard copy from the printer.
Printouts are designed around the output requirements of the user(s).
Interface Design
Forms are designed to control the redundancy, increased operator accuracy
maximum readability, easy data entry and elimination of unnecessary data to
provide easier checking and correction of data.
Keeping in view the users requirements, the input/output forms have been
designed
and developed for easy data entry and query handling. Based on the various
types of inputs to be fed into the computer in using this system, several
inputs forms have been designed to make data entry easier and accurate.
Database Design
27
System implemantation
Implementation, literally, means to put into effects or to carry out. The
system implementation phase of software engineering deals with all
activities that take place to convert from the old system to the new. Proper
implementation is essential to provide system to meet organizations
requirements.
During the implementation phase debugging, documentation of the system
was created out, module in the project for
Accuracy of Results,
Minimization of response Time,
Clarity and Simplicity of the code,
Minimization of hard Coding i.e. (a generic approach was followed)
Minimization of amount of memory used.
28
INTERNAL DOCUMENTATION
2.
EXTERNAL DOCUMENTATION
29
Internal documentation
Internal documentation in the code can be extremely useful in enhancing the
understandability of programs. Internal documentation of programs is done
by the use of comments. All the language provide means of writing
comments in the programs. Comments are textual statements that are meant
for the reader and are not executed. Comment, if properly written, and if
kept consistent with the code, can be invaluable during maintenance.
The purpose of comments is not to explain the internal logic of the program
the program itself is the best documentation for the details of logic.
The comments should explain what the code is done is doing, and not how it
is done it. Comments should be provided for the block of code, particularly
those parts of code which are hard to follows.
Providing comments for module is most useful as module form the unit
testing, compiling, verification and modification. Comments for a module
are often called prologue for the module. It is best to standardized the
structure of the prologue of the module. It is desirable that prologue contains
the following information ;
a) Module functionality or what the module is doing.
b) Parameters are their purpose
c) Assumptions about the input, if any
30
Apart from this comments lines have been inserted whenever it was felt that
they were necessary. Moreover meaningful variable names/constants have
been assigned to different variable/constants used in the program.
External documentation
The external documentation of the system contains all the relevant
information about the system which is not included within the programs.
The external documentation typically explains:
What is the basic purpose of the system?
Why the system was developed?
The platform on which the system will run.
The various trouble shooting mechanisms.
The operations guide.
32
TESTING
It should be clear in mind that the philosophy behind testing is to find errors.
Test cases are devised with this purpose in mind. A test case is a set of data
that the system will process as normal input. However, the data are created
with the express intent of determining whether the system will process them
correctly. For example, test cases for inventory handling should include
situations in which the quantifies to be withdrawn from inventory exceed,
equal and are less than the actual quantities on hand. Each test case is
designed with the intent of finding errors in the way the system will process
it. There are two general strategies for testing software: Code testing and
Specification testing. In code testing, the analyst develops that cases to
execute every instructions and path in a program. Under specification
testing, the analyst examines the program specifications and then writes test
data to determine how the program operates under specific conditions.
Regardless of which strategy the analyst follows, there are preferred
practices to ensure that the testing is useful. The levels of tests and types of
test data, combined with testing libraries, are important aspects of the actual
test process.
Levels of Testing
Systems are not designed as entire systems nor are they tested as single
systems. The analyst must perform both unit and system testing.
33
Unit Testing:
In unit testing the analyst tests the programs making up a system. For this
reason, unit testing is sometimes called program testing. Unit testing gives
stress on the modules independently of one another, to find errors. This helps
the tester in detecting errors in coding and logic that are contained within
that module alone. The errors resulting from the interaction between
modules are initially avoided. For example, a hotel information system
consists of modules to handle reservations; guest checking and checkout;
restaurant, room service and miscellaneous charges; convention activities;
and accounts receivable billing. For each, it provides the ability to enter,
modify or retrieve data and respond to different types of inquiries or print
reports. The test cases needed for unit testing should exercise each condition
and option.
Unit testing can be performed from the bottom up, starting with smallest and
lowest-level modules and proceeding one at a time. For each module in
bottom-up testing a short program is used to execute the module and
provides the needed data, so that the module is asked to perform the way it
will when embedded within the larger system.
System Testing:
The important and essential part of the system development phase, after
designing and developing the software is system testing. We cannot say that
every program or system design is perfect and because of lack of
communication between the user and the designer, some error is there in the
34
35
Program Testing:
A program represents the logical elements of a system. For a program to run
satisfactorily, it must compile and test data correctly and tie in properly with
other programs. it is the responsibility of a programmer to have an error free
program. At the time of testing the system, there exists two types of errors
that should be checked. These errors are syntax and logic. A syntax error is a
program statement that violates one or more rules of the language in which it
is written. An improperly defined field dimension or omitted key words are
common syntax errors. These errors are shown through error messages
generated by the computer. A logic error, on the other hand, deals with
incorrect data fields out of range items, and invalid combinations. Since the
logical errors are not detected by compiler, the programmer must examine
the output carefully to detect them.
When a program is tested, the actual output is compared with the expected
output. When there is a discrepancy, the sequence of the instructions, must
be traced to determine the problem. The process is facilitated by breaking
the program down into self-contained portions, each of which can be
checked at certain key points.
String Testing:
Programs are invariably related to one another and interact in a total system.
Each program is tested to see whether it conforms to related programs in the
system. Each part of the system is tested against the entire module with both
test and live data before the whole system is ready to be tested.
36
System Testing:
38
Recovery Testing: This testing determines the ability of user to recover data
or re-start system after failure. For example, load backup copy of data and
resume processing without data or integrity loss.
Procedure Testing: It determines the clarity of documentation on operation
and use of system by having users do exactly what manuals request. For
example, powering down system at the end of week or responding to paperout light on printer.
Human Factors Testing: It determines how users will use the system when
processing data or preparing reports.
DEBUGGING
39
40
Trace Routines: A trace is a program that prints information concerning the status of the
processor at specified intervals. Most simulator program & some
microcomputer development system have trace facilities.
Memory Dumps: A memory dump is a listing of the current contents of a section of the
memory. Most simulator programs, microcomputer development systems &
monitors can produce memory dumps.
Software Interrupts: -
41
42
OUTPUT
43
44
45
46
47
48
49
50
51
52
53
54
55
56
CODING
57
LOGINFORM
Data1.RecordSource = "logintable"
End Sub
SPLASHFORM
MAINFORM
Private Sub addopt_Click()
Add_supplier.Show
End Sub
Private Sub dispstk_Click()
Stockform.Show
59
End Sub
Private Sub ed_Click()
Deleteeditsale.Show
End Sub
Private Sub Listsupplier_Click()
Suppreport.Show
End Sub
Private Sub MDIForm_Load()
Me.WindowState = 2
End Sub
Private Sub Modifyopt_Click()
EDITDELETESUPP.Show
End Sub
Private Sub Purchaseopt_Click()
purchase.Show
End Sub
Private Sub Purchassopt_Click()
purchasereg.Show
End Sub
Private Sub Reportopt_Click()
60
STKSEARCH.Show
End Sub
Private Sub Saleopt_Click()
Saleform.Show
End Sub
Private Sub Saleopt2_Click()
Saleregister.Show
End Sub
Private Sub Searchingopt_Click()
Del_Edit_purchase.Show
End Sub
ADD_SUPPLIER
Data1.Recordset.Update
txtsno.Text = ""
txtsname.Text = ""
txtaddress.Text = ""
TXTPHONE.Text = ""
MsgBox "Successfully saved", vbExclamation
Exit Sub
message:
MsgBox "Invalid data", vbExclamation
End Sub
Private Sub cmdclear_Click()
txtsno.Text = ""
txtsname.Text = ""
txtaddress.Text = ""
TXTPHONE.Text = ""
txtsno.SetFocus
End Sub
Private Sub cmdexit_Click()
Me.Hide
End Sub
Private Sub Form_Load()
Data1.DatabaseName = App.Path + "\madicaldatabase.mdb"
Data1.RecordSource = "SUPPtab"
62
End Sub
EDIT_SUPPLIER
End Sub
Private Sub CMDSEARCH_Click()
On Error GoTo message
Data1.Refresh
Data1.Recordset.FindFirst "SNO=" & txtsno.Text
If Data1.Recordset.NoMatch Then
MsgBox "NOT FOUND", vbExclamation
Else
txtsname.Text = Data1.Recordset.Fields("SNAME")
txtaddress.Text = Data1.Recordset.Fields("ADDRESS")
TXTPHONE.Text = Data1.Recordset.Fields("PHONE")
End If
Exit Sub
message:
MsgBox "Invalid data", vbExclamation
End Sub
Private Sub CMDUPDATE_Click()
Data1.Recordset.Edit
Data1.Recordset.Fields("sno") = txtsno.Text
Data1.Recordset.Fields("sname") = txtsname.Text
Data1.Recordset.Fields("address") = txtaddress.Text
Data1.Recordset.Fields("phone") = TXTPHONE.Text
Data1.Recordset.Update
64
txtmname.Text = ""
txtcompany.Text = ""
txtmdate.Text = ""
txtexpdate.Text = ""
txtrate.Text = ""
txtqty.Text = ""
txtbill.Text = ""
TXTORDERNO.SetFocus
End Sub
Private Sub cmdsave_Click()
On Error GoTo message
Data2.Refresh
Data2.Recordset.AddNew
Data2.Recordset.Fields("orderno") = TXTORDERNO.Text
Data2.Recordset.Fields("purchasedate") = txtpdate.Text
Data2.Recordset.Fields("sno") = txtsno.Text
Data2.Recordset.Fields("SName") = txtsname.Text
Data2.Recordset.Fields("address") = txtaddress.Text
Data2.Recordset.Fields("medicinetype") = txttype.Text
Data2.Recordset.Fields("mname") = txtmname.Text
Data2.Recordset.Fields("compname") = txtcompany.Text
Data2.Recordset.Fields("mdate") = txtmdate.Text
Data2.Recordset.Fields("expdate") = txtexpdate.Text
Data2.Recordset.Fields("rate") = txtrate.Text
Data2.Recordset.Fields("qty") = txtqty.Text
Data2.Recordset.Fields("bill") = txtbill.Text
66
Data2.Recordset.Update
'Update stock
Data3.Refresh
Data3.Recordset.FindFirst "medicinename='" & txtmname.Text & " ' "
If Data3.Recordset.NoMatch Then
Data3.Recordset.AddNew
Data3.Recordset.Fields("medicinename") = txtmname.Text
Data3.Recordset.Fields("company") = txtcompany.Text
Data3.Recordset.Fields("rate") = txtrate.Text
Data3.Recordset.Fields("qty") = txtqty.Text
Data3.Recordset.Update
Else
Data3.Recordset.Edit
Data3.Recordset.Fields("qty") = Data3.Recordset.Fields("qty") +
Val(txtqty.Text)
Data3.Recordset.Update
End If
TXTORDERNO.Text = ""
txtpdate.Text = ""
txtsno.Text = ""
txtsname.Text = ""
67
txtaddress.Text = ""
txttype.Text = ""
txtmname.Text = ""
txtcompany.Text = ""
txtmdate.Text = ""
txtexpdate.Text = ""
txtrate.Text = ""
txtqty.Text = ""
txtbill.Text = ""
MsgBox "Successfully saved", vbExclamation
Exit Sub
message:
MsgBox "Invalid data", vbExclamation
End Sub
Data1.Recordset.MoveNext
Wend
txttype.Clear
txttype.AddItem "Tablet"
txttype.AddItem "Capsule"
txttype.AddItem "Syrup"
txttype.AddItem "Injection"
End Sub
Private Sub Form_Load()
Data1.DatabaseName = App.Path + "\madicaldatabase.mdb"
Data1.RecordSource = "supptab"
Data2.DatabaseName = App.Path + "\madicaldatabase.mdb"
Data2.RecordSource = "purchasetab"
Data3.DatabaseName = App.Path + "\madicaldatabase.mdb"
Data3.RecordSource = "stocktable"
End Sub
Private Sub txtqty_Change()
txtbill.Text = Val(txtrate.Text) * Val(txtqty.Text)
End Sub
69
End Sub
DEL_EDIT_PURCHASE
txtpdate.Text = ""
txtsno.Text = ""
txtsname.Text = ""
txtaddress.Text = ""
txttype.Text = ""
txtmname.Text = ""
txtcompany.Text = ""
txtmdate.Text = ""
txtexpdate.Text = ""
txtqty.Text = ""
txtrate.Text = ""
txtbill.Text = ""
End If
End Sub
Private Sub cmdexit_Click()
Me.Hide
End Sub
Data2.Recordset.Fields("orderno") = TXTORDERNO.Text
Data2.Recordset.Fields("purchasedate") = txtpdate.Text
Data2.Recordset.Fields("sno") = txtsno.Text
Data2.Recordset.Fields("SName") = txtsname.Text
Data2.Recordset.Fields("address") = txtaddress.Text
Data2.Recordset.Fields("medicinetype") = txttype.Text
Data2.Recordset.Fields("mname") = txtmname.Text
Data2.Recordset.Fields("compname") = txtcompany.Text
Data2.Recordset.Fields("mdate") = txtmdate.Text
Data2.Recordset.Fields("expdate") = txtexpdate.Text
Data2.Recordset.Fields("rate") = txtrate.Text
Data2.Recordset.Fields("qty") = txtqty.Text
Data2.Recordset.Fields("bill") = txtbill.Text
Data2.Recordset.Update
TXTORDERNO.Text = ""
txtpdate.Text = ""
txtsno.Text = ""
txtsname.Text = ""
txtaddress.Text = ""
txttype.Text = ""
txtmname.Text = ""
txtcompany.Text = ""
txtmdate.Text = ""
txtexpdate.Text = ""
txtrate.Text = ""
txtqty.Text = ""
txtbill.Text = ""
72
txtpdate.Text = Data1.Recordset.Fields("purchasedate")
txtsno.Text = Data1.Recordset.Fields("sno")
txtsname.Text = Data1.Recordset.Fields("sname")
txtaddress.Text = Data1.Recordset.Fields("address")
txttype.Text = Data1.Recordset.Fields("medicinetype")
txtmname.Text = Data1.Recordset.Fields("mname")
txtcompany.Text = Data1.Recordset.Fields("compname")
txtmdate.Text = Data1.Recordset.Fields("mdate")
txtexpdate.Text = Data1.Recordset.Fields("expdate")
txtqty.Text = Data1.Recordset.Fields("qty")
txtrate.Text = Data1.Recordset.Fields("rate")
txtbill.Text = Data1.Recordset.Fields("bill")
End If
End Sub
SALEFORM
txtmname.Text = ""
txtcompany.Text = ""
txtmdate.Text = ""
txtexpdate.Text = ""
txtrate.Text = ""
txtqty.Text = ""
txtbill.Text = ""
End Sub
Private Sub cmdexit_Click()
Me.Hide
End Sub
Private Sub cmdsave_Click()
On Error GoTo message
Data1.Refresh
Data1.Recordset.AddNew
Data1.Recordset.Fields("ono") = TXTORDERNO.Text
Data1.Recordset.Fields("dos") = txtsale.Text
Data1.Recordset.Fields("cno") = txtcno.Text
Data1.Recordset.Fields("cName") = txtcname.Text
Data1.Recordset.Fields("address") = txtaddress.Text
Data1.Recordset.Fields("mtype") = txttype.Text
Data1.Recordset.Fields("mname") = txtmname.Text
Data1.Recordset.Fields("company") = txtcompany.Text
Data1.Recordset.Fields("mdate") = txtmdate.Text
75
Data1.Recordset.Fields("expdate") = txtexpdate.Text
Data1.Recordset.Fields("rate") = txtrate.Text
Data1.Recordset.Fields("qty") = txtqty.Text
Data1.Recordset.Fields("bamount") = txtbill.Text
Data1.Recordset.Update
'update stock
Data3.Refresh
Data3.Recordset.FindFirst "medicinename='" & txtmname.Text & " ' "
Data3.Recordset.Edit
Data3.Recordset.Fields("qty") = Data3.Recordset.Fields("qty") Val(txtqty.Text)
Data3.Recordset.Update
TXTORDERNO.Text = ""
txtsale.Text = ""
txtcno.Text = ""
txtcname.Text = ""
txtaddress.Text = ""
txttype.Text = ""
txtmname.Text = ""
txtcompany.Text = ""
txtmdate.Text = ""
txtexpdate.Text = ""
76
txtrate.Text = ""
txtqty.Text = ""
txtbill.Text = ""
MsgBox "Successfully saved", vbExclamation
Exit Sub
message:
MsgBox "Invalid data", vbExclamation
End Sub
Private Sub Form_Activate()
txttype.Clear
txttype.AddItem "Tablet"
txttype.AddItem "Capsule"
txttype.AddItem "Syrup"
txttype.AddItem "Injection"
End Sub
Private Sub Form_Load()
Data1.DatabaseName = App.Path + "\madicaldatabase.mdb"
Data1.RecordSource = "saletable"
Data3.DatabaseName = App.Path + "\madicaldatabase.mdb"
Data3.RecordSource = "stocktable"
77
End Sub
Private Sub txtqty_Change()
txtbill.Text = Val(txtrate.Text) * Val(txtqty.Text)
End Sub
Private Sub txtrate_Change()
txtbill.Text = Val(txtrate.Text) * Val(txtqty.Text)
End Sub
EDITSALE
Private Sub CMDDELETE_Click()
a = MsgBox("Are you sure ", vbYesNo + vbQuestion)
If a = vbYes Then
Data1.Recordset.Delete
TXTORDERNO.Text = ""
txtpdate.Text = ""
txtsno.Text = ""
txtsname.Text = ""
txtaddress.Text = ""
78
txttype.Text = ""
txtmname.Text = ""
txtcompany.Text = ""
txtmdate.Text = ""
txtexpdate.Text = ""
txtqty.Text = ""
txtrate.Text = ""
txtbill.Text = ""
End If
End Sub
Private Sub cmdexit_Click()
Me.Hide
End Sub
Private Sub cmdsave_Click()
On Error GoTo message
Data1.Recordset.Edit
Data1.Recordset.Fields("ono") = TXTORDERNO.Text
Data1.Recordset.Fields("dos") = txtsale.Text
Data1.Recordset.Fields("cno") = txtcno.Text
Data1.Recordset.Fields("cName") = txtcname.Text
Data1.Recordset.Fields("address") = txtaddress.Text
Data1.Recordset.Fields("mtype") = txttype.Text
79
Data1.Recordset.Fields("mname") = txtmname.Text
Data1.Recordset.Fields("company") = txtcompany.Text
Data1.Recordset.Fields("mdate") = txtmdate.Text
Data1.Recordset.Fields("expdate") = txtexpdate.Text
Data1.Recordset.Fields("rate") = txtrate.Text
Data1.Recordset.Fields("qty") = txtqty.Text
Data1.Recordset.Fields("bamount") = txtbill.Text
Data1.Recordset.Update
TXTORDERNO.Text = ""
txtsale.Text = ""
txtcno.Text = ""
txtcname.Text = ""
txtaddress.Text = ""
txttype.Text = ""
txtmname.Text = ""
txtcompany.Text = ""
txtmdate.Text = ""
txtexpdate.Text = ""
txtrate.Text = ""
txtqty.Text = ""
txtbill.Text = ""
MsgBox "Successfully saved", vbExclamation
Exit Sub
message:
MsgBox "Invalid data", vbExclamation
80
End Sub
Private Sub Form_Activate()
Data1.Refresh
While Data1.Recordset.EOF = False
TXTORDERNO.AddItem Data1.Recordset.Fields("ONO")
Data1.Recordset.MoveNext
Wend
End Sub
Private Sub Form_Load()
Data1.DatabaseName = App.Path + "\madicaldatabase.mdb"
Data1.RecordSource = "saletable"
End Sub
Private Sub TXTORDERNO_Click()
Data1.Refresh
Data1.Recordset.FindFirst "ono=" & TXTORDERNO.Text
If Data1.Recordset.NoMatch Then
MsgBox "Not found", vbExclamation
Else
txtsale.Text = Data1.Recordset.Fields("dos")
txtcno.Text = Data1.Recordset.Fields("cno")
txtcname.Text = Data1.Recordset.Fields("cname")
txtaddress.Text = Data1.Recordset.Fields("address")
txttype.Text = Data1.Recordset.Fields("mtype")
81
txtmname.Text = Data1.Recordset.Fields("mname")
txtcompany.Text = Data1.Recordset.Fields("company")
txtmdate.Text = Data1.Recordset.Fields("mdate")
txtexpdate.Text = Data1.Recordset.Fields("expdate")
txtqty.Text = Data1.Recordset.Fields("qty")
txtrate.Text = Data1.Recordset.Fields("rate")
txtbill.Text = Data1.Recordset.Fields("bamount")
End If
End Sub
PURCHASEREG
Private Sub Command1_Click()
'Me.PrintForm
End Sub
Private Sub Form_Load()
Data1.DatabaseName = App.Path + "\madicaldatabase.mdb"
Data1.RecordSource = "PURCHASETAB"
End Sub
SALEREG
Private Sub Form_Load()
Data1.DatabaseName = App.Path + "\madicaldatabase.mdb"
82
Data1.RecordSource = "saletable"
End Sub
STOCKREG
Private Sub cmdexit_Click()
Me.Hide
End Sub
Private Sub Form_Load()
Data1.DatabaseName = App.Path + "\madicaldatabase.mdb"
Data1.RecordSource = "stocktable"
End Sub
STOCKSEARCH
Data1.Refresh
End Sub
84
BIBLIOGRAPHY
The following are the books references that have been studied in the
duration of making of this project.
Mastering in vb6.0
Microsoft office
Black book of vb6
WEB REFRENCES
www.microsoft.com
85