Sei sulla pagina 1di 134

BSNL SIM

DISTRIBUTION SYSTEM
A
Project Report
Submitted For The Partial Fulfillment of

B.Sc IT Degree
Under the supervision of
Mr. Ashraf Jamal

BY

ANIL KUMAR
ENROLLMENT NO. 520822367

SIKKIM MANIPAL UNIVERSITY


2011

TABLE OF CONTENTS
Introduction
Main Objectives of the Projects
Project Category
Tools and Environment
System Analysis
o Identification of Need
Preliminary Investigation

Feasibility Study
o Technical Feasibility
o Economical Feasibility
o Operational Feasibility

Software Engineering Paradigm


Software Requirement Specification
DFD & ER Diagram
Design
Forms and Coding
Code Efficiency & Optimization
Validation Checks
Testing
Implements
Evaluation
Maintenance
Security Measures Taken
Cost Estimation of Project
PERT Chart and Gantt Chart
Future scope of the project

ENROLL NO. 520822367

ANIL KUMAR

Bibliography
Glossary
Synopsis

ENROLL NO. 520822367

ANIL KUMAR

Introduction

The Project BSNL SIM DISTRIBUTION SYSTEM is dedicated to the


requirements of Vishal Mobile Agency, Golghar, Gorakhpur, who deals with
Mobile Prepaid in bulk and retail both.

BSNL SIM DISTRIBUTION SYSTEM is a system that is made to work for an


Mobile Prepaid Agency who is providing different kind of Mobile products, their
servicing and Mobile Prepaid of those products for which company has got the
Authorized sales and service Agency. Mobile Prepaid companies like, Air Tel, Tata
Indicom, Vodafone, Reliance & VSNL has chosen Vishal Mobile Agency

as

Authorized Prepaid Card dealer. The Agency is very famous for their services and
customers and retailers of City and near by rural and semi urban area are also
visiting the Agency. Typical spares can be found in the Agency. BSNL SIM
DISTRIBUTION SYSTEM is made to keep track of each equipment inventory, make
the billing proper so that on spot computerized bill can be produced to the
customer/Retailers, The purchase of Products, Mobile Prepaid, its sales, indent
creation, reporting, expanses maintenance, Product receiving for repair, Service
done

(warranty/unwarranted),

mechanic/staff

duties,

salary,

attendance,

dues/Advances of Retailers, etc.

Manually handling the details of each Appliances, Mobile Prepaid, the Retailers,
retailers/Company dues, sales, purchase, reporting, standard billing are tedious
and not always enjoyable. Efforts and energies are hence, focused at not just
speeding up the managements capability, but also on consciously reducing their
load in an effort to provide accurate and dependable information. Computers are
ENROLL NO. 520822367

ANIL KUMAR

able to do all kinds of tasks at amazing speed than done manually. Therefore, came
forth the idea of developing a BSNL SIM DISTRIBUTION SYSTEM.

For example, there are number of Retailers of Agency who purchases equipments
on half or one fourth payment, some times they takes on 100% credit. Same time
some are paying advances for the Indent. If information of any one retailer is
needed for any purpose, identifying the Marketing Staff / Retailer and then
obtaining related information manually will be time consuming. Keeping track of
each Purchase, sales, Indent, expanses, advance received, due payment, return of
Product, Mechanic allotment for service, outside mechanics involvement, etc.
require to look on a no. of registers/books which may produce clerical and technical
mistakes. The greatest gift that an automated system offers us is that of storage of
large amount of information and accurate retrieval in a couple of seconds.

Storage of data and information on the computer allows reduction of paper filing
and other mundane tasks. This considerably improves administrations efficiency,
facilitating it to promptly address any kind of information sought for.

No doubt, the calculation of Amount, Tax, current due, Sales during a period,
Product wise sales/purchase details, sum of advances made by a customer, etc. is
one of the most tedious and time-consuming tasks. This process is also very prone
to errors, so automation will lead to flawless calculation of all of these.

ENROLL NO. 520822367

ANIL KUMAR

About The Mobile Prepaid Agency

Vishal Prepaid Agency is one the most famous Mobile Prepaid Agency of
Genuine Mobile Appliances, spares and authorized service of Nokia, Samsung, LG,
Benq, Motorola of wide range. The customers and Mobile Prepaid retailers, Mobile
Prepaid service centres of Gorakhpur (Purvanchal) are willingly knowing the firm.
The firm is owned by Mr. Vishal Srivastava is running the business and it is on top
among other Agencies of the same range. The firm has got good name and frame
due to quality product and Good price and warm service.

The environment of the office/store dont become busy / crud some, due to proper
care and huge space of office hall. It is also planning for opening of two new outlets
at different locations of city. Main reason of success of the firm is that the satisfied
customers of the enterprise, behavior of Consulting staff, managers and Proprietor.
The staff puts an ideal way of dealing with customers. It gives the quality notch
service to the retailers, customers, Company higher authorities, and staff.

ENROLL NO. 520822367

ANIL KUMAR

Objectives

1.

This project is being developed with a view to automate the function of Vishal
Prepaid

Agency,

provides

services

to

Administrator

(BSNL

SIM

DISTRIBUTION SYSTEM).

2.

The management of Vishal Prepaid Agency wants a


computerize system that can manage the list of Retailers, Customers, Spare,
Inventory

(Scratch

Cards,

spares),

receiving

of

Appliances(unused/faulty/outdated) for service, Job allotment to suitable


mechanic, various types of Appliances and their concerned match for spare,
order collection, indents in particular date & time send and order received
from company, etc.

3.

Another objective of this project is to maintain the details


of each customer/ retailer/Company dues and advances (which ever be the
case applicable). Managing the details of the

Customers/Retailers manually

is not impossible but no doubt it is a very tedious job. The Job becomes even
more complex i.e. which Customers/Retailers are

regular or not regular

(Friends and relatives). Thus the objective is to manage the details of


Customers/Retailers.

4.

The main objective of the project is to improve


administrator efficiency facilitating it to promptly address any kind of
information sought for and to minimize the workload.

ENROLL NO. 520822367

ANIL KUMAR

5.

Details of members who are under various schemes.

6.

Checks the validity of Customers/Retailers and staff to get


put a feasible schedule for preemptive service.

7.

Maintenance of Attendance/hrs. of each staff(Mechanical/


Marketing / Office , gother) with respect to day.

8.

Addition of new equipments introduced in market, or


modification in specification of previous spares must not be possible without
the permission of administrator.

9.

Hence this software is used to providing good service to


the Customers/Retailers, reducing the paper work to be done and reducing
workload of the administrator.

10.

The Enquiry is given more emphasis, since they can be a


way to continue an Appliances, season for which it should be stocked,
festival/occasions in which demand goes high, demand of service, spare,
remove a spare from profile, or initiate a new scheme like Diwali, New Year, off
season, winter, etc.

11.

Reporting is one third of the use of the system required to


built. Hence reporting in various ways should be done for Administrator,
customers, retailers, company Authority, Service center, Appliances/Spare
Inventory, service (done, pending), etc.

ENROLL NO. 520822367

ANIL KUMAR

PROGRAM CATEGORY

RDBMS
RELATIONAL DATA BASE MANAGEMENT SYSTEM.

ENROLL NO. 520822367

ANIL KUMAR

Tools/Environment Used

Hardware Requirements :
1. Pentium IV or Advanced Processor
2. 2 GB RAM
3. 100 GB Hard disk or onwards
4. CD Drive

Software requirements :

1. Windows 98 /Windows NT (Windows 200/Xp) Server


2. Oracle 8i (SQL, PL/SQL) /SQL SERVER 2005
3. VB 6.0
4. Data Report Designer

ENROLL NO. 520822367

10

ANIL KUMAR

Analysis

Breaking a problem into successively manageable parts for individual study. Every
application development project should begin with an analysis of the requirements
and clear list of goals. The basic aim of analysis is to obtain a clear understanding
of users needs & what exactly is desired from the software, and what constraints
on the solution are.

ENROLL NO. 520822367

11

ANIL KUMAR

System Analysis

System Analysis is the process of totally understanding the current system by


gathering and interpreting facts, diagnosing problems, and using the facts to
improve the current system.

It is conducted with the following objectives in mind:

1.

Identify the users need;

2.

Evaluate the system concept for feasibility;

3.

Perform economic and technical feasibility;

4.

Allocate functions to hardware, software, people, database, and other


System elements; and

5.

Create a system definition that forms the foundation for all subsequent
Engineering works.

ENROLL NO. 520822367

12

ANIL KUMAR

Identification Of The Need

At present the Vishal Prepaid Agency maintains different registers for different
purposes for example Scratch Cards Master, Mobile Master, Spare Master,
Inventory (Spare, Appliances), Customers/Retailers, staff, Indents, Schemes,
Sales, Purchase, Expanses, Order, Dump from Company, Issue to Retailers,
Receiving from retailers, Attendance, Enquiry, etc.

As and when a new Customer comes to the Agency they have to enter their
Company/Retailers Code for regular care. Besides this the manager keep a
track on each entity of the Agency to provide schemes, discount.

Again there are a number of instances when:

1.

Entry of Master records

2.

A particular record is searched for tracking.

3.

A list of Mobiles and concerned Spares is prepared.

4.

A list of components of Appliances with suitable equipments is

prepared.

All this causes a great amount of chaos and confusion. It was finally decided to
computerize the working of Vishal Prepaid Agency, Gorakhpur.

ENROLL NO. 520822367

13

ANIL KUMAR

Preliminary Investigation

The Preliminary Investigation starts as soon as someone either a user or a


member of a particular department recognizes a problem or initiates a request,
to modify the current computerized system, or to computerize the current
manual system. An important outcome of the preliminary investigation is
determining whether the system requested is feasible or not.

The major purposes of this study are listed below:

(1)

Identify the responsible users and develop an initial scope of the


system. There are two specific groups of end-users:

a.

Inventory of Scratch and spares

b.

Those who use the system. In this case the Customers/Retailers


and staff who actually participates in service.

c.

Those affected by the inputs and outputs of the system in study. In


this case the management who decides the schemes given to
Customers/Retailers, the amount taken from the Retailers the first
time Advance is taken for dumping of appliances/spares to the
retailers.

To develop the initial scope of the system we need to get a broad idea of
the system in study. In this case we can identify the main process as to
ENROLL NO. 520822367

14

ANIL KUMAR

get the details of the Appliances of each category and amount, which
gets the input from each standard category. The output of the system is
produced by a number of manual works like discount, tax, etc.

(2)

Identify current deficiencies in the users environment.

As each spare is being monitored, the current status of the standard and
rate is entered in different register, so there is a chance of duplication of
record.

As there are separate registers maintained very often the entries are
entered in the wrong registers, causing duplication of work and
confusion.

(3)

Determine objectives for the new system.

Here we will briefly list the functions of the new system:

a.

Entry of Scratch Master, Inventory with Company, Inventory with


Retailers, Inventory with Marketing staff.

b.

Entry of Customers/Retailers, Details in a central Location.

Entry of a new Customers, Scheme details.

Modification or updating of Old Customers and


Servive details (if any).

ENROLL NO. 520822367

15

ANIL KUMAR

b.

Keeping track of Each Retailer.

c.

Generation

of

dues/advances

of

Customers/Retailers

and

equipments list if taken on credit basis.

d.

Generation of Indent order.

ENROLL NO. 520822367

16

ANIL KUMAR

Feasibility Study

Feasibility is the determination of whether or not a project is worth doing. The


process followed in making this determination is called a feasibility study. This
type of study determines if a project can and should be taken. Once it has been
determine that project is feasible, the analyst can go ahead and prepare a
project specification, which finalizes project requirements.

In the conduct of the feasibility study, the analysts usually consider seven
distinct, but inter-related types of feasibility. They are:

(1)

Technical Feasibility

(2)

Economical Feasibility

(3)

Operational Feasibility

(4)

Social Feasibility

(5)

Management Feasibility

(6)

Legal Feasibility

(7)

Time Feasibility

ENROLL NO. 520822367

17

ANIL KUMAR

A)

Technical Feasibility

The Technical needs of the system are as follows:

Facility to communicate data to distant location.

Response time under certain conditions.

Ability to process a certain volume of transaction at a particular speed.

In examining the technical feasibility, configuration is given more importance


than actual make of hardware. Here the configuration gives the complete
picture about the systems requirements:

How many workstations are required.

How these workstations are interconnected so that they can operate and
communicate smoothly.

What speeds of Input and Output should be achieved.

As the above requirements of the system can be fulfilled easily with the
technology available in the market, therefore the proposed system is
technically feasible.

ENROLL NO. 520822367

18

ANIL KUMAR

B)

Economical Feasibility

Economic analysis is the most frequently used technique for evaluating the
effectiveness of a proposed system. More commonly known as Cost / Benefit
analysis: the procedure is to determine the benefits and savings that are
expected from a proposed system and compare them with the costs. If
benefits outweigh costs, a decision is taken to design and implement the
system. Otherwise, further justification or alternative in the proposed system
will have to be made if it is to have a chance of being approved.

Proposed system for Vishal Prepaid Agency is economically feasible in


terms of time and effort of staff and management. Cost will be incurred at the
beginning but the effort and time saved by the proposed system far outweighs
the cost incurred. Since the Agency is not already computerized, so initially
large amount will be involved but in due standard with the outcome of the
system, the cost will be outweighed by the result of the automated system.

ENROLL NO. 520822367

19

ANIL KUMAR

C)

Operational Feasibility

It is mainly related to Human, Agency and political aspects. The points to be


considered are:

What changes will be brought with the system?

What Agency structures are distributed?

What new skills will be required?

Project is not rejected simply because of operational infeasibility but such


consideration is likely to critically affect the nature and scope of the eventual
recommendations.

For Vishal Prepaid Agency apart from other facts as per operational feasibility
is concerned we need to see to it that the system to be developed should be
user-friendly so that staff personnels who are not computer literate find it easy
to work with. As the office staff does most of the work, so they might have to
be trained.

ENROLL NO. 520822367

20

ANIL KUMAR

Software Engineering Paradigm Applied (Waterfall Model)

It is the simplest model, which shows that the phases are organized in the linear
order. Never a project begins with a feasibility analysis. After a successful
completion of the feasibility analysis, the requirement analysis and project planning
begins. The design starts after the requirement analysis is completed and coding
begins after the design is complete. Once the programming is complete, the code is
integrated and the testing is done. On successful completion of testing the system
is installed. After this regular operation the maintenance of the system takes place.

ENROLL NO. 520822367

21

ANIL KUMAR

Diagrammatic Representation of Water-fall-Model

Validation

Feasibility Report

System
Feasibility

Requirement Document
& Project Plan

Requirement Analysis
& Project
Planning
Validation

System Design
Document

System
Design
Verification

Detailed Design
Document

Detailed
Design
Verification

Coding

Programs

Verificati-on

Test Plan Test


Reports & Manuals

Testing and
Integration

Installation

Installation
Report
Operations and
Maintenance

ENROLL NO. 520822367

22

ANIL KUMAR

In the previous model, the requirement analysis phase is mentioned as analysis


and planning. Planning is a critical activity in the software development. In this
model, the sequence of activity is: requirement analysis, project planning, system
design, detailed design, coding and unit testing, system integration and testing.
Linear ordering of activities is to clearly identify the end of phase and beginning of
other. This is done by verification and validation. In each phase, there is some
defined output that can be evaluated and certified. When activity of a phase is
completed then there should be output product of that phase. The outputs of earlier
phases are known as intermediate products. For the coding phase the output is
code. The certified output of a phase that is released for next phase is known as
baseline.

ENROLL NO. 520822367

23

ANIL KUMAR

Context Diagram for Information Flow Representation

DATA FLOW DIAGRAMS

1.0

Administrator

1.1

1.2

Scratch Card /
Spares

Customers/
Retailers

Entry of new
Scratch Card
/ Spare
standard
wise and
company
wise

Scratch Master

No. of
Retailers
receiving
services

Retailer Detail

Update status
of each retailer
on the basis of
dues and
equipments
taken on credit
basic

Retailer transaction Details

Agency Manager Activities

ENROLL NO. 520822367

24

ANIL KUMAR

Software Requirement Specifications

A) System Reference

The objective of BSNL SIM DISTRIBUTION SYSTEM is to help the organization


in automating the whole manual processing of the existing system.

As the system is based on providing the Mobile Prepaid/spare available in


Agency if demanded product is not available then provide suitable alternate.
Calculation of dues on the Customers/Retailers, calculation of amount require a
high level of accuracy is maintained throughout the whole processing. Manual
maintenance and calculations are error prone and are sometimes very time &
resource consuming.

The main aim is thus to make the results accurate, fast and with a minimum
stress on the designer/end user.

B) Overall Description

This software titled BSNL SIM DISTRIBUTION SYSTEM has been designed for
Vishal Prepaid Agency to make the work efficient and problem free & accurate
with easiness.

The main part of the system is the providing the Mobile Prepaid, Spares, and
service through company trained technicians & Keeping track of date and time

ENROLL NO. 520822367

25

ANIL KUMAR

of service, which comprises a detailed summary of Customers/Retailers detail,


payment due, Staff activities, Expanses, etc.

C) Information content representation

The main objective to develop the system is to make the accurate & efficient
decisions in different tasks at different time at different situations. The existing
system is manual so Administration/Customers/Retailers/Company and staff of
the unit generally face a lot of embarrassing situations many times.

Now they need to automate the whole process so as to make it more easy and
accurate. As they need to expand their work and hence their workload shall
increase so they require a reliable, efficient and supportive system. Different
people who are working under the organization handle their different tasks.
Hence, to perform all the functions under one system is required.

Therefore, a prototyping approach was followed. After the initial study, the
complete picture of the system came into mind and the process started. Initial
designing was also made clear to the users so that they are satisfied with the
content or if they require something more or enhanced.

ENROLL NO. 520822367

26

ANIL KUMAR

Functional Description
A)

Processing Narrative
Main functions used in the system, which further have sub-function, are defined
as:

Scratch Cards receiving (Dump) from Company (Air tel,


Hutch, Reliance, etc)

Mobile / Spare receiving from company (Nokia,


Samsung, LG, Motorola, etc.)

Sales of Scratch

Replacement of Mobile (warranty and out of warranty)

Customers

Retailer Master

Issue to retailer / receiving from retailer

Staff selection (appointment)

Spare entry, Uses, and fixing MRP

Due/advances details

Selection of a mechanic for a service.

Billing

Expanses maintenance

Issue of ordered equipments to retailers/customers

Issue of Indent to company

Issue of service slip.

Attendance Maintenance (Day by Day)

ENROLL NO. 520822367

27

ANIL KUMAR

B)

Staff salary, etc.

Limitation

Along with a lot of benefits, the system has certain restrictions while execution,
which are as follows:

Immense care has to be taken while entering data because


any mistake in entering data in any of the fields might result in innumerable
numbers of wrong answers in the series of reports generated.

Because the proposed project is based on a highly calculation


of data, therefore implementation, evaluation and maintenance phases are
going to be very tedious and time consuming also.

Further enhancement of the system may be required after


implementation.

ENROLL NO. 520822367

28

ANIL KUMAR

C)

Performance Requirements

The major performance objectives of the exploration and testing system are:

Reduce the errors generated by the manual system like; a


minor mistake in data entry may result in major variations in the results. So a
very high level of accuracy has to be maintained.

Reduce the time spent in performing typical maths


calculations based on the observations.

Reduce the manpower needed to evaluate the whole lot of


factors after testing. Even a single but reliable. person/user/operators of the
existing system can easily work on the system.

ENROLL NO. 520822367

29

ANIL KUMAR

Design

Design is a meaningful engineering representation of something that is to be built. It


can be traced to a customers requirements and at the same time assessed for
quality against a set of predefined criteria for good design. Design focuses on the
following major areas of concern: data, architecture and interfaces.

A)

Data Design

Database structure, any external file structures, internal data structures are all
defined on next page as:

ENROLL NO. 520822367

30

ANIL KUMAR

TABLE STRUCTURE
ADVERTISEMEMENT
AD_CD
DESCRIPTION
DT
AMT
AUTH
AD_TYPE
REMARKS

NUMBER(5)
VARCHAR2(30)
DATE
NUMBER(8,2)
VARCHAR2(30)
VARCHAR2(15)
VARCHAR2(20)

BILL
BILL_CD
DISCRIPTION
S_NO
PERSON
AMT
DT
P_MODE
AUTH
NO_REC
REMARK

NUMBER(5)
VARCHAR2(10)
VARCHAR2(10)
VARCHAR2(30)
NUMBER(8,2)
DATE
CHAR(1)
VARCHAR2(10)
NUMBER(7)
VARCHAR2(56)

COMPANY_MASTER
COMPANY_CD
NAME
ADDRESS
TEL1
TEL2
FAX
E_MAIL
MOBILE
CONTECT_PER
DUE
REMARK
NO_REC

NOT NULL NUMBER(4)


VARCHAR2(20)
VARCHAR2(21)
VARCHAR2(12)
VARCHAR2(12)
VARCHAR2(12)
VARCHAR2(28)
VARCHAR2(14)
VARCHAR2(14)
NUMBER(10,2)
VARCHAR2(30)
NUMBER(7)

DUMP_FROM_COMP
DUMP_CD
COMPANY_CD
PREPAID_TYPE_ID1
PREPAID_TYPE_ID2
PREPAID_TYPE_ID3
ENROLL NO. 520822367

NUMBER(4)
NUMBER(4)
NUMBER(3)
NUMBER(3)
NUMBER(3)
31

ANIL KUMAR

PREPAID_TYPE_ID4
PREPAID_TYPE_ID5
QTY1
QTY2
QTY3
QTY4
QTY5
D_DT
TOTAL_MRP
TOTAL_DEALER_PRICE
AUTH
REMARK
NO_REC

NUMBER(3)
NUMBER(3)
NUMBER(4)
NUMBER(4)
NUMBER(4)
NUMBER(4)
NUMBER(4)
DATE
NUMBER(10,2)
NUMBER(10,2)
VARCHAR2(20)
VARCHAR2(30)
NUMBER(7)

EXPANCE
EXP_CD
S_NO
EXP_TYPE
AMT
DT
P_MODE
AUTH
REMARK
NO_REC

NUMBER(5)
VARCHAR2(10)
CHAR(1)
NUMBER(10)
DATE
CHAR(1)
VARCHAR2(10)
VARCHAR2(56)
NUMBER(7)

ISSUE_TO_RETAILER
RISSUE_CD
RE_CD
COMPANY_CD
PREPAID_TYPE_ID1
PREPAID_TYPE_ID2
PREPAID_TYPE_ID3
PREPAID_TYPE_ID4
PREPAID_TYPE_ID5
QTY1
QTY2
QTY3
QTY4
QTY5
I_DT
TOTAL_MRP
TOTAL_DEALER_PRICE
AUTH
NO_REC
REMARK

ENROLL NO. 520822367

NUMBER(4)
NUMBER(3)
NUMBER(4)
NUMBER(3)
NUMBER(3)
NUMBER(3)
NUMBER(3)
NUMBER(3)
NUMBER(4)
NUMBER(4)
NUMBER(4)
NUMBER(4)
NUMBER(4)
DATE
NUMBER(10,2)
NUMBER(10,2)
VARCHAR2(20)
NUMBER(7)
VARCHAR2(30)

32

ANIL KUMAR

ISSUE_TO_STAFF
SISSUE_CD
STAFF_CD
COMPANY_CD
PREPAID_TYPE_ID1
PREPAID_TYPE_ID2
PREPAID_TYPE_ID3
PREPAID_TYPE_ID4
PREPAID_TYPE_ID5
QTY1
QTY2
QTY3
QTY4
QTY5
I_DT
TOTAL_MRP
TOTAL_DEALER_PRICE
AUTH
NO_REC
REMARK

NUMBER(4)
NUMBER(3)
NUMBER(4)
NUMBER(3)
NUMBER(3)
NUMBER(3)
NUMBER(3)
NUMBER(3)
NUMBER(4)
NUMBER(4)
NUMBER(4)
NUMBER(4)
NUMBER(4)
DATE
NUMBER(10,2)
NUMBER(10,2)
VARCHAR2(20)
NUMBER(7)
VARCHAR2(30)

LOGIN_MANAGER
LOGIN_NM
PASS
REMARK

VARCHAR2(30)
VARCHAR2(20)
VARCHAR2(50)

MARKET_STAFF_MASTER
S_CD
NAME
ADDRESS
TEL
SEX
MARID
E_QUAL
P_QUAL
D_O_B
D_O_J
PREV_EXP
STAFF_CAT
CONDUCT
DUES
ADVANCE
REMARK
NO_REC

ENROLL NO. 520822367

NUMBER(3)
VARCHAR2(25)
VARCHAR2(25)
NUMBER(12)
CHAR(1)
CHAR(1)
VARCHAR2(20)
VARCHAR2(20)
DATE
DATE
NUMBER(2)
NUMBER(3)
CHAR(1)
NUMBER(6,2)
NUMBER(7,2)
VARCHAR2(35)
NUMBER(7)

33

ANIL KUMAR

PREPAID_DUMP
DUMP_CD
COMPANY_CD
DT_DUMP
CONSIGN_NO
REMARK
NO_REC

NUMBER(5)
NUMBER(4)
DATE
VARCHAR2(15)
VARCHAR2(56)
NUMBER(7)

PREPAID_MASTER
PREPAID_TYPE_ID
NAME
MRP
DEALER_PRICE
VALIDITY_DAYS
COMPANY_CD
NO_REC
REMARK

NUMBER(3)
VARCHAR2(30)
NUMBER(6,2)
NUMBER(6,2)
NUMBER(3)
NUMBER(4)
NUMBER(7)
VARCHAR2(35)

RETAILER_MASTER
RE_CD
NAME
ADDRESS
TEL1
TEL2
E_MAIL
MOBILE
FAX
D_O_B
D_O_R
OTH_OCCU
E_QUALI
P_QUALI
DUES
REMARK
SEX
NO_REC

NOT NULL NUMBER(4)


VARCHAR2(20)
VARCHAR2(21)
NUMBER(13)
NUMBER(13)
VARCHAR2(30)
NUMBER(10)
NUMBER(20)
DATE
DATE
VARCHAR2(20)
VARCHAR2(20)
VARCHAR2(20)
NUMBER(8,2)
VARCHAR2(25)
CHAR(1)
NUMBER(7)

RETURN_FROM_RETAILER
RRETURN_CD
RE_CD
COMPANY_CD
PREPAID_TYPE_ID1
PREPAID_TYPE_ID2
PREPAID_TYPE_ID3
PREPAID_TYPE_ID4
PREPAID_TYPE_ID5
QTY1
QTY2
ENROLL NO. 520822367

NUMBER(4)
NUMBER(4)
NUMBER(4)
NUMBER(3)
NUMBER(3)
NUMBER(3)
NUMBER(3)
NUMBER(3)
NUMBER(4)
NUMBER(4)
34

ANIL KUMAR

QTY3
QTY4
QTY5
R_DT
TOTAL_MRP
TOTAL_DEALER_PRICE
AUTH
NO_REC
REMARK

NUMBER(4)
NUMBER(4)
NUMBER(4)
DATE
NUMBER(10,2)
NUMBER(10,2)
VARCHAR2(20)
NUMBER(7)
VARCHAR2(30)

RETURN_FROM_STAFF
SRETURN_CD
S_CD
COMPANY_CD
PREPAID_TYPE_ID1
PREPAID_TYPE_ID2
PREPAID_TYPE_ID3
PREPAID_TYPE_ID4
PREPAID_TYPE_ID5
QTY1
QTY2
QTY3
QTY4
QTY5
R_DT
TOTAL_MRP
TOTAL_DEALER_PRICE
AUTH
NO_REC
REMARK

NUMBER(4)
NUMBER(3)
NUMBER(4)
NUMBER(3)
NUMBER(3)
NUMBER(3)
NUMBER(3)
NUMBER(3)
NUMBER(4)
NUMBER(4)
NUMBER(4)
NUMBER(4)
NUMBER(4)
DATE
NUMBER(10,2)
NUMBER(10,2)
VARCHAR2(20)
NUMBER(7)
VARCHAR2(30)

RETURN_TO_COMP
RETURN_CD
COMPANY_CD
PREPAID_TYPE_ID1
PREPAID_TYPE_ID2
PREPAID_TYPE_ID3
PREPAID_TYPE_ID4
PREPAID_TYPE_ID5
QTY1
QTY2
QTY3
QTY4
QTY5
R_DT
TOTAL_MRP
TOTAL_DEALER_PRICE
ENROLL NO. 520822367

NUMBER(4)
NUMBER(4)
NUMBER(3)
NUMBER(3)
NUMBER(3)
NUMBER(3)
NUMBER(3)
NUMBER(4)
NUMBER(4)
NUMBER(4)
NUMBER(4)
NUMBER(4)
DATE
NUMBER(10,2)
NUMBER(10,2)
35

ANIL KUMAR

AUTH
NO_REC
REMARK

VARCHAR2(20)
NUMBER(7)
VARCHAR2(30)

STAFF_ATTENDANCE
ST_CD
MONTH
ATTD
REMARK

NUMBER(4)
VARCHAR2(15)
NUMBER(2)
VARCHAR2(50)

STAFF_GRADE
JOB_CD
DESCRIPTION
BASIC
DA
PF
HRA
PER_D_DAM
REMARK

NUMBER(3)
VARCHAR2(30)
NUMBER(7,2)
NUMBER(6,2)
NUMBER(6,2)
NUMBER(6,2)
NUMBER(6,2)
VARCHAR2(50)

STAFF_MASTER
STAFF_CD
NM
ADDR
TEL
MOBIL
E_QUILY
P_QUILY
JOB_CD
DATE_OF_J
DOB
REMARK

NUMBER(4)
VARCHAR2(25)
VARCHAR2(20)
VARCHAR2(10)
VARCHAR2(10)
VARCHAR2(12)
VARCHAR2(12)
NUMBER(3)
DATE
DATE
VARCHAR2(50)

STAFFF_SALARY
SAL_CD
S_CD
BASIC
HRA
DA
BONUS
ARIAR
UN
OTHER_DED
PF
ENROLL NO. 520822367

NUMBER(4)
NUMBER(4)
NUMBER(6,2)
NUMBER(6,2)
NUMBER(6,2)
NUMBER(6,2)
NUMBER(6,2)
NUMBER(6,2)
NUMBER(6,2)
NUMBER(6,2)
36

ANIL KUMAR

LOAN_AMT
TOT_GAIN
OTHER_GAIN
NET_PAY
TOT_DED
DT
AUTH
P_MODE
REMARK
NAME
ADR

NUMBER(8,2)
NUMBER(7,2)
NUMBER(6,2)
NUMBER(8,2)
NUMBER(7,2)
DATE
VARCHAR2(20)
CHAR(1)
VARCHAR2(50)
VARCHAR2(20)
VARCHAR2(30)

TAX_PAYMENT
TP_CD
TAX_TYPE
TAX_RECIPT_NO
AMT
DT
P_MODE
AUTH
NO_REC
REMARK

ENROLL NO. 520822367

NUMBER(5)
CHAR(1)
VARCHAR2(10)
NUMBER(8,2)
DATE
CHAR(1)
VARCHAR2(10)
NUMBER(7)
VARCHAR2(56)

37

ANIL KUMAR

B)

Interface Design

Design of inputs and outputs are important features of design specifications.


The input design is the link that ties the information system into the world of its
users. Output is the main reason for developing the system and the basis on
which they evaluate the usefulness of the application.

I. Input Design

II. Output Design

Input Design (Input Screens)

The design decisions for handling input specify how data are accepted for
computer processing. Analysts decide whether the data are entered directly, or by
using source documents, such as variable forms where the data are transferred
into the computer for processing. Input design features can ensure the reliability of
the system and produce results from accurate data, or they can result in erroneous
information. The input design also determines whether the user can interact
efficiently with the system. Six objectives guiding the design of the input focus on:

Effectiveness

Accuracy

Ease to use

Consistency

ENROLL NO. 520822367

38

ANIL KUMAR

Simplicity

Attractiveness

All the above-mentioned features were kept in mind while designing the input
screens for the automated system of BSNL SIM DISTRIBUTION SYSTEM. As the
user will only like to work on the system if only it makes appeal to them. Additional
tools like Internet Explorer are also provided to the user.

ENROLL NO. 520822367

39

ANIL KUMAR

ENROLL NO. 520822367

40

ANIL KUMAR

Output Design (Reports)

One of the most important features of an automated system for users is the output
it produces. Output is information delivered to users through the information
system. Without quality output, the entire system may appear to be unnecessary
and users will avoid using it. In order to create the most useful output possible there
need to be an interaction with the user, until the result is considered to be
satisfactory.

Following objectives were kept in mind while designing acceptable outputs for the
automated system of BSNL SIM DISTRIBUTION SYSTEM:

Outputs were designed to serve the intended purpose.

Outputs were designed to fit the users need.

Appropriate quantity of output is delivered.

Output is where it is needed.

Output is provided on time.

Right output method is chosen (i.e. a report, a document or a


message. All the output are shown in report section.)

ENROLL NO. 520822367

41

ANIL KUMAR

OUTPUT DESIGN : REPORTS

ENROLL NO. 520822367

42

ANIL KUMAR

Coding

The design must be translated into a machine-readable form. Coding step performs
this task. If design is performed in a detailed manner, coding can be accomplished
mechanistically. Coding may involve unit testing and debugging. In development of
the automated system for BSNL SIM DISTRIBUTION SYSTEM Visual Basic 6.0
and Data Report are used. Oracle 8i is used as a database to store the data.

ENROLL NO. 520822367

43

ANIL KUMAR

LOGIN FORM

LOGIN
GENERAL SECTION
Dim db As Connection
Dim rs As Recordset
Dim x As Variant

Coding of login command


Private Sub LOGIN_Click()
Set rs = New Recordset
rs.Open "select * from login_manager where login_nm ='" & LOGIN.Text & "'and
PWD.Text & "'", db, adOpenStatic, adLockOptimistic

pass ='" &

If rs.RecordCount >= 1 Then


MsgBox ("Wellcome User")
Else
x=x+1
MsgBox ("User Id Or Password if Failed")
login.Text = ""
pwd.Text = ""
login.SetFocus
If x >= 3 Then
MsgBox ("You are invalied User")
Unload Me
End If
End If

End Sub
Coding of exit command
Private Sub EXIT_Click()
End

End Sub

Foam_load
Private Sub Form_Load()
x=0
Set db = New Connection
Set rs = New Recordset
db.Open "provider=msdasql;dsn=form1;uid=cell;pwd=setup"
rs.Open "select login_nm, pass from login_manager", db, adOpenStatic,

adLockOptimistic

End Sub

Coding of timer to displaylabels and lines


ENROLL NO. 520822367

44

ANIL KUMAR

Private Sub Timer1_Timer()


If Label5.Visible = True Then
Label6.Visible = True
Label5.Visible = False
Else
Label5.Visible = True
Label6.Visible = False
End If
Line1.BorderStyle = 2 * 3 * Rnd
Line4.BorderStyle = 1 * 4 * Rnd

End Sub

ENROLL NO. 520822367

45

ANIL KUMAR

RETURN-FROM-STAFF
GENERAL SECTION
Dim db As Connection
Dim rs As Recordset
Dim M As Integer
Dim X As Integer
Dim Y As Integer
AUTOMATICALY DISPLAY DATE
Private Sub DT_GotFocus()
DT.Text = Date
End Sub
COADING OF EXIT COMMAND
Private Sub exit_Click()
Unload Me
End Sub
FORM LOAD
Private Sub Form_Load()
DAT.Caption = Date
Set db = New Connection
Set rs = New Recordset
db.Open "provider=msdasql;dsn=FORM1;uid=CELL;pwd=SETUP;"
rs.Open "select * from advertisement", db, adOpenStatic, adLockOptimistic
disp
With AD_TYPE
.AddItem "Poster"
.AddItem "Banner"
.AddItem "Wall Painting"
.AddItem "Hoarding"
.AddItem "stall"
.AddItem "Announcement"
.AddItem "Others"
End With
f=0
End Sub

FUNCTION(DISP) FOR DISPLAY RECORDS


Public Sub DISP()

ENROLL NO. 520822367

46

ANIL KUMAR

If rs.RecordCount >= 1 Then


AD_CD.Text = rs!AD_CD
DESCRIPTION.Text = rs!DESCRIPTION
DT.Text = rs!DT
AMOUNT.Text = rs!AMT
AUTHOR.Text = rs!AUTH
AD_TYPE.Text = rs!AD_TYPE
REMARK.Text = rs!REMARKS
Else
MsgBox ("No records in Database ... ")
End If
END SUB
COADING OF SAVE COMMAND
Private Sub SAVE_Click()
If f = 1 Then
rs.AddNew
End If
rs!AD_CD = AD_CD.Text
rs!DESCRIPTION = DESCRIPTION.Text
rs!DT = DT.Text
rs!AMT = AMOUNT.Text
rs!AUTH = AUTHOR.Text
rs!AD_TYPE = AD_TYPE.Text
rs!REMARKS = REMARK.Text
rs.UPDATE
If f = 1 Then
MsgBox ("A new record added ... ")
Else
MsgBox ("Previous record updated properly ... ")
End If
f=0
End Sub
COADING OF TIMER
Private Sub Timer1_Timer()
Shape1.BorderColor = vbRed * Rnd
Tm.Caption = Time
End Sub

COADING FOR NEW COMMAND


Private Sub add_Click()
f=1
If rs.RecordCount = 0 Then
tad_cd = 21000
Else
rs.MoveLast
tad_cd = rs!AD_CD + 1
End If
AD_CD.Text = tad_cd

ENROLL NO. 520822367

47

ANIL KUMAR

DESCRIPTION.Text = ""
DT.Text = Date
AUTHOR.Text = ""
AMOUNT.Text = ""
AD_TYPE.Text = "banner"
REMARK.Text = ""
DESCRIPTION.SetFocus
End Sub
COADING FOR DELETE COMMAND
Private Sub DELETE_Click()
On Error Resume Next
If rs.RecordCount >= 1 Then
rs.DELETE
Else
MsgBox "No records to delete"
End If
End Sub
COADING TO DISPLAY FIRST RECORD
Private Sub first_Click()
On Error Resume Next
Y=0
If X > 1 Then
MsgBox "END OF RECORDS"
End If
If rs.RecordCount >= 1 Then
rs.MoveFirst
CALL2
X=2
Else
MsgBox "NO RECORDS !"
End If
End Sub
COADING TO DISPLAY LAST RECORD
Private Sub last_Click()
On Error Resume Next
X=0
If Y > O Then
MsgBox "END OF RECORDS"
End If
If rs.RecordCount >= 1 Then
rs.MoveLast
CALL2
Y=1
Else
MsgBox "END OF RECORDS !"
End If
End Sub
COADING TO DISPLAY NEXT RECORD
Private Sub next_Click()
On Error Resume Next
X=0

ENROLL NO. 520822367

48

ANIL KUMAR

If rs.RecordCount >= 1 Then


rs.MoveNext
CALL2
End If
If rs.EOF = True Then
MsgBox "SORRY ! THE DATABASE END...."
rs.MoveLast
CALL2
End If
End Sub

COADING TO DISPLAY PREVIOUS RECORD


Private Sub PREVIOUS_Click()
On Error Resume Next
Y=0
If rs.RecordCount >= 1 Then
Rs.MovePrevious
CALL2
End If
If rs.BOF = True Then
MsgBox "SORRY !
rs.MoveFirst
CALL2
End If
End Sub

NO RECORDS TO DISPAY"

COADING FOR SEARCH COMMAND


Private Sub SEARCH_Click()
If AD_CD.Text <> "" Then
If rs.RecordCount >= 1 Then
Do While rs.EOF <> True
If AD_CD.Text = rs!AD_CD Then
disp
End If
rs.MoveNext
Loop
Else
MsgBox "NO RECORDS IN DATABASE"
End If
Else
MsgBox "PLEASE ENTER ANY VALUE IN AD_CD"
End If
End Sub

ENROLL NO. 520822367

49

ANIL KUMAR

BILL
GENERAL SECTION
Dim db As Connection
Dim rs As Recordset
Dim M As Integer
Dim X As Integer
Dim Y As Integer

AUTOMATICALY DISPLAY DATE


Private Sub DT_GotFocus()
DT.Text = Date
End Sub

COADING OF EXIT COMMAND


Private Sub exit_Click()

Unload Me
End Sub

FORM LOAD
Private Sub Form_Load()
DAT.Caption = Date
Set db = New ADODB.Connection
Set rs = New ADODB.Recordset
db.Open "PROVIDER=MSDASQL;DSN=FORM1;UID=CELL;PWD=SETUP"
rs.Open "SELECT BILL_CD,DISCRIPTION,S_NO,PERSON, AMT,DT,P_MODE
AUTH,no_rec,REMARK FROM BILL ORDER BY NO_REC,BILL_CD ASC",
db, adOpenStatic,
adLockOptimistic
End Sub

FUNCTION(CALL1) FOR CLEAR THE CONTENTS


Private Sub CALL1()
DESCRIPTION.Text = ""
S_NO.Text = ""
PERSON.Text = ""
AMT.Text = ""
AUTH.Text = ""
REMARK.Text = ""
DT.Text = ""
End Sub

FUNCTION(CALL2) FOR DISPLAY RECORDS


Public Sub CALL2()
BILL_CD.Text = rs!BILL_CD
DESCRIPTION.Text = rs!DISCRIPTION
S_NO.Text = rs!S_NO
PERSON.Text = rs!PERSON
AMT.Text = rs!AMT
AUTH.Text = rs!AUTH
ENROLL NO. 520822367

50

ANIL KUMAR

REMARK.Text = rs!REMARK
NO_REC.Text = rs!NO_REC
If rs!p_mode = "A" Then
CA.Value = True
End If
If rs!p_mode = "B" Then
CH.Value = True
End If
If rs!p_mode = "C" Then
DR.Value = True
End If
If rs!p_mode = "D" Then
OT.Value = True
End If
DT.Text = rs!DT
End Sub

COADING OF SAVE COMMAND


Private Sub SAVE_Click()
If M = 1 Then
CALL3
rs.SAVE
Else
MsgBox "PLEASE INSERT A NEW RECORD BY CLICK ON NEW"
End If
M=0
End Sub

COADING OF TIMER
Private Sub Timer1_Timer()
Shape1.BorderColor = vbRed * Rnd
Tm.Caption = Time
End Sub

COADING OF UPDATE
Private Sub update_Click()
If rs.RecordCount >= 1 Then
CALL3
rs.UPDATE
Else
MsgBox "NO RECORDS"
End If
End Sub

FUNCTION(CALL3) FOR SAVING RECORDS


Public Sub CALL3()
rs!BILL_CD = BILL_CD.Text
rs!DISCRIPTION = DESCRIPTION.Text
rs!S_NO = S_NO.Text
rs!PERSON = PERSON.Text
rs!AMT = AMT.Text
rs!AUTH = AUTH.Text
rs!REMARK = REMARK.Text
rs!NO_REC = NO_REC.Text
ENROLL NO. 520822367

51

ANIL KUMAR

If CA.Value = True Then


rs!p_mode = "A"
End If
If CH.Value = True Then
rs!p_mode = "B"
End If
If DR.Value = True Then
rs!p_mode = "C"
End If
If OT.Value = True Then
rs!p_mode = "D"
End If
rs!DT = DT.Text
End Sub
COADING FOR NEW COMMAND
Private Sub add_Click()
M=1
If rs.RecordCount >= 1 Then
rs.MoveLast
NO_REC.Text = Val(rs!NO_REC) + 1
BILL_CD.Text = Val(rs!BILL_CD) + 1
Else
NO_REC.Text = 1
BILL_CD.Text = 1
End If
CALL1
rs.AddNew
BILL_CD.SetFocus
End Sub

COADING FOR DELETE COMMAND


Private Sub DELETE_Click()
On Error Resume Next
If rs.RecordCount >= 1 Then
rs.DELETE
CALL2
Else
MsgBox "No records to delete"
End If
If rs.EOF = True Then
MsgBox "END OF RECORDS"
End If
End Sub

COADING TO DISPLAY FIRST RECORD


Private Sub first_Click()
On Error Resume Next
Y=0
If X > 1 Then
MsgBox "END OF RECORDS"
End If

ENROLL NO. 520822367

52

ANIL KUMAR

If rs.RecordCount >= 1 Then


rs.MoveFirst
CALL2
X=2
Else
MsgBox "NO RECORDS !"
End If
End Sub

COADING TO DISPLAY LAST RECORD


Private Sub last_Click()
On Error Resume Next
X=0
If Y > O Then
MsgBox "END OF RECORDS"
End If
If rs.RecordCount >= 1 Then
rs.MoveLast
CALL2
Y=1
Else
MsgBox "END OF RECORDS !"
End If
End Sub

COADING TO DISPLAY NEXT RECORD


Private Sub next_Click()
On Error Resume Next
X=0
If rs.RecordCount >= 1 Then
rs.MoveNext
CALL2
End If
If rs.EOF = True Then
MsgBox "SORRY ! THE DATABASE END...."
rs.MoveLast
CALL2
End If
End Sub

COADING TO DISPLAY LAST RECORD


Private Sub PREVIOUS_Click()
On Error Resume Next
Y=0
If rs.RecordCount >= 1 Then
Rs.MovePrevious
CALL2
End If
If rs.BOF = True Then
MsgBox "SORRY !
rs.MoveFirst
CALL2
End If

NO RECORDS TO DISPAY"

ENROLL NO. 520822367

53

ANIL KUMAR

End Sub

COADING FOR SEARCH COMMAND


Private Sub SEARCH_Click()
rs.MoveFirst
If BILL_CD.Text <> " " Then
Do While rs.EOF <> True
If rs!BILL_CD = BILL_CD.Text Then
CALL2
Exit Do
End If
rs.MoveNext
Loop
Else
MsgBox "PLEASE ENTER THE VALUE IN BILL_CD "
End If
If rs.EOF = True Then
MsgBox "NO SUCH RECORDS"
End If
End Sub

ENROLL NO. 520822367

54

ANIL KUMAR

COMPANY - MASTER
GENERAL SECTION
Dim db As Connection
Dim rs As Recordset
Dim M As Integer
Dim X As Integer
Dim Y As Integer

AUTOMATICALY DISPLAY DATE


Private Sub DT_GotFocus()
DT.Text = Date
End Sub

COADING OF EXIT COMMAND


Private Sub exit_Click()

Unload Me
End Sub

FORM LOAD
Private Sub Form_Load()
DT.Caption = Date
Set db = New ADODB.Connection
Set rs = New ADODB.Recordset
db.Open "provider=msdasql;dsn=form1;uid=cell;pwd=setup"
rs.Open "select company_cd,name,address,tel1,tel2,fax,e_mail,mobile,contect_per
from company_master", db, adOpenStatic, adLockOptimistic
End Sub

,due,remark,no_rec

FUNCTION(CALL1) FOR CLEAR THE CONTENTS


Private Sub CALL1()
NAME1.Text = ""
ADDRESS.Text = ""
TEL1.Text = ""
TEL2.Text = ""
E_MAIL.Text = ""
MOBILE.Text = ""
FAX.Text = ""
contect_per.Text = ""
DUES.Text = ""
REMARK.Text = ""
End Sub

FUNCTION(CALL2) FOR DISPLAY RECORDS


Public Sub CALL2()
COMPANY_CD.Text = rs!COMPANY_CD
NAME1.Text = rs!NAME
ADDRESS.Text = rs!ADDRESS
TEL1.Text = rs!TEL1
TEL2.Text = rs!TEL2
ENROLL NO. 520822367

55

ANIL KUMAR

E_MAIL.Text = rs!E_MAIL
MOBILE.Text = rs!MOBILE
FAX.Text = rs!FAX
CONTECT_PER.TEXT=rs!CONTECT_PER
DUES.Text = rs!DUE
REMARK.Text = rs!REMARK
NO_REC.Text = Val(rs!NO_REC)
End Sub

COADING OF SAVE COMMAND


Private Sub SAVE_Click()
If M = 1 Then
CALL3
rs.SAVE
Else
MsgBox "PLEASE INSERT A NEW RECORD BY CLICK ON NEW"
End If
M=0
End Sub

COADING OF TIMER
Private Sub Timer1_Timer()
Shape1.BorderColor = vbRed * Rnd
Tm.Caption = Time
End Sub

COADING OF UPDATE
Private Sub update_Click()
If rs.RecordCount >= 1 Then
CALL3
rs.UPDATE
Else
MsgBox "NO RECORDS"
End If
End Sub

FUNCTION(CALL2) FOR SAVING RECORDS


Public Sub CALL2()
rs!COMPANY_CD = COMPANY_CD.Text
rs!NAME = NAME1.Text
rs!ADDRESS = ADDRESS.Text
rs!TEL1 = TEL1.Text
rs!TEL2 = TEL2.Text
rs!E_MAIL = E_MAIL.Text
rs!MOBILE = MOBILE.Text
rs!FAX = FAX.Text
rs!contect_per = contect_per.Text
rs!DUE = DUES.Text
rs!REMARK = REMARK.Text
rs!NO_REC = NO_REC.Text
End Sub
COADING FOR NEW COMMAND
Private Sub add_Click()
ENROLL NO. 520822367

56

ANIL KUMAR

M=1
If rs.RecordCount >= 1 Then
rs.MoveLast
NO_REC.Text = Val(rs!NO_REC) + 1
BILL_CD.Text = Val(rs!BILL_CD) + 1
Else
NO_REC.Text = 1
BILL_CD.Text = 1
End If
CALL1
rs.AddNew
BILL_CD.SetFocus
End Sub

COADING FOR DELETE COMMAND


Private Sub DELETE_Click()
On Error Resume Next
If rs.RecordCount >= 1 Then
rs.DELETE
CALL2
Else
MsgBox "No records to delete"
End If
If rs.EOF = True Then
MsgBox "END OF RECORDS"
End If
End Sub

COADING TO DISPLAY FIRST RECORD


Private Sub first_Click()
On Error Resume Next
Y=0
If X > 1 Then
MsgBox "END OF RECORDS"
End If
If rs.RecordCount >= 1 Then
rs.MoveFirst
CALL2
X=2
Else
MsgBox "NO RECORDS !"
End If
End Sub

COADING TO DISPLAY LAST RECORD


Private Sub last_Click()
On Error Resume Next
X=0
If Y > O Then
MsgBox "END OF RECORDS"
End If

ENROLL NO. 520822367

57

ANIL KUMAR

If rs.RecordCount >= 1 Then


rs.MoveLast
CALL2
Y=1
Else
MsgBox "END OF RECORDS !"
End If
End Sub

COADING TO DISPLAY NEXT RECORD


Private Sub next_Click()
On Error Resume Next
X=0
If rs.RecordCount >= 1 Then
rs.MoveNext
CALL2
End If
If rs.EOF = True Then
MsgBox "SORRY ! THE DATABASE END...."
rs.MoveLast
CALL2
End If
End Sub

COADING TO DISPLAY LAST RECORD


Private Sub PREVIOUS_Click()
On Error Resume Next
Y=0
If rs.RecordCount >= 1 Then
Rs.MovePrevious
CALL2
End If
If rs.BOF = True Then
MsgBox "SORRY !
rs.MoveFirst
CALL2
End If
End Sub

NO RECORDS TO DISPAY"

COADING FOR SEARCH COMMAND


Private Sub SEARCH_Click()
rs.MoveFirst
If BILL_CD.Text <> " " Then
Do While rs.EOF <> True
If rs!BILL_CD = BILL_CD.Text Then
CALL2
Exit Do
End If
rs.MoveNext
Loop

ENROLL NO. 520822367

58

ANIL KUMAR

Else
MsgBox "PLEASE ENTER THE VALUE IN BILL_CD "
End If
If rs.EOF = True Then
MsgBox "NO SUCH RECORDS"
End If
End Sub

ENROLL NO. 520822367

59

ANIL KUMAR

COMPANY - MASTER
GENERAL SECTION
Dim db As Connection
Dim rs As Recordset
Dim M As Integer
Dim X As Integer
Dim Y As Integer

AUTOMATICALY DISPLAY DATE


Private Sub DT_GotFocus()
DT.Text = Date
End Sub

COADING OF EXIT COMMAND


Private Sub exit_Click()

Unload Me
End Sub

FORM LOAD
Private Sub Form_Load()
DT.Caption = Date
Set db = New ADODB.Connection
Set rs = New ADODB.Recordset
db.Open "provider=msdasql;dsn=form1;uid=cell;pwd=setup"
rs.Open "select company_cd,name,address,tel1,tel2,fax,e_mail,mobile,contect_per
from company_master", db, adOpenStatic, adLockOptimistic
End Sub

,due,remark,no_rec

FUNCTION(CALL1) FOR CLEAR THE CONTENTS


Private Sub CALL1()
NAME1.Text = ""
ADDRESS.Text = ""
TEL1.Text = ""
TEL2.Text = ""
E_MAIL.Text = ""
MOBILE.Text = ""
FAX.Text = ""
contect_per.Text = ""
DUES.Text = ""
REMARK.Text = ""
End Sub

FUNCTION(CALL2) FOR DISPLAY RECORDS


Public Sub CALL2()
COMPANY_CD.Text = rs!COMPANY_CD
NAME1.Text = rs!NAME
ADDRESS.Text = rs!ADDRESS
TEL1.Text = rs!TEL1
TEL2.Text = rs!TEL2
ENROLL NO. 520822367

60

ANIL KUMAR

E_MAIL.Text = rs!E_MAIL
MOBILE.Text = rs!MOBILE
FAX.Text = rs!FAX
CONTECT_PER.TEXT=rs!CONTECT_PER
DUES.Text = rs!DUE
REMARK.Text = rs!REMARK
NO_REC.Text = Val(rs!NO_REC)
End Sub

COADING OF SAVE COMMAND


Private Sub SAVE_Click()
If M = 1 Then
CALL3
rs.SAVE
Else
MsgBox "PLEASE INSERT A NEW RECORD BY CLICK ON NEW"
End If
M=0
End Sub

COADING OF TIMER
Private Sub Timer1_Timer()
Shape1.BorderColor = vbRed * Rnd
Tm.Caption = Time
End Sub

COADING OF UPDATE
Private Sub update_Click()
If rs.RecordCount >= 1 Then
CALL3
rs.UPDATE
Else
MsgBox "NO RECORDS"
End If
End Sub

FUNCTION(CALL2) FOR SAVING RECORDS


Public Sub CALL2()
rs!COMPANY_CD = COMPANY_CD.Text
rs!NAME = NAME1.Text
rs!ADDRESS = ADDRESS.Text
rs!TEL1 = TEL1.Text
rs!TEL2 = TEL2.Text
rs!E_MAIL = E_MAIL.Text
rs!MOBILE = MOBILE.Text
rs!FAX = FAX.Text
rs!contect_per = contect_per.Text
rs!DUE = DUES.Text
rs!REMARK = REMARK.Text
rs!NO_REC = NO_REC.Text
End Sub
COADING FOR NEW COMMAND
Private Sub add_Click()
ENROLL NO. 520822367

61

ANIL KUMAR

M=1
If rs.RecordCount >= 1 Then
rs.MoveLast
NO_REC.Text = Val(rs!NO_REC) + 1
BILL_CD.Text = Val(rs!BILL_CD) + 1
Else
NO_REC.Text = 1
BILL_CD.Text = 1
End If
CALL1
rs.AddNew
BILL_CD.SetFocus
End Sub

COADING FOR DELETE COMMAND


Private Sub DELETE_Click()
On Error Resume Next
If rs.RecordCount >= 1 Then
rs.DELETE
CALL2
Else
MsgBox "No records to delete"
End If
If rs.EOF = True Then
MsgBox "END OF RECORDS"
End If
End Sub

COADING TO DISPLAY FIRST RECORD


Private Sub first_Click()
On Error Resume Next
Y=0
If X > 1 Then
MsgBox "END OF RECORDS"
End If
If rs.RecordCount >= 1 Then
rs.MoveFirst
CALL2
X=2
Else
MsgBox "NO RECORDS !"
End If
End Sub

COADING TO DISPLAY LAST RECORD


Private Sub last_Click()
On Error Resume Next
X=0
If Y > O Then
MsgBox "END OF RECORDS"
End If

ENROLL NO. 520822367

62

ANIL KUMAR

If rs.RecordCount >= 1 Then


rs.MoveLast
CALL2
Y=1
Else
MsgBox "END OF RECORDS !"
End If
End Sub

COADING TO DISPLAY NEXT RECORD


Private Sub next_Click()
On Error Resume Next
X=0
If rs.RecordCount >= 1 Then
rs.MoveNext
CALL2
End If
If rs.EOF = True Then
MsgBox "SORRY ! THE DATABASE END...."
rs.MoveLast
CALL2
End If
End Sub

COADING TO DISPLAY LAST RECORD


Private Sub PREVIOUS_Click()
On Error Resume Next
Y=0
If rs.RecordCount >= 1 Then
Rs.MovePrevious
CALL2
End If
If rs.BOF = True Then
MsgBox "SORRY !
rs.MoveFirst
CALL2
End If
End Sub

NO RECORDS TO DISPAY"

COADING FOR SEARCH COMMAND


Private Sub SEARCH_Click()
rs.MoveFirst
If BILL_CD.Text <> " " Then
Do While rs.EOF <> True
If rs!BILL_CD = BILL_CD.Text Then
CALL2
Exit Do
End If
rs.MoveNext
Loop

ENROLL NO. 520822367

63

ANIL KUMAR

Else
MsgBox "PLEASE ENTER THE VALUE IN BILL_CD "
End If
If rs.EOF = True Then
MsgBox "NO SUCH RECORDS"
End If
End Sub

ENROLL NO. 520822367

64

ANIL KUMAR

ISSUE TO - STAFF
GENERAL SECTION
Dim db As Connection
Dim rs As Recordset
Dim M As Integer
Dim X As Integer
Dim Y As Integer

AUTOMATICALY DISPLAY DATE


Private Sub DT_GotFocus()
DT.Text = Date
End Sub

COADING OF EXIT COMMAND


Private Sub exit_Click()

Unload Me
End Sub

FORM LOAD
Private Sub Form_Load()
dat.Caption = Date
Set db = New ADODB.Connection
Set rs = New ADODB.Recordset
db.Open "PROVIDER=MSDASQL;DSN=FORM1;UID=CELL;PWD=SETUP"
rs.OpenSELECT SISSUE_CD,STAFF_CD,COMPANY_CD,PREPAID_TYPE_ID1,
PREPAID_TYPE_ID2,PREPAID_TYPE_ID3,PREPAID_TYPE_ID4,PREPAID_TYPE_ID5,QTY
1,QTY2,QTY3,QTY4,QTY5,I_DT,TOTAL_MRP,TOTAL_DEALER_PRICE,AUTH,no_rec,REMA
RK FROM ISSE_TO_staff", db, adOpenStatic, adLockOptimistic
End Sub

FUNCTION(CALL1) FOR CLEAR THE CONTENTS


Private Sub CALL1()
STAFF_CD.Text = ""
COMPANY_CD.Text = ""
PREPAID_TYPE_ID1.Text = ""
PREPAID_TYPE_ID2.Text = ""
PREPAID_TYPE_ID3.Text = ""
PREPAID_TYPE_ID4.Text = ""
PREPAID_TYPE_ID5.Text = ""
QTY1.Text = ""
QTY2.Text = ""
QTY3.Text = "
QTY4.Text = ""
QTY5.Text = ""
TOTAL_MRP.Text = ""
TOTAL_DEALER_PRICE.Text = ""
AUTH.Text = ""
REMARK.Text = ""
I_DT.Text = ""
End Sub

ENROLL NO. 520822367

65

ANIL KUMAR

FUNCTION(CALL2) FOR DISPLAY RECORDS


Public Sub CALL2()
SISSUE_CD.Text = rs!SISSUE_CD
STAFF_CD.Text = rs!STAFF_CD
COMPANY_CD.Text = rs!COMPANY_CD
PREPAID_TYPE_ID1.Text = rs!PREPAID_TYPE_ID1
PREPAID_TYPE_ID2.Text = rs!PREPAID_TYPE_ID2
PREPAID_TYPE_ID3.Text = rs!PREPAID_TYPE_ID3
PREPAID_TYPE_ID4.Text = rs!PREPAID_TYPE_ID4
PREPAID_TYPE_ID5.Text = rs!PREPAID_TYPE_ID5
QTY1.Text = rs!QTY1
QTY2.Text = rs!QTY2
QTY3.Text = rs!QTY3
QTY4.Text = rs!QTY4
QTY5.Text = rs!QTY5
TOTAL_MRP.Text = rs!TOTAL_MRP
TOTAL_DEALER_PRICE.Text = rs!TOTAL_DEALER_PRICE
AUTH.Text = rs!AUTH
REMARK.Text = rs!remark
NO_REC.Text = rs!NO_REC
I_DT.Text = rs!I_DT
END SUB

COADING OF SAVE COMMAND


Private Sub SAVE_Click()
If M = 1 Then
CALL3
rs.SAVE
Else
MsgBox "PLEASE INSERT A NEW RECORD BY CLICK ON NEW"
End If
M=0
End Sub

COADING OF TIMER
Private Sub Timer1_Timer()
Shape1.BorderColor = vbRed * Rnd
Tm.Caption = Time
End Sub

COADING OF UPDATE
Private Sub update_Click()
If rs.RecordCount >= 1 Then
CALL3
rs.UPDATE
Else
MsgBox "NO RECORDS"
End If
End Sub

FUNCTION(CALL3) FOR SAVING RECORDS


Public Sub CALL3()

ENROLL NO. 520822367

66

ANIL KUMAR

rs!SISSUE_CD = SISSUE_CD.Text
rs!STAFF_CD = STAFF_CD.Text
rs!COMPANY_CD = COMPANY_CD.Text
rs!PREPAID_TYPE_ID1 = PREPAID_TYPE_ID1.Text
rs!PREPAID_TYPE_ID2 = PREPAID_TYPE_ID2.Text
rs!PREPAID_TYPE_ID3 = PREPAID_TYPE_ID3.Text
rs!PREPAID_TYPE_ID4 = PREPAID_TYPE_ID4.Text
rs!PREPAID_TYPE_ID5 = PREPAID_TYPE_ID5.Text
rs!QTY1 = QTY1.Text
rs!QTY2 = QTY2.Text
rs!QTY3 = QTY3.Text
rs!QTY4 = QTY4.Text
rs!QTY5 = QTY5.Text
rs!TOTAL_MRP = TOTAL_MRP.Text
rs!TOTAL_DEALER_PRICE = TOTAL_DEALER_PRICE.Text
rs!AUTH = AUTH.Text
rs!remark = remark.Text
rs!NO_REC = NO_REC.Text
rs!I_DT = I_DT.Text
End Sub
COADING FOR NEW COMMAND
Private Sub add_Click()
M=1
If rs.RecordCount >= 1 Then
rs.MoveLast
NO_REC.Text = Val(rs!NO_REC) + 1
SISSUE_CD_CD.Text = Val(rs!SISSUE_CD) + 1
Else
NO_REC.Text = 1
SISSUE_CD.Text = 1
End If
CALL1
rs.AddNew
SISSUE_CD.SetFocus
End Sub

COADING FOR DELETE COMMAND


Private Sub DELETE_Click()
On Error Resume Next
If rs.RecordCount >= 1 Then
rs.DELETE
CALL2
Else
MsgBox "No records to delete"
End If
End Sub

COADING TO DISPLAY FIRST RECORD


Private Sub first_Click()
On Error Resume Next
Y=0
If X > 1 Then
MsgBox "END OF RECORDS"
End If
If rs.RecordCount >= 1 Then
rs.MoveFirst

ENROLL NO. 520822367

67

ANIL KUMAR

CALL2
X=2
Else
MsgBox "NO RECORDS !"
End If
End Sub

COADING TO DISPLAY LAST RECORD


Private Sub last_Click()
On Error Resume Next
X=0
If Y > O Then
MsgBox "END OF RECORDS"
End If
If rs.RecordCount >= 1 Then
rs.MoveLast
CALL2
Y=1
Else
MsgBox "END OF RECORDS !"
End If
End Sub

COADING TO DISPLAY NEXT RECORD


Private Sub next_Click()
On Error Resume Next
X=0
If rs.RecordCount >= 1 Then
rs.MoveNext
CALL2
End If
If rs.EOF = True Then
MsgBox "SORRY ! THE DATABASE END...."
rs.MoveLast
CALL2
End If
End Sub

COADING TO DISPLAY PREVIOUS RECORD


Private Sub PREVIOUS_Click()
On Error Resume Next
Y=0
If rs.RecordCount >= 1 Then
Rs.MovePrevious
CALL2
End If
If rs.BOF = True Then
MsgBox "SORRY !
rs.MoveFirst
CALL2
End If
End Sub

NO RECORDS TO DISPAY"

COADING FOR SEARCH COMMAND


Private Sub SEARCH_Click()
rs.MoveFirst
If SISSUE_CD.Text <> " " Then
Do While rs.EOF <> True
ENROLL NO. 520822367

68

ANIL KUMAR

If rs!SISSUE_CD = SISSUE_CD.Text Then


CALL2
Exit Do
End If
rs.MoveNext
Loop
Else
MsgBox "PLEASE ENTER THE VALUE IN SISSUE_CD "
End If
If rs.EOF = True Then
MsgBox "NO SUCH RECORDS"
End If
End Sub

ENROLL NO. 520822367

69

ANIL KUMAR

LOGIN - MASTER
GENERAL SECTION
Dim db As Connection
Dim rs As Recordset
Dim cou As Variant
Dim flag As Variant

CODING OF LOGIN COMMAND BUTTON


Private Sub LOGIN_Click()
Set rs = New Recordset
rs.Open "select * from login_MANAGER where login_nm ='" & Text1.Text & "'and pass ='" & Text2.Text &
"'", db, adOpenStatic, adLockOptimistic
If rs.RecordCount >= 1 Then
MsgBox ("Wellcome User")
flag = 1
pass.Enabled = True
remark.Enabled = True
userid.SetFocus
Else
cou = cou + 1
MsgBox ("User Id Or Password if Failed")
userid.Text = ""
pass.Text = ""
userid.SetFocus
If cou >= 3 Then
MsgBox ("You are Invalied user......")
Unload Me
End If
End If
End Sub

CODING OF USER COMMAND BUTTON


Private Sub USER_Click()
If flag = 1 Then
userid.Text = ""
pass.Text = ""
remark.Text = ""
user.Caption = "UPDATE"
flag = 2
ElseIf
flag = 2 Then
rs.AddNew
rs!login_nm = userid.Text
rs!pass = pass.Text
rs!remark = remark.Text
rs.UPDATE
LOGIN.Caption = "NEW USER"
flag = 1
End If
End Sub

ENROLL NO. 520822367

70

ANIL KUMAR

EXIT
Private Sub EXIT_Click()
Unload Me
End Sub
FORM - LOAD
Private Sub Form_Load()
cou = 0
flag = 0
Set db = New Connection
Set rs = New Recordset
db.Open "provider=msdasql;dsn=FORM1;uid=CELL;pwd=SETUP"
rs.Open "select login_NM, pass from login_MANAGER", db, adOpenStatic,
adLockOptimistic
userid.Text = ""
USER.Enabled = False
End Sub

ENROLL NO. 520822367

71

ANIL KUMAR

PREPAID - DUMP
GENERAL SECTION
Dim db As Connection
Dim rs As Recordset
Dim M As Integer
Dim X As Integer
Dim Y As Integer

AUTOMATICALY DISPLAY DATE


Private Sub DT_GotFocus()
DT.Text = Date
End Sub

COADING OF EXIT COMMAND


Private Sub exit_Click()

Unload Me
End Sub

FORM LOAD
Private Sub Form_Load()
DT.Caption = Date
CALL1
Set db = New ADODB.Connection
Set rs = New ADODB.Recordset
db.Open "PROVIDER=MSDASQL;DSN=FORM1;UID=CELL;PWD=SETUP"
rs.Open"SELECTPREPAID_TYPE_ID,NAME,MRP,DEALER_PRICE,VALIDITY_DAYS,COMPANY_C
D,REMARK,NO_REC FROM PREPAID_MASTER", db, adOpenStatic, adLockOptimistic
End Sub

FUNCTION(CALL1) FOR CLEAR THE CONTENTS


Private Sub CALL1()
MRP.Text = ""
DEALER_PRICE.Text = ""
COMPANY_CD.Text = ""
NAME1.Text = ""
VALIDITY_DAYS.Text = ""
REMARK.Text = ""
END SUB

FUNCTION(CALL2) FOR DISPLAY RECORDS


Public Sub CALL2()

ENROLL NO. 520822367

72

ANIL KUMAR

PREPAID_TYPE_ID.Text = rs!PREPAID_TYPE_ID
COMPANY_CD.Text = rs!COMPANY_CD
NAME1.Text = rs!NAME
MRP.Text = rs!MRP
DEALER_PRICE.Text = rs!DEALER_PRICE
REMARK.Text = rs!REMARK
VALIDITY_DAYS.Text = rs!VALIDITY_DAYS
NO_REC.Text = rs!NO_REC
END SUB

COADING OF SAVE COMMAND


Private Sub SAVE_Click()
If M = 1 Then
CALL3
rs.SAVE
Else
MsgBox "PLEASE INSERT A NEW RECORD BY CLICK ON NEW"
End If
M=0
End Sub

COADING OF TIMER
Private Sub Timer1_Timer()
Shape1.BorderColor = vbRed * Rnd
Tm.Caption = Time
End Sub

COADING OF UPDATE
Private Sub update_Click()
If rs.RecordCount >= 1 Then
CALL3
rs.UPDATE
Else
MsgBox "NO RECORDS"
End If
End Sub

FUNCTION(CALL3) FOR SAVING RECORDS


Public Sub CALL3()
rs!PREPAID_TYPE_ID = PREPAID_TYPE_ID.Text
rs!COMPANY_CD = COMPANY_CD.Text
rs!VALIDITY_DAYS = VALIDITY_DAYS.Text
rs!NAME = name1.Text
rs!REMARK = REMARK.Text
rs!MRP = MRP.Text
rs!DEALER_PRICE = DEALER_PRICE.Text
rs!NO_REC = NO_REC.Text
End Sub
COADING FOR NEW COMMAND
Private Sub add_Click()
M=1
If rs.RecordCount >= 1 Then
rs.MoveLast
NO_REC.Text = Val(rs!NO_REC) + 1
PREPAID_TYPE_ID.Text = Val(rs!PREPAID_TYPE_ID) + 1
ENROLL NO. 520822367

73

ANIL KUMAR

Else
NO_REC.Text = 1
PREPAID_TYPE_ID.Text = 1
End If
CALL1
rs.AddNew
PREPAID__TYPE_ID.SetFocus
End Sub

COADING FOR DELETE COMMAND


Private Sub DELETE_Click()
On Error Resume Next
If rs.RecordCount >= 1 Then
rs.DELETE
CALL2
Else
MsgBox "No records to delete"
End If
End Sub

COADING TO DISPLAY FIRST RECORD


Private Sub first_Click()
On Error Resume Next
Y=0
If X > 1 Then
MsgBox "END OF RECORDS"
End If
If rs.RecordCount >= 1 Then
rs.MoveFirst
CALL2
X=2
Else
MsgBox "NO RECORDS !"
End If
End Sub

COADING TO DISPLAY LAST RECORD


Private Sub last_Click()
On Error Resume Next
X=0
If Y > O Then
MsgBox "END OF RECORDS"
End If
If rs.RecordCount >= 1 Then
rs.MoveLast
CALL2
Y=1
Else
MsgBox "END OF RECORDS !"
End If
End Sub

COADING TO DISPLAY NEXT RECORD


Private Sub next_Click()
On Error Resume Next
X=0
If rs.RecordCount >= 1 Then
rs.MoveNext
CALL2
ENROLL NO. 520822367

74

ANIL KUMAR

End If
If rs.EOF = True Then
MsgBox "SORRY ! THE DATABASE END...."
rs.MoveLast
CALL2
End If
End Sub

COADING TO DISPLAY PREVIOUS RECORD


Private Sub PREVIOUS_Click()
On Error Resume Next
Y=0
If rs.RecordCount >= 1 Then
Rs.MovePrevious
CALL2
End If
If rs.BOF = True Then
MsgBox "SORRY !
rs.MoveFirst
CALL2
End If
End Sub

NO RECORDS TO DISPAY"

COADING FOR SEARCH COMMAND


Private Sub SEARCH_Click()
rs.MoveFirst
If PREPAID_TYPE_ID.Text <> " " Then
Do While rs.EOF <> True
If rs!PREPAID_TYPE_ID = PREPAID_TYPE_ID.Text Then
CALL2
Exit Do
End If
rs.MoveNext
Loop
Else
MsgBox " PLEASE ENTER THE VALUE IN PREPAID_TYPE_ID "
End If
If rs.EOF = True Then
MsgBox "NO SUCH RECORDS"
End If
End Sub

ENROLL NO. 520822367

75

ANIL KUMAR

PREPAID - DUMP
GENERAL SECTION
Dim db As Connection
Dim rs As Recordset
Dim M As Integer
Dim X As Integer
Dim Y As Integer

AUTOMATICALY DISPLAY DATE


Private Sub DT_GotFocus()
DT.Text = Date
End Sub

COADING OF EXIT COMMAND


Private Sub exit_Click()

Unload Me
End Sub

FORM LOAD
Private Sub Form_Load()
N=0
DT.Caption = Date
Set db = New ADODB.Connection
Set rs = New ADODB.Recordset
db.Open "PROVIDER=MSDASQL;DSN=FORM1;UID=CELL;PWD=SETUP"
rs.Open SELECT DUMPCD,COMPANY_CD,dt_dump,CONSIGN_NO,
REMARK,NO_REC FROM PREPAID_DUMP", db, adOpenStatic, adLockOptimistic
End Sub

FUNCTION(CALL1) FOR CLEAR THE CONTENTS


Private Sub CALL1()
COMPANY_CD.Text = ""
CONSIGN_NO.Text = ""
REMARK.Text = ""
DUMP_CD.SetFocus
DT_DUMP.Text = ""
END SUB

FUNCTION(CALL2) FOR DISPLAY RECORDS


Public Sub CALL2()
DUMP_CD.Text = rs!DUMP_CD
COMPANY_CD.Text = rs!COMPANY_CD
CONSIGN_NO.Text = rs!CONSIGN_NO
REMARK.Text = rs!REMARK
NO_REC.Text = rs!NO_REC
DT_DUMP.Text = rs!DT_DUMP
END SUB

COADING OF SAVE COMMAND


Private Sub SAVE_Click()
If M = 1 Then
CALL3
rs.SAVE
ENROLL NO. 520822367

76

ANIL KUMAR

Else
MsgBox "PLEASE INSERT A NEW RECORD BY CLICK ON NEW"
End If
M=0
End Sub

COADING OF TIMER
Private Sub Timer1_Timer()
Shape1.BorderColor = vbRed * Rnd
Tm.Caption = Time
End Sub

COADING OF UPDATE
Private Sub update_Click()
If rs.RecordCount >= 1 Then
CALL3
rs.UPDATE
Else
MsgBox "NO RECORDS"
End If
End Sub

FUNCTION(CALL3) FOR SAVING RECORDS


Public Sub CALL3()
rs!DUMP_CD = DUMP_CD.Text
rs!COMPANY_CD = COMPANY_CD.Text
rs!CONSIGN_NO = CONSIGN_NO.Text
rs!REMARK = REMARK.Text
rs!NO_REC = NO_REC.Text
rs!DT_DUMP = DT_DUMP.Text
End Sub
COADING FOR NEW COMMAND
Private Sub add_Click()
M=1
If rs.RecordCount >= 1 Then
rs.MoveLast
NO_REC.Text = Val(rs!NO_REC) + 1
DUMP_CD_CD.Text = Val(rs!DUMP_CD) + 1
Else
NO_REC.Text = 1
DUMP_CD.Text = 1
End If
CALL1
rs.AddNew
DUMP_CD.SetFocus
End Sub

COADING FOR DELETE COMMAND


Private Sub DELETE_Click()
On Error Resume Next
If rs.RecordCount >= 1 Then
rs.DELETE
CALL2
Else
MsgBox "No records to delete"
End If
ENROLL NO. 520822367

77

ANIL KUMAR

End Sub

COADING TO DISPLAY FIRST RECORD


Private Sub first_Click()
On Error Resume Next
Y=0
If X > 1 Then
MsgBox "END OF RECORDS"
End If
If rs.RecordCount >= 1 Then
rs.MoveFirst
CALL2
X=2
Else
MsgBox "NO RECORDS !"
End If
End Sub

COADING TO DISPLAY LAST RECORD


Private Sub last_Click()
On Error Resume Next
X=0
If Y > O Then
MsgBox "END OF RECORDS"
End If
If rs.RecordCount >= 1 Then
rs.MoveLast
CALL2
Y=1
Else
MsgBox "END OF RECORDS !"
End If
End Sub

COADING TO DISPLAY NEXT RECORD


Private Sub next_Click()
On Error Resume Next
X=0
If rs.RecordCount >= 1 Then
rs.MoveNext
CALL2
End If
If rs.EOF = True Then
MsgBox "SORRY ! THE DATABASE END...."
rs.MoveLast
CALL2
End If
End Sub

COADING TO DISPLAY PREVIOUS RECORD


Private Sub PREVIOUS_Click()
On Error Resume Next
Y=0
If rs.RecordCount >= 1 Then
Rs.MovePrevious
CALL2
End If
If rs.BOF = True Then
MsgBox "SORRY !

NO RECORDS TO DISPAY"

ENROLL NO. 520822367

78

ANIL KUMAR

rs.MoveFirst
CALL2
End If
End Sub

COADING FOR SEARCH COMMAND


Private Sub SEARCH_Click()
rs.MoveFirst
If DUMP_CD.Text <> " " Then
Do While rs.EOF <> True
If rs!DUMP_CD = DUMP_CD.Text Then
CALL2
Exit Do
End If
rs.MoveNext
Loop
Else
MsgBox " PLEASE ENTER THE VALUE IN DUMP_CD "
End If
If rs.EOF = True Then
MsgBox "NO SUCH RECORDS"
End If
End Sub

ENROLL NO. 520822367

79

ANIL KUMAR

RETAILER - MASTER
GENERAL SECTION
Dim db As Connection
Dim rs As Recordset
Dim M As Integer
Dim X As Integer
Dim Y As Integer

AUTOMATICALY DISPLAY DATE


Private Sub DT_GotFocus()
DT.Text = Date
End Sub

COADING OF EXIT COMMAND


Private Sub exit_Click()

Unload Me
End Sub

FORM LOAD
Private Sub Form_Load()
DT.Caption = Date
Tm.Caption = Time
CALL1
M=0
Set db = New ADODB.Connection
Set rs = New ADODB.Recordset
db.Open "PROVIDER=MSDASQL;DSN=FORM1;UID=CELL;PWD=SETUP"
rs.Open "SELECT re_cd,name,address,tel1,tel2,e_mail,mobile,fax,d_o_b,d_o_r,oth_occu
,e_quali,p_quali,dues,remark,NO_REC,sex fROM RETAILER_MASTER", db, adOpenStatic,
adLockOptimistic
End Sub

FUNCTION(CALL1) FOR CLEAR THE CONTENTS


Private Sub CALL1()
TEL1.Text = ""
TEL2.Text = ""
E_MAIL.Text = ""
MOBILE.Text = ""
DUES.Text = ""
FAX.Text = ""
NAME1.Text = ""
ADDRESS.Text = ""
OTH_OCCU.Text = ""
E_QUALI.Text = ""
P_QUALI.Text = ""
REMARK.Text = ""
D_O_B.Text = ""
D_O_R.Text = ""
END SUB

FUNCTION(CALL2) FOR DISPLAY RECORDS


Public Sub CALL2()
ENROLL NO. 520822367

80

ANIL KUMAR

RE_CD.Text = rs!RE_CD
TEL1.Text = rs!TEL1
TEL2.Text = rs!TEL2
E_MAIL.Text = rs!E_MAIL
MOBILE.Text = rs!MOBILE
DUES.Text = rs!DUES
FAX.Text = rs!FAX
NAME1.Text = rs!NAME
ADRESS.Text = rs!ADDRESS
OTH_OCCU.Text = rs!OTH_OCCU
E_QUALI.Text = rs!E_QUALI
P_QUALI.Text = rs!P_QUALI
REMARK.Text = rs!REMARK
NO_REC.Text = rs!NO_REC
D_O_R.Text = rs!D_O_R
D_O_B.Text = rs!D_O_B
If rs!SEX = "m" Then
MALE.Value = True
Else
FEMALE.Value = True
End If
END SUB

COADING OF SAVE COMMAND


Private Sub SAVE_Click()
If M = 1 Then
CALL3
rs.SAVE
Else
MsgBox "PLEASE INSERT A NEW RECORD BY CLICK ON NEW"
End If
M=0
End Sub

COADING OF TIMER
Private Sub Timer1_Timer()
Shape1.BorderColor = vbRed * Rnd
Tm.Caption = Time
End Sub

COADING OF UPDATE
Private Sub update_Click()
If rs.RecordCount >= 1 Then
CALL3
rs.UPDATE
Else
MsgBox "NO RECORDS"
End If
End Sub

FUNCTION(CALL3) FOR SAVING RECORDS


Public Sub CALL3()

ENROLL NO. 520822367

81

ANIL KUMAR

rs!RE_CD = RE_CD.Text
rs!TEL1 = TEL1.Text
rs!TEL2 = TEL2.Text
rs!E_MAIL = E_MAIL.Text
rs!MOBILE = MOBILE.Text
rs!DUES = DUES.Text
rs!D_O_R = D_O_R.Text
rs!d_o_b = d_o_b.Text
rs!FAX = FAX.Text
rs!NAME = name1.Text
rs!address = address.Text
rs!OTH_OCCU = OTH_OCCU.Text
rs!E_QUALI = E_QUALI.Text
rs!P_QUALI = P_QUALI.Text
rs!remark = remark.Text
If MALE.Value = True Then
rs!SEX = "m"
Else
rs!SEX = "f"
End If
End Sub
COADING FOR NEW COMMAND
Private Sub add_Click()
M=1
If rs.RecordCount >= 1 Then
rs.MoveLast
NO_REC.Text = Val(rs!NO_REC) + 1
RE_CD.Text = Val(rs!RE_CD) + 1
Else
NO_REC.Text = 1
RE_CD.Text = 1
End If
CALL1
rs.AddNew
RE_CD.SetFocus
End Sub

COADING FOR DELETE COMMAND


Private Sub DELETE_Click()
On Error Resume Next
If rs.RecordCount >= 1 Then
rs.DELETE
CALL2
Else
MsgBox "No records to delete"
End If
End Sub

COADING TO DISPLAY FIRST RECORD


Private Sub first_Click()
On Error Resume Next
Y=0
If X > 1 Then
MsgBox "END OF RECORDS"
End If
If rs.RecordCount >= 1 Then
rs.MoveFirst
CALL2

ENROLL NO. 520822367

82

ANIL KUMAR

X=2
Else
MsgBox "NO RECORDS !"
End If
End Sub

COADING TO DISPLAY LAST RECORD


Private Sub last_Click()
On Error Resume Next
X=0
If Y > O Then
MsgBox "END OF RECORDS"
End If
If rs.RecordCount >= 1 Then
rs.MoveLast
CALL2
Y=1
Else
MsgBox "END OF RECORDS !"
End If
End Sub

COADING TO DISPLAY NEXT RECORD


Private Sub next_Click()
On Error Resume Next
X=0
If rs.RecordCount >= 1 Then
rs.MoveNext
CALL2
End If
If rs.EOF = True Then
MsgBox "SORRY ! THE DATABASE END...."
rs.MoveLast
CALL2
End If
End Sub

COADING TO DISPLAY PREVIOUS RECORD


Private Sub PREVIOUS_Click()
On Error Resume Next
Y=0
If rs.RecordCount >= 1 Then
Rs.MovePrevious
CALL2
End If
If rs.BOF = True Then
MsgBox "SORRY !
rs.MoveFirst
CALL2
End If
End Sub

NO RECORDS TO DISPAY"

COADING FOR SEARCH COMMAND


Private Sub SEARCH_Click()
rs.MoveFirst
If RE_CD.Text <> " " Then
Do While rs.EOF <> True
If rs!RE_CD = RE_CD.Text Then
ENROLL NO. 520822367

83

ANIL KUMAR

CALL2
Exit Do
End If
rs.MoveNext
Loop
Else
MsgBox " PLEASE ENTER THE VALUE IN RE_CD "
End If
If rs.EOF = True Then
MsgBox "NO SUCH RECORDS"
End If
End Sub

ENROLL NO. 520822367

84

ANIL KUMAR

STAFF - GRADE
GENERAL SECTION
Dim db As Connection
Dim rs As Recordset
Dim M As Integer
Dim X As Integer
Dim Y As Integer

AUTOMATICALY DISPLAY DATE


Private Sub DT_GotFocus()
DT.Text = Date
End Sub

COADING OF EXIT COMMAND


Private Sub exit_Click()

Unload Me
End Sub

FORM LOAD
Private Sub Form_Load()
CALL1
dat.Caption = Date
M=0
Set db = New ADODB.Connection
Set rs = New ADODB.Recordset
db.Open "PROVIDER=MSDASQL;DSN=FORM1;UID=CELL;PWD=SETUP"
rs.Open "SELECT JOB_cd,DESCRIPTION,BASIC,DA,PF,HRA,remark,PER_D_DAM fROM
STAFF_GRADE", db, adOpenStatic, adLockOptimistic
End Sub

FUNCTION(CALL1) FOR CLEAR THE CONTENTS


Private Sub CALL1()
DESC.Text = ""
BASIC.Text = ""
DA.Text = ""
PF.Text = ""
REMARK.Text = ""
HRA.Text = ""
DAILY_AL.Text = ""
End Sub

FUNCTION(CALL2) FOR DISPLAY RECORDS


Public Sub CALL2()
If rs.RecordCount >= 1 Then
Job_cd.Text = rs!JOB_CD
desc.Text = rs!Description
basic.Text = rs!BASIC
da.Text = rs!DA
pf.Text = rs!PF
hra.Text = rs!HRA
daily_al.Text = rs!PER_D_DAM
remark.Text = rs!REMARK
Else
ENROLL NO. 520822367

85

ANIL KUMAR

MsgBox ("No records in Data base ... ")


End If
End Sub

COADING OF SAVE COMMAND


Private Sub SAVE_Click()
If f = 1 Then
rs.AddNew
rs!JOB_CD = Text1.Text
End If
Call3
rs.Update
If f = 1 Then
MsgBox ("A new record is added ... ")
Else
MsgBox ("Previously record is updated... ")
End If
f=0
End Sub

COADING OF TIMER
Private Sub Timer1_Timer()
Shape1.BorderColor = vbRed * Rnd
Tm.Caption = Time
End Sub

COADING OF UPDATE
Private Sub update_Click()
If rs.RecordCount >= 1 Then
CALL3
rs.UPDATE
Else
MsgBox "NO RECORDS"
End If
End Sub

FUNCTION(CALL3) FOR SAVING RECORDS


Public Sub CALL3()
Rs!job_cd=job_cd.text
rs!Description = desc.Text
rs!BASIC = basic.Text
rs!DA = da.Text
rs!PF = pf.Text
rs!HRA = hra.Text
rs!PER_D_DAM = daily_al.Text
rs!REMARK = remark.Text
End Sub
COADING FOR NEW COMMAND
Private Sub add_Click()
f=1
If rs.RecordCount = 0 Then
tjob_cd = 100
Else
rs.MoveLast
ENROLL NO. 520822367

86

ANIL KUMAR

tjob_cd = rs!JOB_CD + 1
End If
Job_cd.Text = tjob_cd
Call1
desc.SetFocus
End Sub

COADING FOR DELETE COMMAND


Private Sub DELETE_Click()
rs.Delete
CALL1
Set rs = New ADODB.Recordset
rs.Open "select * from staff_grade", db, adOpenStatic, adLockOptimistic
MsgBox ("one Record is Deleted......")
End Sub

COADING TO DISPLAY FIRST RECORD


Private Sub first_Click()
On Error Resume Next
Y=0
If X > 1 Then
MsgBox "END OF RECORDS"
End If
If rs.RecordCount >= 1 Then
rs.MoveFirst
CALL2
X=2
Else
MsgBox "NO RECORDS !"
End If
End Sub

COADING TO DISPLAY LAST RECORD


Private Sub last_Click()
On Error Resume Next
X=0
If Y > O Then
MsgBox "END OF RECORDS"
End If
If rs.RecordCount >= 1 Then
rs.MoveLast
CALL2
Y=1
Else
MsgBox "END OF RECORDS !"
End If
End Sub

COADING TO DISPLAY NEXT RECORD


Private Sub next_Click()
On Error Resume Next
X=0
If rs.RecordCount >= 1 Then
rs.MoveNext
CALL2
End If
If rs.EOF = True Then
MsgBox "SORRY ! THE DATABASE END...."
rs.MoveLast
CALL2
ENROLL NO. 520822367

87

ANIL KUMAR

End If
End Sub

COADING TO DISPLAY LAST RECORD


Private Sub PREVIOUS_Click()
On Error Resume Next
Y=0
If rs.RecordCount >= 1 Then
Rs.MovePrevious
CALL2
End If
If rs.BOF = True Then
MsgBox "SORRY ! NO RECORDS TO DISPAY"
rs.MoveFirst
CALL2
End If
End Sub

COADING FOR SEARCH COMMAND


Private Sub SEARCH_Click()
rs.MoveFirst
If job_CD.Text <> " " Then
Do While rs.EOF <> True
If rs!job_CD = job_CD.Text Then
CALL2
Exit Do
End If
rs.MoveNext
Loop
Else
MsgBox "PLEASE ENTER THE VALUE IN BILL_CD "
End If
If rs.EOF = True Then
MsgBox "NO SUCH RECORDS"
End If
End Sub

ENROLL NO. 520822367

88

ANIL KUMAR

STAFF - SALARY
GENERAL SECTION
Dim db As Connection
Dim rs As Recordset
Dim rs1 As Recordset
Dim rs2 As Recordset
Dim f As Integer

CODING TO DISPLAY STAFF-CODE BY COMBO


Private Sub Combo1_Click()
Set rs1 = New Recordset
rs1.Open "select * from STAFF_master where staff_cd = '" & combo1.Text & "'", db, adOpenStatic,
adLockOptimistic
If rs1.RecordCount >= 1 Then
Label15.Caption = rs1!nm
Set rs2 = New Recordset
rs2.Open "select * from STAFF_grade where job_cd = '" & rs1!JOB_CD & "'", db, adOpenStatic,
adLockOptimistic
If rs2.RecordCount >= 1 Then
Label16.Caption = rs2!Description
text2.Text = rs2!BASIC
Text4.Text = rs2!HRA
Text5.Text = rs2!DA
Text11.Text = rs2!PF
Else
Label16.Caption = "None"
text2.Text = "0"
Text4.Text = "0"
Text5.Text = "0"
Text11.Text = "0"
End If
Else
Label15.Caption = "Unknown Staff"
End If
End Sub
CODING TO MOVE FIRST IN RECORDSET
Private Sub first_Click()
rs.MoveFirst
disp
End Sub

CODING TO MOVE LAST IN RECORDSET


Private Sub last_Click()
rs.MoveLast
disp
End Sub
CODING TO MOVE PREVIOUS IN RECORDSET
Private Sub pre_Click()
rs.MovePrevious
If rs.BOF Then
rs.MoveFirst
End If
ENROLL NO. 520822367

89

ANIL KUMAR

disp
End Sub
CODING TO MOVE NEXT IN RECORDSET
Private Sub next_Click()
rs.MoveNext
If rs.EOF Then
rs.MoveLast
End If
disp
End Sub
CODING TO EXITING
Private Sub exit_Click()
Unload Me
End Sub

CODING FOR DELETE


Private Sub delete_Click()
rs.DELETE
text1.Text = ""
name1.Text = ""
address.Text = ""
text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
combo1.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Text11.Text = ""
Text12.Text = ""
Text13.Text = ""
Text14.Text = ""
Text15.Text = ""
Text16.Text = ""
Text17.Text = ""
Option1.Value = False
Option2.Value = False
Option3.Value = False
Option4.Value = False
Set rs = New ADODB.Recordset
rs.Open "select * from staff_salary", db, adOpenStatic, adLockOptimistic
MsgBox ("one Record is Deleted......")
End Sub

CODING FOR DISPLAY LABEL IN ACTIVE MODE


Private Sub Timer1Timer()
Tm.Caption = Time
shape1.BorderColor = vbRed * Rnd
End Sub
CODING TO SAVE
Private Sub update_Click()
If f = 1 Then
rs.AddNew
rs!sal_cd = text1.Text
ENROLL NO. 520822367

90

ANIL KUMAR

rs!Name = name1.Text
rs!address = address.Text
End If
rs!BASIC = text2.Text
If Text3.Text = "" Then
rs!bonus = 0
Else
rs!bonus = Text3.Text
End If
rs!HRA = Text4.Text
rs!DA = Text5.Text
If Text6.Text = "" Then
rs!ariar = 0
Else
Rs!ariar = Text6.Text
End If
If Text7.Text = "" Then
rs!un = 0
Else
rs!un = Text7.Text
End If
If rs!other_ded = "" Then
rs!other_ded = 0
Else
rs!other_ded = Text8.Text
End If
If rs!other_gain = "" Then
rs!other_gain = 0
Else
rs!other_gain = Text9.Text
End If
rs!tot_gain = Text10.Text
rs!PF = Text11.Text
If rs!loan_amt = "" Then
rs!loan_amt = 0
Else
rs!loan_amt = Text12.Text
End If
rs!tot_ded = Text13.Text
rs!net_pay = Text14.Text
rs!DT = Text15.Text
If Text17.Text = "" Then
rs!remark = " "
Else
rs!remark = Text17.Text
End If
rs!sal_cd = combo1.Text
If Option1.Value = True Then
rs!p_mode = "C"
ElseIf
Option2.Value = True Then
rs!p_mode = "D"
ElseIf
Option3.Value = True Then
rs!p_mode = "Q"
Else
rs!p_mode = "O"
End If
rs.UPDATE
If f = 1 Then
MsgBox ("A new record is added ... ")
Else
ENROLL NO. 520822367

91

ANIL KUMAR

MsgBox ("Previously record is updated... ")


End If
f=0
End Sub

CODING FOR AD NEW RECORD


Private Sub add_Click()
f=1
If rs.RecordCount >= 1 Then
rs.MoveLast
tsal_cd = rs!sal_cd + 1
Else
tsal_cd = 1000
End If
text1.Text = tsal_cd
text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
combo1.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Text11.Text = ""
Text12.Text = ""
Text13.Text = ""
Text14.Text = ""
Text15.Text = Date
Text16.Text = ""
Text17.Text = ""
Option1.Value = False
Option2.Value = False
Option3.Value = False
text2.SetFocus
End Sub

FORM - LOAD
Private Sub Form_Load()
dat.Caption = Date
f=0
Set db = New Connection
Set rs = New Recordset
Set rs1 = New Recordset
db.Open "provider=msdasql;dsn=form1;uid=cell;pwd=setup;"
rs.Open "select * from staff_salary order by sal_cd asc", db, adOpenStatic, adLockOptimistic
rs1.Open "select * from STAFF_master", db, adOpenStatic, adLockOptimistic
While Not rs1.EOF
combo1.AddItem rs1!staff_cd
rs1.MoveNext
Wend
disp
End Sub
PROCEDURE FOR DISPLAY RECORDS
Private Sub disp()
If rs.RecordCount >= 1 Then
text1.Text = rs!sal_cd
ENROLL NO. 520822367

92

ANIL KUMAR

text2.Text = rs!BASIC
name1.Text = rs!Name
address.Text = rs!adr
If rs!bonus = 0 Then
Text3.Text = ""
Else
Text3.Text = rs!bonus
End If
Text4.Text = rs!HRA
Text5.Text = rs!DA
If rs!ariar = 0 Then
Text6.Text = ""
Else
Text6.Text = rs!ariar
End If
If rs!un = 0 Then
Text7.Text = ""
Else
Text7.Text = rs!un
End If
If rs!other_ded = 0 Then
Text8.Text = ""
Else
Text8.Text = rs!other_ded
End If
If rs!other_gain = 0 Then
Text9.Text = ""
Else
Text9.Text = rs!other_gain
End If
Text10.Text = rs!tot_gain
Text11.Text = rs!PF
If rs!loan_amt = 0 Then
Text12.Text = ""
Else
Text12.Text = rs!loan_amt
End If
Text13.Text = rs!tot_ded
Text14.Text = rs!net_pay
Text15.Text = rs!DT
Text16.Text = rs!p_mode
If rs!remark = " " Then
Text17.Text = ""
Else
Text17.Text = rs!remark
End If
combo1.Text = rs!sal_cd
If rs!p_mode = "C" Or rs!p_mode = "c" Then
Option1.Value = True
ElseIf rs!p_mode = "D" Or rs!p_mode = "d" Then
Option2.Value = True
ElseIf rs!p_mode = "Q" Or rs!p_mode = "q" Then
Option3.Value = True
Else
Option4.Value = True
End If
Else
MsgBox ("No records in Data base ... ")
End If
End Sub

ENROLL NO. 520822367

93

ANIL KUMAR

CODING TO CALCULATE PF
Private Sub Text11_Change()
Text10.Text = Val(text2.Text) + Val(Text3.Text) + Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text) +
Val(Text9.Text)
Text13.Text = Val(Text7.Text) + Val(Text8.Text) + Val(Text12.Text) + Val(Text11.Text)
Text14.Text = Val(Text10.Text) - Val(Text13.Text)
End Sub
CODING TO CALCULATE LOAN AMOUNT
Private Sub Text12_Change()
Text10.Text = Val(text2.Text) + Val(Text3.Text) + Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text) +
Val(Text9.Text)
Text13.Text = Val(Text7.Text) + Val(Text8.Text) + Val(Text11.Text) + Val(Text12.Text)
Text14.Text = Val(Text10.Text) - Val(Text13.Text)
End Sub
CODING TO CALCULATE BASIC
Private Sub Text2_Change()
Text10.Text = Val(text2.Text) + Val(Text3.Text) + Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text) +
Val(Text9.Text)
Text13.Text = Val(Text7.Text) + Val(Text8.Text) + Val(Text11.Text) + Val(Text12.Text)
Text14.Text = Val(Text10.Text) - Val(Text13.Text)
End Sub
CODING TO CALCULATE BONUS
Private Sub Text3_Change()
Text10.Text = Val(text2.Text) + Val(Text3.Text) + Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text) +
Val(Text9.Text)
Text13.Text = Val(Text7.Text) + Val(Text8.Text) + Val(Text11.Text) + Val(Text12.Text)
Text14.Text = Val(Text10.Text) - Val(Text13.Text)
End Sub
CODING TO CALCULATE HRA
Private Sub Text4_Change()
Text10.Text = Val(text2.Text) + Val(Text3.Text) + Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text) +
Val(Text9.Text)
Text13.Text = Val(Text7.Text) + Val(Text8.Text) + Val(Text11.Text) + Val(Text12.Text)
Text14.Text = Val(Text10.Text) - Val(Text13.Text)
End Sub
CODING TO CALCULATE DA
Private Sub Text5_Change()
Text10.Text = Val(text2.Text) + Val(Text3.Text) + Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text) +
Val(Text9.Text)
Text13.Text = Val(Text7.Text) + Val(Text8.Text) + Val(Text11.Text) + Val(Text12.Text)
Text14.Text = Val(Text10.Text) - Val(Text13.Text)
End Sub
CODING TO CALCULATE ARIAR
Private Sub Text6_Change()
Text10.Text = Val(text2.Text) + Val(Text3.Text) + Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text) +
Val(Text9.Text)
Text13.Text = Val(Text7.Text) + Val(Text8.Text) + Val(Text11.Text) + Val(Text12.Text)
Text14.Text = Val(Text10.Text) - Val(Text13.Text)

ENROLL NO. 520822367

94

ANIL KUMAR

End Sub
CODING TO CALCULATE UNION
Private Sub Text7_Change()
Text10.Text = Val(text2.Text) + Val(Text3.Text) + Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text) +
Val(Text9.Text)
Text13.Text = Val(Text7.Text) + Val(Text8.Text) + Val(Text11.Text) + Val(Text12.Text)
Text14.Text = Val(Text10.Text) - Val(Text13.Text)
End Sub
CODING TO CALCULATE OTHER DED
Private Sub Text8_Change()
Text10.Text = Val(text2.Text) + Val(Text3.Text) + Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text) +
Val(Text9.Text)
Text13.Text = Val(Text7.Text) + Val(Text8.Text) + Val(Text11.Text) + Val(Text12.Text)
Text14.Text = Val(Text10.Text) - Val(Text13.Text)
End Sub
CODING TO CALCULATE OTHER GAIN
Private Sub Text9_Change()
Text10.Text = Val(text2.Text) + Val(Text3.Text) + Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text) +
Val(Text9.Text)
Text13.Text = Val(Text7.Text) + Val(Text8.Text) + Val(Text11.Text) + Val(Text12.Text)
Text14.Text = Val(Text10.Text) - Val(Text13.Text)
End Sub

ENROLL NO. 520822367

95

ANIL KUMAR

STAFF - SALARY
GENERAL SECTION
Dim db As Connection
Dim rs As Recordset
Dim rs1 As Recordset
Dim rs2 As Recordset
Dim f As Integer

CODING TO DISPLAY STAFF-CODE BY COMBO


Private Sub Combo1_Click()
Set rs1 = New Recordset
rs1.Open "select * from STAFF_master where staff_cd = '" & combo1.Text & "'", db, adOpenStatic,
adLockOptimistic
If rs1.RecordCount >= 1 Then
Label15.Caption = rs1!nm
Set rs2 = New Recordset
rs2.Open "select * from STAFF_grade where job_cd = '" & rs1!JOB_CD & "'", db, adOpenStatic,
adLockOptimistic
If rs2.RecordCount >= 1 Then
Label16.Caption = rs2!Description
text2.Text = rs2!BASIC
Text4.Text = rs2!HRA
Text5.Text = rs2!DA
Text11.Text = rs2!PF
Else
Label16.Caption = "None"
text2.Text = "0"
Text4.Text = "0"
Text5.Text = "0"
Text11.Text = "0"
End If
Else
Label15.Caption = "Unknown Staff"
End If
End Sub
CODING TO MOVE FIRST IN RECORDSET
Private Sub first_Click()
rs.MoveFirst
disp
End Sub

CODING TO MOVE LAST IN RECORDSET


Private Sub last_Click()
rs.MoveLast
disp
End Sub
CODING TO MOVE PREVIOUS IN RECORDSET
Private Sub pre_Click()
rs.MovePrevious
If rs.BOF Then
rs.MoveFirst
End If
ENROLL NO. 520822367

96

ANIL KUMAR

disp
End Sub
CODING TO MOVE NEXT IN RECORDSET
Private Sub next_Click()
rs.MoveNext
If rs.EOF Then
rs.MoveLast
End If
disp
End Sub
CODING TO EXITING
Private Sub exit_Click()
Unload Me
End Sub

CODING FOR DELETE


Private Sub delete_Click()
rs.DELETE
text1.Text = ""
name1.Text = ""
address.Text = ""
text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
combo1.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Text11.Text = ""
Text12.Text = ""
Text13.Text = ""
Text14.Text = ""
Text15.Text = ""
Text16.Text = ""
Text17.Text = ""
Option1.Value = False
Option2.Value = False
Option3.Value = False
Option4.Value = False
Set rs = New ADODB.Recordset
rs.Open "select * from staff_salary", db, adOpenStatic, adLockOptimistic
MsgBox ("one Record is Deleted......")
End Sub

CODING FOR DISPLAY LABEL IN ACTIVE MODE


Private Sub Timer1Timer()
Tm.Caption = Time
shape1.BorderColor = vbRed * Rnd
End Sub
CODING TO SAVE
Private Sub update_Click()
If f = 1 Then
rs.AddNew
rs!sal_cd = text1.Text
ENROLL NO. 520822367

97

ANIL KUMAR

rs!Name = name1.Text
rs!address = address.Text
End If
rs!BASIC = text2.Text
If Text3.Text = "" Then
rs!bonus = 0
Else
rs!bonus = Text3.Text
End If
rs!HRA = Text4.Text
rs!DA = Text5.Text
If Text6.Text = "" Then
rs!ariar = 0
Else
Rs!ariar = Text6.Text
End If
If Text7.Text = "" Then
rs!un = 0
Else
rs!un = Text7.Text
End If
If rs!other_ded = "" Then
rs!other_ded = 0
Else
rs!other_ded = Text8.Text
End If
If rs!other_gain = "" Then
rs!other_gain = 0
Else
rs!other_gain = Text9.Text
End If
rs!tot_gain = Text10.Text
rs!PF = Text11.Text
If rs!loan_amt = "" Then
rs!loan_amt = 0
Else
rs!loan_amt = Text12.Text
End If
rs!tot_ded = Text13.Text
rs!net_pay = Text14.Text
rs!DT = Text15.Text
If Text17.Text = "" Then
rs!remark = " "
Else
rs!remark = Text17.Text
End If
rs!sal_cd = combo1.Text
If Option1.Value = True Then
rs!p_mode = "C"
ElseIf
Option2.Value = True Then
rs!p_mode = "D"
ElseIf
Option3.Value = True Then
rs!p_mode = "Q"
Else
rs!p_mode = "O"
End If
rs.UPDATE
If f = 1 Then
MsgBox ("A new record is added ... ")
Else
ENROLL NO. 520822367

98

ANIL KUMAR

MsgBox ("Previously record is updated... ")


End If
f=0
End Sub

CODING FOR AD NEW RECORD


Private Sub add_Click()
f=1
If rs.RecordCount >= 1 Then
rs.MoveLast
tsal_cd = rs!sal_cd + 1
Else
tsal_cd = 1000
End If
text1.Text = tsal_cd
text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
combo1.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Text11.Text = ""
Text12.Text = ""
Text13.Text = ""
Text14.Text = ""
Text15.Text = Date
Text16.Text = ""
Text17.Text = ""
Option1.Value = False
Option2.Value = False
Option3.Value = False
text2.SetFocus
End Sub

FORM - LOAD
Private Sub Form_Load()
dat.Caption = Date
f=0
Set db = New Connection
Set rs = New Recordset
Set rs1 = New Recordset
db.Open "provider=msdasql;dsn=form1;uid=cell;pwd=setup;"
rs.Open "select * from staff_salary order by sal_cd asc", db, adOpenStatic, adLockOptimistic
rs1.Open "select * from STAFF_master", db, adOpenStatic, adLockOptimistic
While Not rs1.EOF
combo1.AddItem rs1!staff_cd
rs1.MoveNext
Wend
disp
End Sub
PROCEDURE FOR DISPLAY RECORDS
Private Sub disp()
If rs.RecordCount >= 1 Then
text1.Text = rs!sal_cd
ENROLL NO. 520822367

99

ANIL KUMAR

text2.Text = rs!BASIC
name1.Text = rs!Name
address.Text = rs!adr
If rs!bonus = 0 Then
Text3.Text = ""
Else
Text3.Text = rs!bonus
End If
Text4.Text = rs!HRA
Text5.Text = rs!DA
If rs!ariar = 0 Then
Text6.Text = ""
Else
Text6.Text = rs!ariar
End If
If rs!un = 0 Then
Text7.Text = ""
Else
Text7.Text = rs!un
End If
If rs!other_ded = 0 Then
Text8.Text = ""
Else
Text8.Text = rs!other_ded
End If
If rs!other_gain = 0 Then
Text9.Text = ""
Else
Text9.Text = rs!other_gain
End If
Text10.Text = rs!tot_gain
Text11.Text = rs!PF
If rs!loan_amt = 0 Then
Text12.Text = ""
Else
Text12.Text = rs!loan_amt
End If
Text13.Text = rs!tot_ded
Text14.Text = rs!net_pay
Text15.Text = rs!DT
Text16.Text = rs!p_mode
If rs!remark = " " Then
Text17.Text = ""
Else
Text17.Text = rs!remark
End If
combo1.Text = rs!sal_cd
If rs!p_mode = "C" Or rs!p_mode = "c" Then
Option1.Value = True
ElseIf rs!p_mode = "D" Or rs!p_mode = "d" Then
Option2.Value = True
ElseIf rs!p_mode = "Q" Or rs!p_mode = "q" Then
Option3.Value = True
Else
Option4.Value = True
End If
Else
MsgBox ("No records in Data base ... ")
End If
End Sub

ENROLL NO. 520822367

100

ANIL KUMAR

CODING TO CALCULATE PF
Private Sub Text11_Change()
Text10.Text = Val(text2.Text) + Val(Text3.Text) + Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text) +
Val(Text9.Text)
Text13.Text = Val(Text7.Text) + Val(Text8.Text) + Val(Text12.Text) + Val(Text11.Text)
Text14.Text = Val(Text10.Text) - Val(Text13.Text)
End Sub
CODING TO CALCULATE LOAN AMOUNT
Private Sub Text12_Change()
Text10.Text = Val(text2.Text) + Val(Text3.Text) + Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text) +
Val(Text9.Text)
Text13.Text = Val(Text7.Text) + Val(Text8.Text) + Val(Text11.Text) + Val(Text12.Text)
Text14.Text = Val(Text10.Text) - Val(Text13.Text)
End Sub
CODING TO CALCULATE BASIC
Private Sub Text2_Change()
Text10.Text = Val(text2.Text) + Val(Text3.Text) + Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text) +
Val(Text9.Text)
Text13.Text = Val(Text7.Text) + Val(Text8.Text) + Val(Text11.Text) + Val(Text12.Text)
Text14.Text = Val(Text10.Text) - Val(Text13.Text)
End Sub
CODING TO CALCULATE BONUS
Private Sub Text3_Change()
Text10.Text = Val(text2.Text) + Val(Text3.Text) + Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text) +
Val(Text9.Text)
Text13.Text = Val(Text7.Text) + Val(Text8.Text) + Val(Text11.Text) + Val(Text12.Text)
Text14.Text = Val(Text10.Text) - Val(Text13.Text)
End Sub
CODING TO CALCULATE HRA
Private Sub Text4_Change()
Text10.Text = Val(text2.Text) + Val(Text3.Text) + Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text) +
Val(Text9.Text)
Text13.Text = Val(Text7.Text) + Val(Text8.Text) + Val(Text11.Text) + Val(Text12.Text)
Text14.Text = Val(Text10.Text) - Val(Text13.Text)
End Sub
CODING TO CALCULATE DA
Private Sub Text5_Change()
Text10.Text = Val(text2.Text) + Val(Text3.Text) + Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text) +
Val(Text9.Text)
Text13.Text = Val(Text7.Text) + Val(Text8.Text) + Val(Text11.Text) + Val(Text12.Text)
Text14.Text = Val(Text10.Text) - Val(Text13.Text)
End Sub
CODING TO CALCULATE ARIAR
Private Sub Text6_Change()
Text10.Text = Val(text2.Text) + Val(Text3.Text) + Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text) +
Val(Text9.Text)
Text13.Text = Val(Text7.Text) + Val(Text8.Text) + Val(Text11.Text) + Val(Text12.Text)
Text14.Text = Val(Text10.Text) - Val(Text13.Text)

ENROLL NO. 520822367

101

ANIL KUMAR

End Sub
CODING TO CALCULATE UNION
Private Sub Text7_Change()
Text10.Text = Val(text2.Text) + Val(Text3.Text) + Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text) +
Val(Text9.Text)
Text13.Text = Val(Text7.Text) + Val(Text8.Text) + Val(Text11.Text) + Val(Text12.Text)
Text14.Text = Val(Text10.Text) - Val(Text13.Text)
End Sub
CODING TO CALCULATE OTHER DED
Private Sub Text8_Change()
Text10.Text = Val(text2.Text) + Val(Text3.Text) + Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text) +
Val(Text9.Text)
Text13.Text = Val(Text7.Text) + Val(Text8.Text) + Val(Text11.Text) + Val(Text12.Text)
Text14.Text = Val(Text10.Text) - Val(Text13.Text)
End Sub
CODING TO CALCULATE OTHER GAIN
Private Sub Text9_Change()
Text10.Text = Val(text2.Text) + Val(Text3.Text) + Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text) +
Val(Text9.Text)
Text13.Text = Val(Text7.Text) + Val(Text8.Text) + Val(Text11.Text) + Val(Text12.Text)
Text14.Text = Val(Text10.Text) - Val(Text13.Text)
End Sub

ENROLL NO. 520822367

102

ANIL KUMAR

STAFF - GRADE
GENERAL SECTION
Dim db As Connection
Dim rs, rs1 As Recordset
Dim f As Integer
Dim X As Integer
Dim Y As Integer

AUTOMATICALY DISPLAY DATE


Private Sub Doj_GotFocus()
Doj.Text = Date
End Sub

COADING OF EXIT COMMAND


Private Sub exit_Click()

Unload Me
End Sub

FORM LOAD
Private Sub Form_Load()
dat.Caption = Date
f=0
Set db = New Connection
Set rs = New Recordset
Set rs1 = New Recordset
db.Open "provider=msdasql;dsn=FORM1;uid=CELL;pwd=SETUP;"
rs.Open "select * from staff_master order by staff_cd asc", db, adOpenStatic, adLockOptimistic
rs1.Open "select * from STAFF_GRADE", db, adOpenStatic, adLockOptimistic
disp
End Sub

FUNCTION(CALL1) FOR CLEAR THE CONTENTS


Private Sub CALL1()
STAFF_CD.Text = tstaff_cd
NAME1.Text = ""
DOB.Text = ""
DOJ.Text = ""
E_QUALI.Text = ""

P_QUALI.Text = ""
TEL.Text = Date
MOBILE.Text = ""
ADDRESS.Text = ""
REMARK.Text = ""
NAME1.SetFocus
End Sub

FUNCTION(CALL2) FOR DISPLAY RECORDS


Public Sub CALL2()
If rs.RecordCount >= 1 Then
ENROLL NO. 520822367

103

ANIL KUMAR

STAFF_CD.Text = rs!STAFF_CD
NAME1.Text = rs!nm
addr.Text = rs!addr
DOB.Text = rs!DOB
TEL.Text = rs!TEL
MOBILE.Text = rs!mobil
DOJ.Text = rs!date_of_j
REMARK.Text = rs!REMARK
JOB_CD.Text = rs!JOB_CD
e_quali.Text = rs!E_QUALI
p_quali.Text = rs!P_QUALI
Else
MsgBox ("No records in Data base ... ")
End If
End Sub

COADING OF SAVE COMMAND


Private Sub SAVE_Click()
If f = 1 Then
rs.AddNew
rs!STAFF_CD = Text1.Text
End If
Call3
rs.UPDATE
If f = 1 Then
MsgBox ("A new record added ... ")
Else
MsgBox ("Previous record updated ... ")
End If
f=0
End Sub

COADING OF TIMER
Private Sub Timer1_Timer()
Shape1.BorderColor = vbRed * Rnd
Tm.Caption = Time
End Sub

COADING OF UPDATE
Private Sub update_Click()
If rs.RecordCount >= 1 Then
CALL3
rs.UPDATE
Else
MsgBox "NO RECORDS"
End If
End Sub

FUNCTION(CALL3) FOR SAVING RECORDS


Public Sub CALL3()

ENROLL NO. 520822367

104

ANIL KUMAR

rs!nm = NAME1.Text
rs!addr = ADDRESS.Text
rs!DOB = DOB.Text
rs!TEL = TEL.Text
rs!mobil = MOBILE.Text
rs!date_of_j = DOJ.Text
rs!REMARK = REMARK.Text
rs!JOB_CD = JOB_CD.Text
rs!E_QUALI = E_QUALI.Text
rs!P_QUALI = P_QUALI.Text
End Sub
COADING FOR NEW COMMAND
Private Sub add_Click()
f=1
If rs.RecordCount >= 1 Then
rs.MoveLast
tstaff_cd = rs!STAFF_CD + 1
Else
tstaff_cd = 1000
End If
Call1
End Sub

COADING FOR DELETE COMMAND


Private Sub DELETE_Click()
rs.DELETE
call1
Set rs = New ADODB.Recordset
rs.Open "select * from staff_master", db, adOpenStatic, adLockOptimistic
MsgBox ("one Record is Deleted......")
End Sub

COADING TO DISPLAY FIRST RECORD


Private Sub first_Click()
On Error Resume Next
Y=0
If X > 1 Then
MsgBox "END OF RECORDS"
End If
If rs.RecordCount >= 1 Then
rs.MoveFirst
CALL2
X=2
Else
MsgBox "NO RECORDS !"
End If
End Sub

COADING TO DISPLAY LAST RECORD


Private Sub last_Click()
On Error Resume Next
X=0
If Y > O Then
MsgBox "END OF RECORDS"
End If
If rs.RecordCount >= 1 Then
rs.MoveLast
ENROLL NO. 520822367

105

ANIL KUMAR

CALL2
Y=1
Else
MsgBox "END OF RECORDS !"
End If
End Sub

COADING TO DISPLAY NEXT RECORD


Private Sub next_Click()
On Error Resume Next
X=0
If rs.RecordCount >= 1 Then
rs.MoveNext
CALL2
End If
If rs.EOF = True Then
MsgBox "SORRY ! THE DATABASE END...."
rs.MoveLast
CALL2
End If
End Sub

COADING TO DISPLAY PREVIOUS RECORD


Private Sub PREVIOUS_Click()
On Error Resume Next
Y=0
If rs.RecordCount >= 1 Then
Rs.MovePrevious
CALL2
End If
If rs.BOF = True Then
MsgBox "SORRY ! NO RECORDS TO DISPAY"
rs.MoveFirst
CALL2
End If
End Sub

COADING FOR SEARCH COMMAND


Private Sub SEARCH_Click()
rs.MoveFirst
If job_CD.Text <> " " Then
Do While rs.EOF <> True
If rs!job_CD = job_CD.Text Then
CALL2
Exit Do
End If
rs.MoveNext
Loop
Else
MsgBox "PLEASE ENTER THE VALUE IN BILL_CD "
End If
If rs.EOF = True Then
MsgBox "NO SUCH RECORDS"
End If
End Sub

ENROLL NO. 520822367

106

ANIL KUMAR

Code Efficiency
The efficiency of source code is directly tied to the efficiency of algorithm defined.
However, the coding style can have an effect on execution speed and memory
requirements. The following set of guidelines is applied during coding:

1.

Before coding all arithmetic and logical expressions are simplified.

2.

Where ever possible we have carefully evaluate the nested loops so that
if statements or expressions can be moved outside.

3.

We have not used the multi-dimensional arrays.

4.

We have used the integer arithmetic and Boolean expression, wherever


required.

ENROLL NO. 520822367

107

ANIL KUMAR

Optimization of Code

The basic design model uses the analysis model as the framework for
implementation. The analysis model captures the logical information about the
system, while the design model must add details to support efficient information
access. During design optimization we must:

1.

Add redundant association to minimize access cost and maximize


convenience.

2.

Rearrange the computation for greater efficiency.

3.

Save derived attributes to avoid recompilation of complicated


expression.

4.

During report generation we used an optimization technique of


rearranging execution order for greater efficiency.

5.

Redundancy of data in the tables has been removed through


Normalization technique. All the tables are designed in normalized form.

6.

Explicit & Implicit locks are used where needed.

ENROLL NO. 520822367

108

ANIL KUMAR

ENROLL NO. 520822367

109

ANIL KUMAR

Validation Checks

Any other cannot access the facility given to the management. Except the
management the other user can access only those facility, which are given to them.
These are all restricted by the password.

Validation checks for Manager. Before accessing the manager ID and password for
the Manager is checked by the computer. If valid, allows the manager to access the
otherwise display a message box.

Each transaction is saved by currently working user as an authority so that in future


if any forgery is found then easily investigation can be made on the basis of that.

If the User Id and password is not suitable for the administrative works then he/she
will not be permitted to enter concerned menu, the user level menu feature is
applicable in the software.

Some time deletion and addition in master is also not allowed for general users.

ENROLL NO. 520822367

110

ANIL KUMAR

Testing

The word test is derived from the Latin word testum meaning pottery vessel
used to measure and access weight. The testing of software is a means of
accessing or measuring the software to determine its quality. Testing is
important because it assesses if the system actually performs, and how well
it performs in its final environment against defined specifications or
requirements. Testing is done with one primary objective- to ensure the
quality of software before live operations. The main purpose of testing, from
the produces viewpoint, is to gain confidence. Testing should be in-depth
and not superficial. Testing involves operation of a system or application
under controlled conditions and evaluating the results. The controlled
conditions should include both normal and abnormal conditions. In the
development of automated system for Vishal Prepaid Agency, we have
applied the following testing techniques and testing Strategies.

1.

Testing Techniques
A)

White - Box Testing


a.

Guarantee that all independent paths within a module have been


exercised at least once.

b.

Exercise all logical decisions on their true and false sides.

c.

Execute all loops at their boundaries and within their operational


bounds.

d.

Exercise internal data structures to ensure their validity.

ENROLL NO. 520822367

111

ANIL KUMAR

B)

Black - Box Testing


a.

Interface Errors

b.

Errors in Data Structures or external database access.

c.

Performance

d.

Initialization Errors

2. Testing Strategies

A)

Unit Testing

Unit Testing, also called module or component testing is testing individual


software units independently of the other units in the same system. The
programmer does this testing. Unit testing is recognized as one of the most
efficient ways to reduce the density and proliferation of errors in a software
application. Unit testing has been done for each screen of the system. We
have followed the following procedure to perform unit testing:

a.

Identified the scenarios for each action in all the screens.

b.

Tested main method in each screen to invoke that screen.

c.

Tested the output for all the possible combination of input values and
user actions.

d.

Examine the result of each user action.

ENROLL NO. 520822367

112

ANIL KUMAR

B) Integration Testing

Integration testing is done when unit testing has already been done for each
separate module and all modules have been integrated. This is an integrated
form of testing which focuses on functionality and interfaces between units
and modules. Integration testing was done for the system when different
modules were connected together. Integration testing was performed to
ensure the achievement of functionality as desired by the automated system
of Vishal Prepaid Agency when brought together.

C) Verification And Validation Criteria

Some of the important verification and validation criteria as applied to the


automated system are:

ENROLL NO. 520822367

113

ANIL KUMAR

Implementation

Implementation is a phase where a number of activities that have been going on


parallel so far have to culminate. To ensure that all these activities indeed converge
at the right time and at the right place without any delays on account of unforeseen
problems, to get the software to be used as it should, is what managing the
implementation phase is all about. Typically the steps involved are:

1. Installation Plan: Much before the software could be actually ready, a detailed
plan has to be prepared in terms of hardware, procurement and installation.
What machines are to be installed at which location and at what point in time,
provision of the necessary infrastructure for installation of the same, site
preparation, arranging any machine specific or commodity software specific
Agency for different categories of users etc. are details which would need to be
worked out. Likewise a plan has got to be made for installation of the software
to be implemented. Details of which modules are to be enabled/disabled in each
location have to be worked out. Therefore a comprehensive installation plan
needs to be in place, which gives location wise installation details as relevant to
different user groups.
So, for Vishal Prepaid Agency an implementation plan was prepared at that
right time. Here we will need to install packages at two different machines [may
be Server and clients]. These two workstations are: one for the manager and
second for the nodes located at different places. All these workstations need to
be connected to one server placed with the manager and which contains the
database.

ENROLL NO. 520822367

114

ANIL KUMAR

2. Data Preparation And Conversion: Assuming that the system is expected to go


live from a particular date, all backlog of data has to be transcribed to fit into the
new formats and coding schemes, and rigorously errors are checked to ensure
no loss of information.
For Vishal Prepaid Agency all the existing data was fed into the system, as the
details of the member is to be maintained old records also apart from the fresh
data.
3. Conversion Testing: Where data is converted from existing files or databases,
rigorous conversion testing needs to be done to ensure proper conversion. The
following steps testing were performed as a part of conversion for Vishal
Prepaid Agency.
4. Tallying of input and output records.
5. Extraction of sample records from both the old and new set of records. These
are then directly compared with each other.
6. Check value ranges of fields within each record.
7. Check whether the required relationships between records are maintained.
8. User Agency: The successful implementation of any software is dependent in
good measure on the quality of Agency imparted. Different user groups need to
be identified. An Agency need analysis has to be done for each of these groups
to find out what kind of Agency is required for each. Getting trained on aspects
that are not relevant may sometimes tend to confuse the users.

For Vishal Prepaid Agency we need to create two groups i.e. manager,
General users. All two groups need to be trained so that for them the concerned
software has the maximum appeal of user-friendliness in it and they free to work
with it. This is to ensure that they are not hesitated to use the system.

ENROLL NO. 520822367

115

ANIL KUMAR

Evaluation

Evaluation is one of the key aspects of the action inquiry approach, being used to
inform further action at each stage of the cycle. The effectiveness of the project will
be determined using the following methods at appropriate stages during the project.

To evaluate whether the management is satisfied with the software provided to


them or not, take the feedback from every member of the management either
on the paper or on the feedback form.

The above method is applied for manager, User and members also.

To evaluate the usefulness of the process, management will keep a journal,


which records their actions and reflections on that action. Analysis of journals
will indicate the effectiveness of the process.

Feedback from the manager will actually evaluate the system because the
software is developed by keeping in mind the need of the manager now the
manager does not have to go to each node for details.
Summative evaluation of the project will involve interviews with almost all the
members and manager. Further feedback will be sought from a colleague of
each staff to provide objective evidence of new ways of practicing evaluation.
Additionally, independent observers will be asked to provide written feedback on
the manager.

ENROLL NO. 520822367

116

ANIL KUMAR

Maintenance

A system should be created whose design is comprehensive and farsighted enough


to serve current and projected user needs for several years to come. The
better the system design, the easier it will be to maintain and the
maintenance cost will be low. It is important to detect software design errors
early on, as it is less costly than if errors remain unnoticed until maintenance
is necessary. Maintenance is performed most often to improve the existing
software rather than to respond to a crisis or system failure. Maintenance is
also done to update software in response to the change made in the
organization. This work is not as substantial as enhancing the software, but it
must be done. With respect to the maintenance of the automated system for
Vishal Prepaid Agency. all these points have been taken into consideration.
For example, firstly it has been taken into consideration that:

1)

If the Management of the company decided to Launch another scheme in


the near future than the management can do it easily.

2)

If the management wants to increase the rate or scheme duration..

Apart from the above points the system has been developed in such a way that in
future if any changes need to be incorporated, they can be done with minimum
effort and expenditure.

ENROLL NO. 520822367

117

ANIL KUMAR

Security Measures Taken

Security and controls are required not only for preventing inadvertent mistakes
made by users, but also to prevent misuse of the system and ensure data integrity.

In an automated system of Agency Manager the following security measures have


been considered:

1. Access Control
Access Control can be defined as control established to ensure that only people
with the proper authority have access to the data. Different types of access
control, which are used in this software are as follows:

A) Transaction Access
All users of a system need not have access to all transactions in a system.
Users must have access only to transactions, which are required by them
for their day-to-day operations. A Manager in an Agency needs to submit
his daily report only. Thus he should not have access to the Agency
records.

B) Data Access
Apart from having access to transactions, which are required for daily
operations, users must only be allowed to see specific instances of
transactions. In some applications it may be required that users must only
see data relating to their needs. Thus the head of the department will have
access to the department query transaction, but the user will not be shown
ENROLL NO. 520822367

118

ANIL KUMAR

all data, the user will be shown data belongings to the users department
only.

In Vishal Prepaid Agency, all users cannot see the details of the records
entered.

C) Physical Access
The best form of access control is the physical access control. Only
authorized personal should be allowed to do specific tasks like booting of
the machine, mounting disks, distributing reports etc.
In this software the database is centralized means all the data is stored at
one place called as server where as number of clients are attached to it.
Without the server nothing can be done. So, for starting server an
authorized person should be there.

2. Validations
Validations of data entered on various input screens are not a security for the
system but a control to ensure that clean data goes into the system. If data is
not validated on input, you will end up with a lot of inconsistent data.

In computer parlance, this is referred to as Garbage In, Garbage Out. If proper


validation is not done, user tends to lose confidence in the system and it
eventually boils down to a new project of clearing up the data. Typical
validations done on input screen are as follows:

Length of data.

ENROLL NO. 520822367

119

ANIL KUMAR

Type of data (numeric, integers, alphabetic, alphanumeric)

Validation against masters

Discreet values

Cross validation of data across various fields

3. Data Integrity
We can have the best of validations in a system but invalid data can always get
into the system due to some recent changes done on the software, which was
not tested comprehensively, or due to corruption. Whatever the cause, it is a
very good control practice to periodically check the integrity of the data o the
system. Data Integrity could be verified by a number of techniques. Some of the
used techniques are listed below :

Tallying number of records across various tables in the database.

Tallying critical fields across tables in the database.

Whatever be the technique, periodic validation of data will give us early warning
signals in case something is wrong with database.

ENROLL NO. 520822367

120

ANIL KUMAR

Cost Estimation Of The Project

The cost of the project can be calculated by Constructive Cost Model (COCOMO).
Barry Bohem introduced COCOMO Model. Boehms hierarchy of models takes the
following form:

Model1 : Basic COCOMO is a static single-valued model that computes software


development effort (and cost) as a function of program size expressed
in estimated lines of code.

Model2 :

Intermediate COCOMO computes software development effort as a


function of program size and a set of cost drivers that include
subjective assessments of product, hardware, personnel and project
attributes.

Model3 : Advanced COCOMO incorporates all characteristics of the intermediate


versions with the assessment of the cost drivers impact on each step
(analysis, design, etc.) of the software engineering process.

So, for the development of the automated system for On-Line complaint monitoring
system, I will use the Basic COCOMO Model.
COCOMO may be applied to three classes of software projects as given:

1. Organic Mode: Relatively small, simple software projects in which small teams
with good application experience work to a set of less than rigid requirements.

ENROLL NO. 520822367

121

ANIL KUMAR

2. Semi-detached Mode: An intermediate (in size & complexity) software project in


which teams with mix experience levels must meet a rigid and less than rigid
requirements.

3. Embedded Mode: a software project that must be developed within a set of tight
hardware, software and operational constraints.

The basic COCOMO equations take the form:

E=Ab*(KLOC) Bb
D=Cb* E Db

Where E is the effort applied in person-months, D is the development time in


chronological months (elapsed time), and KLOC is the estimated number of
delivered lines of code for the project (expressed in thousands). The coefficients Ab
and Cb and the exponents Bb and Db are given the table :

Table: Basic COCOMO Model

Software Project
Organic
Semi-Detached

Ab
2.4
3.0

Bb
1.05
1.12

Cb
2.5
2.5

Db
0.38
0.35

Embedded

3.6

1.20

2.5

0.32

ENROLL NO. 520822367

122

ANIL KUMAR

Now, for the automated system for On-Line Complaint Monitoring System on
applying Basic COCOMO model, we get

LOC = 1141
KLOC = 1.141
E = Ab*(KLOC) Bb
Therefore, E = 2.4 * (1.141)1.05
= 2.76 efforts applied per person month
D = Cb* E Db
Therefore, D = 2.5 * 2.760.38
= 3.7 months.

ENROLL NO. 520822367

123

ANIL KUMAR

PERT Chart

PERT Chart is a scheduling technique that also shows graphically which tasks
must be completed before others are begun. PERT controls time and costs during
the project and also facilitates finding the right balance between completing a
project on time and completing it with in the budget. PERT recognizes that projects
are complex, that some tasks must be completed before others can start, and that
the appropriate way to manage a project is to define and control each task.

Designing
3.
24

18
Requirement
Gathering
1.

Analysis
12

Integration
Testing

Coding
24

2.

4.

12

6.

Implementation
7

7.

12

12

60

ENROLL NO. 520822367

5.

8.

Unit Testing

Review

9.

10.

Documentation

Finish

124

ANIL KUMAR

GANTT Chart

Gantt chart provides a graphical illustration of a schedule that helps to plan,


coordinate, and track specific tasks in a project.

Work Tasks

Start
Requirement
Gathering
Analysis
Design
Coding
Unit Testing
Integration
Testing
Implementati
on
Review
Documentati
on
Finish

21

26
June

01

08

15

22

July

26

05

07
August

14

18

01

06

12

September

24

ANIL KUMAR

125

ENROLL NO. 520822367

Future Scope Of The Project

END USER SUPPORT:

The proposed system is developed with roles like oracle

and Visual Basic it means that if proposed Agency increases his users it just
has to add more machines and can install client software to new machines
to provide Enquiry on one machine, Amount receiving on other, Amount
receiving on other, Equipment issue/receiving on other and so on...

SECURITY: Data is secure. Only the administrators can do backup and restoring
of data type of job by giving login name and password. To operate the
program also administrator has to enter password.

LARGE DATABASE SUPPORT: using oracle as DBMS means large number of


records can be managed without facing any problem.

UNLIMITED USERS: The proposed system provides with unlimited number of


users. Besides being highly quantities the project presents a unique
combination of mathematical tools.

ENROLL NO. 520822367

126

ANIL KUMAR

Bibliography

The Bibliography contains references to all the documents that were used to
develop the software.

1. Software Engineering A practitioners approach Roger S. Pressman,


(McGrawHill International Edition).

2. Visual Basic 6.0 Super Bible David Jung, Pierre Boutquin, John D. Conley,
Loren Eidahl, Lowell Mauer, Jack Purdum.

3. The Visual Basic 6.0 Database How To Buy Eric Winemiller, Jason Roff, Bill
Meyman, Ryan Groom.
The Complete Reference Visual Basic 6.0 By Noel Jerke.

4. Oracle8 TheCompleteReferenceLoney Koch(Tata McGraw Hill).

5. Commercial Application Development Using Oracle Developer 2000 By Ivan


Bayross.

6. Database System Concepts Abraham Silberschatz, Henry F. Korth, S.

7. Study material by IGNOU.

ENROLL NO. 520822367

127

ANIL KUMAR

Glossary

Analysis: Analysis means breaking a problem into successively manageable


parts for individual study.

Automated Systems: These are nothing but man-made systems that interact
with or are controlled by one or more computers.

Central Functions: Central Functions are the main work of the system. They
transform the major inputs into the major outputs.

Cohesion: Strength within a modules; degree of relationship between elements


within a module.

Constant Data: This implies to data that are same for every entry.

Coupling: It is the strength of relation between modules. It is a measure of the


strength of interconnection between one module and another. The degree
of dependence of one module on another, specifically, a measure of the
chance that a defect in one module will appear as a defect in the other, or
the chance that a change to one module will necessitate a change to the
other.

Context Diagram: This will be the most general diagram, really a birds eye view
of data movement in the system.

ENROLL NO. 520822367

128

ANIL KUMAR

Control: In a system, the element or component that governs the pattern of


activities of the system.

Conversion: Conversion is the task of translating the users current files, forms
and databases to the format required by the new system.

Database: A store of integrated data capable of being directly addressed for


multiple uses; it is organized so that various files can be accessed through
a single reference based on the relationship among records in a file rather
than the physical location.

Database management system (DBMS): The software that determines how


data must be structured to produce the users view; manages, stores, and
retrieves data and enforces procedures.

Data Coupling: A form of coupling in which one module communicates


information to another in the form of elementary parameters.

Data Flow Diagram: Graphic representation of data movement, process, and


files (data stores) used in support of an information system.

Data Integrity: The extent to which the data used for processing is reliable,
accurate, and free from error.

ENROLL NO. 520822367

129

ANIL KUMAR

Data Stores: Data stores could be thought of as the memory of the system. In a
data flow diagram, a storage area for collecting data input during
processing; the symbol is an open rectangle.

Data structure: A logically related set of data that can be decomposed into lower
level data elements; a group of data elements handled as a unit.

Design: The (iterative) process of taking a logical model of a system, together


with a strongly stated set of objectives for that system, and producing the
specification of a physical system that will meet those objectives.
Database Design: It involves designing the conceptual model of the database.

Documentation: A means of communication; a written record of a phase of a


specific project; it establishes design and performance criteria for phases
of the project.

End-users: End-user is widely used by system analysts to refer to people who


are not professional information system specialists but who use computers
to perform their jobs.

External

Entity:

They

are

organizations,

other

information

systems,

departments, or people, which represent a source or destination of


transaction or data.

ENROLL NO. 520822367

130

ANIL KUMAR

Feasibility Study: An important outcome of the preliminary investigation is the


determination that the system requested is feasible, which is done through
feasibility study.

Feedback: The part of a closed-loop system that automatically brings back


information about the condition being controlled.
Field: A specified area of a record used for a particular category of data.

File: Collection of related records organized for a particular purpose.

Flexibility: A measure of the degree to which a system, as is, can be used in a


variety of ways.

Gantt Chart: A static system model used for scheduling; portrays output
performance against time.

Implementation: In system development-a phase that focuses on user Agency,


site preparation and file conversion for installing a candidate system.

Information: A meaningful set of data that tells something about the data
relationships.

Initial Investigation: An exploratory activity that determines whether a user


request is valid and feasible before a standard of action is recommended.
Maintenance: Restoring something to its original condition.

ENROLL NO. 520822367

131

ANIL KUMAR

Manuals: A form of documentation to guide employees in doing their tasks.

Model: A logical or mathematical representation of a system that encompasses


features of interest to the user.

Module: A module is defined as a set of instructions, which can be invoked by


name. It is a group of instructions, i.e., a paragraph, block, subprogram,
subroutine or the like.

On-Line system: A system that accepts input directly from the area where it is
created and in which the output or results of computation are returned
directly to where they are required.

Output: Data that have been processed; the end result (product) of the system
under study.

Overhead: Allocated costs that includes maintenance expense, heat, light and
power; costs that are neither direct nor indirect; costs that are tagged to
the general administration of the business.

Parallel run: Putting the new system into operation in conjunction with the
continued operation of the old system.

Parameter: A variable that is given a constant value for a specific purpose or


process.

ENROLL NO. 520822367

132

ANIL KUMAR

Partitioning:

Dividing a problem into smaller, separate elements for easier

understanding or solution.

Password: Identity authenticator; a key that allows access to a program, system,


or procedure.

Physical Design: A design that produces the working system by defining design
specifications that tell programmers exactly what the candidate system
must do.

Planning: Studying a project standard of action and determining what is to done


to meet stated goals.

Process: Process that transforms input into useful output; in data flow diagram
indicated by a bubble or a circle.

Project Evaluation and Review Technique (PERT): A flow system model used
to manipulate various values as a basis for determining the critical path, to
interpret these relationships and to relate them back to the real world as a
control technique.

Reliability: Dependability or level of confidence; in systems work-the need to


gather dependable information for use in making decisions about the
system being studied.

ENROLL NO. 520822367

133

ANIL KUMAR

Security: The protection of data or hardware against accidental or intentional


damage from a defined threat.

System Analysis: It is the process of totally understanding the current system by


gathering and interpreting the facts, diagnosing problems and using the
facts to improve the current system.

System Design: Detailed concentration on the technical and other specifications


that will make the new system.

Unit testing: This involves the test carried out on modules/ programs, which
make up a system.

Validation: Checking the quality of software in both simulated and live


environment.

ENROLL NO. 520822367

134

ANIL KUMAR

Potrebbero piacerti anche