project report
DESCRIPTION
Inventory Management SystemTRANSCRIPT
Project Report 2011 Ration shop Inventory Control System
CO-OPERATIVE INSTITUTE OF TECHNOLOGY, VADAKARA
ENGINEERING COLLEGE UNDER COOPERATIVE ACADEMY OFPROFESSIONAL EDUCATION (CAPE)
Established by Govt. of Kerala
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
RATIONSHOP INVENTORY CONTROL SYSTEMMINI PROJECT REPORT
SUBMITTED BY,
DEEPTHI DINAKARANJINCY K .T.K JINU JOSE SINCY JOHN SYAMILY K.R
CO-OPERATIVE INSTITUTE OF TECHNOLOGY, VADAKARA
ENGINEERING COLLEGE UNDER COOPERATIVE ACADEMY OFPROFESSIONAL EDUCATION (CAPE)
Established by Govt. of Kerala
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
RATIONSHOP INVENTORY CONTROL SYSTEM MINI PROJECT REPORT
SUBMITTED BY,
DEEPTHI DINAKARANJINCY K .T. K JINU JOSE SINCY JOHN SYAMILY K.R
CO-OPERATIVE INSTITUTE OF TECHNOLOGY, VADAKARA
ENGINEERING COLLEGE UNDER COOPERATIVE ACADEMY OFPROFESSIONAL EDUCATION (CAPE)
Established by Govt. of Kerala
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
RATIONSHOP INVENTORY CONTROL SYSTEM
GUIDED BY
Miss. NITHYA A.K(Lecture in Computer science & Engineering)
CO-OPERATIVE INSTITUTE OF TECHNOLOGY, VADAKARA
ENGINEERING COLLEGE UNDER COOPERATIVE ACADEMY OFPROFESSIONAL EDUCATION (CAPE)
Established by Govt. of Kerala
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
CERTIFICATE
Date..
Certified that this report of Project work titled RATIONSHOP INVENTORY CONTROL SYSTEM is a bona fide record of the work done by DEEPTHI DINAKARAN, JINCY K.T.K, JINU JOSE, SINCY JOHN, SYAMILY K.R of this college in partial fulfillment of the requirements for the award of the Degree of Bachelor of Technology in Computer science & Engineering of the Cochin University of Science and Technology.
NITHYA A.K DHANYA A.K LINDASEBASTAIN (Lecture in (Lecture in (Lecture inInformation technology) computer science) computer science) Project Guide Project coordinator HOD
ACKNOWLEDGEMENT We thank the almighty God for showering his blessings without this, project would be a dream. We are grateful to our Institution with its ideas and inspiration for having provided the facilities that have made this project a great success. We extend our heart felt thanks to our honorable Principal Mrs. Smitha and also HOD of our Department Mrs. Linda Sebastian for supporting us all along. We also acknowledge in a special way to our project guide Miss. Nithya A.K who have supported and advised us through out the preparation of the project. We also thank all staff members of department for their help and advise provided for the preparation of this project. Before proceeding into the details of our project, it would be incomplete without admitting grateful thanks to our beloved parents, friends, batch mates , and well wishers without whose co-operation and help we would have not completed this task.
We thank one and all.
ABSTRACT
Ration shops are one of the main food product supply centers of Indian Government. Both Central and State government control this supply but these shops are managed under private sector. In existing system all the activities of this shop are done manually in paper works. They keep all records in big paper file records. Govt. of Kerala Provide Register Book, Issue Book, Bill book, through the Supply Office to the Ration Shops. The Shop owners must keep and maintain these three books with proper entry of data. Due to the manual entry through paper work in the three books, duplicate entry or wrong entry may occur, resulting in wasting time and resources in the existing system.As per the Kerala Govt. the customers are divided into two groups like APL [Above Poverty Line] and BPL [Below poverty Line]. Central Govt. provides a special scheme AAY [Andhyothaya] and ANP [Annapurna]. Then the customers are divided in to four groups. Ration-Shops provide Rice, wheat, Sugar, Kerosene oil, Atta to the customers. Each group gets products in separate quantity and rate as per the Govt. norms. RATION-SHOP INVENTORY CONTROL SYSTEM is intended to fully automate Ration Shops. The system must provide an easy interface so that person of little computer knowledge can use it easily and efficiently. The proposed system provides enhanced functionalities and efficient process design.
CONTENTS
1. INTRODUCTION 1.1 ABOUT THE TOPIC 1.2 ABOUT THE PROJECT2. SYSTEM ANALYSIS 2.1 EXISTING SYSTEM 2.2 PROPOSED SYSYTEM 2.2 REQUIREMENTS ANALYSIS 3. SYSTEM REQUIREMENTS 3.1 HARDWARE REQUIREMENTS 3.2 SOFTWARE REQUIREMENTS 4. SYSTEM DESIGN AND DEVELOPMENT 4.1 SYSTEM DESIGN 4.2 INPUT AND OUTPUT DESIGN 4.3 DATABASE DESIGN 4.4 DESIGN DIAGRAM 4.4.1 DATAFLOW DIAGRAM 5. IMPLEMENTATION AND CODING 6. TESTING 7. MAINTENANCE 8. CONCLUSION 9. BIBLIOGRAPHY 10. APPENDIX 10.1 SCREEN SHOTS
1. INTRODUCTION
This Software titled as RATION-SHOP INVENTORY CONTROL SYSTEM developed to control the inventory management of the Kerala Ration shops. The expected audience of this document is the faculty of ************************* proprietor of ration-shop number **** .This documents is also facilitates the requirement of those who need to do back tracking in further.
1.1 Background
1.1.1Existing System
In existing system all the activities of this shop are done manually in paper works. They keep all records in big paper file records. Govt. of Kerala provide register book, issue book, bill book, through the supply office to the Ration-Shops. The shop owners must keep and maintain these three books with proper entry of data. These books must be submitted to the supply office. Ration Inspector (RI) of supply office verify all the books entry-wise and calculate the closing stock using the equation opening stock + purchase stock sales stock=closing stock. With the help of closing stock she/he calculates the purchase quantity and allows the purchase unit from the whole sales. The wholesaler only provides the quantity allowed from the RI. Wholesaler calculates the bill amount of the allowed quantity. Due to the manual entry through paper work in the three books duplicate entry or wrong entry may occur in the existing system, resulting in wasting time and resources.As per the Kerala Govt. the customers are divided into two groups like APL [Above Poverty Line] and BPL [Below poverty Line]. Central Govt. provides a special scheme AAY [Andhyothaya] and ANP [Annapurna]. Then the customers are divided in to four groups. Ration-Shops provide rice, wheat, sugar, kerosene oil, atta to the customers. Each group gets products in separate quantity and rate as per the Govt. norms. The customers under ANP scheme get 10 kg at free of cost in every week. Presently providing item, quantity, price and maximum allowed quantity is given below:-
Category name: AAY
ItemUnitPrice per unitAllowed quantity
Rice Kg2.0035kg
Sugar Kg13.50400g
Atta Kg122
Kerosene oil
Non Electricity (NE) Ltr9.302ltr
Electricity (E) Ltr9.302ltr
Category name: ANP
ItemAllowed quantityPrice
Rice10kgNo price
Category name: APL ItemsQuantityPriceAllowed quantity
Rice1kg8.9010kg
Wheat1kg6.702kg
Kerosene oil1ltr9.302
Atta1kg122 kg
Category name: APL SC/STItemsquantitypriceAllowed quantity
Rice1kg210kg
Wheat1kg22kg
Category name: BPL
ItemquantityPriceAllowed quantity
Rice1kg217kg
Wheat1kg25kg
Sugar113.50400g
Atta1kg122
Kerosene oil
NE1ltr9.305ltr
E1ltr9.302ltr
When a customer comes to the Ration-Shop the shop keeper must check the card no, customer name and customer category then the shop-keeper checks whether the customer required quantity item is allowed or not? And calculate category wise rate of the product. If the customers need quantity is more than his/her allowed quantity, shopkeeper cant provide the item.
1.1.2 Limitations of Existing System Time consumption Error factor Storage of data Difficulty in accessing data Integrity problems Security issues Existing system consumes man power Corruption1.1.3 PROPOSED SYSTEM In this project all the disadvantages of the existing system can be removed
Features of the proposed system The proposed system has many advantages: Low response time Cost effective solution Robustness Scalability Possibility of upgrading
SYSTEM ANALYSIS
System analysis works with users to identify goals and build systems to achieve them. System analysis is an important phase of any system development process. The system is studied to the minutest details and analyzed. The system analysts play the role of an interrogator and dwells deep in the working of the present system. In analysis, a detailed study of these operations performed by a system and their relationship within and outside of the system is done. A key question considered here is What must be done to solve the problem? One aspect of analysis is defining the boundaries of the system and determining whether or not the candidate system should be considered.
The system is viewed as a whole and inputs to the system are identified. The outputs from the system are traced through the various data that are collected on available files, decision points and transactions handled by the present system. Once analysis is completed, the analyst has a firm understanding of what is to be done.
Based on analysis, a cost/benefit analysis is considered. Here the cost for the system is calculated on the basis of the analysis made. The best one is selected as the solution. The proposal is presented to the user for an endorsement by the user. The proposal is reviewed on the user request and suitable changes are made. This is a loop that ends as soon as the user is satisfied with the proposal. After all this, the proposal becomes a formal agreement that paves way for the design and implementation.
3.1. Preliminary Study
Preliminary study is the process of gathering and interpreting facts, using the information for further studies on the system. It is a problem solving activity that requires intensive communication between system users and system developers. It does various feasibility studies. In these studies a rough figure of the system activity can be obtained, from which the decision about the strategies to be followed for effective system study and analysis can be taken. Preliminary study also identifies the method collection to be followed.
As the preliminary study was conducted, an initial picture about the system working was obtained. From the information received from the study, data collection methods are identified. Even in the first investigation itself, the drawback of the existing system could be identified.
3.2. Requirement Gathering and Analysis
The analyst starts the requirements gathering analysis activity by collecting all information from the customer, which could be used to develop the requirements of the system. He then analyzes the collected information to obtain a clear and thorough understanding of the product to be developed, with a view of removing all ambiguities and inconsistencies from the initial customer perception of the problem. This may sound like a simple task. However, in practice it is difficult to gather the necessary information and to form an unambiguous understanding problem. Now we elaborate the two main activities involved in the requirements gathering and analysis phase.
3.2.1. Requirements Gathering
This activity typically involves interviewing the end users and customers and studying the existing documents to collect all possible information regarding the system. If the project involves automating some existing procedure, the task of the system analyst becomes a little easier as we can immediately obtain the input and the output data formats and the details of the operational data procedures.
3.2.2. Analysis of the Gathered Requirements
The main purpose of this activity is to clearly understand the exact requirements of the customer. The following basic questions pertaining to the project should be clearly understood by the analyst in order to obtain a good grasp of the problem:
What is the problem? Why is it important to solve the problem? What are the possible solutions to the problem? What exactly are the data inputs to the system and what exactly are the data outputs to the system? What are the likely complexities that might arise while solving the problem? If there is external software or hardware with which the developed software has to interface, then what exactly would the data interchange formats with the external system be?
After the analyst has understood the exact customer requirements, he proceeds to identify and resolve the various requirement problems. The most important requirement problem that the analyst has to identify and eliminate is the problems of anomalies, inconsistencies and incompleteness.
3.3. Software Requirement Specification (SRS)
After the analyst has collected all the required information regarding the software to be developed, and has removed all completeness, inconsistencies and anomalies from the specification I start to systematically organize the requirements in the form of an SRS document. The SRS document usually contains all the user requirements in an informal form.Among all the documents produced during a software development life cycle, writing SRS document is probably the toughest. One reason behind this difficulty is that the SRS document is expected to cater to the needs of a wide variety of audience. Different people need the SRS document for different purposes. Some of the important categories of users of the SRS document and their needs are as follows:Users, customers and marketing personnel: The goal of this set of audience is to ensure that the system as described in the SRS document will cater to their needs.Software developers: The software developers refer to the SRS document to make sure that they develop exactly what the customer requires.Test engineers: Their goal is to ensure that the requirements are understandable from a functionality point of view, so that they can test the software and validate its working. They need the functionality to be clearly described, and input and output data to be identified precisely.User documentation writers: Their goal in reading the SRS document is to ensure that they understand well enough to be able to write the user manuals.Project manager: They want to ensure that they can estimate the cost easily by referring to the SRS document and that it contains all the information required planning the project well.Maintenance engineers: The SRS document helps the maintenance engineers to understand the functionalities of the system. A clear knowledge of the functionality can help them to understand the design code. Also, the requirement knowledge would enable them to determine what modifications to the systems functionality would be needed for a specific purpose.An SRS document should clearly specify Functional requirements Nonfunctional requirements Goals of implementation
3.4. System Feasibility
Having understood the existing software and specified objective of the proposed software the alternative software is investigated. A feasibility analysis is performed to choose the software that meets the performance at least cost. The main aim of feasibility study activity is to determine whether it would be functionally and technically feasible to develop the product. The feasibility study involves the analysis of the problem and collection of relevant information relating to the product such as different data items which would be the input to the system, the processing required to be carried out on these data, the output data required to be produced by the system. A feasibility study is a rest of the system proposal according to its working, impact on the organization, ability to meet users, need and effective use of resources. The objective of the feasibility study is acquiring the sense of the scope of the system. The collected data are analyzed to arrive following:
An abstract problem definition. An abstract problem definition is a rough description of the problem, which considers only the important requirements and ignores the rest. Formulation of different strategies Analysis of alternative solution strategies to compare their benefits and shortcoming. This analysis usually requires making approximate estimate of the resources required, cost of development time for each of the options. These estimates are used as the basis for comparing the different solution is identified; all later phases of development are carried out as per this solution. Thus during the feasibility study, most of the high-level architectural design decision are made. Therefore feasibility study considered as the important stage. During this study it may come to high cost, resource constraints or some other technical reasons. The development of a computer-based system is more likely to be projects are feasible. During product engineering, we concentrate our attention on three main areas of interest. Three essential considerations involved in the feasibility study are Operational feasibility Technical feasibility Economical feasibility
3.4.1. Operational Feasibility This is a step in the feasibility analysis that is concerned with determining whether it is possible to design a user-friendly interaction. It is feasible to develop a user-friendly interface using Microsoft Visual Basic. The forms developed provide a very good interface to the user where in they enter all the details and view the output. Many other options such as viewing the database are also possible. The language to be used for coding in Microsoft Visual Basic is a Rapid Application Language, which has a very efficient click and drag interface for the project. Since the project has so many features it is better if it is menu driven. Microsoft Visual Basic has a very good menu editor, which allows to easily create menus. Also it should be possible to open more than one window, which requires a Multiple Document Interface (MDI) format. And Microsoft Visual Basic has an inbuilt option for specifying the MDI format. Since Microsoft Visual Basic has this easy to click and drag interface, with the menu editor, it is possible to implement user-friendly interface. The database is implemented using Structured Query Language (SQL) server.
3.4.2. Technical Feasibility
Technical feasibility is the step of feasibility analysis that is concerned with determining whether it is possible to code the project using the language selected. The language selected for coding is VB.net. The software tools selected provided technical guarantee of accuracy, reliability is of access and data security. Thus since both the hardware and the software requirement are satisfied, it is technically feasible.
3.4.3. Economic Feasibility
The project is to be developed in VB. It comes inbuilt with Microsoft Visual Studio that could be installed on any version of Windows operating system above 95. The project does not involve any special hardware other than standard specifications. So it is economically feasible to implement the project within the available budget.
4.0. SYSTEM SPECIFICATION
The system specification deals with the hardware and software needed for the development and implementation of the system.
4.1. Hardware Specification
Processor : Intel PENTIUM DUAL CPU Main memory : 504 MB RAM CPU speed : 2.00 GHz
4.2. Software Specification
It includes the following three sections. 1. Operating System 2. Front end software 3. Back end software1. Operating SystemOperating System used in Windows XP
2. Front End Software : VB VB, Visual Basic (VB6), it is a unified windows development platform that provides the services necessary for developers to build enterprise-class windows applications. Visual Basic is one of the most exciting developments in programming in many years. Visual Basic 2005 is the latest generation of Visual Basic, a language used by millions of software developers.Visual basic was designed to make user-friendly programs easier to develop. Prior to the creation of Visual Basic, developing a friendly user interface usually required a programmer to use a language such as C or C++, often requiring hundreds of lines of code just to get a window to appear on the screen. Now the same program can be created with much less time and fewer instructions using a language that is a direct descendant of BASIC the language most accessible to beginning programmers.When Microsoft made Visual Basic into an object-oriented programming language, millions of VB developers resisted the change of the .NET platform. Now, after integrating feedback from their customers and creating Visual Basic2005, Microsoft finally has the right carrot. Visual Basic 2005 offers the power of the .NET platform, yet restores the speed and convenience of Visual Basic.
3. Back End Server: SQL Server Microsoft SQL Server 2000 provides the database developer the opportunity to locate programming code in native formats or create server-driven complex system. The .NET frame work, in combination with the SQL Server 2000, delivers the functionality of the powerful class library in combination with modern programming languages. Common Language Runtime (CLR) is used to code procedures, trigger and functions within the chosen language in the .NET frame work using object-oriented constructs such as structured exception handling procedural issues when programming with SQL Server 2000.
Microsoft SQL Server is used by database administrators to install, configure, manage and maintain multi dimensional databases, user accounts recovery, reporting and database availability. Step-by-step installation instructions with screen shots are provided to assist the beginner, intermediated or advanced level developer and Database Administrator when setting up the SQL Server 2000. The tutorials cover Microsofts SQL Server 2000 in express, Work group, Standard and enterprise editions, including the differences and features of each edition. The SQL Server is a reliable and productive database management system that is used in advanced business intelligence system. The Windows Server system is not effective, efficient and secure. Key Capabilities: High Availability: Ensure business continuity with the highest level of system availability through technologies that protect your data against costly human errors and protect your data against costly human errors and minimize disaster recovery downtime.
Performance and Scalability: Deliver an infrastructure that can grow with your business and has a proven record in handling todays large amounts of data and most critical enterprise workloads.
Security: Provide secure environment to address privacy and compliance requirements with built-in features that protect your data against unauthorized access.
Manageability: Manage your infrastructure with automated diagnostics, tuning, and configuration to reduce operational costs while reducing maintenance and reducing maintenance and easily managing very large amounts of data.
Developer Productivity: Built and deploy critical business-ready applications more quickly by improving developer productivity and reducing project life cycle times.
Business Intelligence: Gain deeper insight into your business with integrated, comprehensive analysis and reporting for enhanced decision making.
5.0. SYSTEM DESIGN
The most creative and challenging phase of the system life cycle is system design. The term design describes a final system and the process by which it is developed. It refers to the technical specifications that will be applied in implementing the candidate system. It also includes the construction of programs and program testing. The key question involved here is "How the problem should be solved". System design is a solution for the question of hoe to approach to the creation of a new system. This important phase is composed of several steps. It provides the understanding and procedural details necessary for implementing the system recommended in the feasibility study. Emphasis is on translating the performance requirements into design specifications. Design goes through logical and physical stages of development. Logical reviews the present physical system, prepares input and output specifications, security and control specifications, details the implementation plan, and prepares a logical design walk. Physical design maps out the details of the physical system, plans the system implementation, devices a test and implementation plan and specify any new hardware and software. The first step is to determine how the output is to be produced and in what format. Samples of output and input are presented. Second, input data and master files have to be designed to meet the requirement of the proposed output. The operational phases are handled through program construction and testing, including a list of programs needed to meet the system's objectives and complete documentation. Finally, details related to justification of the system and estimate of the impact of the candidate system on the user and organization are documented and evaluated by management as a step towards implementation. The final report prior to the implementation phases includes procedural flowcharts, record layout and a workable plan for implementing the candidate system.
Information on personal, money, hardware, facilities and their estimated cost must also be available. At this point, projected costs must be close to actual costs of implementation.
5.1. Logical Design
In logical design the proposed system is pictorially represented. Drawing the Data Flow Diagrams of the proposed system does this.
Data Flow Diagrams
The DFD is also known as the bubble chart. It is a simple graphical formalism that can be used to represent a system in terms of the input data to the system, various processing carried out in these data and the output data generated by the system. The main reason why this DFD technique is so popular is probably because of the facts that DFD is very simple formalism. It is simple to understand and use. A DFD model uses a very limited number of primitive symbols to represent the functions performed by a system and the data flow among these systems. Starting with a set of high-level functions that a system performance of DFD model in hierarchically it represents various sub functions. The Data Flow Diagramming technique also follows a simple a simple set of intuitive concepts and rules. Data Flow Diagram (DFD) is used to show how data flow through the system and the processes that transfer the input data into output. Data Flow Diagrams are a way of expressing system requirements in a graphical manner. DFD represents one of the most ingenious tools used for structural analysis.In a normal convention, logical DFD can be completed using only four notations: Represents source or destination of dataRepresents Data FlowRepresents a process that transforms incoming data into outgoing dataRepresents Data Source
Function Symbol
A function is represented using a circle. This symbol is called a process or a bubble. Bubbles are annotated with the names of corresponding functions.
External Entity Symbol
An external entity such as a librarian, library member etc is represented by a rectangle. The external entities are essentially those physical entities external to the software system, which interact with the system by inputting data to the system or by consuming the data produced by the system. In addition to the human users the external entity symbols can be used o represent external hardware and software such as application software.
Data Flow Symbol
A directed arc or an arrow is used as a Data Flow Symbol. This represents the data flow occurring between two processes or between an external entity and a process in direction of the Data Flow Arrow. Data Flow symbols are annotated with corresponding data names.
Data Store Symbol
A Data Store represents a logical file; it is represented using two parallel lines. A logical file can represent either Data Store Symbol, which can represent either data structure or a physical file on disk. Each data store is connected to a process by means of a Data Flow Symbol. The direction of the Data Flow Arrow shows whether data is being read from or written into a Data Store and hence arrows connecting to a data store need not be annotated with the names of the corresponding data items.
Output Symbol The output symbol is used when a hardcopy is produced and the user of the copies cannot be clearly specified or there are several users of the output. The DFD at the simplest level is referred to as the Context Analysis Diagram. These are expanded by level, each explaining in process in detail. Processes are numbered for easy identification and are normally labeled in block letters. Each data flow is labeled for easy understanding.
Context Diagram
The context diagram is the most abstract data flow representation of a system. It represents the entire system as a single bubble. This bubble is labeled according to the main function of the system. The various external entities with the system interact and the data input to the system and the data output from the system are represented as incoming and outgoing arrows. These data flow arrows should be annotated with the corresponding data names. The name context diagram is well justified because it represents the context in which the system is to exist, i.e. the external entities who would interact with the system and the specific data items they would be supplying to the system and the data items they would be receiving from the system. The context diagram is also called the Level 0 DFD. To develop the context diagram of the system, we have to analyze the SRS Document to identify the different types of users who would be using the system and the kind of data they would be inputting to the system and the data they would be receiving from the system. Here, the term users of the system, also includes the external systems, which supply data to or receive data from the system.
Level-1 DFD
To develop the LEVEL-1 DFD, examine the high level functional requirements. It is between three to seven high-level functional requirements then these can be directly represented as bubbles as in the LEVEL-1 DFD. We can examine the input data to these functions and the data output by these functions, and represent them appropriately in the diagram. If a system has more than seven high-level requirements, then some of the related requirements have to be combined represented in the form of a bubble in the level-1 DFD. These can be split in the lower DFD levels. If a system has less than three high-level requirements, then some of the high-level requirements need to be split into their sub functions so that we have roughly about five to seven bubbles on the diagram.
How to develop a DFD model of a system:1. The SRS document is examined to determine:
Different high-level functions that the system need to perform. Data input to every high-level function Data output from every high-level functions Interactions among the identified high-level functions
These aspects of the high-level functions are then represented in a diagrammatic form. This forms the top level Data Flow Diagram, usually called DFD.
2. The high-level functions described in the SRS Documents, and then each of the high-level functions can be represented in form of a bubble. If there are more than seven bubbles, then some of them have to be combined. If there are less than three bubbles, then some of these are to be split. Each high-level function is decomposed into constituent sun functions through the following set of activities. Different sub functions of the high-level functions are identified. Data input to each of these sub functions is identified. Data output from each of these sub functions is identified. Interactions among these sub functions are identified. These aspects are then represented in a diagrammatic form using a DFD. 3. Step three is repeated recursively for each sub function until a simple algorithm can represent a sub function.
RATION SHOPLEVEL 0
OUTPUTUSER
REGISTRATION, VIEW, OFFER, SETTINGS, SEARCHLEVEL 1
USER
ITEM REGISTRATIONLEVEL 1.1.1
USERITEMREG
CUSTOMER REGISTRATION CUSTOMER
STAFF REGISTRATION STAFFREG
PURCHASE PURCHASE MASTER PURCHASE DETAILS STOCK
SALES SALES MASTER
SALES DETAILS STOCK
OFFER
LEVEL 1.1.2
ITEM VIEW
USER ITEMREG
CUSTOMER VIEW CUSTOMER
STAFF VIEW STAFFREG
PURCHASE VIEW PURCHASE MASTER PURCHASE DETAILS
SALES VIEWSALES MASTER
SALESDETAILS
LEVEL 1.1.3
ADD OFFER
USER ITEMREG
OFFER VIEWOFFER
TABLE DESIGN
LOGINCOLUMN NAMEDATA TYPELENGTH
UsernameVarchar50
PasswordVarchar50
ITEMREGCOLUMN NAMEDATA TYPELENGTH
ItemIDVarchar50
NameVarchar50
UnitVarchar50
CategoryVarchar50
PriceFloat8
QtyFloat8
CUSTOMERCOLUMN NAMEDATA TYPELENGTH
RegnoVarchar50
NameVarchar50
AddressVarchar2000
TalukVarchar50
HousenoVarcahr50
CardnoVarchar50
CategoryVarchar50
GenderVarchar50
DobDatetime8
ElectricityVarchar50
LpgVarchar50
AdultsVarchar50
ChildrensBigint8
AIncomeFloat8
ALLOTEDCOLUMN NAMEDATATYPELENGTH
SdateDatatime8
CardNOVarchar50
ItemcodeVarchar50
AllwqtyBigint8
ReqQtyBigint8
AllotQtyBigint8
PURCHASEDETAILSCOLUMN NAMEDATA TYPELENGTH
ReceiptnoVarchar50
ProductidVarchar50
productnameVarchar50
purchaserateFloat8
SalesrateFloat8
QtyBigint8
TotalFloat8
PURCHASEMASTERCOLUMN NAMEDATA TYPELENGTH
ReceiptnoVarchar50
[date]floatDatetime8
PurchasedateDatetime8
GrandtotalFloat8
FreightFloat8
NettotalFloat8
SALESMASTERCOLUMN NAMEDATA TYPELENGTH
BillnoBigint8
SdateDatetime8
CardnoVarchar50
CategoryVarchar50
NettotalFloat8
SALESDETAILSCOLUMN NAMEDATA TYPELENGTH
BillnoBigint8
ItemidVarchar50
ItemnameVarchar50
PriceFloat8
AllQtyBigint8
ReqQtyBigint8
NetpriceFloat8
STOCK COLUMN NAMEDATA TYPELENGTH
Item codeVarchar50
StockBigint8
STAFFREG COLUMN NAMEDATATYPELENGTH
Staff IDVarchar50
NameVarchar50
AddressVarchar2000
PhoneVarchar50
GenderVarchar50
DobVarchar50
AgeVarchar50
SalaryVarchar50
JdVarchar50
USERACC COLUMN NAMEDATA TYPELENGTH
FNAMEVarchar50
LNAMEVarchar50
[ADD]Varchar50
UNAMEVarchar50
PWVarchar50
LNOVarchar50
MODULES The various modules included in our project are Buying Selling Report Customer Details Item Details
1. CUSTOMER DETAILSIn this module details of customer such as name, date of birth, address, taluk, house no., category, annual income, number of members in the family etc are registered.
2. ITEM DETAILS
This module contains the details of item such as item id,name of the item, unit price, allowed quantity etc. The item id is different for each category
3. BUYING
This section deals with the purchase and stock details of the item.
4. SELLINGThis section deals with sales details. Items can be sold only to registered customers .Only one bill is issued per day for each card owner. Billing also updates the stock details.
5. REPORT
Crystal report is a product that helps you to build, display, and print reports. Crystal report is used to provide the accounting details, sales details, customer details. Reports can be maintained and verified.
5. SYSTEM IMPLEMENTATION AND CODING
The implementation of the software is for representation. The important task involved in the implementation process is the conversion of existing system into the new system. Creation of compatible file, training the people, installing the software and hardware has its own importance. A conversion must ensure that it does not disrupt the system. Testing with actual data may be done prior to the implementation process. But it is always advisable to use the parallel of the new software to avoid the risk.
CODING
LOGIN
Imports System.Data.SqlClientImports System.DataPublic Class LOGIN Dim con As New SqlConnection("Data Source=.;Initial Catalog=Ration;Integrated Security=True") Private Sub BTNLOG_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTNLOG.Click Dim str As String str = "select * from Login where username='" & TXTNAM.Text & "' and password='" & TXTPW.Text & "'" Dim ds As New DataSet ds.Clear() Dim da As New SqlDataAdapter(str, con) da.Fill(ds, "Login") If ds.Tables(0).Rows.Count > 0 Then mainform.show() Me.Hide() Else MsgBox("Invalied Username or Password", MsgBoxStyle.Critical) End If End Sub
Private Sub TXTNAM_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TXTNAM.KeyDown If e.KeyCode = Keys.Enter Then TXTPW.Focus()
End If End Sub
Private Sub TXTPW_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TXTPW.KeyDown If e.KeyCode = Keys.Enter Then BTNLOG.Focus() End If End Sub
Private Sub BTNX_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTNX.Click Me.Close() End SubEnd Class
ITEMREG
Imports system.Data.SqlClient
Public Class ITEM_REGISTRATION Dim con As New SqlConnection("server=.;database=ration;trusted_connection=true") Dim ds As New DataSet Dim da As New SqlDataAdapter Dim str As String Dim cmd As SqlCommand
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTNUP.Click Try If validation() = True Then str = "select * from itemreg where itemid='" & TXTID.Text & "' and category='" + CMBCT.Text + "'" ds = New DataSet da = New SqlDataAdapter(str, con) da.Fill(ds) If ds.Tables(0).Rows.Count > 0 Then str = "update itemreg set name='" & TXTIN.Text & "',unit='" & CMBUNT.SelectedItem.ToString & "',category='" & CMBCT.SelectedItem.ToString & "',price='" & TXTPR.Text & "',qty='" & TXTAQ.Text & "' where itemID = '" & TXTID.Text & "' and category='" + CMBCT.Text + "'" cmd = New SqlCommand(str, con) con.Open() cmd.ExecuteNonQuery() con.Close() MsgBox("Item Update Succssful", MsgBoxStyle.Information) clear() Else MsgBox("Please enter valid ItemCode", MsgBoxStyle.Critical) End If End If Catch ex As Exception End Try
End Sub
Private Sub BTNSAV_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTNSAV.Click Try If validation() = True Then str = "select * from itemreg where itemid='" & TXTID.Text & "' and category='" + CMBCT.Text + "'" ds = New DataSet da = New SqlDataAdapter(str, con) da.Fill(ds) If ds.Tables(0).Rows.Count > 0 Then MsgBox("Item already exist", MsgBoxStyle.Critical) Else str = "insert into itemreg values('" & TXTID.Text.Trim & "','" & TXTIN.Text.Trim & " ','" & CMBUNT.Text & "','" & CMBCT.Text & "','" & TXTPR.Text.Trim & "','" & TXTAQ.Text.Trim & "')" cmd = New SqlCommand(str, con) con.Open() cmd.ExecuteNonQuery() con.Close() MsgBox("Item Registered", MsgBoxStyle.Information) clear() End If End If Catch ex As Exception
End Try
End Sub Sub clear() TXTIN.Text = " " CMBUNT.SelectedIndex = 0 CMBCT.SelectedIndex = 0 TXTPR.Text = " " TXTAQ.Text = " " TXTID.Text = "" TXTID.Select() showItem() End Sub Private Sub BTNCLR_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTNCLR.Click clear() End Sub
Sub showItem() Try str = "select * from itemreg" ds = New DataSet ds.Clear() da = New SqlDataAdapter(str, con) da.Fill(ds) If ds.Tables(0).Rows.Count > 0 Then DataGridView1.DataSource = ds.Tables(0) End If Catch ex As Exception
End Try End Sub Private Function validation() As Boolean If TXTID.Text.Trim = "" Then MsgBox("Enter ItemID", MsgBoxStyle.Information) TXTID.Focus() Return False ElseIf TXTIN.Text.Trim = "" Then MsgBox("Enter ItemName", MsgBoxStyle.Information) TXTIN.Select() Return False ElseIf CMBUNT.SelectedIndex = 0 Then MsgBox("Select an Unit", MsgBoxStyle.Information) CMBUNT.Select() Return False ElseIf CMBCT.SelectedIndex = 0 Then MsgBox("Select a Category", MsgBoxStyle.Information) CMBCT.Select() Return False ElseIf TXTPR.Text.Trim = "" Then MsgBox("Enter Price", MsgBoxStyle.Information) TXTPR.Select() Return False ElseIf TXTAQ.Text.Trim = "" Then MsgBox("Enter Qty", MsgBoxStyle.Information) TXTAQ.Select() Return False Else Return True End If End Function
Private Sub TXTID_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TXTID.KeyDown If e.KeyCode = Keys.Enter Then TXTIN.Focus() End If
End SubPrivate Sub TXTIN_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TXTIN.KeyDown If e.KeyCode = Keys.Enter Then CMBUNT.Focus() End If
End Sub
Private Sub CMBUNT_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles CMBUNT.KeyDown If e.KeyCode = Keys.Enter Then CMBCT.Focus() End If
End Sub
Private Sub CMBCT_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles CMBCT.KeyDown If e.KeyCode = Keys.Enter Then TXTPR.Focus() End If
End Sub
Private Sub TXTPR_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TXTPR.KeyDown If e.KeyCode = Keys.Enter Then TXTAQ.Focus() End If
End Sub
Private Sub TXTAQ_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TXTAQ.KeyDown If e.KeyCode = Keys.Enter Then BTNSAV.Focus() End If
End Sub
Private Sub ITEM_REGISTRATION_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load showItem() clear() End Sub
Private Sub DataGridView1_CellDoubleClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellDoubleClick Try TXTID.Text = DataGridView1.CurrentRow.Cells(0).Value.ToString TXTIN.Text = DataGridView1.CurrentRow.Cells(1).Value.ToString CMBUNT.Text = DataGridView1.CurrentRow.Cells(2).Value.ToString CMBCT.Text = DataGridView1.CurrentRow.Cells(3).Value.ToString TXTPR.Text = DataGridView1.CurrentRow.Cells(4).Value.ToString TXTAQ.Text = DataGridView1.CurrentRow.Cells(5).Value.ToString Catch ex As Exception
End Try End SubPrivate Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick
End SubEnd Class
BILL
Imports System.Data.SqlClientPublic Class BILL_MASTER Dim con As New SqlConnection("server=.;database=ration;trusted_connection=true") Dim cmd As New SqlCommand Dim str As String Dim da As New SqlDataAdapter Dim ds As New DataSet Dim str1 As String Dim ds1 As New DataSet Dim da1 As New SqlDataAdapter Dim rpt As New rptBill
Private Function validation() As Boolean If txtcno.Text.Trim = "" Then MsgBox("Enter Card No", MsgBoxStyle.Critical) txtcno.Select() Return False ElseIf txtname.Text.Trim = "" Then MsgBox("Enter a valid Card No", MsgBoxStyle.Critical) txtcno.Select() Return False ElseIf txtNettot.Text.Trim = "" Then MsgBox("Enter valid Information", MsgBoxStyle.Critical) txtcno.Select() Return False Else Return True End If End Function Sub clear() txtcno.Text = "" txtname.Text = "" txtcat.Text = "" dtpdt.Text = Today.Date
cmbItem.Text = "Select" txtItName.Text = "" txtUnitPrice.Text = "" txtAllowQty.Text = "" txtReqQty.Text = "" txtTotal.Text = "" txtNettot.Text = "" gd1.Rows.Clear() autonumber() txtcno.Select() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsav.Click If validation() = True Then str = "select * from alloted where sdate='" & Format(Convert.ToDateTime(dtpdt.Text), "yyyy/MM/dd") & "' and cardno='" & txtcno.Text & "'" Dim ds1 As New DataSet ds1.Clear() da1 = New SqlDataAdapter(str, con) da1.Fill(ds1, "stock") If ds1.Tables(0).Rows.Count > 0 Then MsgBox("Transaction Not Allowed", MsgBoxStyle.Critical) Else str = "insert into salesmaster values('" & txtid.Text & "','" & Format(Convert.ToDateTime(dtpdt.Text), "yyyy/MM/dd") & _ "','" & txtcno.Text & "','" & txtcat.Text & "','" & txtNettot.Text & "')" cmd = New SqlCommand(str, con) con.Open() cmd.ExecuteNonQuery() con.Close()
For i As Integer = 0 To gd1.Rows.Count - 2 str = "insert into salesdetails values('" & txtid.Text & "','" & gd1.Rows(i).Cells(1).Value.ToString & _ "','" & gd1.Rows(i).Cells(2).Value.ToString & "','" & gd1.Rows(i).Cells(3).Value.ToString & _ "','" & gd1.Rows(i).Cells(4).Value.ToString & "','" & gd1.Rows(i).Cells(5).Value.ToString & _ "','" & gd1.Rows(i).Cells(6).Value.ToString & "')" cmd = New SqlCommand(str, con) con.Open() cmd.ExecuteNonQuery() con.Close()
str = "select * from stock where itemcode='" & gd1.Rows(i).Cells(1).Value.ToString & "'" Dim ds As New DataSet ds.Clear() da = New SqlDataAdapter(str, con) da.Fill(ds, "stock") If ds.Tables(0).Rows.Count > 0 Then str = "update stock set stock=stock-'" & gd1.Rows(i).Cells(5).Value.ToString & "' where itemcode='" & gd1.Rows(i).Cells(1).Value.ToString & "'" cmd = New SqlCommand(str, con) con.Open() cmd.ExecuteNonQuery() con.Close()
End If
str = "insert into alloted values('" & Format(Convert.ToDateTime(dtpdt.Text), "yyyy/MM/dd") & "','" & txtcno.Text & _ "','" & gd1.Rows(i).Cells(1).Value.ToString & "','" & gd1.Rows(i).Cells(4).Value.ToString & _ "','" & gd1.Rows(i).Cells(5).Value.ToString & "','" & (gd1.Rows(i).Cells(4).Value.ToString - gd1.Rows(i).Cells(5).Value.ToString) & "')" cmd = New SqlCommand(str, con) con.Open() cmd.ExecuteNonQuery() con.Close()
Next rpt.Load() CrystalReportViewer1.ReportSource = rpt CrystalReportViewer1.SelectionFormula = "{SalesMaster.billno}=" & txtid.Text & "" CrystalReportViewer1.PrintReport() MsgBox("Sales Successful", MsgBoxStyle.Information) clear() autonumber()
End If
End If End Sub
Private Sub BILL_MASTER_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load clear() End Sub
Private Sub autonumber() str = "select isnull(max(billno),100) from SalesMaster" Dim ds As New DataSet da = New SqlDataAdapter(str, con) da.Fill(ds, "SalesMaster") If ds.Tables(0).Rows.Count > 0 Then txtid.Text = ds.Tables(0).Rows(0).Item(0) + 1 End If End Sub
Private Sub txtcno_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtcno.TextChanged str = " select * from customer where cardno='" & txtcno.Text & "'"
ds = New DataSet da = New SqlDataAdapter(str, con) da.Fill(ds, "customer") If ds.Tables(0).Rows.Count > 0 Then txtname.Text = ds.Tables(0).Rows(0).Item(1).ToString txtcat.Text = ds.Tables(0).Rows(0).Item(6).ToString End If
End Sub
Private Sub txtcno_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtcno.KeyPress If e.KeyChar = Chr(13) Then str1 = "select * from itemreg where category= '" & txtcat.Text & "'" ds1 = New DataSet ds.Clear() da1 = New SqlDataAdapter(str1, con) da1.Fill(ds1) If ds1.Tables(0).Rows.Count > 0 Then cmbItem.DataSource = ds1.Tables(0) cmbItem.DisplayMember = "itemid" cmbItem.Text = "Select txtItName.Text = "" txtAllowQty.Text = "" txtUnitPrice.Text = "" cmbItem.Select() End If End If
End Sub
Private Sub gd1_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles gd1.KeyPress Dim i As Int16 = gd1.Rows.Count - 1 gd1.Rows.Add() gd1.Rows(i).Cells(5).Value = gd1.Rows(i).Cells(2).Value * gd1.Rows(i).Cells(4).ToString End Sub
Private Sub gd1_CellContentClick_1(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles gd1.CellContentClick Dim i As Int16 = gd1.Rows.Count - 1 gd1.Rows.Add() gd1.Rows(i).Cells(5).Value = gd1.Rows(i).Cells(2).Value * gd1.Rows(i).Cells(4).Value End Sub Private Sub btnclr_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnclr.Click clear() End Sub
Private Sub cmbItem_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbItem.SelectedIndexChangedTry If cmbItem.Text = "Select" Then Exit Sub Else str = "select * from itemreg where itemid='" + cmbItem.Text + "'" ds = New DataSet ds.Clear() da = New SqlDataAdapter(str, con) da.Fill(ds) If ds.Tables(0).Rows.Count > 0 Then str = "select * from stock where itemcode='" + cmbItem.Text + "'" ds1 = New DataSet ds1.Clear() da1 = New SqlDataAdapter(str, con) da1.Fill(ds1) If ds1.Tables(0).Rows.Count > 0 Then If ds1.Tables(0).Rows(0).Item(0).ToString Val(txtAllowQty.Text) Then MsgBox("Process Denied", MsgBoxStyle.Critical) txtReqQty.Text = "" Exit Sub
End If txtTotal.Text = Val(txtUnitPrice.Text) * Val(txtReqQty.Text) End Sub
Private Sub txtUnitPrice_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtUnitPrice.KeyPress If e.KeyChar = Chr(13) Then txtReqQty.Select() End If End Sub
Private Sub BTNPRNT_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTNPRNT.Click
End SubEnd Class
PURCHASE
Imports SYSTEM.DATA.SQLCLIENTPublic Class purchase Dim CON As New SqlConnection("server=.;database=ration;trusted_connection=true")
Dim str As String Dim cmd As SqlCommand Dim ds As New DataSet Dim da As New SqlDataAdapter
Private Function validation() As Boolean If txtrn.Text.Trim = "" Then MsgBox("Enter ReeceiptNO", MsgBoxStyle.Critical) txtrn.Select() Return False ElseIf txtnt.Text.Trim = "" Or txtnt.Text.Trim = 0 Then MsgBox("Please enter details", MsgBoxStyle.Critical) cmbid.Select() Return False Else Return True End If
End Function Sub clear() cmbid.Text = "" txtname.Text = "" txtpr.Text = "" txtsr.Text = "" txtqty.Text = "" txttot.Text = 0 txtot.Text = 0 txtfgt.Text = 0 txtnt.Text = 0 showitems()
dtppd.Text = Today.Date End Sub Sub showitems() str = "select itemid from itemreg" ds = New DataSet da = New SqlDataAdapter(str, CON) da.Fill(ds) If ds.Tables(0).Rows.Count > 0 Then cmbid.DataSource = ds.Tables(0) cmbid.DisplayMember = "itemid" End If End Sub
Private Sub autonumber() str = "select isnull(max(receiptno),100) from purchasemaster" Dim ds As New DataSet da = New SqlDataAdapter(str, con) da.Fill(ds, "purchasemaster") If ds.Tables(0).Rows.Count > 0 Then txtrn.Text = ds.Tables(0).Rows(0).Item(0) + 1 End If End Sub
Private Sub purchase_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load showitems() autonumber() End Sub
Private Sub btnclr_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnclr.Click clear() End Sub
Private Sub btnsub_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsub.Click If validation() = True Then str = "insert into purchasemaster values('" & txtrn.Text & "','" & Format(Convert.ToDateTime(Today.Date), "yyyy/MM/dd") & _ "','" & Format(Convert.ToDateTime(dtppd.Text), "yyyy/MM/dd") & "','" & txtot.Text & _ "','" & txtfgt.Text & "','" & txtnt.Text & "')" cmd = New SqlCommand(str, CON) CON.Open() cmd.ExecuteNonQuery() CON.Close()
For i As Integer = 0 To gdpur.Rows.Count - 2 str = "insert into purchasedetails values('" & txtrn.Text & "','" & gdpur.Rows(i).Cells(0).Value.ToString & "','" & gdpur.Rows(i).Cells(1).Value.ToString & "','" & gdpur.Rows(i).Cells(2).Value.ToString & "','" & gdpur.Rows(i).Cells(3).Value.ToString & "','" & gdpur.Rows(i).Cells(4).Value.ToString & "','" & gdpur.Rows(i).Cells(5).Value.ToString & "')" cmd = New SqlCommand(str, CON) CON.Open() cmd.ExecuteNonQuery() CON.Close()
str = "select * from stock where itemcode='" & gdpur.Rows(i).Cells(0).Value.ToString & "'" Dim ds As New DataSet da = New SqlDataAdapter(str, CON) da.Fill(ds, "stock") If ds.Tables(0).Rows.Count > 0 Then str = "update stock set stock=stock+'" & gdpur.Rows(i).Cells(4).Value.ToString & "' where itemcode='" & gdpur.Rows(i).Cells(0).Value.ToString & "'" cmd = New SqlCommand(str, CON) CON.Open() cmd.ExecuteNonQuery() CON.Close() Else str = "insert into stock values('" & gdpur.Rows(i).Cells(0).Value.ToString & "','" & gdpur.Rows(i).Cells(4).Value.ToString & "')" cmd = New SqlCommand(str, CON) CON.Open() cmd.ExecuteNonQuery() CON.Close() End If
Next
MsgBox("Item Purchase Successful", MsgBoxStyle.Information) clear() autonumber() End If
End Sub
Private Sub cmbid_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbid.SelectedIndexChanged Try str = "select * from itemreg where itemid='" + cmbid.Text + "'" ds = New DataSet da = New SqlDataAdapter(str, CON) da.Fill(ds) If ds.Tables(0).Rows.Count > 0 Then txtname.Text = ds.Tables(0).Rows(0).Item(1).ToStringtxtsr.Text = ds.Tables(0).Rows(0).Item(4).ToString End If Catch ex As Exception
End Try
End Sub
Private Sub txtqty_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtqty.KeyPress If e.KeyChar = Chr(13) Then Dim i As Int16 = gdpur.Rows.Count - 1 gdpur.Rows.Add() gdpur.Rows(i).Cells(0).Value = cmbid.Text gdpur.Rows(i).Cells(1).Value = txtname.Text gdpur.Rows(i).Cells(2).Value = txtpr.Text gdpur.Rows(i).Cells(3).Value = txtsr.Text gdpur.Rows(i).Cells(4).Value = txtqty.Text gdpur.Rows(i).Cells(5).Value = txttot.Text txtot.Text = Val(txtot.Text) + gdpur.Rows(i).Cells(5).Value txtnt.Text = txtot.Text End If End Sub
Private Sub txtqty_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtqty.TextChanged Try txttot.Text = Val(txtpr.Text) * Val(txtqty.Text) Catch ex As Exception
End Try
End Sub Private Sub txtfgt_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtfgt.TextChanged txtnt.Text = Val(txtot.Text) + Val(txtfgt.Text) End Sub
Private Sub btnxt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnxt.Click Me.Close()
End SubEnd Class
CUSTOMER REGISTRATION
Imports system.data.sqlclientPublic Class CUSTOMER_DETAILS Dim con As New SqlConnection("server=.;database=ration;trusted_connection=true") Dim ds As New DataSet Dim da As New SqlDataAdapter Dim str As String Dim cmd As SqlCommand
Sub clear() TXTRNO.Text = "" TXTNAM.Text = "" TXTADD.Text = "" TXTCN.Text = "" Cmbct.SelectedIndex = 0 dtpdob.Text = Today.Date Cmbad.SelectedIndex = 0 Cmbch.SelectedIndex = 0 TXTTOT.Text = "" TXTTAL.Text = "" TXTNO.Text = "" TXTAIN.Text = "" details() TXTRNO.Select() End Sub Sub details() str = "select * from customer" Dim ds As New DataSet da = New SqlDataAdapter(str, con) da.Fill(ds, "customer") If ds.Tables(0).Rows.Count > 0 Then DataGridView1.DataSource = ds.Tables(0) End If End Sub Private Function validation() As Boolean If TXTRNO.Text.Trim = "" Then
MsgBox("Enter Reister No", MsgBoxStyle.Information) TXTRNO.Select() Return False ElseIf TXTNAM.Text = "" Then MsgBox("Enter Name", MsgBoxStyle.Information) TXTNAM.Select() Return False ElseIf TXTADD.Text.Trim = "" Then MsgBox("Enter Address", MsgBoxStyle.Information) TXTADD.Select() Return False ElseIf TXTTAL.Text.Trim = "" Then MsgBox("Enter Taluk", MsgBoxStyle.Information) TXTTAL.Select() Return False ElseIf TXTNO.Text.Trim = "" Then MsgBox("Enter House No", MsgBoxStyle.Information) TXTNO.Select() Return False ElseIf TXTCN.Text.Trim = "" Then MsgBox("Enter Card No", MsgBoxStyle.Information) TXTCN.Select() Return False ElseIf Cmbct.SelectedIndex = 0 Then MsgBox("Select any", MsgBoxStyle.Information) Cmbct.Select() Return False ElseIf Cmbad.Text = "00" Then MsgBox("Select any", MsgBoxStyle.Information) Cmbad.Select() Return False ElseIf TXTAIN.Text.Trim = "" Then
MsgBox("Enter Annual Income", MsgBoxStyle.Information) TXTAIN.Select() Return False Else Return True End If
End Function
Private Sub BTNCLR_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
clear() End Sub
Private Sub BTNUP_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click If validation() = True Then Dim y, z, gen As String If rdbMale.Checked = True Then gen = "Male" Else gen = "Female" End If If RDBY.Checked = True Then y = "Yes" Else y = "No" End If If RDBY1.Checked = True Then z = "Yes" Else z = "No"
End If str = "select * from customer where regno='" & TXTRNO.Text & "'" Dim ds As New DataSet da = New SqlDataAdapter(str, con) da.Fill(ds, "customer") If ds.Tables(0).Rows.Count > 0 Then str = "update customer set name='" & TXTNAM.Text & "',address='" & TXTADD.Text & _ "',taluk='" & TXTTAL.Text & "',houseno='" & TXTNO.Text & "' ,cardno='" & TXTCN.Text & _ "',category='" & Cmbct.SelectedItem.ToString & "',gender= '" & gen & "',dob= '" & Format(Convert.ToDateTime(dtpdob.Text), "yyyy/MM/dd") & "',adults='" & Cmbad.Text & "',childrens='" & Cmbch.Text & "',total='" & TXTTOT.Text & "',electricity='" & y & "',lpg= '" & z & "',aincome='" & TXTAIN.Text & "' where regno = '" & TXTRNO.Text & "'"
cmd = New SqlCommand(str, con) con.Open() cmd.ExecuteNonQuery() con.Close() MsgBox("Customer Details updated", MsgBoxStyle.Information) clear() Else MsgBox("Invalid RegNO", MsgBoxStyle.Critical) End If End If
End Sub
Private Sub BTNSAV_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsav.Click If validation() = True Then Dim y, z, gen As String If rdbMale.Checked = True Then gen = "Male" Else gen = "Female" End If If RDBY.Checked = True Then y = "Yes" Else y = "No" End If If RDBY1.Checked = True Then z = "Yes" Else z = "No"
End If str = "select * from customer where regno='" & TXTRNO.Text & "'" Dim ds As New DataSet da = New SqlDataAdapter(str, con) da.Fill(ds, "customer") If ds.Tables(0).Rows.Count > 0 Then MsgBox("RegNO already exist", MsgBoxStyle.Critical) Else str = "insert into customer values('" & TXTRNO.Text & "','" & TXTNAM.Text & "','" & TXTADD.Text & "','" & TXTTAL.Text & _ "','" & TXTNO.Text & "','" & TXTCN.Text & "','" & Cmbct.SelectedItem.ToString & _ "','" & gen & "','" & Format(Convert.ToDateTime(dtpdob.Text), "yyyy/MM/dd") & _ "','" & y & "','" & z & "',' " & Cmbad.Text & "','" & Cmbch.Text & "','" & TXTTOT.Text & "','" & TXTAIN.Text & "')" cmd = New SqlCommand(str, con) con.Open() cmd.ExecuteNonQuery() con.Close() MsgBox("Customer Registerd", MsgBoxStyle.Information) clear() End If
End If
End Sub
Private Sub TXTno_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TXTNO.KeyDown If e.KeyCode = Keys.Enter Then TXTCN.Focus() End If
End Sub
Private Sub TXTrno_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TXTRNO.KeyDown If e.KeyCode = Keys.Enter Then TXTNAM.Focus() End If
End Sub
Private Sub TXTnam_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TXTNAM.KeyDown If e.KeyCode = Keys.Enter Then TXTADD.Focus() End If End Sub Private Sub Cmbct_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cmbct.SelectedIndexChanged
End Sub
Private Sub Cmbct_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Cmbct.KeyDown If e.KeyCode = Keys.Enter Then
End If
End Sub
Private Sub Cmbgr_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) If e.KeyCode = Keys.Enter Then dtpdob.Focus() End If
End Sub
Private Sub dtpdob_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles dtpdob.KeyDown If e.KeyCode = Keys.Enter Then Cmbad.Focus() End If
End Sub
Private Sub Cmbad_KeyDown(ByVal sender As System.Object, ByVal e AsSystem.Windows.Forms.KeyEventArgs) Handles Cmbad.KeyDown If e.KeyCode = Keys.Enter Then Cmbch.Focus() End If End Sub
Private Sub TXTADD_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TXTADD.KeyDown If e.KeyCode = Keys.Enter Then TXTTAL.Focus()
End If End Sub
Private Sub Cmbch_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cmbch.SelectedIndexChanged TXTTOT.Text = Val(Cmbad.SelectedItem.ToString) + Val(Cmbch.SelectedItem.ToString) End Sub
Private Sub CUSTOMER_DETAILS_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load clear() End Sub
Private Sub DataGridView1_CellDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellDoubleClick Try TXTRNO.Text = DataGridView1.CurrentRow.Cells(0).Value.ToString TXTNAM.Text = DataGridView1.CurrentRow.Cells(1).Value.ToString TXTADD.Text = DataGridView1.CurrentRow.Cells(2).Value.ToString TXTTAL.Text = DataGridView1.CurrentRow.Cells(3).Value.ToString TXTNO.Text = DataGridView1.CurrentRow.Cells(4).Value.ToString TXTCN.Text = DataGridView1.CurrentRow.Cells(5).Value.ToString Cmbct.Text = DataGridView1.CurrentRow.Cells(6).Value.ToString If DataGridView1.CurrentRow.Cells(7).Value.ToString = "Male" Then rdbMale.Checked = True Else rdbFemale.Checked = True End If dtpdob.Text = Format(Convert.ToDateTime(DataGridView1.CurrentRow.Cells(8).Value.ToString), "ddMMMyyyy") If DataGridView1.CurrentRow.Cells(9).Value.ToString = "Yes" Then RDBY.Checked = True Else RDBN.Checked = True End If If DataGridView1.CurrentRow.Cells(10).Value.ToString = "Yes" Then RDBY1.Checked = True Else RDBN1.Checked = True End If
Cmbad.Text = DataGridView1.CurrentRow.Cells(11).Value.ToString Cmbch.Text = DataGridView1.CurrentRow.Cells(12).Value.ToString TXTTOT.Text = DataGridView1.CurrentRow.Cells(13).Value.ToString TXTAIN.Text = DataGridView1.CurrentRow.Cells(14).Value.ToString Catch ex As Exception
End Try End Sub
Private Sub btnexit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnexit.Click Me.Close() End Sub
Private Sub TXTCN_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TXTCN.KeyDown
If e.KeyCode = Keys.Enter Then Cmbct.Focus()
End If End Sub
Private Sub TXTTAL_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TXTTAL.KeyDown If e.KeyCode = Keys.Enter Then TXTNO.Focus() End If End Sub
Private Sub BTNDEL_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTNDEL.Click str = "select * from customer where regno= '" & TXTRNO.Text & " ' " Dim ds As New DataSet da = New SqlDataAdapter(str, con) da.Fill(ds, "customer") If ds.Tables(0).Rows.Count > 0 Then str = "delete from customer where regno= '" & TXTRNO.Text & "' " cmd = New SqlCommand(str, con) con.Open() cmd.ExecuteNonQuery() con.Close() MsgBox("Deleted successfully") clear() Else MsgBox("unable to delete") End If End Sub
Private Sub TXTAIN_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TXTAIN.KeyDown If e.KeyCode = Keys.Enter Then btnsav.Focus() End If
End SubEnd Class
6. TESTING 1. Unit testing Test each module individually; integrate the overall system done in programming stage. Module works with regards to expected o/p. Validation checks done to verify data I /p given by user. 2. Integrated testing Data lost in an interface. 1 module can have adverse effect on other sub functions when combined to produce major fns. Done with sample data to find overall system performance. 3. Black box testing Interface, performance, initialization, termination, external db errors, missing functions.4. Validation testing It succeeds when soft ware fns reasonably accepted by user. 1-fns accepted that confirms specification2-deficiency list created. 5. Output testing
Output displayed is tested by asking the user about format displayed, output format according to user needs.
6. User acceptance testing
User acceptance testing-tested by constantly keeping in touch with prospective system at developing time, make changes wherever required. Done according to output, input screen design, menu driven system.
7. MAINTENANCE The first maintenance activity occurs since it is unreasonable to assume that the definition of software maintenance can be given describing four activities that are under taken after the program is released for use. Software testing will uncover all in a large system. The process of including the diagnosis and correction of one or more errors is called corrective maintenance.The second activity that contributes the definition of maintenance occurs since rapid change is encountered in every aspect of computing. Therefore adaptive maintenance modifies software to properly interface with the changing environment.
The third activity involves recommendation for new capabilities, modifications to the existing functions and general enhancements when the software is used. To satisfy requests perceptive maintenance is performed. The fourth maintenance activity occurs when software is changed to improve future maintainability or reliability. This is called preventive maintenance.If the only available element of a software configuration is the source code, maintenance activity begins with the evaluation of the code, often complicated by poor internal documentation.
8. CONCLUSION
The proposed system RATION SHOP INVENTORY CONTROL SYSTEM has proved as a well defined alternative for the existing system by overcoming its drawbacks and the system has been developed with ground realities .The main objective of the system is to develop a computerized registration and billing process and to minimize the problem. The proposed system is a new system along with all the features of the existing system. In the proposed system it is very easy to enter new details, updating, deletion and producing daily reports. The system has been designed in such a way that it can be modified with little effort when such a need arises in the future. The main aim of the project, i.e. to eliminate the drawbacks found in the existing system has been achieved .A more user friendly environment was created which in turn lead to more satisfied customers. Amount of workload was reduced and also the inconvenience and complications involved in the customer side was solved. In general the new system is found to meet its entire proposed objective.
BIBLIOGRAPHY
Professional visual studio 2005 Inside Microsoft SQL server 2000 www.vb.net www.microsoft.com
SCREEN SHOTS
LOGIN
NEW ACCOUNT
OFFER SETTINGS
MAIN FORM
Department of Computer Science & Engineering