automation of civil supply system
TRANSCRIPT
-
7/28/2019 Automation of Civil Supply System
1/82
CONTENTS
SL.NO. PARTICULARS PAGE NO1. SYNOPSIS
2. PROJECT DESCRIPTION
3. SYSTEM ANALYSIS
3.1 EXISTING SYSTEM
3.2 PROPOSED SYSTEM
4. SYSTEM CONFIGURATION5. 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. CONCLUSION9. BIBLIOGRAPHY
APPENDIX
a)SAMPLE CODE
b)SAMPLE OUTPUT
-
7/28/2019 Automation of Civil Supply System
2/82
INTRODUCTIONINTRODUCTION
-
7/28/2019 Automation of Civil Supply System
3/82
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.
-
7/28/2019 Automation of Civil Supply System
4/82
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.
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 Supply System
5/82
-
7/28/2019 Automation of Civil Supply System
6/82
PROJECTPROJECT
DESCRIPTIONDESCRIPTION
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.
-
7/28/2019 Automation of Civil Supply System
7/82
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
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
-
7/28/2019 Automation of Civil Supply System
8/82
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.
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
-
7/28/2019 Automation of Civil Supply System
9/82
SYSTEM
ANALYSIS
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.
-
7/28/2019 Automation of Civil Supply System
10/82
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
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.
-
7/28/2019 Automation of Civil Supply System
11/82
SYSTEMSYSTEM
CONFIGURATIONCONFIGURATION
.
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
-
7/28/2019 Automation of Civil Supply System
12/82
MOUSE 3 BUTTON MOUSE
PRINTER HP LASER JET PRINTER
SOFTWARE REQUIREMENTS:SOFTWARE REQUIREMENTS:
OPERATING SYSTEM: WINDOWS 98
FRONT END: VISUAL BASIC 6.0
BACK END: MS-ACCESS
-
7/28/2019 Automation of Civil Supply System
13/82
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.
-
7/28/2019 Automation of Civil Supply System
14/82
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
part refers to the BASIC (Beginners All Purpose Symbolic Instruction Code) language used by
more programmers than any other language in the history of computing. Visual Basic is evolved
from the original Basic language and now contains several hundred statements, functions, and
keywords, many of which relate to windows GUI.
ADVANTAGES OF VISUAL BASIC:
User interfacesUser interfaces:: Visual Basic 6 is an application development tool from theVisual Basic 6 is an application development tool from the
Basic language. Basic language is a widely used languageBasic language. Basic language is a widely used language
that provides a simple syntax.that provides a simple syntax.
Data AccessData Access:: The data access options of visual basic allows you to createThe data access options of visual basic allows you to create
Databases and applications for various databases formatDatabases and applications for various databases format
Such as Microsoft SQL server.Such as Microsoft SQL server.
Application DevelopmentApplication Development::
-
7/28/2019 Automation of Civil Supply System
15/82
1) Using VB you can create event-driven Applications. In a Visual Basic application code isUsing VB you can create event-driven Applications. In a Visual Basic application code is
executed in response. This is Different from a procedural application in which code isexecuted in response. This is Different from a procedural application in which code is
executed according to a specific path defined by the logic of the application.executed according to a specific path defined by the logic of the application.
2) you can also dynamic-link library routines in applications.2) you can also dynamic-link library routines in applications.
3) Active X components help you in reusing the code in applications3) Active X components help you in reusing the code in applications
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.
-
7/28/2019 Automation of Civil Supply System
16/82
THERE ARE 2 TYPES OF OBJECT IN VISUAL BASICTHERE ARE 2 TYPES OF OBJECT IN VISUAL BASIC
1)1) FORMSFORMS
2)2) CONTROLSCONTROLS
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.
-
7/28/2019 Automation of Civil Supply System
17/82
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.
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.
-
7/28/2019 Automation of Civil Supply System
18/82
SyntaxSyntax:: Hide
EVENTS:EVENTS:
1) Load
2) Unload
3) Query unload
4) Active and deactivate
5) Terminate
6) Got focus
7) Lost focus
8) Resize
9) Click event
10) Paint event
LOAD:LOAD:
Occurs when a form is loaded occurs when an application starts as the result of a load
statement or as the result of a reference to an unload forms properties or controls.
UNLOAD:UNLOAD:
Occurs when a form is about to be removed from the screen. When that form us reloaded
the contents of all its controls are reinitialized. This even is triggered by a user closing the form
using the close command on the control menu or an unload statement.
-
7/28/2019 Automation of Civil Supply System
19/82
QUERY UNLOAD:QUERY UNLOAD:
Occurs before a form or application closes. When a MDI form object closes the Query
unload event occurs first for the MDI form and then in all MDI child forms. If no form cancels
the Queryunload event, The unload event occurs in all other forms and then for the other MDI
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 orclick 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:
-
7/28/2019 Automation of Civil Supply System
20/82
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.
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 Supply System
21/82
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 professional
edition 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 objects
also 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
-
7/28/2019 Automation of Civil Supply System
22/82
2) Picture box control
3) Label control
4) Textbox control
5) Frame control
6) Command button control
7) Checkbox control
8) Option button control
9) List box control
10) Combo box control
11) Horizontal/vertical scroll bar
12) Timer control
13) Drive list box control
14) Directory list box control
15) File list box control
16) Shape control
17) List control
18) Image control
19) Data control
20) OLE control
POINTER CONTROL:POINTER CONTROL:
-
7/28/2019 Automation of Civil Supply System
23/82
This is the only item in the toolbox that does not draw a control. Use it to move or resize
a control after its been drawn on a form.
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.
-
7/28/2019 Automation of Civil Supply System
24/82
COMMAND BUTTON CONTOLS:COMMAND BUTTON CONTOLS:
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 Supply System
25/82
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:
-
7/28/2019 Automation of Civil Supply System
26/82
It is used to draw lines on the form.
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 Supply System
27/82
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 removedfrom 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.
-
7/28/2019 Automation of Civil Supply System
28/82
OCX CONTROLS TYPES:
1)1) MICROSOFT COMMON DIALOG CONTROL 6.0MICROSOFT COMMON DIALOG CONTROL 6.0
2)2) MICROSOFT RICHTEXT CONTROL 6.0MICROSOFT RICHTEXT CONTROL 6.0
3)3) MICROSOFT PICTURECHIP CONTROL 6.0MICROSOFT PICTURECHIP CONTROL 6.0
4)4) MICROSOFT WINDOWS COMMON CONTROL 6.0MICROSOFT WINDOWS COMMON CONTROL 6.0
5)5) MICROSOFT ADO CONTROL 6.0MICROSOFT ADO CONTROL 6.0
6)6) MICROSOFT DATA BOUND GRID CONTOL 6.0MICROSOFT DATA BOUND GRID CONTOL 6.0
7)7) MICROSOFT DATA BOUND LIST CONTROL 6.0MICROSOFT DATA BOUND LIST CONTROL 6.0
8)8) MICROSOFT REMOTE DATA CONTROL 6.0MICROSOFT REMOTE DATA CONTROL 6.0
RICHTEXT BOX CONTRL:
The Rich text box control allows the user to enter and edit text while also providing more
advanced formatting features the conventional textbox control. The rich textbox control provides
a number of properties you can also apply Formatting to any portion of the text within the
control.
DATA ACCESS OPTIONS:
1)1) DATA ACCESS OBJECTSDATA ACCESS OBJECTS
2)2) REMOTE DATA OBJECTSREMOTE DATA OBJECTS
3)3) ActiveX DATA OBJECTSActiveX DATA OBJECTS
-
7/28/2019 Automation of Civil Supply System
29/82
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 Supply System
30/82
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 more
efficient 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
-
7/28/2019 Automation of Civil Supply System
31/82
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.
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 Supply System
32/82
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 Supply System
33/82
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 Supply System
34/82
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 Supply System
35/82
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 Supply System
36/82
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 Supply System
37/82
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 Supply System
38/82
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 Supply System
39/82
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 Supply System
40/82
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 Supply System
41/82
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 Supply System
42/82
CONCLUSION
-
7/28/2019 Automation of Civil Supply System
43/82
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 Supply System
44/82
BIBLIOGRAPY
-
7/28/2019 Automation of Civil Supply System
45/82
9. BIBILIOGRAPHY:9. BIBILIOGRAPHY:
Paul sheriff Visual basic 6Paul sheriff Visual basic 6
Patricia Hartman Teach yourself Visual basic 6Patricia Hartman Teach yourself Visual basic 6
Gary Cornell VB Complete ReferenceGary Cornell VB Complete Reference
Steven Holzer Visual Basic 6 ProgrammingSteven Holzer Visual Basic 6 Programming
Roger Pressman Software EngineeringRoger Pressman Software Engineering
-
7/28/2019 Automation of Civil Supply System
46/82
APPENDIXAPPENDIX
-
7/28/2019 Automation of Civil Supply System
47/82
Login Form:-Login Form:-
-
7/28/2019 Automation of Civil Supply System
48/82
Main Menu:-
-
7/28/2019 Automation of Civil Supply System
49/82
Customer information:-
-
7/28/2019 Automation of Civil Supply System
50/82
Customer information:-
-
7/28/2019 Automation of Civil Supply System
51/82
Purchasing Product:-
-
7/28/2019 Automation of Civil Supply System
52/82
Sale A Product:-
-
7/28/2019 Automation of Civil Supply System
53/82
Sale A Product:-
-
7/28/2019 Automation of Civil Supply System
54/82
-
7/28/2019 Automation of Civil Supply System
55/82
-
7/28/2019 Automation of Civil Supply System
56/82
Current Stock:-
-
7/28/2019 Automation of Civil Supply System
57/82
-
7/28/2019 Automation of Civil Supply System
58/82
Data Report1:-
-
7/28/2019 Automation of Civil Supply System
59/82
DataReport1:-
-
7/28/2019 Automation of Civil Supply System
60/82
-
7/28/2019 Automation of Civil Supply System
61/82
'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
'Dim rs1 As New ADODB.Recordset
'con.Execute ("delete * from rptsal")
'rs1.Open "select * from tblsalpro", con, adOpenDynamic, adLockOptimistic
'Dim sd As String
'MsgBox rs1.RecordCount
'For i = 1 To rs1.RecordCount
'sd = rs1("datee")
'sd = VBA.Month(CDate(sd))
'MsgBox sd
'If ((Val(txtfdate.Text)
-
7/28/2019 Automation of Civil Supply System
62/82
-
7/28/2019 Automation of Civil Supply System
63/82
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 Supply System
64/82
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 Supply System
65/82
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 Supply System
66/82
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 Supply System
67/82
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 Supply System
68/82
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 Supply System
69/82
MsgBox sd
If ((Val(txtfdate.Text)
-
7/28/2019 Automation of Civil Supply System
70/82
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 Supply System
71/82
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 Supply System
72/82
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 Supply System
73/82
-
7/28/2019 Automation of Civil Supply System
74/82
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 Supply System
75/82
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 Supply System
76/82
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 Supply System
77/82
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 Supply System
78/82
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 Supply System
79/82
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 Supply System
80/82
cbomonth.AddItem "May"
cbomonth.AddItem "June"
cbomonth.AddItem "July"
cbomonth.AddItem "August"
cbomonth.AddItem "September"
cbomonth.AddItem "October"
cbomonth.AddItem "November"
cbomonth.AddItem "December"
End Function
Function caller2()
cboyear.AddItem "2009"
cboyear.AddItem "2010"
cboyear.AddItem "2011"
cboyear.AddItem "2012"
cboyear.AddItem "2013"
End Function
Private Sub Timer1_Timer()
lbldate(1).Caption = Date
lbltime(1).Caption = Time
End Sub
Private Sub txtkero_Change()
txtkamt.Text = Val(txtkero.Text) * 8
End Sub
Private Sub txtmaida_Change()
txtmamt.Text = Val(txtmaida.Text) * 5
End Sub
Private Sub txtoil_Change()
-
7/28/2019 Automation of Civil Supply System
81/82
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 Supply System
82/82