automation of civil suppile system
TRANSCRIPT
-
7/28/2019 Automation of Civil Suppile System
1/86
AUTOMATION OF CIVIL SUPPLIES
Submitted by
KAMALRAJ. R
(Reg. No: 06UCS631)
Under the Guidance of
Prof. SANTHI PUNITHA T, MCA, MPhil.
BACHELOR OF SCIENCE IN COMPUTER SCIENCE
DEPARTMENT OF COMPUTER SCINENCE
ST.JOSEPHS COLLEGE (AUTONOMOUS)
NATIONALITY RE-ACCREDIATED WITH A+
COLLEGE WITH POTENTIAL FOR EXCELLENCE
TIRUCHIRAPALLI 620002
APRIL 2009
-
7/28/2019 Automation of Civil Suppile System
2/86
DEPARTMENT OF COMPUTER SCINENCE
ST.JOSEPHS COLLEGE (AUTONOMOUS)
NATIONALITY RE-ACCREDIATED WITH A+
COLLEGE WITH POTENTIAL FOR EXCELLENCE
TIRUCHIRAPALLI 620002
CERTIFICATE
This is to certify that the project work entitled AUTOMATION OF CIVIL SUPPLIES
is a bonafide work done by KAMALRAJ. R, Reg. No: 06UCS631, in partial fulfillment of
the requirement of the award of the degree ofBachelor of Science in Computer Science
under my guidance and supervision during November 2008 to April 2009.
Prof. D S Ravi, M.Sc, MPhil., Prof. SANTHI PUNITHA T, MCA,
MPhil.,
Head of the Department Internal Examiner
The viva voce was conducted on ___________ at St. Josephs College (Autonomous),
Tiruchiappalli 620002.
Internal Examiner External Examiner
Date:___________ Date: ____________
-
7/28/2019 Automation of Civil Suppile System
3/86
ACKNOWLEDGEMENT
I am glad indeed to accord our gratitude to god Almighty, who has been an ineffable
source of strength and inspiration in completing the project.
I am really grateful to Rev. Dr RAJARATHINAM R SJ, MA, MPhil, PD.,
Principal St.Josephs College (AUTONOMOUS), Tiruchirappalli 02, for giving me a
chance to be a member of this family and also rendering consistent help and innovative ideasto the Computer Science Department.
I am really thankful to Rev. Fr JOSEPH ANTONY SAMY G SJ, Vice-Principal
(General) St.Josephs College, SHIFT II, for giving me a valuable opportunity to be a student
of this great institute.
I thank with gratitude to ourProf. RAVI D S M.Sc, MPhil, PGDCA, Coordinator of
the department of Computer Science (Shift II) great Institute. For his constant
encouragement and advice which kindled to me to do my best in this project s well
throughout the course.
PUNCTUALITY this word of wisdom fits into the shoes aptly for my guide
Prof. SANTHI PUNITHA T, MCA, MPhil., who spent his valuable time amidst his busy
schedules to make me understand and materialize this project.
-
7/28/2019 Automation of Civil Suppile System
4/86
I am really thankful to our Prof. VIJAY SHANKAR, MCA., MPhil., my class-in-
charge for encouraging me throughout the completion of the project.
I am sincerely thankful to Mr.Pazhani.K and Mr.Anthony Raja.A, our lab
Administrators for providing labs me throughout the duration of this project also spending
his valuable time for installation of the software requirements to me.
I am grateful to our Department Staff Members, classmates and friends for their help
and moral support given to me during the course of this project.
And finally A family is ones first ever school in ones lifespan. Soul and mind are
bounded with the sense of greatness towards my family members.
- KAMALRAJ. R
CONTENTS
-
7/28/2019 Automation of Civil Suppile System
5/86
SL.NO. PARTICULARS PAGE NO1. SYNOPSIS
2. PROJECT DESCRIPTION3. SYSTEM ANALYSIS
3.1 EXISTING SYSTEM
3.2 PROPOSED SYSTEM
4. SYSTEM CONFIGURATION
5. SOFTWARE DESCRIPTION
6. SYSTEM DESIGN
6.1 DATABASE DESIGN
6.2 ARCHITECTURAL DIAGRAM
6.3 E.R. DIAGRAM
6.4 DATA FLOW DIAGRAM
6.5 DATA DICTIONARY
7. SYSTEM TESTING
8. CONCLUSION
9. BIBLIOGRAPHY
APPENDIX
a)SAMPLE CODE
b)SAMPLE OUTPUT
-
7/28/2019 Automation of Civil Suppile System
6/86
INTRODUCTIONINTRODUCTION
-
7/28/2019 Automation of Civil Suppile System
7/86
1. SYNOPSIS1. SYNOPSIS
Now a days, all works are done with the help of the softwares. But in the ration shop,Now a days, all works are done with the help of the softwares. But in the ration shop,
sales and purchasing of the products, daily collection amount calculation and Inventory (Currentsales and purchasing of the products, daily collection amount calculation and Inventory (Current
stock) system are done by manually. It is very tedious work. Thats why we want to computerizestock) system are done by manually. It is very tedious work. Thats why we want to computerize
the ration shop system.the ration shop system.
The project titled Computerization of Civil Supplies mainly focuses on the dailyThe project titled Computerization of Civil Supplies mainly focuses on the daily
routine activites in a Ration shop.routine activites in a Ration shop.
The maintenance of customer information and customer purchasing details are importantThe maintenance of customer information and customer purchasing details are important
task in ration shop.task in ration shop.
The module Customer information maintains the details of the customer.The module Customer information maintains the details of the customer.
The module Sale a product to customer is used to billing purpose and also displayThe module Sale a product to customer is used to billing purpose and also display
quantity level of each family depends on family members.quantity level of each family depends on family members.
The module Purchasing product used to purchase a product from head office andThe module Purchasing product used to purchase a product from head office and
added with current stock.added with current stock.
-
7/28/2019 Automation of Civil Suppile System
8/86
The module Inventory Control is used to identify the current stock and currently saleThe module Inventory Control is used to identify the current stock and currently sale
quantity for each product such as Rice, Sugar, Wheat, Sooji, Maida, Oil, Kerosene. It alsoquantity for each product such as Rice, Sugar, Wheat, Sooji, Maida, Oil, Kerosene. It also
generate the reports for Sales details and particular customer purchasing details.generate the reports for Sales details and particular customer purchasing details.
Now a days, all works are done with the help of the softwares. But in the ration shop,Now a days, all works are done with the help of the softwares. But in the ration shop,
Sales and purchasing of the products, daily collection amount calculation and Inventory (CurrentSales and purchasing of the products, daily collection amount calculation and Inventory (Current
stock) system are done by manually. It is very tedious work. Thats why we want to computerizestock) system are done by manually. It is very tedious work. Thats why we want to computerize
the ration shop system.the ration shop system.
In existing system, we have many problems.In existing system, we have many problems.
Lots of manual process has to be done to maintain the customer details.Lots of manual process has to be done to maintain the customer details.
Lots of register (Books) has to be maintainedLots of register (Books) has to be maintained
Maintenance of daily amount collection and Current stocks quantity for each item is identifiedMaintenance of daily amount collection and Current stocks quantity for each item is identified
are tedious task.are tedious task.
The project titledThe project titledComputerization of Civil SuppliesComputerization of Civil Supplies mainly focuses on mainly focuses on
Customer informationCustomer information
Sale a product to customerSale a product to customer
Purchasing product from Head officePurchasing product from Head office
Inventory Control (Inventory Control (Current position of StockCurrent position of Stock))
It also generate the reports for Sales details and particular customer purchasing DetailsIt also generate the reports for Sales details and particular customer purchasing Details ..
-
7/28/2019 Automation of Civil Suppile System
9/86
PROJECTPROJECT
DESCRIPTIONDESCRIPTION
-
7/28/2019 Automation of Civil Suppile System
10/86
2.2. PROJECT DESCRIPTION:PROJECT DESCRIPTION:
The project entitledThe project entitled Computerization of Civil SuppliesComputerization of Civil Supplies is done to automate the is done to automate the
works in a Ration shopworks in a Ration shop
The modules in the projects are:The modules in the projects are:
1.Customer information2. Sale a product to customer
3. Purchasing product from Head office.
4. Inventory Control (Current position of Stock)
5. Report Generation
CUSTOMER INFORMATION:
The information of the customer details is specified here. We also see the particularThe information of the customer details is specified here. We also see the particular
customer information by specifying the Customer number. It has contains the details Customercustomer information by specifying the Customer number. It has contains the details Customer
Name and Address ,Number of major person, Number of minor person and Number of cylinderName and Address ,Number of major person, Number of minor person and Number of cylinder
and Ward number and District and Name of members of the family and Date of issued for theand Ward number and District and Name of members of the family and Date of issued for the
-
7/28/2019 Automation of Civil Suppile System
11/86
customer. The customer number is automatically generated. Save option is available to savecustomer. The customer number is automatically generated. Save option is available to save
customer details.customer details.
SALE A PRODUCT TO CUSTOMERSALE A PRODUCT TO CUSTOMER::
The products are sale to the customer and this is used for billing purpose and alsoThe products are sale to the customer and this is used for billing purpose and also
display quantity levels of each family depends on family members. the customer may purchasedisplay quantity levels of each family depends on family members. the customer may purchase
the part of the quantity for specified month,then the account will be locked for the month forthe part of the quantity for specified month,then the account will be locked for the month for
corresponding customer.In this form, We have constrains for Kerosene supply such as ifcorresponding customer.In this form, We have constrains for Kerosene supply such as if
customer have two cylinder, we allot only 3 litre of Kerosene, if customer have 1 cylinder, wecustomer have two cylinder, we allot only 3 litre of Kerosene, if customer have 1 cylinder, we
allot only 5 litre of Kerosene and if customer have no cylinder, we allot only 10 litre ofallot only 5 litre of Kerosene and if customer have no cylinder, we allot only 10 litre of
Kerosene. The rice quantity maximum 20 kg and minimum 12 kg depends o family membersKerosene. The rice quantity maximum 20 kg and minimum 12 kg depends o family members
Each major person has allotted only 4 kg and each minor person has allotted only 2 kgEach major person has allotted only 4 kg and each minor person has allotted only 2 kg The sugarThe sugar
quantity maximum 2 kg depends on family members. If each person has allotted only kg.quantity maximum 2 kg depends on family members. If each person has allotted only kg.
PURCHASING PRODUCT:
We are purchasing a product from head office and added with current stock inWe are purchasing a product from head office and added with current stock in
order to supply to the customer. Every ration shop get the products from corresponding headorder to supply to the customer. Every ration shop get the products from corresponding head
office, This module holds the information about purchase details that is how much quantities areoffice, This module holds the information about purchase details that is how much quantities are
purchased. Every ration shop get the product from corresponding head office, This module holdspurchased. Every ration shop get the product from corresponding head office, This module holds the information about purchasing product and details it automatically generate total date and timethe information about purchasing product and details it automatically generate total date and time
for purchasing products , end of the date purchasing , save option available, to save the purchasefor purchasing products , end of the date purchasing , save option available, to save the purchase
product details.This module automatically generate Total, Date and Time for every entry. End ofproduct details.This module automatically generate Total, Date and Time for every entry. End of
data purchasing save option available to save the purchase product details.data purchasing save option available to save the purchase product details.
INVENTORY CONTROL:INVENTORY CONTROL:
We can identify the current stock and currently sale quantity for each product suchWe can identify the current stock and currently sale quantity for each product such
as Rice, Sugar, Wheat, Sooji, Maida, Oil, Kerosene. In a ration shop always stocks will be storedas Rice, Sugar, Wheat, Sooji, Maida, Oil, Kerosene. In a ration shop always stocks will be stored
to serve the people, this module keep track of current stock details. Based on the userto serve the people, this module keep track of current stock details. Based on the user
requirements that is date it will show the stock details of ration shop save option available torequirements that is date it will show the stock details of ration shop save option available to
save the current stock details.save the current stock details.
-
7/28/2019 Automation of Civil Suppile System
12/86
REPORT:
It also generate the reports for sales details and particular customer purchasingIt also generate the reports for sales details and particular customer purchasing
detailsdetails.. This module will help to generate various types of sales report, that is based onThis module will help to generate various types of sales report, that is based on
particular date and based on two given date reports will generatedparticular date and based on two given date reports will generated
SYSTEM
ANALYSIS
-
7/28/2019 Automation of Civil Suppile System
13/86
3.3. SYSTEM ANALYSIS:SYSTEM ANALYSIS:
3.1 EXISTING SYSTEM:3.1 EXISTING SYSTEM:
Now a day, all works are done with the help of the softwares. But in the ration shop,Now a day, all works are done with the help of the softwares. But in the ration shop,
sales and purchasing of the products, daily collection amount calculation and Inventory (Currentsales and purchasing of the products, daily collection amount calculation and Inventory (Current
stock) system are done by manually. It is very tedious work. Thats why we want to computerizestock) system are done by manually. It is very tedious work. Thats why we want to computerize
the ration shop system.In existing system, we have many problems.Lots of manual process has tothe ration shop system.In existing system, we have many problems.Lots of manual process has to
be done to maintain the customer detailsLots of register (Books) has to be maintained.be done to maintain the customer detailsLots of register (Books) has to be maintained.
Maintenance of daily amount collection and current stock quantity for each item is identified areMaintenance of daily amount collection and current stock quantity for each item is identified are
tedious task.tedious task.
3.2 PROPOSED SYSTEM:3.2 PROPOSED SYSTEM:
The Project titled Computerization of Civil Supplies mainly automates the work done
in a Ration shop.
The Computerization of Civil Supplies mainly focuses on
Customer information
-
7/28/2019 Automation of Civil Suppile System
14/86
Sale a product to customer
Purchasing product from Head office
Inventory Control (Current position of Stock)
It also generates the reports for sales details and particular customer purchasing details.
SYSTEMSYSTEM
CONFIGURATIONCONFIGURATION
-
7/28/2019 Automation of Civil Suppile System
15/86
.
4. SYSTEM CONFIGURATION:4. SYSTEM CONFIGURATION:
HARDWARE REQUIREMENTS:HARDWARE REQUIREMENTS:
PROCESSOR PENTIUM 4 PROCESSOR
MEMORY 256 MB RAM
MONITOR 15 SVGA MONITOR
KEYBOARD INTERNET/MULTIMEDIA
MOUSE 3 BUTTON MOUSE
PRINTER HP LASER JET PRINTER
SOFTWARE REQUIREMENTS:SOFTWARE REQUIREMENTS:
-
7/28/2019 Automation of Civil Suppile System
16/86
OPERATING SYSTEM: WINDOWS 98
FRONT END: VISUAL BASIC 6.0
BACK END: MS-ACCESS
-
7/28/2019 Automation of Civil Suppile System
17/86
SOFTWARESOFTWARE
DESCRIPTIONDESCRIPTION
5. SOFTWARE DESCRIPTION:5. SOFTWARE DESCRIPTION:
The system environment is proposed to be developed in visual basic 6.0 under
Window-98 operating system environment. The features of the softwares are given below.
INTRODUCTION TO VISUAL BASIC 6.0:INTRODUCTION TO VISUAL BASIC 6.0:
The VISUAL part refers to the method used to create the graphical user interfaces
(GUI). Rather than writing numerous lines f code to describe the appearance and location of
interface elements, you can simply add the prebuilt objects into places on screen. The BASIC
-
7/28/2019 Automation of Civil Suppile System
18/86
-
7/28/2019 Automation of Civil Suppile System
19/86
4) Visual Basic also provides setup wizard, which is used to prepare, and applications for the4) Visual Basic also provides setup wizard, which is used to prepare, and applications for the
distribution.distribution.
5) Internet oriented: Visual Basic lets you to create Internet-aware applications5) Internet oriented: Visual Basic lets you to create Internet-aware applications
EDITIONS OF VISUAL BASIC:EDITIONS OF VISUAL BASIC:
1.1. Learning EditionLearning Edition
2.2. Professional EditionProfessional Edition
3.3. Enterprise EditionEnterprise Edition
COMPONENTS OF VISUAL BASIC APPLICATIONCOMPONENTS OF VISUAL BASIC APPLICATION::
A standard EXE Project contains forms, controls and code modules. Each of theseA standard EXE Project contains forms, controls and code modules. Each of these
components has its own file associated with it.components has its own file associated with it.
OBJECT:OBJECT:
An object is an independent unit that contains code and data. An object has properties,An object is an independent unit that contains code and data. An object has properties,
methods and events associated with it.methods and events associated with it.
THERE ARE 2 TYPES OF OBJECT IN VISUAL BASICTHERE ARE 2 TYPES OF OBJECT IN VISUAL BASIC
1)1) FORMSFORMS
2)2) CONTROLSCONTROLS
-
7/28/2019 Automation of Civil Suppile System
20/86
FORMS:FORMS:
A form is a system-defined object. You can add one or more form objects to anA form is a system-defined object. You can add one or more form objects to an
application.application.
CONTROLS:CONTROLS:
Controls are the object that you can place on the FormControls are the object that you can place on the Form..
PROPERTIES:PROPERTIES:
Properties are attributes associated with an object. They define the appearance andProperties are attributes associated with an object. They define the appearance and
behavior of the object. Properties can be changed according to the application development. Thebehavior of the object. Properties can be changed according to the application development. The
property values are stored along with the project.property values are stored along with the project.
METHODS:METHODS:
Methods provide functionality to an object. Methods are actions or tasks that can beMethods provide functionality to an object. Methods are actions or tasks that can be performed by an object.performed by an object.
EVENTS:EVENTS:
Events are procedures that are executed that are executed in response to actionsEvents are procedures that are executed that are executed in response to actions
performed by the user, operating system, or other objects in an application. Code is written forperformed by the user, operating system, or other objects in an application. Code is written for
the events to provide functionality.the events to provide functionality.
-
7/28/2019 Automation of Civil Suppile System
21/86
METHODS AND STATEMENTSMETHODS AND STATEMENTS::
1)1) LoadLoad
2)2) UnloadUnload
3)3) ShowShow
4)4) HideHide
Load:Load: loads a form or control into memory.
Syntax:Syntax:Load object
UnloadUnload:: Unload form or control from memory.
Syntax:Syntax: unload object.
Show:Show: Displays a MDI form or form object.
SyntaxSyntax::Show style
HideHide:: Hides a MDI form of form object but doesnt unload it.
SyntaxSyntax:: Hide
EVENTS:EVENTS:
1) Load
2) Unload
-
7/28/2019 Automation of Civil Suppile System
22/86
-
7/28/2019 Automation of Civil Suppile System
23/86
forms. When a child form or a form object closes, the Query unload event in that form occurs
before the forms unload event.
ACTIVATE:ACTIVATE:
Occurs when an object becomes an active window.
DEACTIVATE:DEACTIVATE:
Occurs when an object is n longer an active window.
TERMINATE:TERMINATE:
Occurs when all references to an instance of a form, MDI form, user control, property
web class are removed from memory by setting all the variables that refer to the object to
nothing when the last reference to the objects falls out of the scope.
GOT FOCUS:GOT FOCUS:
Occurs when objects receives the focus, either by the user action such as tabbing to or
click the object or by changing the focus using the set focus method. A form receives the focus
only when all visible controls are disabled.
LOST FOCUS:LOST FOCUS:
Occurs when an objects loses the focus whether by the user action such as tabbing to or
clicking object or by changing the focus in the code using the set focus method.
-
7/28/2019 Automation of Civil Suppile System
24/86
RESIZE:RESIZE:
Occurs when an object is first displayed or when the window sate of an object
changes (eithermaximized, minimized or restored)
CLICK EVENTS:CLICK EVENTS:
Occurs when the user presses and the releases a mouse button over an object. It can also
occurs when the value of a control is changed. For a form objects this event occurs when the user
clicks either a blank area or a disabled control.
PAINT EVENT:PAINT EVENT:
Occurs when a part of the object is exposed after being moved or enlarged or after a
widow that was covering the object that has been moved.
STANDARD CONTROLS:STANDARD CONTROLS:
The Visual Basic toolbox contains the tools you use to draw controls on the form.
CONTROL CATAGORIES:CONTROL CATAGORIES:
1) Intrinsic controls
2) Insert controls
3) Active X controls
-
7/28/2019 Automation of Civil Suppile System
25/86
INTRINSIC CONTROLS:INTRINSIC CONTROLS:
Intrinsic controls such as the command button and frame controls. These controls are
contained inside in the visual basic.exe files. Intrinsic controls are always included in the
toolbox.
ActiveX controls:ActiveX controls:
This exists as separate files with .OCX file name extension. These include all controls
that are available in all editions of visual basic and those are available only in the professionaledition and Enterprise edition.
INSERTABLE CONTROLS:INSERTABLE CONTROLS:
It has Microsoft Excel worksheet object containing a list of all our companys employees
or a Microsoft Project Calendar control containing the scheduling information of the project.
Since this can be added to the toolbox they can be considered controls. Some of these objectsalso support AUTOMATION (formerly called OLE automation) which allows you to program
another application object from within Visual Basic.
STANDARD CONTROLS:STANDARD CONTROLS:
There are 21 standard controls in Visual Basic are seen in the standard toolbox.
1) Pointer control
2) Picture box control
3) Label control
-
7/28/2019 Automation of Civil Suppile System
26/86
-
7/28/2019 Automation of Civil Suppile System
27/86
PICTUREBOX CONTROL:PICTUREBOX CONTROL:
The Picture box control is used to display graphical image from a bitmap, icon or a
metafile. It clips to the graphic if the control is not large enough to display he entire image. It
also acts as a container for other controls.
LABEL CONTROL:LABEL CONTROL:
A label control displays the text that the user cannot edit. You can use labels to identify
controls, such as textboxes and scrollbars that do not their own caption property. Labels can be
transparent so that the text appears to be placed directly on the form.
TEXTBOX CONTROLTEXTBOX CONTROL::
Textbox are versatile controls that can be used to get input form the user or to display
text.
FRAME CONTROL:FRAME CONTROL:
It is used as control passively to group other controls.
COMMAND BUTTON CONTOLS:COMMAND BUTTON CONTOLS:
-
7/28/2019 Automation of Civil Suppile System
28/86
Command button allows user to simply click them to perform actions. When the user
chooses the button it carries out the appropriate action it also looks as if its being pushed in and
released. Whenever the user clicks the button the click event procedure is invoked.
CHECKBOX CONTROL:CHECKBOX CONTROL:
A check box indicates whether a particular condition is n or off. You use check boxes in
an application to give users true or false or yes/no options. Because check boxes work
independently of each other a user can select any number of check boxes at the same time.
OPTION BUTTON CONTROL:OPTION BUTTON CONTROL:
Option button presents a set of two or more choices to the user. Unlike checkboxes
however option button should work as a part of the group selecting one option immediately
clears all other buttons in the group.
LISTBOX CONTROL:LISTBOX CONTROL:
A list box displays a list of items from which the user can select one or more list boxes.
List box present a list present a list of choice to the user. By default the choices are displayed
vertically in a single column although you can setup multiple column as well.
COMBOBOX CONTROL:COMBOBOX CONTROL:
A combo box contains the feature of the textbox and the list box. This controls allows the
user to select an item either by typing the text into the combo box or by selecting it from the list.
-
7/28/2019 Automation of Civil Suppile System
29/86
HORIZONTAL/VERTICAL SCROLL BARS:HORIZONTAL/VERTICAL SCROLL BARS:
Scroll bars provide easy navigation through a list of all items or a large amount of
information by scrolling either horizontally or vertically within an application or control.
TIMER CONTROL:TIMER CONTROL:
Timer control responds to the passage of the time. They are independent of the user, and
you can program to take actions at regular intervals.
DRIVELIST BOX CONTROL:DRIVELIST BOX CONTROL:
ADrive list box control enables a user to select a valid disk drive at runtime.
DIRECTORY LISTBOX CONTROL:DIRECTORY LISTBOX CONTROL:
A directory list box controls displays the directories and paths at runtime. Using this
control you can displays hierarchical list of directories.
SHAPE CONTROL:SHAPE CONTROL:
Shape control is a graphical control displayed as a rectangle, oval square and rounded
shaped.
LINE CONTROL:LINE CONTROL:
It is used to draw lines on the form.
-
7/28/2019 Automation of Civil Suppile System
30/86
IMAGE CONTROL:IMAGE CONTROL:
It is similar to the picture box controlling that it can display images but it can support
only a few features of picture box control.
DATA CONTROL:DATA CONTROL:
Data control provides access to data stored in databases using any one of the three types
of record set objects. You can perform most data access options using the data control without
writing any code at all.
OLE CONTROL:OLE CONTROL:
This control is a window you can pace on your form to host documents from other
applications such as Microsoft Excel or Word. Through this control you can access the
functionality of the other applications with the support of OLE.
MENUS:MENUS:
A menu in Visual Basic is a type of control. Menus like other control have properties and
events but do not have any methods. Also each menu item is a separator menu control. A menu
control displays a custom menu for your application. A menu can include commands, submenus
and separator bars. Each menu you can create Menus up to 4 levels of sub menus.
DIALOG BOXES:DIALOG BOXES:
A Dialog box is a special window displayed by the system or applications to request aA Dialog box is a special window displayed by the system or applications to request a
response from or provide information to the user.response from or provide information to the user.
-
7/28/2019 Automation of Civil Suppile System
31/86
TYPES OF DIALOG BOXES:TYPES OF DIALOG BOXES:
i)i) CUSTOMIZED DIALOG BOXESCUSTOMIZED DIALOG BOXES
ii)ii) PREDEFINED DIALOG BOXESPREDEFINED DIALOG BOXES
iii)iii) STANDARD DIALOG BOXESTANDARD DIALOG BOXE
DOCUMENT:
A Document is a collection of data that can be worked on as unit by a particular
application program. In fact Visual Basic is an example of a program that works with documents
of a particular application.
MULTIPLE DOCUMENT INTERFACE:
The multiple documents interfaces allow you to create an application that matains forms
within a single container form. Applications such as Microsoft Exel and Microsoft Word for
windows have multiple-document interfaces.
OCX CONTROLS:
OCX controls can be used ease as the standard controls. This is because they have
properties and methods and fire off events in just the same way. The only different between is
that the standard controls are permanently built into Visual Basic 6.0 and cannot be removed
from the toolbox, where as OCX controls are packages as separate files. Because of this you
have to go through a small procedure to tell Visual Basic 6.0 that you want to use a particular
OCX control in your project.
OCX CONTROLS TYPES:
-
7/28/2019 Automation of Civil Suppile System
32/86
-
7/28/2019 Automation of Civil Suppile System
33/86
DATA ACCESS OBJECTS:
DAO enables you to use a programming language to access and manipulate data in local
or remote databases and to manage databases their objects and their structures. DAO supports
two different database environment or workspace.
REMOTE DATA OBJECTS:
Remote data objects and its collection provide a framework for using code to create and
manipulate components of a Remote ODBC system. It provides an information model for
accessing remote data sources through ODBC. RDO offers a set of objects that make it easy to
connect to a database, Execute queries and stored procedures, manipulate results and commit
changes to them.
ActiveX DATA OBJECTS:
ADO is designed as an easy-to-use application level interface to microsofts newest and
most powerful data access paradigm. OLE DB. OLEDB provides high performance access to
any data source, including relational and non relational databases, email and file system, text
graphics custom business objects and more. ADO is implemented for minimal network traffic in
key internet scenarios and a minimal number of layers between the front-end and data source all
to provide a lightweight, high performance interface. ADO is called using familiar metaphor
the OLE automation interface. And ADO uses conventions and features similar to DAO and
RDO with simplified semantics that makes it easy to learn.
-
7/28/2019 Automation of Civil Suppile System
34/86
ABOUT MICROSOFT ACCESS:
Microsoft access is one of the popular relational database management systems in use
today. Access allows building and maintaining powerful database both efficiently and
effectively. There are four parts in an access database. They are tables, queries, forms and
reports.
DATABASE:
A database is a collection of information related to a particular subject or purpose such as
tracking orders or maintaining a music collection. If your database isnt stored on a computer, or
only parts of it are, you may be tracking information from a variety of sources that you have to
co-ordinate and organize yourself. Using Microsoft access, you can manage all your information
from a single database file. Within the file, divide your data into separate storage containers
called tables. View , addand update table data using online forms, find and retrieve just the data
you want queries and analyze or print data in a specific layout using reports. To store your data,
create one table for each type of information you track. To bring the data from multiple tables
together in a query, form, a report, you defined relationship between the tables. To find and
retrieve just the data that meets the conditions you specify, including data from multiple tables,create a query. A query can also update or delete multiple records at the same time and perform
built-in or custom calculation on your data.
TABLES:
A table is a collection of data about a specific topic, such as products or suppliers. Using
a separate table for each topics means you store data only once, which makes your database moreefficient and reduce data-entry errors. Tables organize data into columns (called fields) and rows
(called records). In table data sheet view, you can add, edit, or view the data in a table. You can
check the spelling and print your tables data, or alter or sort records, change that data sheets
appearance, or caching the tables structure by adding or deleting columns. In table design view,
you can create an entire table from scratch, or add, delete or customize an existing tables field.
-
7/28/2019 Automation of Civil Suppile System
35/86
Microsoft access provides two ways to create a table. You can create a blank table for entering
your won data or you can create a table using existing data from another source.
IMPORTING AND EXPORTING DATA:
One can export data from access to any other database application or import data into
access. Access supports access to database, paradox, SQL, oracle and Foxpro. One can create an
access data base from data stored in spreadsheet like excel or word processing programs like
word.
SECURITY:SECURITY:
Security that access is designed to supplement the security options in the network
software and hardware.
-
7/28/2019 Automation of Civil Suppile System
36/86
SYSTEM DESIGNSYSTEM DESIGN
6. SYSTEM DESIGN:6. SYSTEM DESIGN:
6.1 DATA BASE DESIGN:6.1 DATA BASE DESIGN:
Table Name: Customer DetailsTable Name: Customer Details
FIELD NAMEFIELD NAME FIELD TYPEFIELD TYPE SIZESIZECnoCno IntegerInteger 0404
NameName TextText 5050
Major personMajor person IntegerInteger 0404
Minor personMinor person IntegerInteger 0404
Noof cylinderNoof cylinder IntegerInteger 0404
AddressAddress TextText 5050
Ward noWard no IntegerInteger 0404
-
7/28/2019 Automation of Civil Suppile System
37/86
DistrictDistrict TextText 5050
Store numberStore number IntegerInteger 0404
Member nameMember name TextText 5050
DoiDoi Date/TimeDate/Time 0808
Table Name: PurchaseTable Name: Purchase
FIELD NAMEFIELD NAME FIELD TYPEFIELD TYPE SIZESIZE
RiceRice IntegerInteger 0404
SugarSugar IntegerInteger 0404
MaidaMaida IntegerInteger 0404
SoojiSooji IntegerInteger 0404
OilOil IntegerInteger 0404KerosceneKeroscene IntegerInteger 0404
DateDate Date/TimeDate/Time 0808
Table Name: StockTable Name: Stock
FIELD NAMEFIELD NAME FIELD TYPEFIELD TYPE SIZESIZE
RiceRice IntegerInteger 0404
SugarSugar IntegerInteger 0404
MaidaMaida IntegerInteger 0404SoojiSooji IntegerInteger 0404
OilOil IntegerInteger 0404
KerosceneKeroscene IntegerInteger 0404
Table Name: Sale a product to customerTable Name: Sale a product to customer
FIELD NAMEFIELD NAME FIELD TYPEFIELD TYPE SIZESIZE
CnoCno IntegerInteger 0404
MonthMonth TextText 5050YearYear IntegerInteger 0404
Bill noBill no IntegerInteger 0404
DatDat Date/TimeDate/Time 0808
RiceRice IntegerInteger 0404
SugarSugar IntegerInteger 0404
MaidaMaida IntegerInteger 0404
SoojiSooji IntegerInteger 0404
-
7/28/2019 Automation of Civil Suppile System
38/86
OilOil IntegerInteger 0404
KerosceneKeroscene IntegerInteger 0404
6.2 DATAFLOW DIAGRAM6.2 DATAFLOW DIAGRAM
Login Admin
AdminCustomer details
Purchase a product
Sale of product
Inventory control
Collection report
Customer
purchase report
Exit
-
7/28/2019 Automation of Civil Suppile System
39/86
6.3 E-R DIAGRAM
Automat
ion of
civil
supplies
exitCustomer
purchase
report
Customer
details
Collection report
Purchase a
productSale of
product
Admin
-
7/28/2019 Automation of Civil Suppile System
40/86
6.4 ARCHITECTURAL DIAGRAM
Automati
on of civil
supplies
Customer
details
Purchase a
productSale of
product
DATA BASE
Customer
purchase
report
Collection
report
Inventory
control
-
7/28/2019 Automation of Civil Suppile System
41/86
6.5 DATA DICTIONARY:6.5 DATA DICTIONARY:
Table Name: Customer DetailsTable Name: Customer Details
FIELD NAMEFIELD NAME DESCRIPTIONDESCRIPTION
CnoCno Card NumberCard Number
NameName Name of the customerName of the customer
Major personMajor person Number of major personNumber of major person
Minor personMinor person Number of minor personNumber of minor personNoof cylinderNoof cylinder Number of CylinderNumber of Cylinder
AddressAddress Address of the customerAddress of the customer
Ward noWard no Ward NumberWard Number
DistrictDistrict Name of the DistrictName of the District
Store numberStore number Store numberStore number
Member nameMember name Member nameMember name
DoiDoi Date of IssuedDate of Issued
Table Name: PurchaseTable Name: Purchase
FIELD NAMEFIELD NAME DESCRIPTIONDESCRIPTION
RiceRice Quantity of RiceQuantity of Rice
SugarSugar Quantity of SugarQuantity of Sugar
MaidaMaida Quantity of MaidaQuantity of Maida
SoojiSooji Quantity of SoojiQuantity of Sooji
OilOil Quantity of OilQuantity of Oil
KerosceneKeroscene Quantity of KerosceneQuantity of Keroscene
DateDate Date of PurchasedDate of Purchased
Table Name: StockTable Name: Stock
-
7/28/2019 Automation of Civil Suppile System
42/86
FIELD NAMEFIELD NAME DESCRIPTIONDESCRIPTION
RiceRice Current Stock of RiceCurrent Stock of Rice
SugarSugar Current Stock of SugarCurrent Stock of Sugar
MaidaMaida Current Stock of MaidaCurrent Stock of Maida
SoojiSooji Current Stock of SoojiCurrent Stock of Sooji
OilOil Current Stock of OilCurrent Stock of OilKerosceneKeroscene Current Stock of KerosceneCurrent Stock of Keroscene
Table Name: Sale a product to customerTable Name: Sale a product to customer
FIELD NAMEFIELD NAME DESCRIPTIONDESCRIPTION
CnoCno Card NumberCard Number
MonthMonth Month of purchasedMonth of purchasedYearYear Year of purchasedYear of purchased
Bill noBill no Bill NumberBill Number
DatDat DateDate
RiceRice Quantity of Rice purchasedQuantity of Rice purchased
SugarSugar Quantity of Sugar purchasedQuantity of Sugar purchased
MaidaMaida Quantity of Maida purchasedQuantity of Maida purchased
SoojiSooji Quantity of Sooji purchasedQuantity of Sooji purchased
OilOil Quantity of Oil purchasedQuantity of Oil purchased
KerosceneKeroscene Quantity of Keroscene purchasedQuantity of Keroscene purchased
-
7/28/2019 Automation of Civil Suppile System
43/86
SYSTEMSYSTEM
TESTING &TESTING &
MAINTENANCEMAINTENANCE
7. SYSTEM TESTING:7. SYSTEM TESTING:
System Testing invokes 3 kinds of actives. They areSystem Testing invokes 3 kinds of actives. They are
1)1) UNIT TESTINGUNIT TESTING
2)2) INTEGRATION TESTINGINTEGRATION TESTING
-
7/28/2019 Automation of Civil Suppile System
44/86
3)3) ACCEPTANCE TESTINGACCEPTANCE TESTING
1)1) UNIT TESTING:UNIT TESTING:
The unit testing is a procedure used to validate that individual units of source code are
working property. A unit is the smallest testable part of an application. In procedural
programming a unit may be an individual program, function, procedure, web page , menu etc,
while in object-oriented programming, the smallest unit is always a class; which may be a
base/super class, abstract class or derived/child class. Units are distinguished from modules in
that modules are typically made up of units. Ideally, each test case is independent from the
others; mock objects and test harnesses can be used to assist testing a module in isolating. Unit
testing is typically done by the developers and not by end-users. The goal of unit testing is toThe goal of unit testing is to
isolate each part of the program and show that the individual parts are correct. A unit testisolate each part of the program and show that the individual parts are correct. A unit test
provides a strict, written contract that the piece of code must satisfy. As a result, it affordsprovides a strict, written contract that the piece of code must satisfy. As a result, it affords
several benefits.several benefits. Unit testing helps to eliminate uncertainly in the units themselves and can beUnit testing helps to eliminate uncertainly in the units themselves and can be
used in a bottom-up testing style approach. By testing the parts of a program first and thenused in a bottom-up testing style approach. By testing the parts of a program first and then
testing the sum of its parts, integration testing becomes much easier.testing the sum of its parts, integration testing becomes much easier.
2)2) INTEGRATION TESTING:INTEGRATION TESTING:
Strategies for integration software component into a functional product into the buttonStrategies for integration software component into a functional product into the button
up, top down and sandwich strategies. The primary purpose of the subsystem testing is to verifyup, top down and sandwich strategies. The primary purpose of the subsystem testing is to verify
operations of the interfaces between modules in the subsystem.operations of the interfaces between modules in the subsystem.
3)3) ACCEPTANCE TESTING:ACCEPTANCE TESTING:
-
7/28/2019 Automation of Civil Suppile System
45/86
Acceptance Testing invokes planning and execution of functional tests, performanceAcceptance Testing invokes planning and execution of functional tests, performance
test and stress test in order to demonstrate the implemented system satisfies its requirements.test and stress test in order to demonstrate the implemented system satisfies its requirements.
In addition functional tests and stress tests are performed to determine the limitations of theIn addition functional tests and stress tests are performed to determine the limitations of the
system. All of the functions procedures of the subsystem are tested individually. Allsystem. All of the functions procedures of the subsystem are tested individually. All
combinations of data are input into and results are compared with those of original results ofcombinations of data are input into and results are compared with those of original results of
the departments. Thus testing is done for all procedures of the system. Once all thethe departments. Thus testing is done for all procedures of the system. Once all the
procedures of the system are tested individually then the whole system is checked as aprocedures of the system are tested individually then the whole system is checked as a
whole. Whenever changes are made messages are displayed so as to make the systemwhole. Whenever changes are made messages are displayed so as to make the system
friendlier.friendlier.
-
7/28/2019 Automation of Civil Suppile System
46/86
-
7/28/2019 Automation of Civil Suppile System
47/86
8. CONCLUSION:8. CONCLUSION:
The Project titled Computerization of Civil Supplies mainly focuses on the dailyThe Project titled Computerization of Civil Supplies mainly focuses on the daily
routine activities in a ration shop. This project is very useful to employee of ration shop androutine activities in a ration shop. This project is very useful to employee of ration shop and
more over reduce the man power and also save a time. Moreover, we have not keeping anymore over reduce the man power and also save a time. Moreover, we have not keeping any
records or registers if we use this project. We have product require report by using this project.records or registers if we use this project. We have product require report by using this project.
Basically this project is developed using Visual Basic with MS-Access. It can be used only withBasically this project is developed using Visual Basic with MS-Access. It can be used only with
in the ration shop. It can be further enhanced using other internet languages such as ASP ,in the ration shop. It can be further enhanced using other internet languages such as ASP ,
HTML.HTML.
This project can be extended in future.This project can be extended in future.
-
7/28/2019 Automation of Civil Suppile System
48/86
-
7/28/2019 Automation of Civil Suppile System
49/86
-
7/28/2019 Automation of Civil Suppile System
50/86
APPENDIXAPPENDIX
-
7/28/2019 Automation of Civil Suppile System
51/86
Login Form:-Login Form:-
-
7/28/2019 Automation of Civil Suppile System
52/86
Main Menu:-
-
7/28/2019 Automation of Civil Suppile System
53/86
Customer information:-
-
7/28/2019 Automation of Civil Suppile System
54/86
Customer information:-
-
7/28/2019 Automation of Civil Suppile System
55/86
-
7/28/2019 Automation of Civil Suppile System
56/86
Sale A Product:-
-
7/28/2019 Automation of Civil Suppile System
57/86
Sale A Product:-
-
7/28/2019 Automation of Civil Suppile System
58/86
-
7/28/2019 Automation of Civil Suppile System
59/86
-
7/28/2019 Automation of Civil Suppile System
60/86
Current Stock:-
-
7/28/2019 Automation of Civil Suppile System
61/86
-
7/28/2019 Automation of Civil Suppile System
62/86
Data Report1:-
-
7/28/2019 Automation of Civil Suppile System
63/86
DataReport1:-
-
7/28/2019 Automation of Civil Suppile System
64/86
COLLECTIONREPORTPT.FRM:-
Private Sub cmdshow_Click()
rptmonpur.Show
'Dim rs As New ADODB.Recordset
'rs.Open "select * from tblsalpro", con, adOpenDynamic, adLockOptimistic
'con.Execute ("delete * from rptsal")
'Dim sd As String
'For i = 1 To rs.RecordCount
'sd = rs("date1")
'sd = VBA.Month(CDate(sd))
'If Val(sd) = Val(txtMonth.Text) Then
''MsgBox txtMonth.Text
' con.Execute ("insert into rptsal values('" & rs(0) & "','" & rs(1) & "','" & rs(2) & "','" & rs(3) &
"','" & rs(4) & "','" & rs(5) & "','" & rs(6) & "'," & rs(7) & "," & rs(8) & "," & rs(9) & ")")
'End If
'rs.MoveNext
'Next
'rs.Close
-
7/28/2019 Automation of Civil Suppile System
65/86
-
7/28/2019 Automation of Civil Suppile System
66/86
'rs1.Close
'Dim n As Integer
'n = MsgBox("Process Completed .......... ", vbInformation)
'If n = 1 Then
'If DataEnvironment1.Connection1.State = 1 Then
'DataEnvironment1.Connection1.Close
'End If
'DataEnvironment1.Connection1.Open
'DataEnvironment1.Command1
'rptmonpur.Show vbModal, Me
'DataEnvironment1.Connection1.Close
'End If
End Sub
Private Sub Form_Load()
conDb
End Sub
-
7/28/2019 Automation of Civil Suppile System
67/86
CUSTOMERDETAIL.FRM:-
Private Sub cmdsave_Click()
con.Execute "insert into tblcust values(" & txtcno.Text & ",'" & Trim(txtname.Text) & "'," &
Val(cbonmp.Text) & "," & Val(cbonmip.Text) & "," & Val(cboncy.Text) & ",'" &
Trim(txtaddr.Text) & "'," & Val(txtwno.Text) & "," & Val(txtsno.Text) & ",'" &
Trim(cbodist.Text) & "','" & Trim(txtnamemem.Text) & "','" & Trim(txtdate.Text) & "')"
MsgBox "Record Saved"
Call clear
End Sub
Sub clear()
txtcno.Text = ""
txtname.Text = ""
txtaddr.Text = ""
txtwno.Text = ""
txtsno.Text = ""
txtnamemem.Text = ""
txtdate.Text = ""
Call incree
End Sub
-
7/28/2019 Automation of Civil Suppile System
68/86
Sub incree()
Set rs = New ADODB.Recordset
rs.Open "select * from tblcust", con, adOpenDynamic, adLockOptimistic
If rs.RecordCount = 0 Then
txtcno.Text = 1
Else
rs1.Open "select max(cno) from tblcust", con, adOpenDynamic, adLockOptimistic
txtcno.Text = rs1(0) + 1
End If
rs.Close
rs1.Close
End Sub
Private Sub cmdview_Click()
Dim v As Integer
v = InputBox("enter the ration card number")
Set rs = New ADODB.Recordset
rs.Open "select * from tblcust where cno=" & v, con, adOpenDynamic, adLockOptimistic
If Not rs.EOF Then
txtcno.Text = rs(0)
txtname.Text = rs(1)
txtaddr.Text = rs(2)
cbonmp.Text = rs(3)
cbonmip.Text = rs(4)
cboncy.Text = rs(5)
txtwno.Text = rs(6)
txtsno.Text = rs(7)
-
7/28/2019 Automation of Civil Suppile System
69/86
cbodist.Text = rs(8)
txtnamemem.Text = rs(9)
txtdate.Text = rs(10)
Else
MsgBox "record not found"
End If
End Sub
Private Sub Command2_Click()
Me.Hide
frmmenu.Show
End Sub
Private Sub Form_Load()
Call conDb
Call incree
Call caller1
Call caller2
Call caller3
Call caller4
End Sub
Function caller1()
cbonmp.AddItem "1"
cbonmp.AddItem "2"
cbonmp.AddItem "3"
cbonmp.AddItem "4"
cbonmp.AddItem "5"
cbonmp.AddItem "6"
-
7/28/2019 Automation of Civil Suppile System
70/86
End Function
Function caller2()
cbonmip.AddItem "1"
cbonmip.AddItem "2"
cbonmip.AddItem "3"
cbonmip.AddItem "4"
cbonmip.AddItem "5"
cbonmip.AddItem "6"
End Function
Function caller3()
cboncy.AddItem "1"
cboncy.AddItem "2"
cboncy.AddItem "No"
End Function
Function caller4()
cbodist.AddItem "Karur"
cbodist.AddItem "Trichy"
cbodist.AddItem "Madurai"
cbodist.AddItem "Coimbatore"
cbodist.AddItem "Dindukkal"
cbodist.AddItem "Chennai"
End Function
Private Sub Timer1_Timer()
lbldate(1).Caption = Date
lbltime(1).Caption = Time
End Sub
-
7/28/2019 Automation of Civil Suppile System
71/86
LOGIN.FRM:
Private Sub cmdCancel_Click()
txtuname.Text = ""
txtpass.Text = ""
txtuname.SetFocus
End Sub
Private Sub cmdok_Click()
If txtuname.Text = "admin" And txtpass.Text = "admin" Then
frmmenu.Show
Me.Hide
Else
MsgBox "Invalid User Name Or PassWord"
End If
End Sub
-
7/28/2019 Automation of Civil Suppile System
72/86
FRMMENU.FRM:
Private Sub cmdcdet_Click()
custdet.Show
Me.Hide
End Sub
Private Sub cmdcoll_Click()
collrpt.Show
Me.Hide
End Sub
Private Sub cmdcrpt_Click()
Dim rs1 As New ADODB.Recordset
conDb
rs1.Open "select * from tblcust", con, adOpenDynamic, adLockOptimistic
Dim sd As String
'MsgBox rs1.RecordCount
For i = 1 To rs1.RecordCount
sd = rs1("datee")
sd = VBA.Month(CDate(sd))
-
7/28/2019 Automation of Civil Suppile System
73/86
MsgBox sd
If ((Val(txtfdate.Text)
-
7/28/2019 Automation of Civil Suppile System
74/86
Me.Hide
End Sub
Private Sub cmdsales_Click()
salesr.Show
Me.Hide
End Sub
Private Sub Exit_Click()
Dim i As Integer
i = MsgBox("do u want to realy exit the project", vbYesNo, "Civil Supply System")
'MsgBox i
If i = 6 Then
End
End If
End Sub
-
7/28/2019 Automation of Civil Suppile System
75/86
INVENTORY CONTROL.FRM:
Private Sub cmdsave_Click()
conDb
Set rs = New ADODB.Recordset
rs.Open "select * from tblstock", con, adOpenDynamic, adLockOptimistic
If rs.RecordCount = 0 Then
MsgBox "record not found"
Else
txtrice.Text = rs(1)
txtsugar.Text = rs(2)
txtmaida.Text = rs(3)
txtsooji.Text = rs(4)
txtoil.Text = rs(5)
txtkero.Text = rs(6)
End If
End Sub
Private Sub Command2_Click()
frmmenu.Show
Me.Hide
-
7/28/2019 Automation of Civil Suppile System
76/86
End Sub
Private Sub Form_Load()
Call conDb
End Sub
Private Sub Timer1_Timer()
lbldate(1).Caption = Date
lbltime(1).Caption = Time
End Sub
-
7/28/2019 Automation of Civil Suppile System
77/86
PURCHASEPROD.FRM:
Dim a, p1, p2, p3, p4, p5, p6 As Integer
Private Sub cmdsave_Click()
con.Execute ("insert into tblpurchase values('" & lbldate(1).Caption & "'," & Val(txtrice.Text) &
"," & Val(txtsugar.Text) & "," & Val(txtmaida.Text) & "," & Val(txtsooji.Text) & "," &Val(txtoil.Text) & "," & Val(txtkero.Text) & ")")
MsgBox "Successfully Executed"
Set rs = New ADODB.Recordset
rs.Open "select * from tblstock", con, adOpenDynamic, adLockOptimistic
If rs.RecordCount = 0 Then
p1 = Val(txtrice.Text)
p2 = Val(txtsugar.Text)
p3 = Val(txtmaida.Text)
p4 = Val(txtsooji.Text)
p5 = Val(txtoil.Text)
p6 = Val(txtkero.Text)
Else
p1 = rs(1) + Val(txtrice.Text)
p2 = rs(2) + Val(txtsugar.Text)
-
7/28/2019 Automation of Civil Suppile System
78/86
p3 = rs(3) + Val(txtmaida.Text)
p4 = rs(4) + Val(txtsooji.Text)
p5 = rs(5) + Val(txtoil.Text)
p6 = rs(6) + Val(txtkero.Text)
End If
a = 1
con.Execute ("update tblstock set rice=" & p1 & ",sugar=" & p2 & ",maida=" & p3 & ",sooji="& p4 & ",oil=" & p5 & ",keroscene=" & p6 & " where cno=" & a)
MsgBox "record saved and updated"
Call clear
End Sub
Sub clear()
txtrice.Text = ""
txtsugar.Text = ""
txtsooji.Text = ""
txtoil.Text = ""
txtmaida.Text = ""
txtkero.Text = ""
End Sub
Private Sub Command2_Click()
frmmenu.Show
Me.Hide
End Sub
Private Sub Form_Load()
Call conDb
End Sub
Private Sub Timer1_Timer()
lbldate(1).Caption = Date
-
7/28/2019 Automation of Civil Suppile System
79/86
lbltime(1).Caption = Time
End Sub
Private Sub txttotal_GotFocus()
txttotal.Text = Val(txtrice.Text) + Val(txtsugar.Text) + Val(txtsooji.Text) + Val(txtoil.Text) +Val(txtkero.Text) + Val(txtmaida.Text)
End Sub
SALESR.FRM:
Dim rs1 As New ADODB.Recordset
Dim s1, s2, s3, s4, s5, s6 As Integer
Private Sub cbocno_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Set rs = New ADODB.Recordset
rs.Open "select * from tblcust where cno=" & Val(cbocno.Text) & "", con, adOpenDynamic,adLockOptimistic
lblname.Caption = rs(1)
lblmnp.Caption = rs(2)
lblmip.Caption = rs(3)
lblallot.Caption = (Val(rs(2)) * 4 + Val(rs(3)) * 2 & "Kgs")
If Val(lblallot.Caption) > 20 Then
lblallot.Caption = "20 Kgs"
End If
If Val(lblallot.Caption) < 12 Then
lblallot.Caption = "12 Kgs"
End If
If rs(4) = 2 Then
-
7/28/2019 Automation of Civil Suppile System
80/86
txtkero.Text = "3 LTRS"
ElseIf rs(4) = 1 Then
txtkero.Text = "5 LTRS"
Else
txtkero.Text = "10 LTRS"
End If
txtbno.SetFocus
Set rs = New ADODB.Recordset
rs.Open "select * from tblsalpro where cno=" & Val(cbocno.Text) & "", con, adOpenDynamic,
adLockOptimistic
If rs.RecordCount = 0 Then
txtrice.Text = 0
txtsugar.Text = 0
txtmaida.Text = 0
txtsooji.Text = 0
txtoil.Text = 0
txtkero.Text = 0
Else
Do While Not rs.EOF
s1 = s1 + rs(5)
s2 = s2 + rs(6)
s3 = s3 + rs(7)
s4 = s4 + rs(8)
s5 = s5 + rs(9)
s6 = s6 + rs(10)
rs.MoveNext
Loop
txtr.Text = s1
-
7/28/2019 Automation of Civil Suppile System
81/86
txts.Text = s2
txtm.Text = s3
txtso.Text = s4
txto.Text = s5
txtk.Text = s6
End If
End If
End Sub
Private Sub cmdsave_Click()
con.Execute ("insert into tblsalpro values(" & Val(cbocno.Text) & ",'" & cbomonth.Text & "',"
& cboyear.Text & "," & Val(txtbno.Text) & ",'" & lbldate(1).Caption & "'," & Val(txtrval.Text)& "," & Val(txtsamt.Text) & "," & Val(txtmamt.Text) & "," & Val(txtsoamt.Text) & "," &
Val(txtoamt.Text) & "," & Val(txtkamt.Text) & "," & Val(txttotal.Text) & "," &Val(txttamt.Text) & ")")
MsgBox "Successfully Executed"
End Sub
Private Sub Command1_Click()
txtrice.Text = 20 - Val(txtr.Text)
txtsugar.Text = 5 - Val(txts.Text)
txtmaida.Text = 5 - Val(txtm.Text)
txtsooji.Text = 6 - Val(txtso.Text)
txtoil.Text = 5 - Val(txto.Text)
txtkero.Text = 10 - Val(txtk.Text)
If Val(txtrice.Text) < 0 Then
MsgBox "Rice is not available for u "
txtrice.Text = 0
End If
If Val(txtrice.Text) < 0 Then
MsgBox "Rice is not available for u "
-
7/28/2019 Automation of Civil Suppile System
82/86
txtrice.Text = 0
End If
If Val(txtsugar.Text) < 0 Then
MsgBox "sugar is not available for u "
txtsugar.Text = 0
End If
If Val(txtmaida.Text) < 0 Then
MsgBox "maida is not available for u "
txtmaida.Text = 0
End If
If Val(txtsooji.Text) < 0 Then
MsgBox "sooji is not available for u "
txtsooji.Text = 0
End If
If Val(txtoil.Text) < 0 Then
MsgBox "oil is not available for u "
txtoil.Text = 0
End If
If Val(txtkero.Text) < 0 Then
MsgBox "keroscene is not available for u "
txtkero.Text = 0
End If
End Sub
Private Sub Command2_Click()
frmmenu.Show
Me.Hide
End Sub
-
7/28/2019 Automation of Civil Suppile System
83/86
Private Sub Form_Load()
conDb
Set rs = New ADODB.Recordset
rs.Open "select cno from tblcust", con, adOpenDynamic, adLockOptimistic
rs.MoveFirst
Do While Not rs.EOF
cbocno.AddItem rs(0)
rs.MoveNext
Loop
rs.Close
Set rs = New ADODB.Recordset
rs.Open "select billno from tblsalpro", con, adOpenDynamic, adLockOptimistic
If rs.RecordCount = 0 Then
txtbno.Text = 1
Else
Set rs1 = New ADODB.Recordset
rs1.Open "select max(billno) from tblsalpro", con, adOpenDynamic, adLockOptimistic
txtbno.Text = rs1(0) + 1
End If
Call caller1
Call caller2
End Sub
Function caller1()
cbomonth.AddItem "January"
cbomonth.AddItem "February"
cbomonth.AddItem "March"
cbomonth.AddItem "April"
-
7/28/2019 Automation of Civil Suppile System
84/86
-
7/28/2019 Automation of Civil Suppile System
85/86
txtoamt.Text = Val(txtoil.Text) * 6
End Sub
Private Sub txtrice_Change()
txtrval.Text = Val(txtrice.Text) * 12
End Sub
Private Sub txtsooji_Change()
txtsoamt.Text = Val(txtsooji.Text) * 7
End Sub
Private Sub txtsugar_Change()
txtsamt.Text = Val(txtsugar.Text) * 5
End Sub
Private Sub txttamt_GotFocus()
txttamt.Text = Val(txtrval.Text) + Val(txtsamt.Text) + Val(txtmamt.Text) + Val(txtsoamt.Text)
+ Val(txtoamt.Text) + Val(txtkamt.Text)
End Sub
Private Sub txttotal_GotFocus()
txttotal.Text = Val(txtrice.Text) + Val(txtsugar.Text) + Val(txtmaida.Text) + Val(txtsooji.Text)+ Val(txtoil.Text) + Val(txtkero.Text)
End Sub
-
7/28/2019 Automation of Civil Suppile System
86/86