+ All Categories
Home > Documents > Pharmacy

Pharmacy

Date post: 13-Nov-2014
Category:
Upload: vinay999
View: 4 times
Download: 2 times
Share this document with a friend
Description:
project VB PHARMACY
Popular Tags:
78
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.
Transcript
Page 1: Pharmacy

INTRODUCTION

The aim of the project is to computerize the pharmacy stores.The modules of the project are;

1. PURCHASE2. 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.

Page 2: 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

Page 3: Pharmacy

LANGUAGE DESCRIPTION

About Visual Basic Language:-

Visual Basic was developed forms the BASIC programminglanguage. In 1970’s Microsoft got its start by developing ROM basedinterpreted Basic for the early microprocessor based computer. In 1982,Microsoft QuickBasic revolutionized Basic and legitimized as a seriousdevelopment language for MS-DOS environment. Later on, MicrosoftCorporation created the enhanced version of BASIC called Visual Basic for Windows.

Visual Basic 6.0:-

Visual Basic 6.0 allows creating Object Oriented Application. WhenVisual Basic originally developed, it allowed to the programmer to createprograms using pre-defined objects, forms and controls. It uses some of the Windows 95 Controls. Visual Basic 6.0 can be used to develop bothstandalone 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:-

Page 4: Pharmacy

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.

Page 5: Pharmacy

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.

Page 6: Pharmacy

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.

Page 7: Pharmacy

SYSTEM DESIGN:

DATAFLOW DIAGRAMS:

OVER VIEW:

MANUFACTURER

CUSTOMER

DEALER USER

Page 8: Pharmacy

PURCHASE:

USER MANUFACTURER

ADDITION

DELETION

MODIFIES

PURCHASE

STOCK

PURCHASE RETURNS

Page 9: Pharmacy

SALES:

STOCK SALES

CUSTOMER SALES RETURNS

Page 10: Pharmacy

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

Page 11: Pharmacy

FIELD NAME DATA TYPE DATA SIZE

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

TABLE NAME:-MANU

FIELD NAME DATA TYPE DATASIZE

MEDCODE DOUBLE 8MEDNAME TEXT 50ADDRESS TEXT 50PHONE DOUBLE 8MANUCODE DOUBLE 8MANUNAME TEXT 50MEDRATE DOUBLE 8MANDATE DATE/TIME 8EXPDATE DATE/TIME 8

TABLE NAME:-PTRAN

FIELD NAME DATA TYPE DATA SIZE

DATEOFTRAN DATE/TIME 8TYPE TEXT 4MANCODE LONG 4MEDCODE LONG 4

Page 12: Pharmacy

QTY LONG 4BALANCE DOUBLE 8

TABLE NAME:-PURRET

FIELD NAME DATA TYPE DATA SIZE

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

TABLE NAME:-SALSRET

FIELD NAME DATA TYPE DATA SIZE

CUSTCODE DOUBLE 8MEDCODE DOUBLE 8QTYDET DOUBLE 8DATEOFTRANS DATE/TIME 8

TABLE NAME:-SALTRANS

FIELD NAME DATA TYPE DATA SIZE

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

Page 13: Pharmacy

BALANCE DOUBLE 8

TABLE NAME:-STOCK

FIELD NAME DATA TYPE DATA SIZE

MEDCODE DOUBLE 8STKLEV DOUBLE 8RELEV DOUBLE 8

SCREENS:-

PASS WORD FORM

Page 14: Pharmacy

MAIN MENU

Page 15: Pharmacy

MANUFACTURER FORM

Page 16: Pharmacy

CASH PURCHASE FORM

Page 17: Pharmacy

CREDIT PURCHASE FORM

Page 18: Pharmacy

PURCHASE RETURNS FORM

Page 19: Pharmacy

CUSTOMER DETAILS

Page 20: Pharmacy
Page 21: Pharmacy

CASH SALES FORM

Page 22: Pharmacy

CREDIT SALES FORM

Page 23: Pharmacy

SALES RETURNS FORM

Page 24: Pharmacy

PURCHASE REPORT

Page 25: Pharmacy

MANUFACTURER REPORT

Page 26: Pharmacy

PURCHASE RETURNS REPORT

Page 27: Pharmacy

SALES TRNASACTION REPORT

Page 28: Pharmacy

CUSTOMER REPORTS

Page 29: Pharmacy

SALES RETURNS REPORT

Page 30: Pharmacy

STOCK DETAILS REPORT

Page 31: Pharmacy

DATEWSIE PURCHASE REPORT

Page 32: Pharmacy

DATEWISE SALES REPORT

Page 33: Pharmacy

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 IfEnd Sub

Private Sub Command2_Click()Unload MDIForm1Unload MeEnd Sub

Private Sub text1_KeyPress(KeyAscii As Integer)

Page 34: Pharmacy

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 IfEnd Sub

Private Sub Form_Load()MDIForm1.ShowMDIForm1.Enabled = FalseEnd Sub

/*MAIN MENU*/

Private Sub CU_Click()DataReport5.ShowEnd Sub

Private Sub CUS_Click()Form6.ShowEnd Sub

Private Sub DA_Click()DataReport2.ShowEnd Sub

Private Sub DAI_Click()DataReport7.ShowEnd Sub

Private Sub EX_Click()EndEnd Sub

Private Sub M_Click()Form3.ShowEnd Sub

Private Sub MO_Click()DataReport4.ShowEnd Sub

Page 35: Pharmacy

Private Sub MON_Click()Dim dd = InputBox("which date u need")DataEnvironment1.Command9 dDataReport9.ShowEnd Sub

Private Sub P_Click()DataReport1.ShowEnd Sub

Private Sub PR_Click()Form5.ShowEnd Sub

Private Sub SA_Click()DataReport6.ShowEnd Sub

Private Sub SR_Click()Form8.ShowEnd Sub

Private Sub TR_Click()Form4.ShowEnd Sub

Private Sub TRA_Click()Form7.ShowEnd Sub

Private Sub we_Click()DataReport3.ShowEnd Sub

Private Sub WEE_Click()Dim dd = InputBox("which date u need")DataEnvironment1.Command8 dDataReport8.ShowEnd Sub

/*MANUFACTURER DETAILS FORM/

Dim DB As Database, RS, RS1 As Recordset

Page 36: Pharmacy

Private Sub Command1_Click()DISABLECommand5.Enabled = TrueCommand1.Enabled = FalseCommand10.Enabled = TrueIf RS.RecordCount <> 0 Then RS.MoveLast Text1.Text = RS(0) + 1Else Text1.Text = 1000End IfText2.SetFocusRS.AddNewEnd 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 DoubleMCODE = 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 IfEnd Sub

Private Sub Command3_Click()RS(0) = Text1.TextRS(1) = Text2.TextRS(2) = Text3.TextRS(3) = Text4.Text

Page 37: Pharmacy

RS(4) = Text5.TextRS(5) = Text6.TextRS(6) = Text7.TextRS(7) = Text8.TextRS(8) = Text9.TextRS.UpdateMsgBox " YOUR RECORD HAS BEEN SAVED"ENABLECLEARCommand7.Enabled = FalseCommand8.Enabled = FalseEnd Sub

Private Sub Command5_Click()Unload MeEnd Sub

Private Sub Command6_Click()RS.MoveFirstLOADENABLEEnd Sub

Private Sub Command7_Click()RS.MoveNextIf RS.EOF = True Then MsgBox "THIS IS THE LAST RECORD" RS.MoveLastElse LOADEnd IfEnd Sub

Private Sub Command8_Click()RS.MovePreviousIf RS.BOF Then MsgBox "THIS IS THE FIRST RECORD" RS.MoveFirstElse LOADEnd IfEnd Sub

Private Sub Command9_Click()RS.MoveLastLOAD

Page 38: Pharmacy

ENABLEEnd 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 = TrueElse ENABLE Command7.Enabled = False Command8.Enabled = FalseEnd IfEnd 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 = TrueCommand2.Enabled = TrueCommand3.Enabled = TrueCommand5.Enabled = True

Page 39: Pharmacy

Command6.Enabled = TrueCommand7.Enabled = TrueCommand8.Enabled = TrueCommand9.Enabled = TrueCommand10.Enabled = TrueEnd Sub

Public Sub DISABLE()Command1.Enabled = FalseCommand2.Enabled = FalseCommand3.Enabled = FalseCommand5.Enabled = FalseCommand6.Enabled = FalseCommand7.Enabled = FalseCommand8.Enabled = FalseCommand9.Enabled = FalseCommand10.Enabled = FalseEnd 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.SetFocusEnd IfEnd Sub

Private Sub Text9_LostFocus()Command3.Enabled = TrueCommand3.SetFocusEnd Sub

/*PURCHASE DETAILS FORM*/

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

Private Sub COMBO2_GotFocus()Combo1.Enabled = FalseSet RS1 = DB.OpenRecordset("select * from MANU where MANUCODE=" & Val(Combo1.Text))RS1.MoveFirstText1.Text = RS1(5)

Page 40: Pharmacy

Do While Not (RS1.EOF = True) Combo2.AddItem RS1(0) RS1.MoveNextLoopEnd Sub

Private Sub Combo2_LostFocus()Combo2.Enabled = FalseSet RS1 = DB.OpenRecordset("select * from MANU where MEDCODE=" & Val(Combo2.Text))RS1.MoveFirstText2.Text = RS1(1)Text4.Text = RS1(6)Text6.Text = Format(Date, "dd-mm-yyyy")Text3.SetFocusEnd Sub

Private Sub Command1_Click()Dim K1 As DoubleOption1.Enabled = TrueOption2.Enabled = TrueCombo1.Enabled = TrueCombo2.Enabled = TrueOption1.SetFocusRS.AddNewCommand1.Enabled = FalseCommand3.Enabled = TrueCommand4.Enabled = FalseCombo1.SetFocusEnd Sub

Private Sub Command2_Click()If Option1.Value = True Then RS(1) = "CS"End IfIf Option2.Value = True Then RS(1) = "CR"End IfRS(2) = Combo1.TextRS(3) = Combo2.TextRS(4) = Text3.TextRS(5) = Text8.TextRS(0) = Format(Date$, "DD/MM/YYYY")RS.UpdateSet RS2 = DB.OpenRecordset("SELECT * FROM STOCK WHERE MEDCODE=" & Val(Combo2.Text))

Page 41: Pharmacy

If RS2.RecordCount <> 0 Then RS2.Edit K1 = RS2(1) RS2(1) = Val(K1 + Val(Text3.Text)) RS2.UpdateElse RS2.AddNew RS2(0) = Combo2.Text RS2(1) = Text3.Text RS2(2) = 40 RS2.UpdateEnd IfMsgBox "YOUR RECORD HAS BEEN SAVED"ENABLECLEARCombo1.Text = ""Combo2.CLEARCombo1.Enabled = FalseCombo2.Enabled = FalseCommand2.Enabled = FalseOption1.Enabled = FalseOption2.Enabled = FalseCommand1.SetFocusEnd Sub

Private Sub Command3_Click()CLEARDISABLECommand1.Enabled = TrueCommand3.Enabled = FalseCommand4.Enabled = TrueCommand1.SetFocusCombo2.CLEAREnd Sub

Private Sub Command4_Click()Unload MeEnd Sub

Private Sub Form_Load()Dim K As DoubleSet 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

Page 42: Pharmacy

DISABLEALL MsgBox "THERE ARE NO RECORDS IN THE DATABASE" Else DISABLE Command1.Enabled = True Command4.Enabled = TrueEnd 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 IfABC: LoopEnd IfEnd Sub

Public Sub DISABLEALL()Label2.Visible = FalseLabel3.Visible = FalseLabel4.Visible = FalseLabel5.Visible = FalseLabel6.Visible = FalseLabel7.Visible = FalseLabel8.Visible = FalseLabel10.Visible = FalseLabel11.Visible = FalseLabel12.Visible = FalseLabel13.Visible = FalseOption1.Visible = FalseOption2.Visible = FalseText1.Visible = FalseText2.Visible = FalseText3.Visible = FalseText4.Visible = FalsesText5.Visible = False

Page 43: Pharmacy

Text6.Visible = FalseText7.Visible = FalseText8.Visible = FalseCombo1.Visible = FalseCombo2.Visible = FalseCommand1.Visible = FalseCommand2.Visible = FalseCommand3.Visible = FalseEnd 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.SetFocusEnd IfIf Option2.Value = True Then Text7.SetFocus Text8.Enabled = FalseEnd IfEnd Sub

Private Sub Text7_LostFocus()Text8.Text = Val(Text5.Text) - Val(Text7.Text) Command2.Enabled = True Command2.SetFocusEnd Sub

Public Sub ENABLE()Option1.Enabled = TrueOption2.Enabled = TrueCommand1.Enabled = TrueCommand2.Enabled = TrueCommand3.Enabled = TrueCommand4.Enabled = TrueCombo1.Enabled = TrueCombo2.Enabled = TrueEnd Sub

Public Sub DISABLE()Option1.Enabled = FalseOption2.Enabled = FalseCommand1.Enabled = False

Page 44: Pharmacy

Command2.Enabled = FalseCommand3.Enabled = FalseCommand4.Enabled = FalseCombo1.Enabled = FalseCombo2.Enabled = FalseEnd 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()DISABLECombo1.Enabled = TrueRS3.AddNewCombo1.SetFocusCommand3.Enabled = TrueCommand4.Enabled = TrueEnd Sub

Private Sub Command2_Click()Dim T As DoubleRS3(0) = Text2.TextRS3(1) = Combo1.TextRS3(2) = Text3.TextRS3(3) = Text1.TextRS3.UpdateSet RS2 = DB.OpenRecordset("SELECT * FROM STOCK WHERE MEDCODE=" & Val(Combo1.Text))RS2.EditT = RS2(1)RS2(1) = T - Val(Text3.Text)RS2.UpdateMsgBox "UR RECORD HAS BEEN SAVED"

Page 45: Pharmacy

If RS2(1) < RS2(2) Then MsgBox "THE STOCK LEVEL IS BELOW REORDER LEVEL, PLEASE ORDER STOCK"End IfCombo1.Text = ""Text2.Text = ""Text3.Text = ""Command2.Enabled = FalseCommand1.Enabled = TrueCommand1.SetFocusEnd Sub

Private Sub Command3_Click()Combo1.Text = ""Text2.Text = ""Text3.Text = ""Command2.Enabled = FalseCommand1.Enabled = TrueCommand1.SetFocusEnd Sub

Private Sub Command4_Click()Unload MeEnd 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 LoopElse MsgBox "THERE ARE NO RECORDS IN THE DATABASE" LABLE2.Visible = False LABLE3.Visible = False LABLE4.Visible = False LABLE5.Visible = False Combo1.Visible = False

Page 46: Pharmacy

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 = FalseCommand2.Enabled = FalseCommand3.Enabled = FalseCommand4.Enabled = FalseEnd Sub

Private Sub Text2_GotFocus()Dim RS4 As RecordsetSet RS4 = DB.OpenRecordset("SELECT * FROM MANU WHERE MEDCODE=" & Val(Combo1.Text))Text2.Text = RS4(4)Text3.SetFocusEnd Sub

Private Sub Text3_LostFocus()Command2.Enabled = TrueCommand2.SetFocusEnd Sub

/*CUSTOMER DETAILS FORM */

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

Private Sub Command1_Click()DISABLECommand5.Enabled = TrueCommand1.Enabled = FalseCommand10.Enabled = TrueIf RS.RecordCount <> 0 Then RS.MoveLast Text1.Text = RS(0) + 1Else Text1.Text = 100End If

Page 47: Pharmacy

Text2.SetFocusRS.AddNewEnd 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 DoubleCCODE = 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 IfEnd Sub

Private Sub Command3_Click()RS(0) = Text1.TextRS(1) = Text2.TextRS(2) = Text3.TextRS(3) = Text4.TextRS.UpdateMsgBox " YOUR RECORD HAS BEEN SAVED"ENABLECLEARCommand7.Enabled = FalseCommand8.Enabled = FalseEnd Sub

Private Sub Command5_Click()Unload MeEnd Sub

Page 48: Pharmacy

Private Sub Command6_Click()RS.MoveFirstLOADENABLEEnd Sub

Private Sub Command7_Click()RS.MoveNextIf RS.EOF = True Then MsgBox "THIS IS THE LAST RECORD" RS.MoveLastElse LOADEnd IfEnd Sub

Private Sub Command8_Click()RS.MovePreviousIf RS.BOF Then MsgBox "THIS IS THE FIRST RECORD" RS.MoveFirstElse LOADEnd IfEnd Sub

Private Sub Command9_Click()RS.MoveLastLOADENABLEEnd 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 = TrueElse ENABLE Command7.Enabled = False Command8.Enabled = FalseEnd IfEnd Sub

Page 49: Pharmacy

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 = TrueCommand2.Enabled = TrueCommand3.Enabled = TrueCommand5.Enabled = TrueCommand6.Enabled = TrueCommand7.Enabled = TrueCommand8.Enabled = TrueCommand9.Enabled = TrueCommand10.Enabled = TrueEnd Sub

Public Sub DISABLE()Command1.Enabled = FalseCommand2.Enabled = FalseCommand3.Enabled = FalseCommand5.Enabled = FalseCommand6.Enabled = FalseCommand7.Enabled = FalseCommand8.Enabled = FalseCommand9.Enabled = FalseCommand10.Enabled = FalseEnd Sub

Private Sub Text4_LostFocus()Command3.Enabled = TrueCommand3.SetFocusEnd Sub

/* SALES DETAILS FORM*/

Page 50: Pharmacy

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()DISABLECommand3.Enabled = TrueCommand4.Enabled = TrueRS.AddNewOption1.Enabled = TrueOption2.Enabled = TrueCombo1.Enabled = TrueCombo2.Enabled = TrueOption1.SetFocusEnd Sub

Private Sub Command2_Click()Dim K As DoubleRS(0) = Text1.TextIf Option1.Value = True Then RS(1) = "CS"End IfIf Option2.Value = True Then RS(1) = "CR"End IfRS(2) = Combo1.TextRS(3) = Combo2.TextRS(4) = Text4.TextRS(5) = Text8.TextRS.UpdateCommand2.Enabled = FalseCommand3.Enabled = FalseCommand1.Enabled = TrueCommand1.SetFocus

Page 51: Pharmacy

Set RS2 = DB.OpenRecordset("SELECT * FROM STOCK WHERE MEDCODE =" & Val(Combo2.Text)) RS2.EditK = RS2(1)RS2(1) = K - Val(Text4.Text)RS2.UpdateMsgBox "UR RECORD HAS BEEN SAVED"If RS2(1) < RS2(2) Then MsgBox "THE STOCK LEVEL IS BELOW REORDER LEVEL, PLEASE ORDER STOCK"End IfCombo1.Text = ""Combo2.Text = ""Combo1.Enabled = FalseCombo2.Enabled = FalseCommand2.Enabled = FalseOption1.Enabled = FalseOption2.Enabled = FalseCommand1.SetFocusText2.Text = ""Text3.Text = ""Text4.Text = ""Text5.Text = ""Text6.Text = ""Text7.Text = ""Text8.Text = ""End Sub

Private Sub Command3_Click()Option1.Enabled = FalseOption2.Enabled = FalseCombo1.Enabled = FalseCombo2.Enabled = FalseText2.Text = ""Text3.Text = ""Text4.Text = ""Text5.Text = ""Text6.Text = ""Text7.Text = ""Text8.Text = ""Command3.Enabled = FalseCommand1.Enabled = TrueCommand1.SetFocusEnd Sub

Private Sub Command4_Click()

Page 52: Pharmacy

Unload MeEnd 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 LoopElse HIDEALL MsgBox "THERE ARE NO RECORDS IN THE CUSTOMER TABLE"End IfIf RS2.RecordCount <> 0 Then RS2.MoveFirst Do While Not (RS2.EOF = True) Combo2.AddItem RS2(0) RS2.MoveNext LoopElse HIDEALL MsgBox "THERE ARE NO RECORDS IN MANUFACTURE TABLE"End IfOption1.Enabled = FalseOption2.Enabled = FalseCombo1.Enabled = FalseCombo2.Enabled = FalseText1.Text = Date$End Sub

Public Sub HIDEALL()LABLE2.Visible = FalseLABLE3.Visible = FalseLABLE4.Visible = FalseLABLE5.Visible = FalseLABLE6.Visible = FalseLABLE7.Visible = FalseLABLE8.Visible = FalseLABLE9.Visible = FalseLABLE10.Visible = False

Page 53: Pharmacy

LABLE11.Visible = FalseLABLE12.Visible = FalseOption1.Visible = FalseOption2.Visible = FalseText1.Visible = FalseText2.Visible = FalseText3.Visible = FalseText4.Visible = FalseText5.Visible = FalseText6.Visible = FalseText7.Visible = FalseText8.Visible = FalseCombo1.Visible = FalseCombo2.Visible = FalseCommand1.Visible = FalseCommand2.Visible = FalseCommand3.Visible = FalseEnd Sub

Public Sub ENABLE()Command1.Enabled = TrueCommand2.Enabled = TrueCommand3.Enabled = TrueCommand4.Enabled = TrueEnd Sub

Public Sub DISABLE()Command1.Enabled = FalseCommand2.Enabled = FalseCommand3.Enabled = FalseCommand4.Enabled = FalseEnd 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.SetFocusEnd IfIf Option2.Value = True Then

Page 54: Pharmacy

Text7.SetFocus Text8.Enabled = FalseEnd IfEnd Sub

Private Sub Text7_LostFocus()Text8.Text = Val(Text6.Text) - Val(Text7.Text)Text8.Enabled = FalseCommand2.Enabled = TrueCommand2.SetFocusEnd Sub

/*SALES RETURNS FORM*/

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

Private Sub Command1_Click()Command1.Enabled = FalseCommand2.Enabled = FalseCommand3.Enabled = TrueRS.AddNewCombo1.Enabled = TrueCombo2.Enabled = TrueCombo1.SetFocusEnd Sub

Private Sub Command2_Click()Command2.Enabled = FalseCommand3.Enabled = FalseRS(0) = Combo1.TextRS(1) = Combo2.TextRS(2) = Text2.TextRS(3) = Text1.TextRS.UpdateSet RS1 = DB.OpenRecordset("SELECT * FROM STOCK WHERE MEDCODE=" & Val(Combo2.Text))RS1.EditDim K As DoubleK = RS1(1)RS1(1) = K + Val(Text2.Text)RS1.UpdateMsgBox "UR RECORD HAS BEEN SAVED"Command1.Enabled = TrueCommand2.Enabled = True

Page 55: Pharmacy

Combo1.CLEARCombo2.CLEARCombo2.Text = ""Text2.Text = ""End Sub

Private Sub Command3_Click()Combo1.Enabled = FalseCombo2.Enabled = FalseText2.Text = ""Command3.Enabled = FalseCommand1.Enabled = TrueCommand1.SetFocusEnd Sub

Private Sub Command4_Click()Unload MeEnd 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 LoopElse HIDEALL MsgBox "THERE ARE NO RECORDS IN CUSTOMER TABLE"End IfIf RS1.RecordCount <> 0 Then RS1.MoveFirst Do While Not (RS1.EOF = True) Combo2.AddItem RS1(0) RS1.MoveNext LoopElse HIDEALL MsgBox "THERE ARE NO RECORDS IN STOCK TABLE"End IfCommand2.Enabled = False

Page 56: Pharmacy

Command3.Enabled = FalseText1.Text = Date$Combo1.Enabled = FalseCombo2.Enabled = FalseEnd Sub

Public Sub HIDEALL()Combo1.Visible = FalseCombo2.Visible = FalseText1.Visible = FalseText2.Visible = FalseLabel2.Visible = FalseLabel3.Visible = FalseLabel4.Visible = FalseLabel5.Visible = FalseCommand1.Visible = FalseCommand2.Visible = FalseCommand3.Visible = FalseEnd Sub

Private Sub Text2_LostFocus()Command2.Enabled = TrueCommand3.Enabled = FalseCommand2.SetFocusEnd 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.

Page 57: Pharmacy

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

Page 58: Pharmacy

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

Page 59: Pharmacy

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:

Page 60: Pharmacy

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.

Page 61: Pharmacy

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.

Page 62: Pharmacy

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

Page 63: Pharmacy

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

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


Recommended