Sei sulla pagina 1di 223

1

INTRODUCTION:

As the world in over in to the 21’ st century the phase of globalization

and growth of technologies such as computer are feeling both

economic property & human advancement with the rapid life or in

business. The computer communication & associated technologies

are developing at the very fast rate. Computer system is a

facilitator catalyst and reforming against every organization has to

face many problem in management of their organization manually

management of petrol pump is not an easy task. This is the

software for management of petrol pump through this software

management of petrol pump will become easy.

The software “AUTOMATED PETROCARE MANAGEMENT

SYSTEM” manage the front office in which we are concerning about

supply, demand and production of various petroleum products like

Petrol, Diesel and Lubricants etc. My software “AUTOMATED

PETROCARE MANAGEMENT SYSTEM” also manages the salary of

employee and stock of various types of products such as petrol,

diesel and lubricants etc.

2
3
OBJECTIVE:

The main Motive behind the development of this software

“AUTOMATED PETROCARE MANAGEMENT SYSTEM” is that the

manual process involve in sale, purchase of petroleum products and

management of employees salary are so complicated and time

consuming process so avoid this problem computerization of petrol

pump is essential. Through this s/w we can store, retrieve the

different types of information and create friendly environment of

organization. This could be a new path in future for up coming to

petroleum companies this s/w assures accurate and lesser time

consumption.

This software “AUTOMATED PETROCARE MANAGEMENT

SYSTEM” plays and important Role in saving man power because

for operating of this S/W only user is sufficient. The work done

manually lacks accuracy. The overall procedure needs very hard

labors. One big profit of this S/W is accuracy. No huge records have

to be maintained.

The main objectives of this software “AUTOMATED PETROCARE

MANAGEMENT SYSTEM” are: -

1. To perform manually effort intensive function timely reduces

errors and having confirmed to inform principal and practices.

4
2. To provide a better platform for generating salary of

employees according to their performance and managing

stock of products.

3. This S/W is able to reduce man power & time so we can say

that S/W is more efficient, comfortable, and reliable and, user

friendly.

5
6
SYSTEM ANALYSIS

System analysis is the initial and most important phase of software

development. Through analysis software developer may develop

best software, which fulfills all the requirements, needs and

expectations that are related to the software. There are several

types of analysis like Requirement analysis or identityfication

of need, preliminary investigation, and feasibility study are

generally used in the software development for developing efficient,

economical, technical and operational software.

Elements of system analysis

These are four basic elements in system analysis.

 OUTPUTS: first of all we must determine what the objectives


or goal are, what do we intend to achieve, what is the

purpose of our work. In other words, what is the main aim

behind the system? Define aim is very vital in system work.

For example if we do not know where we want to go, we will

not when know when we have reached there. We shall be

unnecessarily wasting our time and energy in the process.

Once we know our aim, we can try to achieve it in the

possible way. The user department has to define these

objectives in terms of their needs. These become the outputs,

which the systems analyst keeps in to mind.

7
 INPUTS: once we know the output, we can easily determine

what the inputs should be. Sometimes, it may happen that

the required information may not be readily available in the

proper form. It may not be possible to get the required

information without the help of top management. Of the

information is vital to the system, we should make all possible

effort to make it available. Sometimes, it might be too costly

to get the desired information. It would be better in such

cases to prepare a cost-benefit analysis to convince the

management of the necessity for acquiring the information.

The essential elements of inputs are:

 ACCURACY: If the data is not accurate, the output will

be wrong.

 TIMELINES: If data is not obtained in time, the entire

system falls in to arrears.

 PROPER FORMAT: The inputs must be available in

proper format.

 ECONOMY: The data must be produce at the least cost.

 FILES: As the word implies files are used to store data. Most

of the inputs necessary for the system may be historical data,

or it may be possible that these are generated form within the

8
system. These are stored in files either in terms of isolated

facts or in large volumes.

 PROCESSES: Here we come to the details of how the inputs

and files are converted into outputs. This involves the

programs and the way in which data is processed through the

computer. The processing involves a set of logical steps.

These steps are required to be instructed to the computers

and this is done by a series of instructions called “program“.

Requirement Analysis

The complete understanding of software requirements is essential

to the success of a software development effort. The requirements

analysis task is a process of discovery, refinement modeling and

specification. The software scope initially established by the system

engineer and refined during software project planning is refined in

detail. Modular of the required data, information and control flow,

and operational behavior are created. Alternative solution are

analyzed and allocated to various software elements. Both

developer and customer take an active role in requirements analysis

and specification. The customer attempts to reformulate a

sometimes-nebulous concept of software function and performance

into concrete detail. The developer acts as interrogator consultant

9
and problem solver. Requirements analysis is a software

engineering task that bridges the gap between system level

software allocation and software design.

System
Engineering

Software
Requirements
Analysis Software
Design

Analysis and a bridge between system engineering and software

design. Requirement analysis enabler the system engineer to

specify software function and performance indicate software’s

interface with other system elements and establish constraints that

software must meet.

Software requirements analysis may be divided into five areas

of effort:

(a) Problem recognition.

10
(b) Evaluation and synthesis

(c) Modeling

(d) Specification

(e) Review

Initially, the analyst studies the system specification and the

software project plan. Problem evaluation and solution synthesis is

the next major area of effort for analysis. Upon evaluating current

problems and desired information (input and output) the analyst

begins to synthesize one or more solutions. During the evaluation

and solution synthesis activity, the analyst creates models of the

system in an effort to better understand data and control flow,

functional processing and behavioral operation, and information

content. The model serves as a foundation for software design and

as the basis for the creation of a specification for the software.

11
Preliminary Investigation

A request to take assistance from information systems can be

made for many reason, but in each case someone in the

organization initiates the request is made, the first systems activity

the Preliminary Investigation beings. This activity has one main

part.

REQUEST CLARIFICATION

Many requests from employees and users in the organizations

are not clearly defined. Therefore, it becomes necessary that the

project request must be examined and clarified properly before

considering systems investigations.

12
13
FEASIBILITY STUDY

Before getting started on the new system it was important to

determine the feasibility involved in the developed system so that

the new system development could be develop. Feasibility is the

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

project 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 determined that project is feasible, the

analyst can go ahead and the prepare the project specification

which finalizes project requirements. Generally, feasibility studies

are undertaken within tight time constraints and Normally culminate

in a written and feasibility report.

The developed system is started after considering the main three

type of feasibilities which are discussed below:-

1)-Technicalfeasibility

2)-Operational feasibility

3)-Economic feasibility

14
Technical Feasibility:

As we know the technical feasibility is concerned with specifying

equipment and software that will successfully satisfy the user

requirement. The technical needs of the system may very

considerably, but might include:

 The facility to produce outputs in a given time.

 Response time under certain conditions.

 Ability to process a certain volume of transaction at a

particular speed.

 Facility to communicate data to distinct location.

In examination technical feasibility, configuration of the system is

given more importance than the actual make of hardware. The

configuration should give the complete picture about the system’s

requirements: How many workstations are required, how these

units are interconnected so that they could operate and

communicate smoothly.

15
Economic Feasibility:

Economic analysis is the most frequently used technique for

evaluating the effectiveness of a proposed system. More commonly

known as cost/benefits analysis the procedure is to determine the

benefits and savings that are expected from a purposed system and

compare with costs. If benefits out weigh cost, 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. This is an on going effort that

improves in accuracy at each phase of the system life cycle. The

analysis part also clears the doubt of economic problems could be

possible in developing the system. As already mentioned that the

company has to just pay the developed software cost and not other

investment is needed at the time of implementation of the new

system as the preliminary requirement are already exist in the

company

16
Operational Feasibility:

Proposed projects are beneficial only if they can be turned into

information system that will meet the operating requirements of the

organization. This test of feasibility asks if the system will work

when it developed and installed. Are there major barriers to

implementation? Some of the important questions that are useful to

test the operational feasibility of a project are given below:

 Is there sufficient support for the project from the

implementation? From user? If the present system is well liked and

used to the extent that persons will not be able to see reasons for

change, there may be resistance.

 Are current business methods acceptable to the user? If they

are not, user may welcome a change that will bring about a more

operational and useful system.

 Have the user been involved in the planning and development

of the project? If they are involved at the earliest stage of project

development, the chances of resistance can be possibly reduced.

 Will the proposed system cause harm? Will it produce poorer

result in any case or area? Will the performance of staff member fall

down after implementation?

Issue that appears to be quite minor at the early stage can grow

into major problem after implementation. Therefore, it is always

17
advisable to consider operational aspects carefully. The system is

developed in keeping mind that it should be user friendly and easy

to operate hence the system is operational feasible.

18
19
Software Engineering Paradigm Applied:

To develop the system Proto Type Modal is applied as the

company wanted to see the software development process and

appearance of the software so that the idea of functionality of the

system can be understood. The software developed in three phases

in first phase the dry proto type is developed in which after the

analysis the screens are designed and no validations are performed

and also no database functionality is incorporated. After the

demonstration of dry proto type suggestions from the client are

noted and the development process is moved to the second phase

i.e. wet prototype the actual designed is incorporated, validations

are performed and the software is submitted to the user for

acceptance and testing and then after final submission of the

software is produced with user manual. To under stand the better

functionality of the Prototype modal the applied modal is described

here given below:

20
Prototype Type Modal:

In general Customer defines a set of objectives for software,

but does not identify detailed input, processing, or output

requirements. In other cases, the developer may be unsure of the

efficiency of an algorithm, the adaptability an operating system or

the form the human machine interaction should have.

In such situations, a prototyping paradigm offers the best approach.

The prototyping paradigm starts with requirements gathering.

Developer and customer define the overall objectives for the

software, identify requirements and outline areas where definition is

necessary. A “quick design “ than focuses on aspects of the

software that are visible to the customer /user. The quick design

leads to the construction of a prototype. The prototype is evaluated

by the customer/user and is used of refine requirement for the

software to be developed. Iteration occurs, as the prototype is

developed to satisfy the needs of the customer and enabling the

developer to better understanding what needs to be done.

The prototype serves as a mechanism for identifying software

requirements if a working prototype is built, the developer uses

existing program fragments or applies tools to make working

program quickly.

21
22
REQUIREMENT SPECIFICATIONS:

SOFTWARE REQUIREMENTS

Programming language : Visual Basic 6.0

Operating system : Microsoft Windows 9X or upgrade

Server side : Microsoft SQL 2000

For documentation : Microsoft Office 97 or Later Version

Reports : Crystal Reports 8.0

HARDWARE REQUIREMENTS

Processor : 300 MHz (500 MHz recommended)

Intel Pentium or other

RAM : 32 MBs min (128MB recommended

For higher version of Windows)

HDD : 50MB of free Hard Disk space (min

10MB virtual space

recommended.)

Monitor : 14’’ SVGA Monitor

CD drive : 32X or later

Floppy drive : 1.44 MB 3.5’’ Floppy Drive

Keyboard : Microsoft standard102 keys normal

Keyboard

Mouse : Microsoft standard 2 buttons or 3

23
Buttons

24
25
SYSTEM DESIGN

Input Design

When designing input, the objective is to ensure that the data

that will be processed by the system is collected and entered into

the system efficiently, according to the specified requirements, and

with the minimum of errors. In description with the client, the

designer will choose a method of input, which is cost effective and

acceptable to the end users. The process of input design, like output

design, which was described earlier, consists of four stages.

 Firstly, identifying the inputs into the system, by listing the

data flows on the required logical data flow diagram which cross the

system boundary on their way in

 Then determining the content of these inputs by inspecting

the data dictionary

 Next choosing an appropriate input device to change the

user's data into a form which can be read and processed by the

computer system

 And finally completing the detailed design work involved in

specifying forms, input screens and other data collection

documents.

Project development required complete analysis of system right

from the scratch Analysis of the system required great attention

26
on big as well as minute transactions This required exhaustive study

of Manual management system. Manual system was divided in

various sections, which were dealt individually. Getting detail of

each section was a tedious and a time consuming task. This

involved various meetings with head of each individual section.

After getting detail of each section whole process was re-evaluated

and a proper design for the system was brought into existence.

Design was discussed with the Workshop’s Manager and was further

improved by eliminating some loopholes. Designing process is

carried on very carefully as this serves as backbone for

development of any software. Thus synopsis of the package was

prepared.

After Design phase attention was laid upon source code of the

package.

Whole project was divided into small modules. Source code for each

module was individually prepared and tested both syntactically and

logically (Modular Testing). In cases modules were further divided

into units and tested (Unit Testing). These units were merged to get

modules and these modules were further available for integration.

This sort of testing comes under Integration Testing. Various tests

were conducted on the package to demonstrate that the system

27
satisfies all the requirements stated in requirements documentation.

This is Acceptance Testing.

Phase 1 of the package has been prepared and is running

successfully (Implementation)

Maintenance of the package would require further enhancement of

the package as per requirements of the company.

28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
SYSTEM DESIGN

System design is the part of designing phase. In which a developer

design the entire system according to analyst. Developers are

generally Data Flow Diagram in this designing phase. Through

data flows diagram designer shows entire system and working of


55
entire system through different types of processes and inputs for

these processes and output of these processes. For which software

would be developed. In the Data Flow Diagrams control floe on

different processes shows by the arrows. Data Flow Diagram is a

best system designing tool and technique.

56
DATA BASE DESIGN

The data in a database is organized according to the data

structure 'imposed' upon it by the physical data model. The physical

data model is normally produced during the physical data design

stage in the development life cycle and tailored specifically to the

selected, or imposed, database type. The rules regarding this

implementation and its subsequent optimization will vary widely

according to the type of DBMS. The Database Management Systems

available today can be grouped into four types.

These are:

 File Management Systems (FMS)

 Hierarchical Databases (HDS)

 Network Databases (NDS)

 Relational Databases (RDBMS)- The relational database model

resulted from an IBM-sponsored research project by Dr.

E.F.Codd. The relation model attempts to overcome some the

failings of the hierarchical and network database model, and

provides easy-to-use and flexible data structure.

 The relational model includes data structure (table), operators

that can be used to manage the data in data structure, and

some integrity rules that ensure that the data obeys the

business rules defined for the system.

57
 The relational model is based on relational algebra concepts

and theory and, in the early days, used some of the same

technology to describe the processing that could be performed

on the data structures For example, relational theory uses the

words "relations" to mean tables, "tuples" to mean rows, and

"attributes" to mean columns in table

 Relational database are the most common type of database

management systems in use today. Created in 1979, ORACLE

is among the products in the field. Other relational database

includes DB2, Ingres, Informix, Sybase, and SQL Server.

 Another important concept in relational databases is that

relationships between tables are not hard-coded in the

structure of the data that is there are no pointers in the data

to relate one table to another. This means that you can

specify the relationships between two sets of data at

development time rather than when the tables are first

created. This greatly improves the flexibility of the database

management system.

 Relational Database Properties- A relational database

management system (RDBMS) has the following properties:

 Represents data in the form of tables

 Does not hard-code relationships between tables

58
 Doesn't require the user to understand its physical

implementation

 Provides information about its contents and structure in

system tables

 Can be manipulated through SQL commands

 Supports the concept of NULL values

In this project the database used is SQL SERVER.

Overview of SQL server:

Oracle is an object-relational database. A relational database is an

extremely simple way of thinking about and managing the data

used in a business. It is nothing more than a collection of tables of

data.

A relational database management system such as SQL server gives

you a way of doing things in an understandable and reasonably

uncompelled way. SQL server basically does three things:

(1) Lets you put data into it.

(2) Keeps the data.

(3) Lets you get the data out and work with it.

The information stored in SQL server is kept in tables. There are

three major characteristics of the tables.

Columns

Rows

59
Name

60
Tables of Information

SQL server stores information in tables. These tables have one or

more columns. The columns heading describe the kind of

information kept in the column. The information is stored row after

row. Each unique set of data gets is own row. Even though the

tables are independent, we can easily see that they are related. A

column in one table is related to a column in the other table. This

relationship is the basis for the name relational database. This is the

basic idea of a relational (sometimes called a relational model).

Data is stored in tables. Tables have columns, rows, and names.

Tables can be related to each other if each has a column with a

common type of information.

The retrieval of data from a database can be faster with primary

key. A primary key is a field that uniquely identifies each record in a

table is called a foreign key. To cascade updating and deletion of

related fields, we enforce the referential integrity. Whenever a

change is made to primary key, SQL Server automatically makes

those changes in the foreign key. When two tables have single

common field, they are said to be 'related'. The types of

relationships, which the tables in SQL Server can have, are:

One to One

One to many

61
Many to One

Many to many

Structured Query Language SQL server was the first company to

release a product that used the English-based structured Query

Languages, or SQL. This Language allowed end users to extract

information themselves, without using a systems group for every

little report. The key words used in a query to OSQL server to help

it understand your request and respond with the correct answer.

The SQL SERVER database system provides a number of benefits,

some of which can also be found in other relational database

systems. SQL server and its components run on more than 100

different hardware & operating system platform (including all the

different versions of UNIX from the many different vendors). SQL

server Corporation also provides a full suite of development tools,

end-user tools, applications, and utilities. Some benefits of using

SQL server are:

Large Databases

Many Users (multiple user can work)

Portable

Backup & Recovery features

Security

62
Client/Server Support

3. Data entities & Key Fields

Entity & Attributes

63
Entity:

An entity is an object, place, person, concept, or activity about

which an enterprises record data.

Attribute-

An attribute is the characteristic property of an existing entity. The

difference between attribute type and attribute instance has to be

understood.

Entities their attributes used in the system and key fields are

discussed here given below:

4.Relationship Diagrams

Relation ship among data

A relationship is defined as "an association among entities". A

relationship type is an association of entity, while a relationship

instance is an association of entity instances.

 One-to-One

If in an entity there is a one field, which is not repeated, and

another entity it is related and also entered once is called One-to-

One relationship.

64
 One-to-Many (or Many-to-One)

In One-to-Many relationship in one table field is not repeated and in

another table which is related to the first table the field has to be

repeated like in the current project in consumer master file

consumer number is not repeated and booking file there is

repetitions of consumer number whenever consumer booked the

refill.

 Many-to-Many

In many to many relation ship both table can have repetitive data.

4. Screen Designs

The quality of screen design can have a direct impact on the

performance of the users of the system, and the designer needs to

consider the format as well as the content of the screens on which

the dialogue, or interaction, between the user and the system is

based. A number of features of screen design are worth discussing

here:

 Text – Must be easily readable. In addition to choosing an

appropriate font and size for the characters, readability can

be improve by using lower and upper case letters, rather than

the approach some times adapted in screen design of using

all upper case evenly

65
Space text, with an unjustified right margin is easier to read than

right justified text, which has spaces of varying sizes between the

words. The use of concise phrase, familiar vocabulary and

appropriate abbreviations make it easier for the reader to

understand the text. The most visible section of the screen is the

upper left-hand corner

And it is a good idea to locate important messages in this area.

Again it is important that the designers understand the

characteristics of the in user in order to deliver quality products.

Beginners, who are usually looking at their fingers, will noticed error

messages

Which appear on the button line on the screen, where as the top

right corner of the screen is a more appropriate location for

experienced keyboard operators.

 Colour- another set of the design option is possible, in

addition to those described above, if the display is in colour. Being

in a different colour to be rest or being enclosed in a coloured box

can highlight text. Background colours can be changed or a design

convention can be used in which different types of information are

displayed in different colours. The consistent use of colours on

screens within the same system is important, and the designer

66
must be wary of using to many colours or creating lurid combination

as these will work against the effectiveness of the screen design.

67
DATA BASE DESCRIPTION

Master Tables

Table: Company_Master

Field name Data type Size Key Constraint

Comapny_id Integer 9 Primary key


Name Varchar 15
Address Varchar 20
City Varchar 15
Phone_no Integer 9

Table: Supplier_Master

Field name Data type Size Key Constraint

Supplier_Id Integer 9 Primary key


Name Varchar 15
Address Varchar 20
Brand Varchar 15
Phone_no Integer 9
Product_list Varchar 15

68
Table: Product_master

Field name Data type Size Key constraint

Product_Id Varchar 9 Primary key


Product_Name Varchar 15
Rate_per_Unit Integer 3
Qty_in_Hand Integer 5
Max_Level Integer 9
Min_Level Integer 3
Qty_in_Order Integer 6
Order_Date Date\Time

Table: Employee_Master

Field name Data type Size Key constraint

Emp_Id Integer 9 (Primary key)


Emp_Name Varchar 15
Emp_Address Varchar 20
Emp_Ph_no Integer 9
Emp_City Varchar 15
Designation Varchar 15
Basic_salary Integer 9

Table: Customer_Master

Field name Data type size Key constraint

Customer_Id Integer 9 (Primary key)


Customer_Name Varchar 15
Customer_Address Varchar 20
Customer_Ph.No Integer 15

69
Department_Name Varchar 15

Table: Fuel_Machine_Master

Field name Data type Size Key constraint

Machine_Id Integer 9 (Primary key)


Fuel_type_name Varchar 15
Opening_Meter Integer 5
Closing_Meter Integer 5

Table: Contract_Master

Field name Data type Size Key constraint

Contract_id Integer 9 (Primary key)


Contract_Date Date\Time
Contractor_Name Varchar 15
Department_name Varchar 15

Table: Shift_Master

Field name Data type Size Key constraint

Shift_Id Integer 9 (Primary key)


Shift_Time Date\Time

Transaction Tables

70
Table: Employee Salary

Field name Data type Size Key constraint

Employee_Id Integer 9 Foreign key


Employee_Name Varchar 15
Basic_Salary Integer 5
Providentfund Integer 4
DA Integer 4
Grosssalary Integer 5
Netsalary Integer 5
Shift_ID Integer 9 Foreign key
Shifttime Date\time

71
Table: Sale

Field name Data type Size Key constraint

Product_Id Integer 9 Foreign key


Product_Name Varchar 15
Customer_id Integer 15 Foreign key
Customer_name Varchar 15
Department_name Varchar 15
Rate Integer 9
Date Date\Time
Product_qty Integer 5
Totalamount Integer 5

72
Table: Purchase

Field name Data type Size Key constraint

Company_Id Integer 9 Foreign key


Supplier_Id Varchar 15 Foreign key
Supplier Name Varchar 15
Supplieraddress Varchar 15
Product_Id Integer 9 Foreign key
Product_Name Varcher 15
Product_Qty Integer 5
Amount Integer 6
Totalamount Integer 6
Order_Date Date\Time

73
Table: Receipt

Field name Data type Size Key Constraint

Product_Id Integer 9 Foreign key


Product_Name Varchar 15
Customer_id Integer 15 Foreign key
Customer_name Varchar 15
Department_name Varchar 15
Rate Integer 9
Date Date\Time
Product_qty Integer 5
Totalamount Integer 5

74
75
CODING

Dim rs As New ADODB.Recordset

Private Sub cmbcompidmod_Click()

If rs.State <> 0 Then rs.Close

rs.Open "select * from companymaster where companyid=" &

(cmbcompidmod.Text) & "", cn, adOpenStatic, adLockOptimistic

If Not rs.EOF Then

With rs

txtcompnamemod.Text = !CompanyName

txtcompaddressmod.Text = !companyaddress

txtcompcitymod.Text = !companycity

txtcompphnomod.Text = !companyphonenumber

End With

rs.Close

End If

End Sub

Private Sub cmbcompidmod_GotFocus()

Call Module1.combofill(cmbcompidmod, "select companyid from

companymaster")

End Sub

Private Sub cmbcompidothers_Click()

If rs.State <> 0 Then rs.Close

76
rs.Open "select * from companymaster where companyid=" &

(cmbcompidothers.Text) & "", cn, adOpenStatic, adLockOptimistic

If Not rs.EOF Then

With rs

txtcompnameothers.Text = !CompanyName

End With

rs.Close

End If

End Sub

Private Sub cmbcompidothers_GotFocus()

Call Module1.combofill(cmbcompidothers, "select companyid from

companymaster")

End Sub

Private Sub cmdcompinsertexit_Click()

mainmenu.Show

End Sub

Private Sub cmdcompinsertref_Click()

Call Module1.clearcontrols

End Sub

Private Sub cmdcompinsertsub_Click()

77
If txtcompidinsert.Text = "" Or txtcompnameinsert.Text = "" Or

txtcompaddressinsert.Text = "" Or txtcompcityinsert.Text = "" Or

txtcompphnoinsert.Text = "" Then

MsgBox "Blank entry not allowed", vbInformation, "INFORMATION"

Else

If rs.State <> 0 Then rs.Close

rs.Open "select * from companymaster where companyid=" &

(txtcompidinsert.Text) & "", cn, adOpenStatic, adLockOptimistic

If Not rs.EOF Then

MsgBox "duplicate entry not allowed", vbInformation, "message"

Exit Sub

Call Module1.clearcontrols

Else

With rs

.AddNew

!companyid = txtcompidinsert.Text

!CompanyName = txtcompnameinsert.Text

!companyaddress = txtcompaddressinsert.Text

!companycity = txtcompcityinsert.Text

!companyphnumber = txtcompphnoinsert.Text

.Update

End With

78
rs.Close

MsgBox "One record add", vbInformation, "message"

Call Module1.clearcontrols

End If

End Sub

Private Sub cmdcompmodexit_Click()

mainmenu.Show

End Sub

Private Sub cmdcompmodref_Click()

Call Module1.clearcontrols

End Sub

Private Sub cmdcompmodup_Click()

If rs.State <> 0 Then rs.Close

rs.Open "select * from companymaster where companyid=" &

(cmbcompidmod.Text) & "", cn, adOpenDynamic, adLockOptimistic

With rs

!CompanyName = txtcompnamemod.Text

!companyaddress = txtcompaddressmod.Text

!companycity = txtcompcitymod.Text

!companyphnumber = txtcompphnomod.Text

.Update

End With

79
rs.Close

Call Module1.clearcontrols

End Sub

Private Sub cmdcompothersexit_Click()

mainmenu.Show

End Sub

Private Sub cmdcompothersref_Click()

Call Module1.clearcontrols

End Sub

Private Sub cmdcompothersyes_Click()

If optdelothers.Value = False And optviewlistothers.Value = False

Then

MsgBox "Please choose any option", vbInformation, "message"

Exit Sub

End If

If optviewlistothers.Value = True Then

cr1.ReportFileName = App.Path & "\Company Report.rpt"

cr1.DiscardSavedData = True

cr1.WindowState = crptMaximized

cr1.Action = 1

Exit Sub

End If

80
If optdelothers.Value = True And cmbcompidothers.Text = "" Then

MsgBox "Please choose company id first"

Exit Sub

Else

cn.Execute "delete from * companymaster where companyid =" &

(cmbcompidothers.Text) & ""

MsgBox "One record deleted", vbInformation, "message"

Call Module1.clearcontrols

End If

End Sub

Private Sub Form_Load()

Call Module1.openconnection

End Sub

81
Dim rs As New ADODB.Recordset

Private Sub cmbcontractidmod_Click()

If rs.State <> 0 Then rs.Close

rs.Open "select * from contractmaster where contractid=" &

(cmbcontractidmod.Text) & "", cn, adOpenStatic, adLockOptimistic

If Not rs.EOF Then

With rs

txtcontractornamemod.Text = !contractorname

dtp1mod.Value = !contractdate

txtcontractdeptnamemod.Text = !departmentname

End With

rs.Close

End If

End Sub

Private Sub cmbcontractidmod_GotFocus()

Call Module1.combofill(cmbcontractidmod, "select contractid from

contractmaster")

End Sub

Private Sub cmbcontractidothers_Click()

If rs.State <> 0 Then rs.Close

82
rs.Open "select * from contractmaster where contractid=" &

(cmbcontractidothers.Text) & "", cn, adOpenStatic,

adLockOptimistic

If Not rs.EOF Then

With rs

txtcontractornameothers.Text = !contractorname

End With

rs.Close

End If

End Sub

Private Sub cmbcontractidothers_GotFocus()

Call Module1.combofill(cmbcontractidothers, "select contractid from

contractmaster")

End Sub

Private Sub cmdconinsertexit_Click()

mainmenu.Show

End Sub

Private Sub cmdconinsertref_Click()

Call Module1.clearcontrols

End Sub

Private Sub cmdconinsertsub_Click()

83
If txtcontractidinsert.Text = "" Or txtcontractornameinsert.Text = ""

Or txtcontractdeptnameinsert.Text = "" Then

MsgBox "Blank entry not allowed", vbInformation, "INFORMATION"

Else

If rs.State <> 0 Then rs.Close

rs.Open "select * from contractmaster where contractid=" &

(txtcontractidinsert.Text) & "", cn, adOpenStatic, adLockOptimistic

If Not rs.EOF Then

MsgBox "duplicate entry not allowed", vbInformation, "message"

Exit Sub

Else

With rs

.AddNew

!contractid = txtcontractidinsert.Text

!contractorname = txtcontractornameinsert.Text

!contractdate = dtp1.Value

!departmentname = txtcontractdeptnameinsert.Text

.Update

End With

End If

rs.Close

MsgBox "One record add", vbInformation, "message"

84
Call Module1.clearcontrols

End If

End Sub

Private Sub cmdconmodexit_Click()

mainmenu.Show

End Sub

Private Sub cmdconmodref_Click()

Call Module1.clearcontrols

End Sub

Private Sub cmdconmodup_Click()

If rs.State <> 0 Then rs.Close

rs.Open "select * from contractmaster where contractid=" &

(cmbcontractidmod.Text) & "", cn, adOpenDynamic,

adLockOptimistic

With rs

!contractorname = txtcontractornamemod.Text

!contractdate = dtp1mod.Value

!departmentname = txtcontractdeptnamemod.Text

.Update

End With

rs.Close

85
MsgBox "One record updated", vbInformation, "message"

Call Module1.clearcontrols

End Sub

Private Sub cmdconothersexit_Click()

mainmenu.Show

End Sub

Private Sub cmdconothersref_Click()

Call Module1.clearcontrols

End Sub

Private Sub cmdconothersyes_Click()

If optdelothers.Value = False And optviewlistothers.Value = False

Then

MsgBox "Please choose any option", vbInformation, "message"

Exit Sub

End If

If optviewlistothers.Value = True Then

cr1.ReportFileName = App.Path & "\Contract Report.rpt"

cr1.DiscardSavedData = True

cr1.WindowState = crptMaximized

cr1.Action = 1

Exit Sub

End If

86
If optdelothers.Value = True And cmbcontractidothers.Text = ""

Then

MsgBox "Pleaswe select contract id first", vbInformation, "message"

Exit Sub

Else

cn.Execute "delete from contractmaster where contractid=" &

(cmbcontractidothers.Text) & ""

Call Module1.clearcontrols

End If

End Sub

Private Sub Form_Load()

Call Module1.openconnection

End Sub

87
Dim rs As New ADODB.Recordset

Private Sub cmbcustomeridcustmod_Click()

If rs.State <> 0 Then rs.Close

rs.Open "select * from customermaster where customerid=" &

(cmbcustomeridcustmod.Text) & "", cn, adOpenStatic,

adLockOptimistic

If Not rs.EOF Then

With rs

txtcustomernamecustmod.Text = !customername

txtcustomeraddresscustmod.Text = !customeraddress

txtcustomerphnocustmod.Text = !customerphno

txtcustomerdeptnamecustmod.Text = !deptname

End With

rs.Close

End If

End Sub

Private Sub cmbcustomeridcustmod_GotFocus()

Call Module1.combofill(cmbcustomeridcustmod, "select customerid

from customermaster")

End Sub

Private Sub cmbcustomeridcustothers_Click()

If rs.State <> 0 Then rs.Close

88
rs.Open "select * from customermaster where customerid=" &

(cmbcustomeridcustothers.Text) & "", cn, adOpenStatic,

adLockOptimistic

With rs

txtcustomernamecustothers.Text = !customername

End With

rs.Close

End Sub

Private Sub cmbcustomeridcustothers_GotFocus()

Call Module1.combofill(cmbcustomeridcustothers, "select

customerid from customermaster")

End Sub

Private Sub cmdcustomerinsertexit_Click()

mainmenu.Show

End Sub

Private Sub cmdcustomerinsertref_Click()

Call Module1.clearcontrols

End Sub

Private Sub cmdcustomerinsertsubmit_Click()

If txtcustomeridcustinsert.Text = "" Or

txtcustomernamecustinsert.Text = ""

Ortxtcustomeraddresscustinsert.Text= "" Or

89
txtcustomerphnocustinsert.Text = "" Or

txtcustomerdeptnamecustinsert.Text = "" Then

MsgBox "Blank entry not allowed", vbInformation, "INFORMATION"

Exit Sub

End If

If rs.State <> 0 Then rs.Close

rs.Open "select * from customermaster where customerid=" &

(txtcustomeridcustinsert.Text) & "", cn, adOpenStatic,

adLockOptimistic

If Not rs.EOF Then

MsgBox "Duplicate entry not allowed", vbInformation, "message"

Exit Sub

Else

With rs

.AddNew

!customerid = txtcustomeridcustinsert.Text

!customername = txtcustomernamecustinsert.Text

!customeraddress = txtcustomeraddresscustinsert.Text

!customerphno = txtcustomerphnocustinsert.Text

!deptname = txtcustomerdeptnamecustinsert.Text

.Update

End With

90
rs.Close

MsgBox "One record add", vbInformation, "message"

Call Module1.clearcontrols

End If

End Sub

Private Sub cmdcustomermodexit_Click()

mainmenu.Show

End Sub

Private Sub cmdcustomermodref_Click()

Call Module1.clearcontrols

End Sub

Private Sub cmdcustomermodupdate_Click()

If cmbcustomeridcustmod.Text = "" Then

MsgBox "Please select any option", vbInformation, "INFORMATION"

Else

If rs.State <> 0 Then rs.Close

rs.Open "select * from customermaster where customerid=" &

(cmbcustomeridcustmod.Text) & "", cn, adOpenDynamic,

adLockOptimistic

If Not rs.EOF Then

With rs

!customername = txtcustomernamecustmod.Text

91
!customeraddress = txtcustomerphnocustmod.Text

!customerphno = txtcustomerphnocustmod.Text

!deptname = txtcustomerdeptnamecustmod.Text

.Update

End With

End If

rs.Close

MsgBox "One record updated"

Call Module1.clearcontrols

End If

End Sub

Private Sub cmdcustomerothersexit_Click()

mainmenu.Show

End Sub

Private Sub cmdcustomerothersref_Click()

Call Module1.clearcontrols

End Sub

Private Sub cmdcustomerothersyes_Click()

If optdelothers.Value = False And optviewlistothers.Value = False

Then

MsgBox "Please choose any option", vbInformation, "message"

Exit Sub

92
End If

If optviewlistothers.Value = True Then

cr1.ReportFileName = App.Path & "\Customer Report.rpt"

cr1.DiscardSavedData = True

cr1.WindowState = crptMaximized

cr1.Action = 1

Exit Sub

End If

If optdelothers.Value = True And cmbcustomeridcustothers.Text =

"" Then

MsgBox "Please select customer id first", vbInformation, "message"

Exit Sub

Else

cn.Execute "delete from customermaster where customerid=" &

(cmbcustomeridcustothers) & ""

MsgBox "One record deleted", vbInformation, "message"

Call Module1.clearcontrols

End If

End Sub

Private Sub Form_Load()

Call Module1.openconnection

End Sub

93
Dim rs As New ADODB.Recordset

Private Sub cmbempidempmod_Click()

If rs.State <> 0 Then rs.Close

rs.Open "select * from empmaster where empid=" &

(cmbempidempmod.Text) & "", cn, adOpenStatic, adLockOptimistic

If Not rs.EOF Then

With rs

txtempnameempmod.Text = !empname

txtempaddressempmod.Text = !empaddress

txtempcityempmod.Text = !empcity

txtempphnoempmod.Text = !empphno

txtempdesignationempmod.Text = !designation

txtempbasicsalaryempmod.Text = !basicsalary

End With

rs.Close

End If

End Sub

Private Sub cmbempidempmod_GotFocus()

Call Module1.combofill(cmbempidempmod, "select empid from

empmaster")

End Sub

Private Sub cmbempidempothers_Click()

94
If rs.State <> 0 Then rs.Close

rs.Open "select * from empmaster where empid=" &

(cmbempidempothers.Text) & "", cn, adOpenStatic,

adLockOptimistic

If Not rs.EOF Then

With rs

txtempnameempothers.Text = !empname

End With

rs.Close

End If

End Sub

Private Sub cmbempidempothers_GotFocus()

Call Module1.combofill(cmbempidempothers, "select empid from

empmaster")

End Sub

Private Sub cmdempexitinsert_Click()

mainmenu.Show

End Sub

Private Sub cmdempexitmod_Click()

mainmenu.Show

End Sub

Private Sub cmdempexitothers_Click()

95
mainmenu.Show

End Sub

Private Sub cmdemprefinsert_Click()

Call Module1.clearcontrols

End Sub

Private Sub cmdemprefmod_Click()

Call Module1.clearcontrols

End Sub

Private Sub cmdemprefothers_Click()

Call Module1.clearcontrols

End Sub

Private Sub cmdempsubmitinsert_Click()

If txtempidempinsert.Text = "" Or txtempnameempinsert.Text = ""

Or txtempaddressempinsert.Text = "" Or txtempcityempinsert.Text

= "" Or txtempphnoempinsert.Text = "" Or

txtempdesignationempinsert.Text = "" Or

txtempbasicsalaryempinsert.Text = "" Then

MsgBox "Blank entry not allowed", vbInformation, "INFORMATION"

Exit Sub

Else

If rs.State <> 0 Then rs.Close

96
rs.Open "select empid from empmaster where empid=" &

(txtempidempinsert.Text) & "", cn, adOpenStatic, adLockOptimistic

If Not rs.EOF Then

MsgBox "dulplicate entry not allowed"

Exit Sub

Else

With rs

.AddNew

!empid = txtempidempinsert.Text

!empname = txtempnameempinsert.Text

!empaddress = txtempaddressempinsert.Text

!empcity = txtempcityempinsert.Text

!empphno = txtempphnoempinsert.Text

!designation = txtempdesignationempinsert.Text

!basicsalary = txtempbasicsalaryempinsert.Text

.Update

End With

rs.Close

Call Module1.clearcontrols

txtempidempinsert.SetFocus

End If

End If

97
End Sub

Private Sub cmdempupdatemod_Click()

If rs.State <> 0 Then rs.Close

rs.Open "select * from empmaster where empid=" &

(cmbempidempmod.Text) & "", cn, adOpenDynamic,

adLockOptimistic

With rs

!empname = txtempnameempmod.Text

!empaddress = txtempaddressempmod.Text

!empcity = txtempcityempmod.Text

!empphno = txtempphnoempmod.Text

!designation = txtempdesignationempmod.Text

!basicsalary = txtempbasicsalaryempmod.Text

.Update

End With

rs.Close

Call Module1.clearcontrols

End Sub

Private Sub cmdempyesothers_Click()

If optdelothers.Value = False And optviewlistothers.Value = False

Then

MsgBox "Please choose any option", vbInformation, "message"

98
Exit Sub

End If

If optviewlistothers.Value = True Then

cr2.ReportFileName = App.Path & "\ Employee Report.rpt"

cr2.DiscardSavedData = True

cr2.WindowState = crptMaximized

cr2.Action = 1

Exit Sub

End If

If optdelothers.Value = True And cmbempidempothers.Text = ""

Then

MsgBox "Please select employee id first", vbInformation, "message"

Exit Sub

Else

cn.Execute "delete from empmaster where empid=" &

(cmbempidempothers) & ""

MsgBox "One Record deleted", vbInformation, "message"

Call Module1.clearcontrols

End If

End Sub

Private Sub Form_Load()

Call Module1.openconnection

99
End Sub

100
Dim rs As New ADODB.Recordset

Private Sub cmbmchidmchmod_Click()

If rs.State <> 0 Then rs.Close

rs.Open "select * from machinemaster where machineid =" &

(cmbmchidmchmod.Text) & "", cn, adOpenStatic, adLockOptimistic

If Not rs.EOF Then

With rs

txtmchfueltypenamemchmod.Text = !fueltypename

txtmchopeningmetermchmod.Text = !openingmeter

txtmchclosingmetermchmod.Text = !closingmeter

End With

rs.Close

End If

End Sub

Private Sub cmbmchidmchmod_GotFocus()

Call Module1.combofill(cmbmchidmchmod, "select machineid from

machinemaster")

End Sub

Private Sub cmbmchidmchothers_Click()

If rs.State <> 0 Then rs.Close

101
rs.Open "select * from machinemaster where machineid =" &

(cmbmchidmchothers.Text) & "", cn, adOpenStatic,

adLockOptimistic

If Not rs.EOF Then

With rs

txtmchfueltypenamemchothers.Text = !fueltypename

End With

rs.Close

End If

End Sub

Private Sub cmbmchidmchothers_GotFocus()

Call Module1.combofill(cmbmchidmchothers, "select machineid from

machinemaster")

End Sub

Private Sub cmdmchinsertexit_Click()

mainmenu.Show

End Sub

Private Sub cmdmchinsertref_Click()

Call Module1.clearcontrols

End Sub

Private Sub cmdmchinsertsub_Click()

102
If txtmchidmchinsert.Text = "" Or

txtmchfueltypenamemchinsert.Text = "" Or

txtmchopeningmetermchinsert.Text = "" Or

txtmchclosingmetermchinsert.Text = "" Then

MsgBox "Blank entry not allowed", vbInformation, "INFORMATION"

End If

If rs.State <> 0 Then rs.Close

rs.Open "select * from machinemaster where machineid=" &

(txtmchidmchinsert.Text) & "", cn, adOpenStatic, adLockOptimistic

If Not rs.EOF Then

MsgBox "Duplicate entry not allowed", vbInformation, "message"

Exit Sub

With rs

.AddNew

!machineid = txtmchidmchinsert.Text

!fueltypename = txtmchfueltypenamemchinsert.Text

!openingmeter = txtmchopeningmetermchinsert.Text

!closingmeter = txtmchclosingmetermchinsert.Text

.Update

End With

rs.Close

MsgBox "One record add", vbInformation, "message"

103
Call Module1.clearcontrols

txtmchidmchinsert.SetFocus

End If

End Sub

Private Sub cmdmchmodexit_Click()

mainmenu.Show

End Sub

Private Sub cmdmchmodref_Click()

Call Module1.clearcontrols

End Sub

104
Private Sub cmdmchmodupdate_Click()

If rs.State <> 0 Then rs.Close

rs.Open "select * from machinemaster where machineid=" &

(cmbmchidmchmod.Text) & "", cn, adOpenDynamic,

adLockOptimistic

With rs

!fueltypename = txtmchfueltypenamemchmod.Text

!openingmeter = txtmchopeningmetermchmod.Text

!closingmeter = txtmchclosingmetermchmod.Text

.Update

End With

rs.Close

MsgBox "One record deleted", vbInformation, "message"

Call Module1.clearcontrols

End Sub

Private Sub cmdmchothersexit_Click()

mainmenu.Show

End Sub

Private Sub cmdmchothersref_Click()

Call Module1.clearcontrols

End Sub

Private Sub cmdmchothersyes_Click()

105
If optdelothers.Value = True Then

cn.Execute "delete from machinemaster where machineid=" &

(cmbmchidmchothers.Text) & ""

Call Module1.clearcontrols

End If

If optviewlistothers.Value = True Then

MsgBox "you are intelligent", vbInformation, "INFORMATION"

End If

End Sub

Private Sub Form_Load()

Call Module1.openconnection

End Sub

106
Dim rs As New ADODB.Recordset

Private Sub cmbprodidprodmod_Click()

If rs.State <> 0 Then rs.Close

rs.Open "select * from productmaster where productid=" &

(cmbprodidprodmod.Text) & "", cn, adOpenStatic, adLockOptimistic

If Not rs.EOF Then

With rs

txtprodnameprodmod.Text = !ProductName

txtprodrateperunitprodmod.Text = !rateperunit

txtprodqtyinhandprodmod.Text = !qtyinhand

txtprodmaxlevelprodmod.Text = !maxlevel

txtprodminlevelprodmod.Text = !minlevel

txtprodqtyinorderprodmod.Text = !qtyinorder

txtprodorderdateprodmod.Text = !orderdate

End With

rs.Close

End If

End Sub

Private Sub cmbprodidprodmod_GotFocus()

Call Module1.combofill(cmbprodidprodmod, "select productid from

productmaster")

107
End Sub

Private Sub cmbprodidprodothers_Click()

If rs.State <> 0 Then rs.Close

rs.Open "select * from productmaster where productid=" &

(cmbprodidprodothers.Text) & "", cn, adOpenStatic,

adLockOptimistic

If Not rs.EOF Then

With rs

txtprodnameprodothers.Text = !ProductName

End With

rs.Close

End If

End Sub

Private Sub cmbprodidprodothers_GotFocus()

Call Module1.combofill(cmbprodidprodothers, "select productid from

productmaster")

End Sub

Private Sub cmdprodinsertexit_Click()

mainmenu.Show

End Sub

Private Sub cmdprodinsertref_Click()

Call Module1.clearcontrols

108
End Sub

Private Sub cmdprodinsertsubmit_Click()

If txtprodidprodinsert.Text = "" Or txtprodnameprodinsert.Text = ""

Or txtprodrateperunitprodinsert.Text = "" Or

txtprodqtyinhandprodinsert.Text = "" Or

txtprodmaxlevelprodinsert.Text = "" Or

txtprodminlevelprodinsert.Text = "" Or

txtprodqtyinhandprodinsert.Text = "" Or

txtprodorderdateprodinsert.Text = "" Then

MsgBox "Alank entry not allowed", vbInformation, "INFORMATION"

Else

If rs.State <> 0 Then rs.Close

rs.Open "select * from productmaster where productid=" &

(txtprodidprodinsert.Text) & "", cn, adOpenStatic, adLockOptimistic

If Not rs.EOF Then

MsgBox "Duplicate entry not allowed"

Exit Sub

Else

With rs

.AddNew

!productid = txtprodidprodinsert.Text

!ProductName = txtprodnameprodinsert.Text

109
!rateperunit = txtprodrateperunitprodinsert.Text

!qtyinhand = txtprodqtyinhandprodinsert.Text

!maxlevel = txtprodmaxlevelprodinsert.Text

!minlevel = txtprodminlevelprodinsert.Text

!qtyinorder = txtprodqtyinorderprodinsert.Text

!orderdate = txtprodorderdateprodinsert.Text

.Update

End With

End If

rs.Close

MsgBox "One record add", vbInformation, "message"

Call Module1.clearcontrols

txtprodidprodinsert.SetFocus

End If

End Sub

Private Sub cmdprodmodexit_Click()

mainmenu.Show

End Sub

Private Sub cmdprodmodref_Click()

Call Module1.clearcontrols

End Sub

Private Sub cmdprodmodupdate_Click()

110
If rs.State <> 0 Then rs.Close

rs.Open "select * from productmaster where productid=" &

(cmbprodidprodmod.Text) & "", cn, adOpendyanmic,

adLockOptimistic

With rs

!ProductName = txtprodnameprodmod.Text

!rateperunit = txtprodrateperunitprodmod.Text

!qtyinhand = txtprodqtyinhandprodmod.Text

!maxlevel = txtprodmaxlevelprodmod.Text

!minlevel = txtprodminlevelprodmod.Text

!qtyinorder = txtprodqtyinorderprodmod.Text

!orderdate = txtprodorderdateprodmod.Text

.Update

End With

rs.Close

MsgBox "One record updated", vbInformation, "message"

Call Module1.clearcontrols

End Sub

Private Sub cmdprodothersexit_Click()

mainmenu.Show

End Sub

Private Sub cmdprodothersref_Click()

111
Call Module1.clearcontrols

End Sub

Private Sub cmdprodothersyes_Click()

If optdelprod.Value = False And optviewlistprod.Value = False Then

MsgBox "Please choose any option", vbInformation, "message"

Exit Sub

End If

If optviewlistprod.Value = True Then

MsgBox "you are intelligent", vbInformation, "INFORMATION"

Exit Sub

End If

If optdelprod.Value = True And cmbprodidprodothers.Text = ""

Then

MsgBox "Please select product id first", vbInformation, "message"

Exit Sub

Else

cn.Execute "delete from productmaster where productid=" &

(cmbprodidprodothers.Text) & ""

MsgBox "One Record deleted", vbInformation, "message"

Call Module1.clearcontrols

End If

End Sub

112
Private Sub Form_Load()

Call Module1.openconnection

End Sub

113
Dim rs As New ADODB.Recordset

Private Sub cmbshiftidshiftmod_Click()

If rs.State <> 0 Then rs.Close

rs.Open "select * from shiftmaster where shiftid=" &

(cmbshiftidshiftmod.Text) & "", cn, adOpenStatic, adLockOptimistic

If Not rs.EOF Then

With rs

txtshifttimeshiftmod.Text = !shifttime

End With

rs.Close

End If

End Sub

Private Sub cmbshiftidshiftmod_GotFocus()

Call Module1.combofill(cmbshiftidshiftmod, "select shiftid from

shiftmaster")

End Sub

Private Sub cmbshiftidshiftothers_Click()

If rs.State <> 0 Then rs.Close

rs.Open "select * from shiftmaster where shiftid=" &

(cmbshiftidshiftothers.Text) & "", cn, adOpenStatic,

adLockOptimistic

If Not rs.EOF Then

114
With rs

txtshifttimeshiftothers.Text = !shifttime

End With

rs.Close

End If

End Sub

Private Sub cmbshiftidshiftothers_GotFocus()

Call Module1.combofill(cmbshiftidshiftothers, "select shiftid from

shiftmaster")

End Sub

Private Sub cmdshiftinsertexit_Click()

mainmenu.Show

End Sub

Private Sub cmdshiftinsertref_Click()

Call Module1.clearcontrols

End Sub

Private Sub cmdshiftinsertsub_Click()

If txtshiftidshiftinsert.Text = "" Or txtshifttimeshiftinsert.Text = ""

Then

MsgBox "ANY TEXT BOX SHOULD NOT BE EMPTY", vbInformation,

"INFORMATION"

Else

115
If rs.State <> 0 Then rs.Close

rs.Open "select * from shiftmaster", cn, adOpenStatic,

adLockOptimistic

With rs

.AddNew

!shiftid = txtshiftidshiftinsert.Text

!shifttime = txtshifttimeshiftinsert.Text

.Update

End With

rs.Close

Call Module1.clearcontrols

End If

End Sub

Private Sub cmdshiftmodexit_Click()

mainmenu.Show

End Sub

Private Sub cmdshiftmodref_Click()

Call Module1.clearcontrols

End Sub

Private Sub cmdshiftmodup_Click()

If rs.State <> 0 Then rs.Close

116
rs.Open "select * from shiftmaster where shiftid=" &

(cmbshiftidshiftmod.Text) & "", cn, adOpenDynamic,

adLockOptimistic

With rs

!shifttime = txtshifttimeshiftmod.Text

.Update

End With

rs.Close

Call Module1.clearcontrols

End Sub

Private Sub cmdshiftothersexit_Click()

mainmenu.Show

End Sub

Private Sub cmdshiftothersref_Click()

Call Module1.clearcontrols

End Sub

Private Sub cmdshiftothersyes_Click()

If optdelothers.Value = True Then

cn.Execute "delete from shiftmaster where shiftid=" &

(cmbshiftidshiftothers.Text) & ""

Call Module1.clearcontrols

End If

117
If optviewlistothers.Value = True Then

MsgBox "you are intelligent", vbInformation, "INFORMATION"

End If

End Sub

Private Sub Form_Load()

Call Module1.openconnection

End Sub

Private Sub Label2_Click()

End Sub

Dim rs As New ADODB.Recordset

Private Sub cmbsuplmodsuplid_Click()

If rs.State <> 0 Then rs.Close

rs.Open "select * from suppliermaster where supplierid=" &

(cmbsuplmodsuplid.Text) & "", cn, adOpenStatic, adLockOptimistic

With rs

txtsuplmodsuplname.Text = !suppliername

txtsuplmodsuplphno.Text = !supplierphno

txtsupmodsuplcity.Text = !suppliercity

txtsuplmodsuplbrand.Text = !brand

txtsuplmodproductlist.Text = !productlist

End With

rs.Close

118
End Sub

Private Sub cmbsuplmodsuplid_GotFocus()

Call Module1.combofill(cmbsuplmodsuplid, "select supplierid from

suppliermaster")

End Sub

Private Sub cmbsuplotherssuplid_Click()

If rs.State <> 0 Then rs.Close

rs.Open "select * from suppliermaster where supplierid=" &

(cmbsuplotherssuplid.Text) & "", cn, adOpenStatic,

adLockOptimistic

With rs

txtsuplotherssuplname.Text = !suppliername

End With

rs.Close

End Sub

Private Sub cmbsuplotherssuplid_GotFocus()

Call Module1.combofill(cmbsuplotherssuplid, "select supplierid from

suppliermaster")

End Sub

Private Sub cmdsuplinsertexit_Click()

mainmenu.Show

End Sub

119
Private Sub cmdsuplinsertref_Click()

Call Module1.clearcontrols

End Sub

Private Sub cmdsuplinsertsubmit_Click()

If txtsuplinsertsuplid.Text = "" Or txtsuplinsertsuplname.Text = ""

Or txtsuplinsertsuplphno.Text = "" Or txtsuplinsertsuplcity.Text = ""

Or txtsuplinsertsuplbrand.Text = "" Or

txtsuplinsertsuplproductlist.Text = "" Then

MsgBox "ANY TEXT BOX SHOULD NOT BE EMPTY", vbInformation,

"INFORMATION"

Else

If rs.State <> 0 Then rs.Close

rs.Open "select * from suppliermaster", cn, adOpenStatic,

adLockOptimistic

With rs

.AddNew

!supplierid = txtsuplinsertsuplid.Text

!suppliername = txtsuplinsertsuplname.Text

!supplierphno = txtsuplinsertsuplphno.Text

!suppliercity = txtsuplinsertsuplcity.Text

!brand = txtsuplinsertsuplbrand.Text

!productlist = txtsuplinsertsuplproductlist.Text

120
.Update

End With

rs.Close

Call Module1.clearcontrols

txtsuplinsertsuplid.SetFocus

End If

End Sub

Private Sub cmdsuplmodexit_Click()

mainmenu.Show

End Sub

Private Sub cmdsuplmodref_Click()

Call Module1.clearcontrols

End Sub

Private Sub cmdsuplmodupdate_Click()

If rs.State <> 0 Then rs.Close

rs.Open "select * from suppliermaster where supplierid=" &

(cmbsuplmodsuplid.Text) & "", cn, adOpenDynamic,

adLockOptimistic

If Not rs.EOF Then

With rs

!suppliername = txtsuplmodsuplname.Text

!supplierphno = txtsuplmodsuplphno.Text

121
!suppliercity = txtsupmodsuplcity.Text

!brand = txtsuplmodsuplbrand.Text

!productlist = txtsuplmodproductlist.Text

.Update

End With

rs.Close

End If

Call Module1.clearcontrols

End Sub

Private Sub cmdsuplothersexit_Click()

mainmenu.Show

End Sub

Private Sub cmdsuplothersref_Click()

Call Module1.clearcontrols

End Sub

Private Sub cmdsuplothersyes_Click()

If optdelotherssupl.Value = True Then

cn.Execute "delete from suppliermaster where supplierid=" &

(cmbsuplotherssuplid.Text) & ""

Call Module1.clearcontrols

End If

If optviewlistotherssupl.Value = True Then

122
MsgBox "you are intelligent", vbInformation, "information"

End If

End Sub

Private Sub Form_Load()

Call Module1.openconnection

End Sub

123
Dim rs As New ADODB.Recordset

Dim i As Integer

Dim mode As String

Private Sub cmbemployeeid_Click()

If rs.State <> 0 Then rs.Close

rs.Open "select * from employeemaster where employeeid=" &

(cmbemployeeid.Text) & "", cn, adOpenStatic, adLockOptimistic

If Not rs.EOF Then

With rs

txtemployeename.Text = !employeename

txtbasicsalary.Text = !basicsalary

txtdesignation.Text = !designation

txtpf.Text = (Val(txtbasicsalary.Text) * 10 / 100)

txtda.Text = (Val(txtbasicsalary.Text) * 40 / 100)

txtgrosssalary.Text = Val(txtbasicsalary.Text) + Val(txtda.Text)

txtnetsal.Text = Val(txtgrosssalary.Text) - Val(txtpf.Text)

End With

rs.Close

End If

End Sub

Private Sub cmbemployeeid_GotFocus()

124
Call Module1.combofill(cmbemployeeid, "select employeeid from

employeemaster")

End Sub

Private Sub cmbsalaryslipno_Click()

If rs.State <> 0 Then rs.Close

rs.Open "select * from employeesalary where salaryslipno=" &

(cmbsalaryslipno.Text) & "", cn, adOpenStatic, adLockOptimistic

If Not rs.EOF Then

With rs

cmbemployeeid.Text = !employeeid

dtp1.Value = !dateofsalary

txtemployeename.Text = !employeename

txtbasicsalary.Text = !basicsalary

txtpf.Text = !providentfund

txtda.Text = !da

txtdesignation.Text = !designation

cmbshiftid.Text = !shiftid

txtshifttime.Text = !shifttime

txtgrosssalary.Text = !grosssalary

txtnetsal.Text = !netsalary

End With

rs.Close

125
End If

End Sub

Private Sub cmbsalaryslipno_GotFocus()

Call Module1.combofill(cmbsalaryslipno, "select salaryslipno from

employeesalary")

End Sub

Private Sub cmbshiftid_Click()

If rs.State <> 0 Then rs.Close

rs.Open "select shifttime from shiftmaster where shiftid=" &

(cmbshiftid.Text) & "", cn, adOpenStatic, adLockOptimistic

If Not rs.EOF Then

With rs

txtshifttime.Text = !shifttime

End With

rs.Close

End If

End Sub

Private Sub cmbshiftid_GotFocus()

Call Module1.combofill(cmbshiftid, "select shiftid from shiftmaster")

End Sub

Private Sub cmdaddnew_Click()

126
mode = "New"

cmbsalaryslipno.Visible = False

txtsalaryslipno.Visible = True

cmdaddnew.Enabled = False

cmdsave.Enabled = True

cmdmodify.Enabled = False

cmddelete.Enabled = False

cmdrefresh.Enabled = True

cmdexit.Enabled = True

Frame1.Enabled = True

Frame2.Enabled = True

End Sub

Private Sub cmddelete_Click()

If cmbsalaryslipno.Text = "" Then

MsgBox "Please choose salary slip no", vbInformation, "message"

Exit Sub

Else

cn.Execute "delete * from employeesalary where salaryslipno=" &

(cmbsalaryslipno.Text) & ""

MsgBox "One record deleted", vbInformation, "message"

Call Module1.clearcontrols

End If

127
End Sub

Private Sub cmdexit_Click()

Unload Me

End Sub

Private Sub cmdmodify_Click()

mode = "Edit"

cmbsalaryslipno.Visible = True

txtsalaryslipno.Visible = False

cmdaddnew.Enabled = False

cmdsave.Enabled = True

cmddelete.Enabled = True

cmdrefresh.Enabled = True

cmdmodify.Enabled = False

cmdexit.Enabled = True

Frame1.Enabled = True

Frame2.Enabled = True

End Sub

Private Sub cmdrefresh_Click()

Call Module1.clearcontrols

End Sub

Private Sub cmdsave_Click()

If mode = "New" Then

128
If txtsalaryslipno.Text = "" Then 'Or List1.ListCount = 0 Or

List2.ListCount = 0 Or List3.ListCount = 0 Or List4.ListCount = 0 Or

List5.ListCount = 0 Or List6.ListCount = 0 Or List7.ListCount = 0 Or

List8.ListCount = 0 Or List9.ListCount = 0 Or List10.ListCount = 0

Then

MsgBox "Blank entries are not allowed", vbInformation

Exit Sub

End If

If rs.State <> 0 Then rst.Close

rs.Open "select * from employeesalary where salaryslipno =" &

(txtsalaryslipno.Text) & " ", cn, adOpenStatic, adLockOptimistic

If Not rs.EOF Then

MsgBox "Duplicate Entry Not Allowed..!", vbCritical

Exit Sub

Else

With rs

rs.AddNew

!dateofsalary = dtp1.Value

!salaryslipno = txtsalaryslipno.Text

!employeeid = cmbemployeeid.Text 'List1.List(i)

!employeename = txtemployeename 'List2.List(i)

!designation = txtdesignation.Text 'List3.List(i)

129
!basicsalary = txtbasicsalary.Text 'List4.List(i)

!providentfund = txtpf.Text 'List5.List(i)

!da = txtda.Text 'List6.List(i)

!shiftid = cmbshiftid.Text 'List7.List(i)

!shifttime = txtshifttime.Text 'List8.List(i)

!grosssalary = txtgrosssalary.Text 'List9.List(i)

!netsalary = txtnetsal.Text 'List10.List(i)

rs.Update

End With

End If

rs.Close

MsgBox "One record added", vbInformation, "message"

ElseIf mode = "Edit" Then

If cmbsalaryslipno.Text = "" Then

MsgBox "please select salaryslip number", vbInformation

Exit Sub

End If

If rs.State <> 0 Then rst.Close

rs.Open "select * from employeesalary", cn, adOpenDynamic,

adLockOptimistic

With rs

rs.AddNew

130
!dateofsalary = dtp1.Value

salaryslipno = cmbsalaryslipno.Text

!employeeid = cmbemployeeid.Text 'List1.List(i)

!employeename = txtemployeename 'List2.List(i)

!designation = txtdesignation.Text 'List3.List(i)

!basicsalary = txtbasicsalary.Text 'List4.List(i)

!providentfund = txtpf.Text 'List5.List(i)

!da = txtda.Text 'List6.List(i)

!shiftid = cmbshiftid.Text 'List7.List(i)

!shifttime = txtshifttime.Text 'List8.List(i)

!grosssalary = txtgrosssalary.Text 'List9.List(i)

!netsalary = txtnetsal.Text 'List10.List(i)

rs.Update

End With

rs.Close

MsgBox "Updated Record saved", vbInformation, "message"

Call Module1.clearcontrols

End If

mode = ""

cmdaddnew.Enabled = True

cmdmodify.Enabled = True

131
cmdsave.Enabled = False

cmdrefresh.Enabled = False

cmddelete.Enabled = False

cmdexit.Enabled = True

Frame1.Enabled = True

Frame2.Enabled = True

Call Module1.clearcontrols

End Sub

Private Sub Form_Load()

Call Module1.openconnection

Frame1.Enabled = True

Frame2.Enabled = True

End Sub

132
Dim rst As New ADODB.Recordset

Dim i As Integer

Dim j As Integer

Dim mode As String

Dim sum As Integer

Private Sub cmdaddnew_Click()

mode = "New"

txtvoucherno.Visible = True

cmbvoucherno.Visible = False

cmdaddnew.Enabled = False

cmdexit.Enabled = True

cmdsave.Enabled = True

cmdrefresh.Enabled = True

cmddelete.Enabled = False

Frame1.Enabled = True

Frame2.Enabled = True

Frame3.Enabled = True

End Sub

Private Sub cmbcompanyid_Click()

If rst.State <> 0 Then rst.Close

133
rst.Open "select * from companymaster where companyid=" &

(cmbcompanyid.Text) & "", cn, adOpenDynamic, adLockOptimistic

If Not rst.EOF Then

With rst

txtcompanyname.Text = !CompanyName

txtcompanyaddress.Text = !companyaddress

End With

rst.Close

End If

End Sub

Private Sub cmbcompanyid_GotFocus()

Call Module1.combofill(cmbcompanyid, "select companyid from

companymaster")

End Sub

Private Sub cmbvoucherno_Click()

If rst.State <> 0 Then rst.Close

rst.Open "select * from purchase where voucherno=" &

(cmbvoucherno.Text) & "", cn, adOpenDynamic, adLockOptimistic

If Not rst.EOF Then

With rst

dtp1.Value = !orderdate

cmbcompanyid.Text = !companyid

134
txtcompanyname.Text = !CompanyName

txtcompanyaddress.Text = !companyaddress

txttotalamount.Text = !totalamount

For i = 0 To rst.RecordCount - 1

List1.AddItem !productid

List2.AddItem !ProductName

List3.AddItem !productRate

List4.AddItem !productqty

List5.AddItem !amount

rst.MoveNext

Next

End With

rst.Close

End If

End Sub

Private Sub cmbvoucherno_GotFocus()

Call Module1.combofill(cmbvoucherno, "select voucherno from

purchase")

End Sub

Private Sub cmbproductid_Click()

If rst.State <> 0 Then rst.Close

135
rst.Open "select * from productmaster where productid=" &

(cmbproductid.Text) & "", cn, adOpenDynamic, adLockOptimistic

If Not rst.EOF Then

With rst

txtproductname.Text = !ProductName

txtproductrate.Text = !rateperunit

txtproductqty.Text = !qtyinorder

txtamount.Text = Val(txtproductrate.Text) *

Val(txtproductqty.Text)

End With

rst.Close

End If

End Sub

Private Sub cmbproductid_GotFocus()

Call Module1.combofill(cmbproductid, "select productid from

productmaster")

End Sub

Private Sub cmdexit_Click()

Unload Me

End Sub

Private Sub cmdrefresh_Click()

mode = " "

136
Call Module1.clearcontrols

cmdaddnew.Visible = True

cmdmodify.Visible = True

cmdsave.Enabled = False

cmdrefresh.Enabled = False

cmddelete.Enabled = False

cmdexit.Enabled = True

Frame1.Visible = True

Frame2.Visible = True

Frame3.Enabled = True

End Sub

Private Sub cmddelete_Click()

cmdaddnew.Enabled = True

cmdmodify.Enabled = True

cmdsave.Enabled = False

cmdrefresh.Enabled = False

cmddelete.Enabled = True

cmdexit.Enabled = True

Frame1.Visible = True

Frame2.Visible = True

Frame3.Enabled = True

If cmbvoucherno.Text = "" Then

137
MsgBox "Please choose voucher number", vbInformation,

"message"

Exit Sub

Else

cn.Execute "delete * from purchase where voucherno =" &

(cmbvoucherno.Text) & ""

MsgBox "One record deleted", vbInformation, "message"

Call Module1.clearcontrols

End If

End Sub

Private Sub Form_Load()

Call Module1.openconnection

txtvoucherno.Visible = True

cmbvoucherno.Visible = False

End Sub

Private Sub List1_Click()

List2.ListIndex = List1.ListIndex

List3.ListIndex = List1.ListIndex

List4.ListIndex = List1.ListIndex

List5.ListIndex = List1.ListIndex

End Sub

Private Sub List2_Click()

138
List1.ListIndex = List2.ListIndex

List3.ListIndex = List2.ListIndex

List4.ListIndex = List2.ListIndex

List5.ListIndex = List2.ListIndex

End Sub

Private Sub List3_Click()

List1.ListIndex = List3.ListIndex

List3.ListIndex = List3.ListIndex

List4.ListIndex = List3.ListIndex

List5.ListIndex = List3.ListIndex

End Sub

Private Sub List4_Click()

List1.ListIndex = List4.ListIndex

List2.ListIndex = List4.ListIndex

List3.ListIndex = List4.ListIndex

List5.ListIndex = List4.ListIndex

End Sub

Private Sub List5_Click()

List1.ListIndex = List5.ListIndex

List2.ListIndex = List5.ListIndex

List3.ListIndex = List5.ListIndex

139
List4.ListIndex = List5.ListIndex

End Sub

Private Sub cmdmodify_Click()

mode = "Edit"

cmbvoucherno.Visible = True

txtvoucherno.Visible = False

cmdaddnew.Enabled = False

cmdmodify.Enabled = False

cmdsave.Enabled = True

cmdrefresh.Enabled = True

cmddelete.Enabled = True

cmdexit.Enabled = True

End Sub

Private Sub cmdremove_Click()

If List1.ListIndex <> -1 Then

txttotalamount.Text = Val(txttotalamount.Text) -

Val(List5.List(List5.ListIndex))

List1.RemoveItem List1.ListIndex

List2.RemoveItem List2.ListIndex

List3.RemoveItem List3.ListIndex

List4.RemoveItem List4.ListIndex

140
List5.RemoveItem List5.ListIndex

Else

MsgBox "please select any item from List..1", vbInformation

Exit Sub

End If

End Sub

Private Sub cmdsave_Click()

If mode = "New" Then

If txtvoucherno.Text = "" Or cmbcompanyid.Text = "" Or

List1.ListCount = 0 Or List2.ListCount = 0 Or List3.ListCount = 0 Or

List4.ListCount = 0 Or List5.ListIndex = 0 Then

MsgBox "Blank entries are not allowed", vbInformation

Exit Sub

End If

If rst.State <> 0 Then rst.Close

rst.Open "select * from purchase where voucherno = " &

(txtvoucherno.Text) & "", cn, adOpenStatic, adLockOptimistic

If Not rst.EOF Then

MsgBox "Duplicate Entry Not Allowed..!", vbCritical

Else

With rst

141
For i = 0 To List1.ListCount - 1

rst.AddNew

!orderdate = dtp1.Value

!voucherno = txtvoucherno.Text

!companyid = cmbcompanyid.Text

!CompanyName = txtcompanyname.Text

!companyaddress = txtcompanyaddress.Text

!totalamount = txttotalamount.Text

!productid = List1.List(i)

!ProductName = List2.List(i)

!productRate = List3.List(i)

!productqty = List4.List(i)

!amount = List5.List(i)

rst.Update

Next

End With

End If

rst.Close

MsgBox "One record added", vbInformation, "message"

ElseIf mode = "Edit" Then

If cmbvoucherno.Text = "" Then

MsgBox "please select voucher no", vbInformation

142
Exit Sub

End If

cn.Execute "delete * from purchase where voucherno=" &

(cmbvoucherno.Text) & ""

If rst.State <> 0 Then rst.Close

rst.Open "select * from purchase", cn, adOpenStatic,

adLockOptimistic

With rst

For i = 0 To List1.ListCount - 1

rst.AddNew

!orderdate = dtp1.Value

!voucherno = cmbvoucherno.Text

!companyid = cmbcompanyid.Text

!CompanyName = txtcompanyname.Text

!companyaddress = txtcompanyaddress.Text

!totalamount = txttotalamount.Text

!productid = List1.List(i)

!ProductName = List2.List(i)

!productRate = List3.List(i)

!productqty = List4.List(i)

!amount = List5.List(i)

143
rst.Update

Next

End With

rst.Close

MsgBox "Updated Record saved", vbInformation, "message"

Call Module1.clearcontrols

End If

mode = ""

cmdaddnew.Enabled = True

cmdmodify.Enabled = True

cmdsave.Enabled = False

cmdrefresh.Enabled = False

cmddelete.Enabled = False

cmdexit.Enabled = True

Frame1.Enabled = True

Frame2.Enabled = True

Frame3.Enabled = True

Call Module1.clearcontrols

End Sub

Private Sub cmdselect_Click()

144
If cmbproductid.Text = "" Or txtproductqty.Text = "" Then

MsgBox "Blank entry does not allowed", vbInformation, "message "

Exit Sub

End If

For i = 0 To List1.ListCount - 1

If cmbproductid.Text = List1.List(i) Then

MsgBox "duplicate enrty does not allowed in list box",

vbInformation, "Message"

cmbproductid.Text = ""

txtproductname.Text = ""

txtproductrate.Text = ""

txtproductqty.Text = ""

txtamount.Text = ""

Exit Sub

End If

Next

List1.AddItem cmbproductid.Text

List2.AddItem txtproductname.Text

List3.AddItem txtproductrate.Text

List4.AddItem txtproductqty.Text

List5.AddItem txtamount.Text

145
txttotalamount.Text = Val(txttotalamount.Text) +

Val(txtamount.Text)

cmbproductid.Text = ""

txtproductname.Text = ""

txtproductrate.Text = ""

txtproductqty.Text = ""

txtamount.Text = ""

End Sub

Receipt

Dim rs As New ADODB.Recordset

Dim i As Integer

Dim mode As String

Dim sum As Integer

Private Sub cmbbillnumber_Click()

If rs.State <> 0 Then rs.Close

rs.Open "select * from reciepttrans where billnumber=" &

(cmbbillnumber.Text) & "", cn, adOpenStatic, adLockOptimistic

If Not rs.EOF Then

With rs

dtp1.Value = !dateofsale

cmbcontractid.Text = !contractid

146
txtdepartmentname.Text = !departmentname

txtcustomername.Text = !customername

txttotalamount.Text = !totalamount

For i = 0 To rs.RecordCount - 1

List1.AddItem !productid

List2.AddItem !ProductName

List3.AddItem !productqty

List4.AddItem !Rate

rs.MoveNext

Next

End With

rs.Close

End If

End Sub

Private Sub cmbbillnumber_GotFocus()

Call Module1.combofill(cmbbillnumber, "select billnumber from

reciepttrans")

End Sub

Private Sub cmbcontractid_Click()

If rs.State <> 0 Then rs.Close

147
rs.Open "select departmentname from contractmaster where

contractid=" & (cmbcontractid.Text) & "", cn, adOpenStatic,

adLockOptimistic

If Not rs.EOF Then

With rs

txtdepartmentname.Text = !departmentname

End With

rs.Close

End If

End Sub

Private Sub cmbcontractid_GotFocus()

Call Module1.combofill(cmbcontractid, "select contractid from

contractmaster")

End Sub

Private Sub cmbproductid_Click()

If rs.State <> 0 Then rs.Close

rs.Open "select * from productmaster where productid=" &

(cmbproductid.Text) & "", cn, adOpenStatic, adLockOptimistic

If Not rs.EOF Then

With rs

txtproductname.Text = !ProductName

txtproductrate.Text = !rateperunit

148
End With

rs.Close

End If

End Sub

Private Sub cmbproductid_GotFocus()

Call Module1.combofill(cmbproductid, "select productid from

productmaster")

End Sub

Private Sub cmdaddnew_Click()

mode = "New"

cmbbillnumber.Visible = False

txtbillnumber.Visible = True

cmdaddnew.Enabled = False

cmdsave.Enabled = True

cmddelete.Enabled = False

cmdmodify.Enabled = False

cmdexit.Enabled = True

cmdrefresh.Enabled = True

reciept.Enabled = True

End Sub

Private Sub cmdcalculate_Click()

sum = 0

149
For i = 0 To List4.ListCount - 1

sum = sum + List4.List(i)

Next

txttotalamount.Text = sum

End Sub

Private Sub cmddelete_Click()

If cmbbillnumber.Text = "" Then

MsgBox "Please choose Billnumber first", vbInformation, "message"

Exit Sub

Else

cn.Execute "delete * from reciepttrans where billnumber=" &

(cmbbillnumber.Text) & ""

MsgBox "One record deleted", vbInformation, "message"

Call Module1.clearcontrols

End If

End Sub

Private Sub cmdexit_Click()

Unload Me

End Sub

Private Sub cmdmodify_Click()

mode = "Edit"

cmbbillnumber.Visible = True

150
txtbillnumber.Visible = False

cmdaddnew.Enabled = True

cmdmodify.Enabled = False

cmddelete.Enabled = True

cmdsave.Enabled = True

cmdrefresh.Enabled = True

cmdexit.Enabled = True

reciept.Enabled = True

End Sub

Private Sub cmdrefresh_Click()

Call Module1.clearcontrols

End Sub

Private Sub cmdremove_Click()

If List1.ListIndex <> -1 Then

txttotalamount.Text = Val(txttotalamount.Text) -

Val(List4.List(List4.ListIndex))

List1.RemoveItem List1.ListIndex

List2.RemoveItem List2.ListIndex

List3.RemoveItem List3.ListIndex

List4.RemoveItem List4.ListIndex

Else

MsgBox "please select any item from List..1", vbInformation

151
Exit Sub

End If

End Sub

Private Sub cmdsave_Click()

If mode = "New" Then

If txtbillnumber.Text = "" Or txtcustomername.Text = "" Or

List1.ListCount = 0 Or List2.ListCount = 0 Or List3.ListCount = 0 Or

List4.ListCount = 0 Then

MsgBox "Blank entries are not allowed", vbInformation

Exit Sub

End If

If rs.State <> 0 Then rst.Close

rs.Open "select * from reciepttrans where billnumber =" &

(txtbillnumber.Text) & " ", cn, adOpenStatic, adLockOptimistic

If Not rs.EOF Then

MsgBox "Duplicate Entry Not Allowed..!", vbCritical

Else

With rs

For i = 0 To List1.ListCount - 1

rs.AddNew

!dateofsale = dtp1.Value

!billnumber = txtbillnumber.Text

152
!contractid = cmbcontractid.Text

!departmentname = txtdepartmentname.Text

!customername = txtcustomername.Text

!totalamount = txttotalamount.Text

!productid = List1.List(i)

!ProductName = List2.List(i)

!productqty = List3.List(i)

!Rate = List4.List(i)

rs.Update

Next

End With

End If

rs.Close

MsgBox "One record added", vbInformation, "message"

ElseIf mode = "Edit" Then

If cmbbillnumber.Text = "" Then

MsgBox "please select bill number", vbInformation

Exit Sub

End If

cn.Execute "delete * from reciepttrans where billnumber=" &

(cmbbillnumber.Text) & ""

If rs.State <> 0 Then rst.Close

153
rs.Open "select * from reciepttrans", cn, adOpenDynamic,

adLockOptimistic

With rs

For i = 0 To List1.ListCount - 1

rs.AddNew

!dateofsale = dtp1.Value

!billnumber = cmbbillnumber.Text

!contractid = cmbcontractid.Text

!departmentname = txtdepartmentname.Text

!customername = txtcustomername.Text

!totalamount = txttotalamount.Text

!productid = List1.List(i)

!ProductName = List2.List(i)

!productqty = List3.List(i)

!Rate = List4.List(i)

rs.Update

Next

End With

rs.Close

MsgBox "Updated Record saved", vbInformation, "message"

Call Module1.clearcontrols

154
End If

mode = ""

cmdaddnew.Enabled = True

cmdmodify.Enabled = True

cmdsave.Enabled = False

cmdrefresh.Enabled = False

cmddelete.Enabled = False

cmdexit.Enabled = True

reciept.Enabled = True

Call Module1.clearcontrols

End Sub

Private Sub cmdselect_Click()

If cmbproductid.Text = "" Or txtproductqty.Text = "" Then

MsgBox "Blank entry does not allowed", vbInformation, "message "

Exit Sub

End If

For i = 0 To List1.ListCount - 1

If cmbproductid.Text = List1.List(i) Then

MsgBox "duplicate enrty does not allowed in list box",

vbInformation, "Message"

cmbproductid.Text = ""

txtproductname.Text = ""

155
txtproductrate.Text = ""

txtproductqty.Text = ""

Exit Sub

End If

Next

List1.AddItem cmbproductid.Text

List2.AddItem txtproductname.Text

List3.AddItem txtproductqty.Text

List4.AddItem txtproductrate.Text * txtproductqty.Text

cmbproductid.Text = ""

txtproductname.Text = ""

txtproductrate.Text = ""

txtproductqty.Text = ""

End Sub

Private Sub Form_Load()

Call Module1.openconnection

reciept.Enabled = True

End Sub

Private Sub List1_Click()

List2.ListIndex = List1.ListIndex

List3.ListIndex = List1.ListIndex

List4.ListIndex = List1.ListIndex

156
End Sub

Private Sub List2_Click()

List1.ListIndex = List2.ListIndex

List3.ListIndex = List2.ListIndex

List4.ListIndex = List2.ListIndex

End Sub

Private Sub List3_Click()

List1.ListIndex = List3.ListIndex

List2.ListIndex = List3.ListIndex

List4.ListIndex = List3.ListIndex

End Sub

Private Sub List4_Click()

List1.ListIndex = List4.ListIndex

List2.ListIndex = List4.ListIndex

List3.ListIndex = List4.ListIndex

End Sub

157
Dim rs As New ADODB.Recordset

Dim i As Integer

Dim mode As String

Dim sum As Integer

Private Sub cmbbillnumber_Click()

If rs.State <> 0 Then rs.Close

rs.Open "select * from saletrans where billnumber=" &

(cmbbillnumber.Text) & "", cn, adOpenStatic, adLockOptimistic

If Not rs.EOF Then

With rs

dtp1.Value = !dateofsale

cmbcontractid.Text = !contractid

txtdepartmentname.Text = !departmentname

txtcustomername.Text = !customername

txttotalamount.Text = !totalamount

For i = 0 To rs.RecordCount - 1

List1.AddItem !productid

List2.AddItem !ProductName

List3.AddItem !productqty

List4.AddItem !Rate

rs.MoveNext

Next

158
End With

rs.Close

End If

End Sub

Private Sub cmbbillnumber_GotFocus()

Call Module1.combofill(cmbbillnumber, "select billnumber from

saletrans")

End Sub

Private Sub cmbcontractid_Click()

If rs.State <> 0 Then rs.Close

rs.Open "select departmentname from contractmaster where

contractid=" & (cmbcontractid.Text) & "", cn, adOpenStatic,

adLockOptimistic

If Not rs.EOF Then

With rs

txtdepartmentname.Text = !departmentname

End With

rs.Close

End If

End Sub

Private Sub cmbcontractid_GotFocus()

159
Call Module1.combofill(cmbcontractid, "select contractid from

contractmaster")

End Sub

Private Sub cmbproductid_Click()

If rs.State <> 0 Then rs.Close

rs.Open "select * from productmaster where productid=" &

(cmbproductid.Text) & "", cn, adOpenStatic, adLockOptimistic

If Not rs.EOF Then

With rs

txtproductname.Text = !ProductName

txtproductrate.Text = !rateperunit

End With

rs.Close

End If

End Sub

Private Sub cmbproductid_GotFocus()

Call Module1.combofill(cmbproductid, "select productid from

productmaster")

End Sub

Private Sub cmdaddnew_Click()

mode = "New"

cmbbillnumber.Visible = False

160
txtbillnumber.Visible = True

cmdaddnew.Enabled = False

cmdsave.Enabled = True

cmddelete.Enabled = False

cmdmodify.Enabled = False

cmdexit.Enabled = True

cmdrefresh.Enabled = True

sale.Enabled = True

End Sub

Private Sub cmdcalculate_Click()

sum = 0

For i = 0 To List4.ListCount - 1

sum = sum + List4.List(i)

Next

txttotalamount.Text = sum

End Sub

Private Sub cmddelete_Click()

If cmbbillnumber.Text = "" Then

MsgBox "Please choose Billnumber first", vbInformation, "message"

Exit Sub

Else

161
cn.Execute "delete * from saletrans where billnumber=" &

(cmbbillnumber.Text) & ""

MsgBox "One record deleted", vbInformation, "message"

Call Module1.clearcontrols

End If

End Sub

Private Sub cmdexit_Click()

Unload Me

End Sub

Private Sub cmdmodify_Click()

mode = "Edit"

cmbbillnumber.Visible = True

txtbillnumber.Visible = False

cmdaddnew.Enabled = True

cmdmodify.Enabled = False

cmddelete.Enabled = True

cmdsave.Enabled = True

cmdrefresh.Enabled = True

cmdexit.Enabled = True

sale.Enabled = True

End Sub

Private Sub cmdrefresh_Click()

162
Call Module1.clearcontrols

End Sub

Private Sub cmdremove_Click()

If List1.ListIndex <> -1 Then

txttotalamount.Text = Val(txttotalamount.Text) -

Val(List4.List(List4.ListIndex))

List1.RemoveItem List1.ListIndex

List2.RemoveItem List2.ListIndex

List3.RemoveItem List3.ListIndex

List4.RemoveItem List4.ListIndex

Else

MsgBox "please select any item from List..1", vbInformation

Exit Sub

End If

End Sub

Private Sub cmdsave_Click()

If mode = "New" Then

If txtbillnumber.Text = "" Or txtcustomername.Text = "" Or

List1.ListCount = 0 Or List2.ListCount = 0 Or List3.ListCount = 0 Or

List4.ListCount = 0 Then

MsgBox "Blank entries are not allowed", vbInformation

Exit Sub

163
End If

If rs.State <> 0 Then rst.Close

rs.Open "select * from saletrans where billnumber =" &

(txtbillnumber.Text) & " ", cn, adOpenStatic, adLockOptimistic

If Not rs.EOF Then

MsgBox "Duplicate Entry Not Allowed..!", vbCritical

Else

With rs

For i = 0 To List1.ListCount - 1

rs.AddNew

!dateofsale = dtp1.Value

!billnumber = txtbillnumber.Text

!contractid = cmbcontractid.Text

!departmentname = txtdepartmentname.Text

!customername = txtcustomername.Text

!totalamount = txttotalamount.Text

!productid = List1.List(i)

!ProductName = List2.List(i)

!productqty = List3.List(i)

!Rate = List4.List(i)

rs.Update

Next

164
End With

End If

rs.Close

MsgBox "One record added", vbInformation, "message"

ElseIf mode = "Edit" Then

If cmbbillnumber.Text = "" Then

MsgBox "please select bill number", vbInformation

Exit Sub

End If

cn.Execute "delete * from saletrans where billnumber=" &

(cmbbillnumber.Text) & ""

If rs.State <> 0 Then rst.Close

rs.Open "select * from saletrans", cn, adOpenDynamic,

adLockOptimistic

With rs

For i = 0 To List1.ListCount - 1

rs.AddNew

!dateofsale = dtp1.Value

!billnumber = cmbbillnumber.Text

!contractid = cmbcontractid.Text

!departmentname = txtdepartmentname.Text

!customername = txtcustomername.Text

165
!totalamount = txttotalamount.Text

!productid = List1.List(i)

!ProductName = List2.List(i)

!productqty = List3.List(i)

!Rate = List4.List(i)

rs.Update

Next

End With

rs.Close

MsgBox "Updated Record saved", vbInformation, "message"

Call Module1.clearcontrols

End If

mode = ""

cmdaddnew.Enabled = True

cmdmodify.Enabled = True

cmdsave.Enabled = False

cmdrefresh.Enabled = False

cmddelete.Enabled = False

cmdexit.Enabled = True

sale.Enabled = True

Call Module1.clearcontrols

166
End Sub

Private Sub cmdselect_Click()

If cmbproductid.Text = "" Or txtproductqty.Text = "" Then

MsgBox "Blank entry does not allowed", vbInformation, "message "

Exit Sub

End If

For i = 0 To List1.ListCount - 1

If cmbproductid.Text = List1.List(i) Then

MsgBox "duplicate enrty does not allowed in list box",

vbInformation, "Message"

cmbproductid.Text = ""

txtproductname.Text = ""

txtproductrate.Text = ""

txtproductqty.Text = ""

Exit Sub

End If

Next

List1.AddItem cmbproductid.Text

List2.AddItem txtproductname.Text

List3.AddItem txtproductqty.Text

List4.AddItem txtproductrate.Text * txtproductqty.Text

cmbproductid.Text = ""

167
txtproductname.Text = ""

txtproductrate.Text = ""

txtproductqty.Text = ""

End Sub

Private Sub Form_Load()

Call Module1.openconnection

sale.Enabled = True

End Sub

Private Sub List1_Click()

List2.ListIndex = List1.ListIndex

List3.ListIndex = List1.ListIndex

List4.ListIndex = List1.ListIndex

End Sub

Private Sub List2_Click()

List1.ListIndex = List2.ListIndex

List3.ListIndex = List2.ListIndex

List4.ListIndex = List2.ListIndex

End Sub

Private Sub List3_Click()

List1.ListIndex = List3.ListIndex

List2.ListIndex = List3.ListIndex

List4.ListIndex = List3.ListIndex

168
End Sub

Private Sub List4_Click()

List1.ListIndex = List4.ListIndex

List2.ListIndex = List4.ListIndex

List3.ListIndex = List4.ListIndex

End Sub

Dim rs As New ADODB.Recordset

Private Sub cmbusername_Click()

If rs.State <> 0 Then rs.Close

rs.Open "select * from authentication where usernm='" &

(cmbusername.Text) & "'", cn, adOpenStatic, adLockOptimistic

If Not rs.EOF Then

With rs

txtoldpassward.Text = !oldpasswd

txtnewpassward.Text = !confirmpasswd

End With

rs.Close

End If

End Sub

Private Sub cmbusername_GotFocus()

169
Call Module1.combofill(cmbusername, "select usernm from

authentication")

End Sub

Private Sub cmdcancel_Click()

Unload Me

End Sub

Private Sub cmdcancel1_Click()

Unload Me

End Sub

Private Sub cmdcancel2_Click()

Unload Me

End Sub

Private Sub cmdchp_Click()

Frame1.Visible = False

Frame2.Visible = False

Frame3.Visible = True

End Sub

Private Sub cmdlog11_Click()

Frame1.Visible = True

Frame2.Visible = False

Frame3.Visible = False

End Sub

170
Private Sub cmdok_Click()

If txtusernamelog.Text = "" Or txtpasswardlog.Text = "" Then

MsgBox "Blank entry not allowed", vbInformation, "message"

Exit Sub

End If

If rs.State <> 0 Then rs.Close

rs.Open "select * from authentication where usernm='" &

(txtusernamelog.Text) & "' and oldpasswd='" &

(txtpasswardlog.Text) & "'", cn, adOpenStatic, adLockOptimistic

If Not rs.EOF Then

mainmenu.Show

Exit Sub

Else

MsgBox "Invalid passward Please Re enter your passward",

vbCritical, "Error"

txtpasswardlog.Text = ""

txtpasswardlog.SetFocus

Exit Sub

rs.Close

End If

End Sub

171
Private Sub cmdref_Click()

Call Module1.clearcontrols

End Sub

Private Sub cmdreff_Click()

Call Module1.clearcontrols

End Sub

Private Sub cmdrefresh_Click()

Call Module1.clearcontrols

End Sub

Private Sub cmdsubmit_Click()

If txtusernameusc.Text = "" Or txtpasswardusc.Text = "" Or

txtconfirmpasswardusc.Text = "" Then

MsgBox "Blank entry not allowed", vbInformation, "message"

Exit Sub

End If

If rs.State <> 0 Then rs.Close

rs.Open "select * from authentication where usernm ='" &

(txtusernameusc.Text) & "' and oldpasswd='" &

(txtpasswardusc.Text) & "'", cn, adOpenStatic, adLockOptimistic

If Not rs.EOF Then

MsgBox "User already exist", vbInformation, "message"

Call Module1.clearcontrols

172
Exit Sub

Else

With rs

.AddNew

!usernm = txtusernameusc.Text

!oldpasswd = txtpasswardusc.Text

!confirmpasswd = txtconfirmpasswardusc.Text

.Update

End With

rs.Close

MsgBox "New user created", vbInformation, "message"

Call Module1.clearcontrols

End If

End Sub

Private Sub cmdusc_Click()

Frame1.Visible = False

Frame2.Visible = True

Frame3.Visible = False

End Sub

Private Sub cmdyes_Click()

If cmbusername.Text = "" Then

MsgBox "Please select your user name", vbInformation, "message"

173
Exit Sub

End If

If rs.State <> 0 Then rs.Close

rs.Open "select * from authentication where usernm='" &

(cmbusername.Text) & "'", cn, adOpenDynamic, adLockOptimistic

With rs

!oldpasswd = txtoldpassward.Text

!confirmpasswd = txtnewpassward.Text

.Update

End With

rs.Close

MsgBox "Passward changed", vbInformation, "message"

Call Module1.clearcontrols

End Sub

Private Sub Form_Load()

Call Module1.openconnection

Frame1.Visible = True

Frame2.Visible = True

Frame2.Visible = True

End Sub

174
175
Code Efficiency

It has been recognized that good coding style can overcome many

of the deficiencies of a primitive programming language, while poor

styles can defeat the intent of an excellent language. The goal of a

good coding style is to provide easily understood, straight –forward

And elegant code. The guidelines for coding include:

 Use of a few standard control constants.

 Use of unconditional branching (go to) in a disciplined

manner.

 Introduction of user-defined data types to model entities in

the problem domain.

 Hiding of data structures behind access functions.

 Providing standard documentation prologues for each

subprogram and compilation unit.

 Use of indentation, parenthesis, and blank spaces, blank

lines, borders and comments to enhance readability.

176
177
OPTIMISATION OF CODE

Code optimization is necessary for efficient and effective software.if

code is not in optimized form then efficeancy of entrire software will

become less.we use some tools and technique for code optimization

of code that are known as module and function. We use some

module in our software that are:

1) Clear controls: Through this module we clear refresh all the

tools like text box, combobox, listbox, option button, and

check box.

2) Combo fill: Through this module we fill the combo box at the

time of update or modify of records with one desired feald of

data base table. But in general we fill combo box with unique

field of data base table.

3) Open connection: through this module we will establish link

between visual basic froms and data base table. This module

is used at form load for loading form for execution.

178
179
Validation And Checks

Validation

Validations At the time of creation of sale and purchase invoices

record should not be saved without providing item information in

invoice detail also quantity and price entered should be validated,

as user can’t enter zero quantity to purchase or sale. The quantity

of the selling items must not be zero in items file however user can

sell items below reorder level and minimum level but the system

should warn before this. While entering data in sale return and

purchase return module system should accept only those items for

which transaction is made in referred return invoice. Items can’t be

repeated in any sale or purchase transaction as the user can change

the quantity of item to be sold or purchased.

Checks

We have applied four types of checks, which are:

1) Blank entry check: In this we check at the time of record

saved in the data base table that each tool boxes are properly

filled with text or value in screen form or not. If any text will

blank then record will not be saved in the data base table and

a message displayed in message box for blank entry on

screen.

180
2) Duplicate entry check: In this we check at the time of

record saved in the database table that which record has to

be saved is not already present.

181
182
IMPLEMENTATION

Introduction: -

A crucial phase in then systems life cycle is the successful

implementation of the new system design. Implementation means

converting a new system design into operation. This creating

computer-compatible files, training the operating staff before the

system is up and running. A major factor in conversion is not

disrupting the functioning of the organization.

The implementation phase of software development is also

concerned with translating design specification into source code. It

is necessary to write source code and internal and documentation

so that conformance of the code to its specification can be easily

verified, and so that debugging, testing and modification are eased.

This can be achieved by making the source code as clear and

straight forward as possible. The implementation team should

therefore be provided with-defined set of software requirements, an

architectural design specification and a detailed design description.

User training is another important area, which is responsible for

minimizing resistance to change and giving the new system a

chance to provide its worth. Training aids, such as user-friendly

manuals, data dictionary, and jobs performance aids that

communication information about the new system; help-screens

183
provide the user with a good start on the new system. Following

conversion, it is desirable to review the performance of the system

and to evaluate it against established criteria. Software

maintenance follows conversion, which includes minor

enhancements or corrections to problems that surface late in the

system's operating.

Conversion:

The objective of conversion is to put the system into operation while

holding costs, risks and personal problems to a minimum. It

involves three major steps:

 Creating computer-compatible files

 Training the operating staff

 Installing hardware/software

Procedure and documents are unique to the conversion phase.

These are shown below:

 Conversion begins with a review of the project plan, the

system test documentation, and the implementation plan. The

parties involved are the user, the project team, programmers, and

operators.

 The conversion portion of the implementation plan is

finalized and approved.

 Files are converted.

184
 Parallel processing between the existing and the new

systems is initiated.

 Results of computer runs and operators for the new system

are logged on a special form.

 Assuming no problems, parallel processing is discounted.

Implementation results are documented for reference.

 Conversion is completed. Plans for the post-implementation

review are prepared. Following the review, the new subsystem is

officially operational.

File Conversion:-

File conversion involves capturing data and creating a computer file

from existing files. There can be problems like staff shortage for

loading data. Also, specialized training necessary tom prepares

records in accordance with the new system specifications. In most

cases, an outside agency performs this function for a flat rate .If a

computerized system already exists, then copying existing files for

the new system is a concern area. If a computerized system already

exist, then copying existing files for the new system is a concern

area. Program can be written to copy files intact for the new system

and test programs on both systems. A file comparison program can

be used for this purpose.

185
Many systems are prone to errors because of insufficient attention

given to data entry control or protective features like audit control

trails. These items must be part of the overall plan for conversion.

Before a data entry operator starts working, a data entry validation

program can be written to keep track of wrong data entered.

At the time installation of the software it is required that SQL server

must be installed on the server of the company and it must contain

the data files related to the software before implementing the

developed system on all machines machine connected to the server.

For this the exported data is imported to the client machine and the

database is checked that all tables are properly imported to the

client machine or not as the software is developed in SQL server

data base and also going to be implemented in oracle there is no

other conversion is required. A good audit control trail is the key to

detecting fraud and errors in data entry.

User Training: -

Analysis of user training focuses on two factors-user capabilities and

the nature of the system being installed. The requirements of the

system also range from very simple tasks like using a pocket

calculator to complex tasks like learning to program a database

system. Tasks that require the user to follow a well-defined,

186
concrete, step-by-step procedure-require limited problem solving

.For this, the training level and duration is basic and brief.

Training Aids: -

The most frequently used user training aids are:

 User manual- Contains information about functionality of the

software available to the user, what each option can do, how these

are executed and how diagnostic should be handled. The manual

should be organized and indexed for quick reference. Graphics,

pictures and schematic diagrams enhance the readability of the

manual. The software is prohibited with both offline and online help.

Offline help is document (User manual), which is the prohibited with

the software, which also contains user form feed which can be used

by the client company to report any bugs in the software. Offline

help helps the user to read the functionality and operation manuals

about the software. Online help is the help, which is available to the

user at his figure tips, and user can get he instant help whenever he

faces any problem regarding the software operations. Online help

helps the user to get the immediate support, as it is not possible to

read the manual for a small problem when the user is sitting on the

computer and he feels comfortable if he gets the help by pressing

<f1> key.

187
 Help screens- this feature is available in every software.

The user selects a help option from a menu. The system

accesses the necessary description or information for user

reference.

 Data Dictionary- Can be part of user manual, describing data

element names used in the manual.

 Job Aids- Communicate essential information about certain

jobs. Forms are used to show the relevant information. For

example:

 Colour printing in forms to highlight headings.

 Colour to identify pieces of hardware, cables etc.

 Wall charts to illustrate schematics of processing information.

 Flowcharts to guide the user for detecting and handling

errors, restarting the system etc.

Hardware/Software Installation

Adequate time and resources for installation of software and

hardware must be allotted in the development schedule. Users can

be trained on the installation procedure. The detailed instructions

can be a part of the user manual.

188
MAINTENANCE

 Software maintenance is used to describe the software

engineering activities that occur following delivery of a

software product to the customer

 Activities involved in maintenance of a software product

include:

 Analysis activities

 Standards and guidelines

 Design activities

 Implementation activities

 Supporting documents

 Configuration management is concerned with tracking and

controlling of the work product that constitute a software

product

 Configuration management tools include

 Configuration management data bases

 Version control libraries

 Automated tools to support software maintenance include

technical support tools and managerial support tools

 Other automated tools include

 Text editor

189
 Debugging aids

 Linkage editor

Computer Maintenance covers a wide range of activities. Many

activities performed during development of Airlines Reservation

System for Global Airways to enhance the maintainability of it are

as follows---

o Analysis Activities The analysis phase of software

development is concerned with determining customer

requirements and constraints, and establishing feasibility of

the product. From maintenance view point, the most

important activities that occur during analysis are establishing

standards and guidelines for the project and the work

products to ensure uniformity of the products; setting of

milestones to ensured that the work products are produce on

schedule; specifying quality assurance procedures to ensure

development of high quality documents; identifying product

enhancements that will most likely occur following initial

delivery of the system; and estimating the

resources( personnel, equipment, floor space) required to

perform the maintenance activities.

190
o Standards and Guidelines various types of standards and

guidelines we developed to enhance the maintainability of our

software.

o Design Activities Design is concerned with developing the

functional components, conceptual data structures and

interconnection in a software system. The most important

activity for enhancing maintainability during the design.

Automated tools to support software maintenance include technical

support tools and managerial support tools. Tolls to support the

technical aspects of software maintenance span the spectrum from

analysis and design tolls to implementation to debugging and

testing tools. Automated tolls include text editors debugging aids,

cross-reference generators, linkage editors, comparators,

complexity metric calculators, and version control system and

configuration management databases.

Text editor permits rapid, efficient modification of source programs,

test data and supporting documents. Text editors can be used to

insert and replace segments of source code, internal comments,

test data and supporting documents; to systematically change all

occurrences of an identifier or other textual strings to locate all

references to a given identifier or other string of text; and to save

both old and new versions of a routine, test file or document. A

191
syntax-directed text editor can ensure that all cross-references in

text editor can ensure that all cross-references in the supporting

documents are correctly updated.

Debugging aids provide traps, dumps, and traces assertion checking

and history file aid in locating the causes of known errors. System-

level-cross-reference generators provide cross-reference listings for

procedure calls, statements usage and data references. Cross-

references directories provide the calling structures of who calls

whom and from where, and procedures names and statement

numbers where formal parameters local variables and global

variables are defined, set and used.

As we already know maintenance of the software is an important

part of using it. Thus various maintenance procedures have to be

followed.

192
EVOLUTION

Suppose that a problem has been identified. The next step is

problem evaluation, which consist of asking the following question:

why is it important to solve the problem? What is possible solution

to the problem? What types of benefits can be expected once the

problem is the solve?

There will be times when an analyst will recommend that no project

be started to resolve the problem, as the next example

demonstrates.

Suppose that an analyst discovers that the real problem lies with

the supervisor of an area. Because of mistakes made by this man,

the throughput rate is 20 percent less than had been expected.

However, suppose next that the supervisor is new to the job, is

smart enough to realize where mistakes were made, and know how

not to repeat them in future. Given this solution, the analyst might

close the book on this project, recommending that no action be

taken at this time.

Consider a different set of circumstances. Suppose that an analyst

determines that a problem of low throughput can be traced to a

computer printer. Suppose further that the problem must be

corrected. Once the problem has been identified, the analyst would

prepare a solution table to list possible problem solution is not at all

193
evident. The analyst might recommend that further study is

required to determine which of the possible solution is best.

We have spent considerably more time examining how an analyst

identifies a problem compared with how the problem is evaluated.

This uneven split also occurs in practice as a general rule, analyst

spend 75 percent of the project-definition phase of analysis defining

the problem and 25 percent evaluating and documenting their

finding.

194
195
Testing Technique & Strategies

Software testing is a critical element of software quality assurance

and represents the ultimate review of specification, design and

coding testing requires that the developer discard preconceived

notions of the “correctness” of software just developed and

overcome a conflict of interest that occurs when errors are

uncovered. Testing is a process of executing a program care is one

that has a high probability of finding an as yet undiscovered error. A

successful test is one that uncovers an as-yet undiscovered error.

Testing is the necessary part of the project the various methods are

used for testing the software. The new look to the project is giving

by the perfect testing. I prefer the black box testing method. Black -

box testing, focuses on the functional requirements of the software.

That is black - box testing enables the software engineer to derive

sets of input conditions that will fully exercise all functional

requirements for a program. Black - box testing is not an

alternative to white - box techniques Rather, it is a complementary

approach that is likely to uncover a different class of errors than

white - box methods.

196
Black - box testing attempts to find errors in following categories:

(1) In correct or missing functions.

(2) Interface errors.

(3) Errors in data structures or external data base access.

(4) Performance errors.

(5) Initialization and termination errors.

Firstly test the incorrect or missing function in the project

design, testing all modules and their dependent modules such as for

new care, detail of old care, forwarding of case reminder of case

and disposal of case.

Secondly, test the interface of the software. The input and

output of the project also depends upon the interface use, so that

all links should be display accordingly.

Thirdly, testing on the data that are use, it should be properly

fitted. The connectivity should be proper.

Fourthly, the performance error, testing is also done on the

performance error, checking the display time, loading time, clear

picture and message. Finally testing on the idealization and

termination error, test the proper loading of the input data easily

connection of the data and display of cases.

197
Unlike white - box testing, which is performed early in the

testing process, black- box testing tender to be applied during later

stages of testing. Because black - box testing purposely disregards

control structure, alteration is focused on the information domain.

By applying black box techniques, we derive a set of test cares that

satisfy the following criteria

(1) Test cares that reduce, by a count that is greater that one,

the number of additional test cares that must be designed to

achieve reasonable testing.

(2) Test cares that tell use something about the presence or

absence of classes of errors rather then errors associated only with

specify test at hand.

For this project alpha and beta testing is performed. In beta

testing software is tested by following some pre-defined cases

assigned by the project guide and after successfully completed

the alpha test software is submitted to the client for alpha

testing for final release.

198
199
Security Mechanism

System Security Measures

Computer system security mechanism includes authentication

access, user creation and user permission phase.

Authentication:

The primary goal of authentication is to allow access to legitimate

system users and to deny access to unauthorized parties.

User Creation:

The primary goal of user creation is to develop an alternative

employee to handle this software in absence of administrator. But

user can use only those options for which he permitted by the

administrator of the software. User creation facility available for

administrator only.

User permission:

User permissions are the restrictions for user, which are provided by

the administrator to use the software. Administrator has all rights to

handle the software but user can use only those options for which

user will permit by the administrator.

200
201
Cost Estimation of the Project

For a given set of requirements it is desirable to know how much it

will cost to develop the software to satisfy the given requirements,

and how much time development will take. These Estimates are

needed before development is initiated. The primary reason for cost

and schedule Estimation is to enable the client or developer to

perform a cost benefit analysis and for project monitoring and

control. A more practical use of these estimates is in bidding for

software projects, where the developers must give cost estimates to

a potential client for the development contract. For a software

development project, detailed, and accurate cost and schedule

estimates are essential prerequisites for managing the project.

Otherwise, even simple question like “is the project late”, “are there

cost overruns”, and “when is the project likely to complete” cannot

be answered. Cost and schedule estimate are also required to

determine the staffing level for a project a deferent phase. It can be

safely said that cost and schedule estimates are fundamental to any

form of management and are generally always required. For a

project. Cost in a project is due to the requirement for software,

hardware, and human resources. Hardware resources are such

thing as the computer time, terminal time, and memory required Fir

the project, whereas software resources include the tool and

202
compilers needed during development .The bulk of the cost of

software development is due to the human resources needed, and

most cost estimation procedure focus on this aspect. Most cost

estimates are determined in terms of person-month (PM). By

properly including the “overheads” in rupees cost of a person-

month, besides including the direct cost of the person month, most

costs for a project can be incorporated by using PM as the basic

measure .estimates can be based on subjective opinion of some

person or determined through the use of models. The costs

associated with the system are expenses, outlays or losses arising

from developing and using a system. But the benefits are the

advantages received from installing and using this system. Cost and

benefits can be classified as follow:

Tangible or intangible

Cost that are known to exist but their financial value cannot be

exactly measured are referred to as intangible costs. The estimate

is only an approximation. It is difficult to fix exact intangible Costs.

For example, employee movable problems because of installing new

system are an intangible cost. How much moral of an employee has

be affected can not be exactly measured In terms of financial value.

(a) Fixed or variable

203
Some costs and benefits remain constant, regardless of how a

system is used. Fixed costs are considered as sunk costs. Once

encountered, they will not recur. For example, the purchase of an

equipment for a computer center is called as fixed cost as it remains

constant whether in equipment is being is called as fixed cost as it

remains constant whether in equipment is being used extensively or

not. Similarly, the insurance, purchase of software etc. Contrast,

variable costs are incurred on a regular basis. They are generally

proportional to work volume and continue as long as the system is

in operation. For example, the cost of forms varies in proportion to

the amount of processing or the length of the reports desired.

(b) Direct or indirect- direct cost are those which are directly

associated with a system. They are applied directly to the operator.

For example, the purchase of floppy for Rs 500/- is a direct cost

because we can associate the floppy box with money spent.

Direct benefits also can be specifically attributable to a given

project. For example, a new system that can process 30 percent

more transactions per day is a direct benefit. Indirect costs are not

directly associated with a specific activity in the system. They are

often referred to as overhead expenses. For example, cost of space

to install a system, maintenance of computer center, heat, light and

air-conditioning are all tangible costs, but it is difficult to calculate

204
the proportion of each attributable to a specific activity such as a

report.

The estimation of cost of the project is a difficult task but we can

estimate the cost of the project by various methods. I am using the

COCOMO (Constructive Cost Model). The model has following

hierarchy: -

Model 1:- The basic COCOMO model computed software

development effort land cost as a function of

program size expressed in estimated lines of code.

Model 2: - The intermediate COCOMO model computer 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.

Model 3 :- The advanced COCOMO model incorporates all

characteristics of the intermediate version with an assessment of

the cost drivers impact on each step (analysis, design etc.) of

the software engineering process.

The COCOMO models are defined for three classes of software

projects are: -

205
1) Organic Mode: - Relatively small, simple projects in which

small teams with good application experience work to a set of less

than rigid requirements.

2) Semidetached Mode: - An intermediate (in size and

complexity) software project in which teams with mixed experience

levels must meet a mix of rigid and less than rigid requirements.

3) Embedded Mode: - A software project that must developed

within a set of tight hardware, software and operational constraints.

The basis COCOMO equation takes the form.

E = ab KLOCbb

D = Cb Edb

When E is the effort applied in person months, D is the

development time in chronological months, and KLOC is the

estimated number of delivered lines of code for the project.

(Express in thousands). The coefficients a b and cb and the

exponents bb and db where taken as.

206
This project is an organic project so :-

ab = 2.4

bb = 1.05

cb = 2.5

db = 0.38

LOC = 3000

KLOC = 3000/1000 = 3

E = 2.4 (KLOC) 1.05

= 2.4 (3)1.05

= 7.12

= 7 person - months

New calculate the D is the development time in chronological

months

0.38
D = 2.5 E

0.38
= 2.5 (8)

= 4.06 months

= 4 months approximately

The computer project duration we use the effort estimated

described above

207
N = E/D

= 7/4

= 1 person approx

Where N is the recommended number of people for the

project.

208
209
DATE WISE SALE REPORT

Date Bill Contract Customer Department Product Product Product Total


Sno Rate
Ofsale Number Id Name Name Id Name Qty Amount
1 9/5/2005 5656 0 Mukesh NONE 1 Petrol 90 2 150
misra
2 9/6/2005 8988 1 Arun JAL NIGAM 1 Petrol 90 2 300
vajpai
3 9/7/2005 89798 2 Shalni PWD 1 Petrol 135 3 135
4 9/8/2005 10012 0 Monu NONE 2 Diesel 60 2 375
5 9/8/2005 5656 0 Mukesh NONE 2 Diesel 60 2 150
misra
6 9/8/2005 9335 2 Shalini PWD 2 Diesel 150 5 150
srivatava
7 9/10/2005 77777 1 Pinku JAL NIGAM 2 Diesel 60 2 2000
8 9/11/2005 10012 3 Monu CPWD 3 Lubricant 315 3 375
box
9 9/21/2005 8988 0 Arun NONE 3 Lubricant 210 2 300
vajpai box
10 9/22/2005 77777 0 Pinku NONE 3 Lubricant 105 1 3000
box

210
DATE WISE PURCHASE REPORT

Order Voucher Company Company Company Product Product Product Product Total
Amount
Date No Id Name Address Id Name Rate Qty Amount
9/1/2005 232323 2 TELCO Jankipura 2 Diesel 30 6000 180000 1005000
m
9/1/2005 232323 2 TELCO Jankipura 3 Lubricant 105 2000 210000 1005000
m box
8/29/2005 1033 1 TATA Aliganj 4 Pauch 5 3000 15000 420000

211
RECIEPT REPORT

Date Bill Contract Customer Department Product Product Product Total


Rate
Ofsale Number Id Name Name Id Name Qty Amount
9/1/2005 100 0 Mak NONE 1 Petrol 45 3 135
9/2/2005 101 1 Ramesh JAL NIGAM 2 Deisel 38 5 190
10/10/2005 102 2 Shalini CPWD 1 Petrol 45 5 225
10/10/2005 102 2 Shalini CPWD 3 Lubricant 105 2 210
box

212
SALARY REPORT

Salary Employee Employee Basic Provident Shift Shift Gross Net


Date Da Designation
Slipno Id Name Salary Fund Id Time Salary Salary
1/22/2002 100 1 Ramesh 25000 2500 10000 1 6:00:00 35000 32500 Manager
AM

1/22/2002 1223 1 Ramesh 25000 2500 10000 1 6:00:00 35000 32500 Manager
AM
1/22/2002 555 1 Ramesh 25000 2500 10000 1 6:00:00 35000 32500 Manager
Srivastava AM

1/22/2002 777777 1 Ramesh 25000 2500 10000 1 6:00:00 35000 32500 Manager
AM

1/22/2002 101 2 Deepak 18000 1800 7200 2 2:30:00 25200 23400 Asst.Manager
AM
1/22/2002 666 2 Deepak 18000 1800 7200 2 2:30:00 25200 23400 Asst.Manager
AM

213
214
PERT CHART
PERT, which stands for project evaluation and Review Technique,

was developed n the late 1950s to plan and control large weapons

development projects for the U.S Navy. It was develop to make

clear the interdependence of project tasks when projects are being

scheduled. Essentially, PERT is a graphic networking technique.

Let’s take a closer look at PERT charts, what they are, how to draw

them, and how to use them. we should be made aware that

different PERT discussions and computer products use different

terminology.

PERT definitions and symbols: On PERT charts, projects can be

organized in terms of events and tasks. An event also called a

milestone- represents a point in time, such as the start or

completion of a task or tasks.

A variety of symbols circles, squares and the like—have

been used to depict events on PERT charts. We will use small

circles, often called nodes, to represent an event. Each node is

divided into three sections. The left half of the node includes an

event identification number. This number is usually keyed to a

legend that explicitly defines the event. The upper and lower right

hand quarters of the node are used to record the earliest and latest

completion times for the event. Instead of dates, time is counted

from TIME=0, where 0 corresponds to the date on which the project

215
is started. Every PERT chart has one beginning node that represents

the start of the project and one end node that represents the

completion of the project.

A PERT chart is a graph-based chart. It can be used to

determine the activities that from the “critical path”, which if

delayed will cause the overall project to delay. The PERT chart for

the project is:

216
Expected Complition Commulative
S.no Work Time Time Time
1Analysis
1.1Requirment gathering 3 6 6
1.2Feasibility study
Technical Feasibility
1.2.1 Study 1 2 8
Operational Feasibility
1.2.2 Study 1 2 10
Economical Feasibility
1.2.3 Study 1 2 12
1.3Fact Finding
1.3.1 Questionaires 1 2 14
1.3.2 Observation 2 3 17
1.4Model
1.4.1 Functional Model 6 10 27
1.4.2 Behaviour Model 2 3 30
1.4.3 Data Base Model 2 3 33
1.4.4 ERD DIAGRAM 4 6 39
1.4.5 Entity diagram 4 6 45
1.4.6 Architectural Model 8 12 57
1.5Design
1.5.1 Module Design 7 9 66
1.5.2 Input Design 12 15 81
Velidation And Check
1.5.3 Design 6 9 90
1.6Coding 50 70 160
1.7Testing 10 14 174
1.8Implementation 3 6 180

217
GANTT CHART
Basic planning user bars charts that shown project activities and

the amount of time they will be take this is activity scheduling

method was first introduced in 1914 by Henry.. Gantt as a

rudimentary aid to plot individual tasks against time. The Gant chart

uses horizontal baars to show the durations of actions or tasks. The

left end marks the beginning of the task the right end its finish.

Earlier tasks appear in the upper left and later ones in the lower

right. A Gantt chart for a hypothetical boat-building project. A Gantt

chart uses a calendar-oriented chart to represent the project

schedule. Each activity is represented as a bar in the calendar,

starting from the start date of the activity and ending at the ending

date for that activity. The start and end of each activity becomes

milestones for the project. The Gantt chart for this project is:

218
1200

1000
1.8 Implementation

1.7 Testing

1.6 Coding
800
1.5.3 Velidation And
Check Design
1.5.2 Input Design

1.5.1 Module Design

600 1.5 Design

1.4.6 Architectural Model

1.4.5 Entity diagram

400 1.4.4 ERD DIAGRAM

1.4.3 Data Base Model

1.4.2 Behaviour Model

1.4.1 Functional Model


200
1.4 Model

1.3.2 Observation

1.3.1 Questionaires
0
Expectedtime c ommulative 1.3 Fact Finding
time
1.2.3 Economical
Feasibility Study
1.2.2 Operational
Feasibility Study
1.2.1 Technical Feasibility
Study
1.2 Feasibility study

1.1 Requirment
gathering
1 Analysis
219
220
Future Scope

1) The software provided latest platform for managing and

control a petrol pump.

2) The software will be able for dynamic management.

3) The software will be able for dynamic user permissions.

4) The software will be most users friendly.

5) The software will be able for further enhancement; we can

include some modules in future like service of vehicles.

6) The software will be able for further enhancement like

payment from creadit card.

7) The software will be easy to maintain.

8) The software will be easy to install.

9) The software will provide batter accuracy.

221
222
.

Bibliography

- Database programming with Visual Basic 6.0, Curtis L. Smith

& Michael C. Amundsen, Techmedia

- Visual Basic 6, Mastering in VB

- SQL SERVER, Techmedia AND NIIT PRISCRIBED

- Software Engineering, Roger S. Pressman

- An integrated approach to software engineering, Pankaj

Jalote, Narosa Publishing House

- System Analysis And Design, IGNOU prescribed book

223

Potrebbero piacerti anche