Sie sind auf Seite 1von 63

INTRODUCTION

The aim of the project is to computerize the pharmacy stores.


The modules of the project are;

1. PURCHASE
2. SALES

We have to purchase the medicines from the manufacture


companies and will sell the Medicines to the customers.

PURCHASE :

In this module, we have Manufacturer, Purchase Transaction and


Purchase Returns. We have the details of Manufacturer of the Medicine
under Manufacturer sub module.

We have the Details of Transactions i.e. the Purchase Details under


Transaction sub module. In Purchase Returns, We have the Details of
Purchase Returns of Purchase, if there any.

In the Manufacturer module have manufacturer code, name, medicine


code, medicine name, qty, Manu.date, Exp.Date & Rate of the Medicine. In
purchase Transaction we have cash & credit Purchases of the Pharmacy.
Here purchase returns also will be included.

SALES :

In this module, we have Customer, Sales Transaction and Sales


Returns. In Customer sub module, we have the Details of the Customer. In
Transaction sub module, we have the Transactions i.e., Sales. In Sales
Returns, we have the Details of the Returns of Sales, if any, In Customer
module, we have details of the customers. In Sales Transactions we have
cash & credit sales of the Pharmacy.
SYSTEM ENVIRONMENT

1.HARDWARE ENVIRONMENT

Processor : PIII/CELERON PROCESSOR

RAM : 128 MB

Hard Disk : 20.4 GB

Floppy Drive : 1.44 MB

Key Board : 104 Keys

SOFTWARE DESCRIPTION

Operating System : WINDOWS 98

Front End : Visual Basic 6.0

Back End : MS-ACCESS 7.0


LANGUAGE DESCRIPTION

About Visual Basic Language:-

Visual Basic was developed forms the BASIC programming


language. In 1970’s Microsoft got its start by developing ROM based
interpreted Basic for the early microprocessor based computer. In 1982,
Microsoft QuickBasic revolutionized Basic and legitimized as a serious
development language for MS-DOS environment. Later on, Microsoft
Corporation created the enhanced version of BASIC called Visual Basic
for Windows.

Visual Basic 6.0:-

Visual Basic 6.0 allows creating Object Oriented Application. When


Visual Basic originally developed, it allowed to the programmer to create
programs using pre-defined objects, forms and controls. It uses some of
the Windows 95 Controls. Visual Basic 6.0 can be used to develop both
standalone systems and Client Server Based systems.

Visual Basic 6.0 come in three categories

• Standard Edition
• Professional Edition
• Enterprise Edition

Features of Visual Basic 6.0:-

Visual Basic 6.0 profoundly concentrates on the internet


development features, ActiveX technology, enhanced controls, enhanced
features of existing control, client/server, new language features
development.

Native Code:-
A Visual Basic project is compiled to native code for faster execution.
Profiles native code using new native code compiler option, and debug
native code using the Visual C++ environment.

Wizards:-

The application Wizard is new and the Setup Wizard has been
enhanced to enable creating a dependency file for a standard project. In the
professional Edition, the Active X control Interface Wizard, Active X
Document Migration Wizard, Data Form Wizard, and property page Wizard
are new. The Setup Wizard has been enhanced to support distribution via the
Internet. The installation of remote server components using Distributed
COM(DCOM)and Remote Automation is an added feature. The ability to
create dependency files for projects and components created with Visual
Basic.

Extensibility Model:-

The new model allows to programmatically extending the


development environment and control projects, events, code, and Visual
elements.

Declare, Raise, and Handle Events:-

Objects provided by the components can raise events that can be


handled in other applications, or by our objects, using with Events variables,
Events provide a simple alternative to asynchronous callbacks.

CREATE ACTIVEX DOCUMENT:

ActiveX document s can be created that boosts the Visual Basic


application to the Internet Browser Windows. The data control, DAO or
Microsoft Access, you can create that is virtually database independent,
because jet automatically performs all syntax and data manipulation
translations.
MS ACCESS

When we create a Microsoft Access database, we create one file that


contains the data and table structures as well as the queries, forms, reports
and other objects that make up the database.

Protecting information can be an important part of developing a


Microsoft Access database. By securing your database, you can control what
a user, is a group of users, can do with database objects. Microsoft Access
security made up of several pieces that must be in place before security is
account information with the work group and permissions assignment in the
database(.mdb) file Microsoft Access Version 7 system database includes
several internal security enhancements.

Encrypting a database makes it indecipherable by a utility program or


word processor. Encrypting a database compacts the database file and makes
it indecipherable by a utility program or word processor. Decrypting a
database reverses it indecipherable in order to protect it from unauthorized
viewing or use.
SYSTEM ANALYSIS

SYSTEM DEFINITION

The structure of pharmacy is about mediating between


manufacturer and customer relations in maintaining the medical information
for the better implications in the field of pharmacy. when a customer is
viewing the details about the medicines and different types of the pharmacy
medicines. The Customer can purchase the medicines by knowing the
information about the medicals and available items in this field for the good
types. He can select the products from the medical shop with the help of the
agents between the manufacturer and the customer, there exits the business
to the customer relationship with this type of the medicines that are
available.

EXISTING SYSTEM

The Existing system was required to include functionalities that will take
care of all the future development which are not available in the system .The
purchasing can be done at any time it works around the clock. In future we
can add the database that can provide various types and best in all of that are
available.

Automatic notification of newly placed orders to the company’s Shipping or


processing department. We are trying to include different kinds of medicines
which are needed by the customer in their day to day life.
SYSTEM DESIGN:

DATAFLOW DIAGRAMS:

OVER VIEW:

MANUFACTURER

USER
DEALER

CUSTOMER
PURCHASE: ADDITION

USER
MANUFACTURER DELETION

MODIFIES

PURCHASE PURCHASE
RETURNS

STOCK
SALES:

STOCK SALES

SALES CUSTOMER
RETURNS
DATA BASE DESIGN
NORMALIZATION
Normalization is a technique of separating redundant fields
and braking up a large table in to a smaller ones. All the tables
have been normalized up to the third normal form. In short the
rules for each of the three normal form are as below.

1. FIRST NORMAL FORM


A relation is said to be in 1 NF if all the under lying domain
of attributes contain simple indivisible values.

2. SECOND NORMAL FORM

The 2 NF is based on the concept of full functional


dependency. A relation is said to be in 2 NF if and only if it is
in 1NF and every non-key attribute is fully functionally
dependent on candidate key of the table.

3. THE THIRD NORMAL FORM

The 3 NF is based on the concept of transitive dependency.


A relation in 2NF is said to be in 3NF if every non-key
attribute is nontransitively dependent on the primary key.
TABLE NAME:- CUSTOMER

FIELD NAME DATA TYPE DATA SIZE

CUSTCODE DOUBLE 8
CUSTNAME TEXT 50
ADDRESS TEXT 50
PHONE DOUBLE 8

TABLE NAME:-MANU

FIELD NAME DATA TYPE DATASIZE

MEDCODE DOUBLE 8
MEDNAME TEXT 50
ADDRESS TEXT 50
PHONE DOUBLE 8
MANUCODE DOUBLE 8
MANUNAME TEXT 50
MEDRATE DOUBLE 8
MANDATE DATE/TIME 8
EXPDATE DATE/TIME 8
TABLE NAME:-PTRAN

FIELD NAME DATA TYPE DATA SIZE

DATEOFTRAN DATE/TIME 8
TYPE TEXT 4
MANCODE LONG 4
MEDCODE LONG 4
QTY LONG 4
BALANCE DOUBLE 8

TABLE NAME:-PURRET

FIELD NAME DATA TYPE DATA SIZE

MANCODE DOUBLE 8
MEDCODE DOUBLE 8
QTYDEF DOUBLE 8
DATEOFTRANS DATE/TIME 8

TABLE NAME:-SALSRET

FIELD NAME DATA TYPE DATA SIZE

CUSTCODE DOUBLE 8
MEDCODE DOUBLE 8
QTYDET DOUBLE 8
DATEOFTRANS DATE/TIME 8
TABLE NAME:-SALTRANS

FIELD NAME DATA TYPE DATA SIZE

DATEOFTRANS DATE/TIME 8
TYPE TEXT 4
CUSTCODE DOUBLE 8
MEDCODE DOUBLE 8
QTY DOUBLE 8
BALANCE DOUBLE 8

TABLE NAME:-STOCK
FIELD NAME DATA TYPE DATA SIZE

MEDCODE DOUBLE 8
STKLEV DOUBLE 8
RELEV DOUBLE 8
SCREENS:-

PASS WORD FORM


MAIN MENU
MANUFACTURER FORM
CASH PURCHASE FORM
CREDIT PURCHASE FORM
PURCHASE RETURNS FORM
CUSTOMER DETAILS
CASH SALES FORM
CREDIT SALES FORM
SALES RETURNS FORM
PURCHASE REPORT
MANUFACTURER REPORT
PURCHASE RETURNS REPORT
SALES TRNASACTION REPORT
CUSTOMER REPORTS
SALES RETURNS REPORT
STOCK DETAILS REPORT
DATEWSIE PURCHASE REPORT
DATEWISE SALES REPORT
SYSTEM IMPLEMENTATION
OPTIMAL DATA STRUCTURE

The proposed system uses very simple data structures in order to simplify
and maintain the entire system. The only data structure used in our
system is TABLES.
The necessity for using files is as follows:

• Tables are easy to create, modify and delete


• Tables are very efficient in case of any searching is
needed
• Tables are useful in retrieving data

CODING:

CODING:
/*PASSWORD FORM*/
Private Sub Command1_Click()
If ((Text1.Text = " ") Or (Text1.Text = " ")) Then
MDIForm1.Enabled = True
MDIForm1.Show
Else
MsgBox "enter the password correctly"
Text1.Text = ""
Text1.SetFocus
End If
End Sub

Private Sub Command2_Click()


Unload MDIForm1
Unload Me
End Sub

Private Sub text1_KeyPress(KeyAscii As Integer)


If Not ((64 < KeyAscii And KeyAscii < 92) Or (96 < KeyAscii And KeyAscii < 123) Or
(47 < KeyAscii And KeyAscii < 59) Or (8 = KeyAscii)) Then
If (KeyAscii = 13) Then
SendKeys "(TAB)"
Else: KeyAscii = 0
End If
End If
End Sub

Private Sub Form_Load()


MDIForm1.Show
MDIForm1.Enabled = False
End Sub

/*MAIN MENU*/
Private Sub CU_Click()
DataReport5.Show
End Sub

Private Sub CUS_Click()


Form6.Show
End Sub

Private Sub DA_Click()


DataReport2.Show
End Sub

Private Sub DAI_Click()


DataReport7.Show
End Sub

Private Sub EX_Click()


End
End Sub

Private Sub M_Click()


Form3.Show
End Sub

Private Sub MO_Click()


DataReport4.Show
End Sub

Private Sub MON_Click()


Dim d
d = InputBox("which date u need")
DataEnvironment1.Command9 d
DataReport9.Show
End Sub

Private Sub P_Click()


DataReport1.Show
End Sub

Private Sub PR_Click()


Form5.Show
End Sub

Private Sub SA_Click()


DataReport6.Show
End Sub

Private Sub SR_Click()


Form8.Show
End Sub

Private Sub TR_Click()


Form4.Show
End Sub

Private Sub TRA_Click()


Form7.Show
End Sub

Private Sub we_Click()


DataReport3.Show
End Sub

Private Sub WEE_Click()


Dim d
d = InputBox("which date u need")
DataEnvironment1.Command8 d
DataReport8.Show
End Sub

/*MANUFACTURER DETAILS FORM/


Dim DB As Database, RS, RS1 As Recordset

Private Sub Command1_Click()


DISABLE
Command5.Enabled = True
Command1.Enabled = False
Command10.Enabled = True
If RS.RecordCount <> 0 Then
RS.MoveLast
Text1.Text = RS(0) + 1
Else
Text1.Text = 1000
End If
Text2.SetFocus
RS.AddNew
End Sub

Private Sub Command10_Click()


If RS.RecordCount = 0 Then
CLEAR
Command1.Enabled = True
Command1.SetFocus
Else
CLEAR
ENABLE
Command1.SetFocus
End If
End Sub

Private Sub Command2_Click()


Dim RS1 As Recordset, MCODE As Double
MCODE = InputBox("ENTER THE MEDICINE CODE TO BE DELETED")
Set RS1 = DB.OpenRecordset("SELECT * FROM MANU WHERE MEDCODE=" &
MCODE)
If RS1.RecordCount <> 0 Then
RS1.Delete
MsgBox "YOUR RECORD HAS BEEN DELETED"
Else
MsgBox "NO SUCH RECORD"
End If
End Sub

Private Sub Command3_Click()


RS(0) = Text1.Text
RS(1) = Text2.Text
RS(2) = Text3.Text
RS(3) = Text4.Text
RS(4) = Text5.Text
RS(5) = Text6.Text
RS(6) = Text7.Text
RS(7) = Text8.Text
RS(8) = Text9.Text
RS.Update
MsgBox " YOUR RECORD HAS BEEN SAVED"
ENABLE
CLEAR
Command7.Enabled = False
Command8.Enabled = False
End Sub

Private Sub Command5_Click()


Unload Me
End Sub

Private Sub Command6_Click()


RS.MoveFirst
LOAD
ENABLE
End Sub

Private Sub Command7_Click()


RS.MoveNext
If RS.EOF = True Then
MsgBox "THIS IS THE LAST RECORD"
RS.MoveLast
Else
LOAD
End If
End Sub

Private Sub Command8_Click()


RS.MovePrevious
If RS.BOF Then
MsgBox "THIS IS THE FIRST RECORD"
RS.MoveFirst
Else
LOAD
End If
End Sub

Private Sub Command9_Click()


RS.MoveLast
LOAD
ENABLE
End Sub

Private Sub Form_Load()


Set DB = OpenDatabase(App.Path & "\RAMA.MDB")
Set RS = DB.OpenRecordset("MANU")
If RS.RecordCount = 0 Then
DISABLE
Command1.Enabled = True
Command5.Enabled = True
Else
ENABLE
Command7.Enabled = False
Command8.Enabled = False
End If
End Sub

Public Sub CLEAR()


Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
End Sub

Public Sub LOAD()


Text1.Text = RS(0)
Text2.Text = RS(1)
Text3.Text = RS(2)
Text4.Text = RS(3)
Text5.Text = RS(4)
Text6.Text = RS(5)
Text7.Text = RS(6)
Text8.Text = RS(7)
Text9.Text = RS(8)
End Sub

Public Sub ENABLE()


Command1.Enabled = True
Command2.Enabled = True
Command3.Enabled = True
Command5.Enabled = True
Command6.Enabled = True
Command7.Enabled = True
Command8.Enabled = True
Command9.Enabled = True
Command10.Enabled = True
End Sub

Public Sub DISABLE()


Command1.Enabled = False
Command2.Enabled = False
Command3.Enabled = False
Command5.Enabled = False
Command6.Enabled = False
Command7.Enabled = False
Command8.Enabled = False
Command9.Enabled = False
Command10.Enabled = False
End Sub

Private Sub Text5_LostFocus()


Set RS1 = DB.OpenRecordset("select * from MANU where manucode=" &
Val(Text5.Text))
If RS1.RecordCount <> 0 Then
Text6.Text = RS1(5)
Else
Text6.SetFocus
End If
End Sub

Private Sub Text9_LostFocus()


Command3.Enabled = True
Command3.SetFocus
End Sub

/*PURCHASE DETAILS FORM*/


Dim DB As Database, RS, RS1, RS2, RS3 As Recordset

Private Sub COMBO2_GotFocus()


Combo1.Enabled = False
Set RS1 = DB.OpenRecordset("select * from MANU where MANUCODE=" &
Val(Combo1.Text))
RS1.MoveFirst
Text1.Text = RS1(5)
Do While Not (RS1.EOF = True)
Combo2.AddItem RS1(0)
RS1.MoveNext
Loop
End Sub
Private Sub Combo2_LostFocus()
Combo2.Enabled = False
Set RS1 = DB.OpenRecordset("select * from MANU where MEDCODE=" &
Val(Combo2.Text))
RS1.MoveFirst
Text2.Text = RS1(1)
Text4.Text = RS1(6)
Text6.Text = Format(Date, "dd-mm-yyyy")
Text3.SetFocus
End Sub

Private Sub Command1_Click()


Dim K1 As Double
Option1.Enabled = True
Option2.Enabled = True
Combo1.Enabled = True
Combo2.Enabled = True
Option1.SetFocus
RS.AddNew
Command1.Enabled = False
Command3.Enabled = True
Command4.Enabled = False
Combo1.SetFocus
End Sub

Private Sub Command2_Click()


If Option1.Value = True Then
RS(1) = "CS"
End If
If Option2.Value = True Then
RS(1) = "CR"
End If
RS(2) = Combo1.Text
RS(3) = Combo2.Text
RS(4) = Text3.Text
RS(5) = Text8.Text
RS(0) = Format(Date$, "DD/MM/YYYY")
RS.Update
Set RS2 = DB.OpenRecordset("SELECT * FROM STOCK WHERE MEDCODE=" &
Val(Combo2.Text))
If RS2.RecordCount <> 0 Then
RS2.Edit
K1 = RS2(1)
RS2(1) = Val(K1 + Val(Text3.Text))
RS2.Update
Else
RS2.AddNew
RS2(0) = Combo2.Text
RS2(1) = Text3.Text
RS2(2) = 40
RS2.Update
End If
MsgBox "YOUR RECORD HAS BEEN SAVED"
ENABLE
CLEAR
Combo1.Text = ""
Combo2.CLEAR
Combo1.Enabled = False
Combo2.Enabled = False
Command2.Enabled = False
Option1.Enabled = False
Option2.Enabled = False
Command1.SetFocus
End Sub

Private Sub Command3_Click()


CLEAR
DISABLE
Command1.Enabled = True
Command3.Enabled = False
Command4.Enabled = True
Command1.SetFocus
Combo2.CLEAR
End Sub

Private Sub Command4_Click()


Unload Me
End Sub

Private Sub Form_Load()


Dim K As Double
Set DB = OpenDatabase(App.Path & "\RAMA.MDB")
Set RS = DB.OpenRecordset("PTRAN")
Set RS1 = DB.OpenRecordset("MANU")
Set RS2 = DB.OpenRecordset("STOCK")
If RS1.RecordCount = 0 Then
DISABLEALL
MsgBox "THERE ARE NO RECORDS IN THE DATABASE"

Else
DISABLE
Command1.Enabled = True
Command4.Enabled = True
End If
If RS1.RecordCount <> 0 Then
RS1.MoveFirst
K = RS1(4)
Do While Not (RS1.EOF = True)
Combo1.AddItem RS1(4)
RS1.MoveNext
If RS1.EOF = True Then
GoTo ABC
End If
If RS1(4) = K Then
RS1.MoveNext
Else
K = RS1(4)
End If
ABC:
Loop
End If
End Sub

Public Sub DISABLEALL()


Label2.Visible = False
Label3.Visible = False
Label4.Visible = False
Label5.Visible = False
Label6.Visible = False
Label7.Visible = False
Label8.Visible = False
Label10.Visible = False
Label11.Visible = False
Label12.Visible = False
Label13.Visible = False
Option1.Visible = False
Option2.Visible = False
Text1.Visible = False
Text2.Visible = False
Text3.Visible = False
Text4.Visible = Falses
Text5.Visible = False
Text6.Visible = False
Text7.Visible = False
Text8.Visible = False
Combo1.Visible = False
Combo2.Visible = False
Command1.Visible = False
Command2.Visible = False
Command3.Visible = False
End Sub

Private Sub Text3_LostFocus()


Text5.Text = Val(Text3.Text) * Val(Text4.Text)
If Option1.Value = True Then
Text7.Text = Text5.Text
Text8.Text = 0
Text8.Enabled = False
Command2.Enabled = True
Command2.SetFocus
End If
If Option2.Value = True Then
Text7.SetFocus
Text8.Enabled = False
End If
End Sub

Private Sub Text7_LostFocus()


Text8.Text = Val(Text5.Text) - Val(Text7.Text)
Command2.Enabled = True
Command2.SetFocus
End Sub

Public Sub ENABLE()


Option1.Enabled = True
Option2.Enabled = True
Command1.Enabled = True
Command2.Enabled = True
Command3.Enabled = True
Command4.Enabled = True
Combo1.Enabled = True
Combo2.Enabled = True
End Sub

Public Sub DISABLE()


Option1.Enabled = False
Option2.Enabled = False
Command1.Enabled = False
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = False
Combo1.Enabled = False
Combo2.Enabled = False
End Sub

Public Sub CLEAR()


Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
End Sub

/*PURCHASE RETURNS FORM*/


Dim DB As Database, RS, RS1, RS2, RS3 As Recordset

Private Sub Command1_Click()


DISABLE
Combo1.Enabled = True
RS3.AddNew
Combo1.SetFocus
Command3.Enabled = True
Command4.Enabled = True
End Sub

Private Sub Command2_Click()


Dim T As Double
RS3(0) = Text2.Text
RS3(1) = Combo1.Text
RS3(2) = Text3.Text
RS3(3) = Text1.Text
RS3.Update
Set RS2 = DB.OpenRecordset("SELECT * FROM STOCK WHERE MEDCODE=" &
Val(Combo1.Text))
RS2.Edit
T = RS2(1)
RS2(1) = T - Val(Text3.Text)
RS2.Update
MsgBox "UR RECORD HAS BEEN SAVED"
If RS2(1) < RS2(2) Then
MsgBox "THE STOCK LEVEL IS BELOW REORDER LEVEL, PLEASE ORDER
STOCK"
End If
Combo1.Text = ""
Text2.Text = ""
Text3.Text = ""
Command2.Enabled = False
Command1.Enabled = True
Command1.SetFocus
End Sub

Private Sub Command3_Click()


Combo1.Text = ""
Text2.Text = ""
Text3.Text = ""
Command2.Enabled = False
Command1.Enabled = True
Command1.SetFocus
End Sub

Private Sub Command4_Click()


Unload Me
End Sub

Private Sub Form_Load()


Set DB = OpenDatabase(App.Path & "\RAMA.MDB")
Set RS = DB.OpenRecordset("MANU")
Set RS1 = DB.OpenRecordset("PTRAN")
Set RS2 = DB.OpenRecordset("STOCK")
Set RS3 = DB.OpenRecordset("PURRET")
If RS.RecordCount <> 0 Then
RS.MoveFirst
Do While Not (RS.EOF = True)
Combo1.AddItem RS(0)
RS.MoveNext
Text1.Text = Date$
Combo1.Enabled = False
Loop
Else
MsgBox "THERE ARE NO RECORDS IN THE DATABASE"
LABLE2.Visible = False
LABLE3.Visible = False
LABLE4.Visible = False
LABLE5.Visible = False
Combo1.Visible = False
Text1.Visible = False
Text2.Visible = False
Text3.Visible = False
Command1.Visible = False
Command2.Visible = False
Command3.Visible = False
Command4.Enabled = True
End If
End Sub

Public Sub DISABLE()


Command1.Enabled = False
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = False
End Sub

Private Sub Text2_GotFocus()


Dim RS4 As Recordset
Set RS4 = DB.OpenRecordset("SELECT * FROM MANU WHERE MEDCODE=" &
Val(Combo1.Text))
Text2.Text = RS4(4)
Text3.SetFocus
End Sub

Private Sub Text3_LostFocus()


Command2.Enabled = True
Command2.SetFocus
End Sub

/*CUSTOMER DETAILS FORM */


Dim DB As Database, RS, RS1, RS2, RS3 As Recordset

Private Sub Command1_Click()


DISABLE
Command5.Enabled = True
Command1.Enabled = False
Command10.Enabled = True
If RS.RecordCount <> 0 Then
RS.MoveLast
Text1.Text = RS(0) + 1
Else
Text1.Text = 100
End If
Text2.SetFocus
RS.AddNew
End Sub

Private Sub Command10_Click()


If RS.RecordCount = 0 Then
CLEAR
Command1.Enabled = True
Command1.SetFocus
Else
CLEAR
ENABLE
Command1.SetFocus
End If
End Sub

Private Sub Command2_Click()


Dim RS1 As Recordset, CCODE As Double
CCODE = InputBox("ENTER THE CUSTOMER CODE TO BE DELETED")
Set RS1 = DB.OpenRecordset("SELECT * FROM CUSTOMER WHERE
CUSTCODE=" & CCODE)
If RS1.RecordCount <> 0 Then
RS1.Delete
MsgBox "YOUR RECORD HAS BEEN DELETED"
Else
MsgBox "NO SUCH RECORD"
End If
End Sub

Private Sub Command3_Click()


RS(0) = Text1.Text
RS(1) = Text2.Text
RS(2) = Text3.Text
RS(3) = Text4.Text
RS.Update
MsgBox " YOUR RECORD HAS BEEN SAVED"
ENABLE
CLEAR
Command7.Enabled = False
Command8.Enabled = False
End Sub

Private Sub Command5_Click()


Unload Me
End Sub

Private Sub Command6_Click()


RS.MoveFirst
LOAD
ENABLE
End Sub

Private Sub Command7_Click()


RS.MoveNext
If RS.EOF = True Then
MsgBox "THIS IS THE LAST RECORD"
RS.MoveLast
Else
LOAD
End If
End Sub

Private Sub Command8_Click()


RS.MovePrevious
If RS.BOF Then
MsgBox "THIS IS THE FIRST RECORD"
RS.MoveFirst
Else
LOAD
End If
End Sub

Private Sub Command9_Click()


RS.MoveLast
LOAD
ENABLE
End Sub

Private Sub Form_Load()


Set DB = OpenDatabase(App.Path & "\RAMA.MDB")
Set RS = DB.OpenRecordset("CUSTOMER")
Set RS1 = DB.OpenRecordset("MANU")
If RS.RecordCount = 0 Then
DISABLE
Command1.Enabled = True
Command5.Enabled = True
Else
ENABLE
Command7.Enabled = False
Command8.Enabled = False
End If
End Sub

Public Sub CLEAR()


Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
End Sub
Public Sub LOAD()
Text1.Text = RS(0)
Text2.Text = RS(1)
Text3.Text = RS(2)
Text4.Text = RS(3)
End Sub

Public Sub ENABLE()


Command1.Enabled = True
Command2.Enabled = True
Command3.Enabled = True
Command5.Enabled = True
Command6.Enabled = True
Command7.Enabled = True
Command8.Enabled = True
Command9.Enabled = True
Command10.Enabled = True
End Sub

Public Sub DISABLE()


Command1.Enabled = False
Command2.Enabled = False
Command3.Enabled = False
Command5.Enabled = False
Command6.Enabled = False
Command7.Enabled = False
Command8.Enabled = False
Command9.Enabled = False
Command10.Enabled = False
End Sub

Private Sub Text4_LostFocus()


Command3.Enabled = True
Command3.SetFocus
End Sub

/* SALES DETAILS FORM*/


Dim DB As Database, RS, RS1, RS2, RS3 As Recordset

Private Sub Combo1_LostFocus()


Set RS1 = DB.OpenRecordset("SELECT * FROM CUSTOMER WHERE
CUSTCODE=" & Val(Combo1.Text))
Text2.Text = RS1(1)
End Sub

Private Sub Combo2_LostFocus()


Set RS3 = DB.OpenRecordset("SELECT * FROM MANU WHERE MEDCODE=" &
Val(Combo2.Text))
Text3.Text = RS3(1)
End Sub

Private Sub Command1_Click()


DISABLE
Command3.Enabled = True
Command4.Enabled = True
RS.AddNew
Option1.Enabled = True
Option2.Enabled = True
Combo1.Enabled = True
Combo2.Enabled = True
Option1.SetFocus
End Sub

Private Sub Command2_Click()


Dim K As Double
RS(0) = Text1.Text
If Option1.Value = True Then
RS(1) = "CS"
End If
If Option2.Value = True Then
RS(1) = "CR"
End If
RS(2) = Combo1.Text
RS(3) = Combo2.Text
RS(4) = Text4.Text
RS(5) = Text8.Text
RS.Update
Command2.Enabled = False
Command3.Enabled = False
Command1.Enabled = True
Command1.SetFocus
Set RS2 = DB.OpenRecordset("SELECT * FROM STOCK WHERE MEDCODE =" &
Val(Combo2.Text))
RS2.Edit
K = RS2(1)
RS2(1) = K - Val(Text4.Text)
RS2.Update
MsgBox "UR RECORD HAS BEEN SAVED"
If RS2(1) < RS2(2) Then
MsgBox "THE STOCK LEVEL IS BELOW REORDER LEVEL, PLEASE ORDER
STOCK"
End If
Combo1.Text = ""
Combo2.Text = ""
Combo1.Enabled = False
Combo2.Enabled = False
Command2.Enabled = False
Option1.Enabled = False
Option2.Enabled = False
Command1.SetFocus
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
End Sub

Private Sub Command3_Click()


Option1.Enabled = False
Option2.Enabled = False
Combo1.Enabled = False
Combo2.Enabled = False
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Command3.Enabled = False
Command1.Enabled = True
Command1.SetFocus
End Sub

Private Sub Command4_Click()


Unload Me
End Sub

Private Sub Form_Load()


Set DB = OpenDatabase(App.Path & "\RAMA.MDB")
Set RS = DB.OpenRecordset("SALTRANS")
Set RS1 = DB.OpenRecordset("CUSTOMER")
Set RS2 = DB.OpenRecordset("STOCK")
Set RS3 = DB.OpenRecordset("MANU")
If RS1.RecordCount <> 0 Then
RS1.MoveFirst
Do While Not (RS1.EOF = True)
Combo1.AddItem RS1(0)
RS1.MoveNext
Loop
Else
HIDEALL
MsgBox "THERE ARE NO RECORDS IN THE CUSTOMER TABLE"
End If
If RS2.RecordCount <> 0 Then
RS2.MoveFirst
Do While Not (RS2.EOF = True)
Combo2.AddItem RS2(0)
RS2.MoveNext
Loop
Else
HIDEALL
MsgBox "THERE ARE NO RECORDS IN MANUFACTURE TABLE"
End If
Option1.Enabled = False
Option2.Enabled = False
Combo1.Enabled = False
Combo2.Enabled = False
Text1.Text = Date$
End Sub

Public Sub HIDEALL()


LABLE2.Visible = False
LABLE3.Visible = False
LABLE4.Visible = False
LABLE5.Visible = False
LABLE6.Visible = False
LABLE7.Visible = False
LABLE8.Visible = False
LABLE9.Visible = False
LABLE10.Visible = False
LABLE11.Visible = False
LABLE12.Visible = False
Option1.Visible = False
Option2.Visible = False
Text1.Visible = False
Text2.Visible = False
Text3.Visible = False
Text4.Visible = False
Text5.Visible = False
Text6.Visible = False
Text7.Visible = False
Text8.Visible = False
Combo1.Visible = False
Combo2.Visible = False
Command1.Visible = False
Command2.Visible = False
Command3.Visible = False
End Sub

Public Sub ENABLE()


Command1.Enabled = True
Command2.Enabled = True
Command3.Enabled = True
Command4.Enabled = True
End Sub

Public Sub DISABLE()


Command1.Enabled = False
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = False
End Sub

Private Sub Text4_LostFocus()


Set RS3 = DB.OpenRecordset("SELECT * FROM MANU WHERE MEDCODE=" &
Val(Combo2.Text))
Text5.Text = RS3(6)
Text6.Text = Val(Text4.Text) * Val(Text5.Text)
If Option1.Value = True Then
Text7.Text = Val(Text6.Text)
Text8.Text = Val(Text6.Text) - Val(Text7.Text)
Text8.Enabled = False
Command2.Enabled = True
Command2.SetFocus
End If
If Option2.Value = True Then
Text7.SetFocus
Text8.Enabled = False
End If
End Sub

Private Sub Text7_LostFocus()


Text8.Text = Val(Text6.Text) - Val(Text7.Text)
Text8.Enabled = False
Command2.Enabled = True
Command2.SetFocus
End Sub

/*SALES RETURNS FORM*/


Dim DB As Database, RS, RS1, RS2, RS3 As Recordset

Private Sub Command1_Click()


Command1.Enabled = False
Command2.Enabled = False
Command3.Enabled = True
RS.AddNew
Combo1.Enabled = True
Combo2.Enabled = True
Combo1.SetFocus
End Sub

Private Sub Command2_Click()


Command2.Enabled = False
Command3.Enabled = False
RS(0) = Combo1.Text
RS(1) = Combo2.Text
RS(2) = Text2.Text
RS(3) = Text1.Text
RS.Update
Set RS1 = DB.OpenRecordset("SELECT * FROM STOCK WHERE MEDCODE=" &
Val(Combo2.Text))
RS1.Edit
Dim K As Double
K = RS1(1)
RS1(1) = K + Val(Text2.Text)
RS1.Update
MsgBox "UR RECORD HAS BEEN SAVED"
Command1.Enabled = True
Command2.Enabled = True
Combo1.CLEAR
Combo2.CLEAR
Combo2.Text = ""
Text2.Text = ""
End Sub

Private Sub Command3_Click()


Combo1.Enabled = False
Combo2.Enabled = False
Text2.Text = ""
Command3.Enabled = False
Command1.Enabled = True
Command1.SetFocus
End Sub

Private Sub Command4_Click()


Unload Me
End Sub

Private Sub Form_Load()


Set DB = OpenDatabase(App.Path & "\RAMA.MDB")
Set RS = DB.OpenRecordset("SALSRET")
Set RS1 = DB.OpenRecordset("STOCK")
Set RS2 = DB.OpenRecordset("SALTRANS")
Set RS3 = DB.OpenRecordset("CUSTOMER")
If RS3.RecordCount <> 0 Then
RS3.MoveFirst
Do While Not (RS3.EOF = True)
Combo1.AddItem RS3(0)
RS3.MoveNext
Loop
Else
HIDEALL
MsgBox "THERE ARE NO RECORDS IN CUSTOMER TABLE"
End If
If RS1.RecordCount <> 0 Then
RS1.MoveFirst
Do While Not (RS1.EOF = True)
Combo2.AddItem RS1(0)
RS1.MoveNext
Loop
Else
HIDEALL
MsgBox "THERE ARE NO RECORDS IN STOCK TABLE"
End If
Command2.Enabled = False
Command3.Enabled = False
Text1.Text = Date$
Combo1.Enabled = False
Combo2.Enabled = False
End Sub

Public Sub HIDEALL()


Combo1.Visible = False
Combo2.Visible = False
Text1.Visible = False
Text2.Visible = False
Label2.Visible = False
Label3.Visible = False
Label4.Visible = False
Label5.Visible = False
Command1.Visible = False
Command2.Visible = False
Command3.Visible = False
End Sub

Private Sub Text2_LostFocus()


Command2.Enabled = True
Command3.Enabled = False
Command2.SetFocus
End Sub

SYSTEM TESTING
In a software development project, errors can be injected at any stage
during the development. Testing performs a very critical role for quality and
for ensuring the reliability of software. During testing ,the program to be
tested is executed with set of test cases ,and the output of the program for the
test cases is evaluated to determine if the program is performing as it is
expected to. Due to its approach, dynamic testing can only ascertain the
presence of error in the program; the exact nature of the error is not usually
decided by testing . Testing forms the first step in determining the errors in
the program. Clearly the success of testing in revealing errors in programs
depends critically on the test cases.

Testing is usually relied upon to detect the faults that occur during any
phase of the software development cycle ,in addition to the faults that
introduced during the coding phase itself. For this ,different levels of testing
are used which perform different tasks and aim to test different aspects of
the system. the basic levels of testing are unit testing ,integration testing
,system and acceptance testing. the different levels of testing attempt to
detect different types of faults.
Client Needs Acceptance Testing

Requirements System Testing

Design Integration Testing

Code Unit Testing

Test Plan:

A Test plan is a general document for the entire project, which defines
the scope approach to be taken, and the schedule of testing ,as well as
identifying the test items for the entire testing process and the personnel
responsible for the different activities of testing commences and can be
done in parallel with the coding and design phases, the inputs for the test
plan are the

 Project plan

 Requirements Document

 System Design Document

The project plan is needed to make sure that the test is consistent with
overall plan for the project and the testing schedule matches that of the
project plan the requirements document and the design document are the
basic document Used for selecting the test unit and deciding the approaches
to be employed during testing .A test plan sholud contain the Following:

 Test unit specification

 Features to be Tested

 Approach for Testing

 Test Deliverables

 Schedule

Test unit

It is a set of one or more modules together with associated data which


are the forms a single computer program and which are the object of testing.
It can occur at any level and can contain from a single module to the entire
system. This is carried out at every stage of the project i.e., after completion
of every module

Features to be tested

Include all software Features and combinations of features and


combination of features to be tested. It includes functionality, performance,
design constraints and attributes.

Approach for testing

Specifies the overall approach to be followed in the current project.


This is some times called testing criteria, or the criteris evaluating the set of
test cases used in testing.

Testing deliverables should be specified in the test plan, before the


actual testing begins. Deliverables could be a list of test cases that were used
detailed results of testing, test summary report, test log and data about the
code coverage.

Schedule
specifies the amount of time and effort to be spent on different
activities of testing, and testing of different units have been identified.

UNIT TESTING:

Unit testing is a dynamic method for verification, where the programs


is actually compiled and executed .It is one of the most widely used method,
and the coding phase is sometimes called “coding and unit testing phase”, as
in other forms of testing, unit testing involves executing the code with some
test cases and then evaluating the results.

The goal of unit testing is to test modules or ”units” and not the entire
software system. The programmer himself most often does unit testing, the
programmer, after finishing the coding of a module, test it with some data.
The tested module is then delivered for system integration and further testing
there are 4 categories of tests that a programmer will typically perform on a
program unit

Functional tests:

Specify operating conditions, input values and expected results.

Performance tests:

It should be designed to verify response time, execution time,


throughput Primary and secondary memory utilization.

Stress tests:

Stress tests are designed to overload a system in various ways.


Structural tests are concerned with examining internal process logic of
software system.

Integration tests:
After the unit testing the modules is gradually integrated into
subsystem, which are then integrated them to eventually form the entire
system. During integration of modules Integration testing is performed .The
goal of this testing is to detect design errors, while focusing on testing the
interconnection between modules.

System testing
After the system is put together, system testing is performed. here the
system is tested against the system requirements to see if all the
requirements are met and the system performs as specified by requirements.
The entire software is tested and the goal is to see if the software meets the
requirements

Alpha-beta testing:
A customer does the alpha test at the developer site .the software is
used in a natural setting with the developer and usage problems.

The beta testing is conducted at one or more customer areas of the end
of software. The problems are recorded and updated.

White Box Testing

A white box testing technique id described as follows:

Control Structure Testing:


Conditional testing is a test case design method that exercises the
logical condition in a program module. The possible types of components in
a condition include a Boolean operator, Boolean variable, pair of Boolean
parenthesis relational operator or an arithmetic operator.

Data Flow Testing:


Data flow testing method selects test path of program according to
the location of definition and uses of variables in the program .they are
useful for selecting test. They are useful for selecting test paths of a program
containing nested if and loop statements.
Loop Testing:
Loops are the cornerstone for the vast majority of all algorithm
implemented in software loop testing is a white box technique that focuses
exclusively on validity of loop construct.

Black box Testing


Black box testing method focuses on the functional requirements of
the software. black box testing method attempts to find in the following
categories.

 Incorrect or missing functions


 Interface errors.
 Error in data structure or external databases access
 Performance errors
 Initialization and termination error

SCOPE FOR ENHANCEMENT

This Application is designed to be generic .as we develop our site we should


take advantage of several areas in which you can improve and customize
business.

Automatic notification of newly placed orders to the company’s Shipping or


processing department. we are trying to include different kinds of medicines
which are needed by the customer in their day to day life, and many more
facilities for the customers.
Credit card facilities will be include for making the payment easy for the
customer. service charge will be there for credit cards. addition of a
procedure to verify the user’s credit card information.
CONCLUSION

The main approach in having this application is that this type of the
systems can play a major role in the part of the life. Since the health is the
major context in our life for that we can make use of such systems for
suggesting the good medicines like one of the application is Medical
Transcription we can do many improvements by making available to every
body by proving this type of applications through net or online.

I would like to extend my warm wishes and thanks to everyone who


contributed their valuable suggestion and time for the development of this
application.

BIBLIOGRAPHY

a) VISUAL BASE VOLUME 1&11 ------ S.S.I PRESS

b) DATA BASE MANAGEMENT SYSTEMS ----- KORTH

c) SYSTEM ANALYSIS AND DESIGN ------JAMES A.SENN

d) VISUALBASIC 6.0 -------- GARY CORNELL

e) COMPLETE REFERENCE VISUAL BASIC---- KEVLIN LONEY

Das könnte Ihnen auch gefallen