STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
1.0
Acknowledgement
As a team member, I cordially thank my project leader Subhamoy Ghosh (PL), Bipru Thakur (DPL), Sujoy Majumder, Nisanta Buxi, Debmalya Ghosh, Kallol for their active participation, complete sincerity, and full dedication and generous co-operation in the making of this project.
We are grateful to Dr. Nirmalya Bhattacharya Mr. Manas kumar Dev Mr. Sutanu Sinha Mr. Debashish Nandi : : : : Principal & project in Charge Faculty, Department of Computer Science Faculty, Department of Computer Science Faculty, Department of Computer Science
Without their humble help and guidance it would have really difficult for us to make this project a good success. It would also be selfish on our part if we do not thank the people who lend their thoughts, ideas and valuable suggestion during the course of our design and development of the project and giving us an ample scope to learn about the usefulness and making of software in the IT field.
(Project Leader)
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
2.0
Requirement Analysis :Purpose:
This application helps in keeping the track of bulk amount of record for easy access, retrieval and systematic maintenance of a companys selling of products among the client. Our softw are not only time but also re duce the Burdon of maintained the record physic ally. Feasibility Analysis: Feasibility analysis involv es the follow ing From a project team and appoint a project leader Prepare system flow chart Enumerate potential candidate system Describe and identif y characteristic s of candidate system Describe the evaluate performance as well as cost effectiv e of each candidate system Weight system performance and cost data Select the best candidate system Prepare and report project directiv e to management
Three key considerations are involved in the feasibility analysis. They are: 1. 2. 3. Technical Operational Economic
System Requirement Analysis Diagram
Client/ User needs
Problem Analysis
Product Description Analysis
Validation
Validated SRS
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
3.0 Project Management Plan: Project name Version Date Prepared By : : : : Stock management and Inventory Control System 1.0 11th September, 2009 [Link] Ghosh (PL) 2. Bipru Thakur (DPL) 3. Sujoy Majumder 4. Nisanta Buxi 5. Debmalya Ghosh 6. Kallol Chakraborty NA
Client Distribution
3.1
Introdu ction:3.1.1
Project Overview : Todays world is running w ith a great speed and concept of existence is most important everywhere. In this great struggle of keeping existence, the whole society is in the glorious proceeding just getting COMPUTERIZATION as the only tool. Computerization w ith its newer and newer solution, has given the modern of great success and victory. Basically this system is built in that w ay that it is suitable for any enterpris e. Transactions will be too much easier using this system. It keeps all the tracks of the creditors, retailers, distributors as well as of the sales and the damages stocks and stores them in the database permanently. The databases are also flexible. The addition & deletion is also done automatically. So this ystem provides less overhead for the user. Below Level Aw areness: From various surveys it has found that through about the use of computer to control a companys stock is much easier and faster than previous manual controlling the stock system. Indian Scenario: Business society and government cannot afford to ignore the digital society just because its current impact is difficult to measure. Privacy and Security: Privacy and security are other concern; Sales Monitoring & Inventory Control System is trusted mechanism for privacy and security. This mechanis m must provide for security, confidentially, authentic ation and non-repletion. The key to Success: Focusing on exis ting customer, creditor, retailer, dis tributor, which is, luring prospect, cementing a long term business relationship. Visionary leadership Business pragmatism and IT. Product Enabling Sales Monitoring & Inventory Control: A lot of products like Books, Music CDs, computer etc that today are in physical form w ill actually become digital products. And that makes partic ularly exciting because its not only sales a product but maintain the stock also. Theme of the Project: Our project is based on SALES MONITORING & INVENTORY CONTROL strategy manufacturing company who supply / dis patch products to those customers (clients) who pay a minimum demanded advance to the company. To implement this mechanism w e use Oracle as backend for database table. In this project we use number of Java classes to transform data from client side to database and vice-versa. Mechanism of the project is that authoriz ed user can login to main platform to maintain the total process. After login, the logged user w ill have all rights to do w ork w ithin this platform related w ith the project. Managing Quality: All work is a process There are four absolute of quality that guide our effort to operate, manage and improve our work process. All work is a process: Every job w e do is a process, a series of actions that produces a result. These results are products are services that satisfy the need and desires of our customers. To meet our customers expectation, we need first to identif y their requirements. The FOUR absolutes of quality: The four absolute of quality are the principles we used to operate, manage and improve our job process:
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
The four absolute of quality are: 1. 2. 3. 4. Definition System Performance standard Measurement
They provide the answers to four very important questions about quality: How do we define quality? How we can make quality? What standard do we use for our performance? How can we measure quality?
1.
DEFINITION : What is quality? Almost everyone has an option. Some say quality means Excellence other say Goodness or Beauty. Quality is defined as Conformance to requirements. Any product, service, or process that confirms to its requirements is a quality product, servic e or process. If the requirements are not met, we have nonconformance.
2.
System : One w ay to ensure quality is by apprais al or inspection. As a result of inspection, we make a decision .Either the w ork conforms or it does not. But inspecting just to sort the good form the bad does not help us to improve. To improve quality we need policies and systems that are based the principle of prevention. Prevention involves communicating, planning, proofing, and w orking in a w ay that elements opportunities for non-conformance.
3.
The performance Standard: To make this commitment, w e need a performance standard that everyone can understand. That standard is called ZERO DEFECTS. Conventional performance standards for quality can be summed up by the phrase thats close enough Zero defects are a commitment to meet all requirements for our work the first time and every time. So w e believe that our project should meet most of the requirements of the users and itself a successful standard quality project.
4.
Measurement: Sometimes w e say we are paying more for quality, that quality better or worse, up or down, good or bad, or in line w ith industry standard. The best way to measuring quality is to calc ulate what it costs to do things wrong. This measurement is called price of non-conformance (PONC).
PONC activities include : Reprocessing Expediting Unplanned servic e Computer returns Dow ntime Rew ork Return
So, PONC is the price of waste. In the time of forming our project, we consider and analysis all the above steps and queries for managing quality.
3.1.2
Objective :Sales Management helps to faster transaction between customer & company. In this case business transaction cost became lesser. In this case business ordering cost als o became lesser. In this case client as well as company saves their valuable time. In this case total cost of business of company comes down. Client gets the facility to choose the maximum number of item w ith minimum effort. Through this client is able to purchase or sale anything at anytime if the stock permits!
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
3.1.3
Sl. No. 1. 2. 3. 4. 5.
Major Work Activities:Phases Requirement Analysis Design Coding Testing Documentation Description Deciding features to be included and examination the feasibility Designing system architecture and creating user interface Creating a database, connectivity and coding of modules Testing and debugging of modules and integrating them, final performance testing Submission of final reports, finalizing the project report and hence complete documentation
3.2
Project Delivery Report:Follow ing are the project deliverable: Source code Installation CD SRS Test Plan User Help
3.3
Platform:Front End Back End Operating System : JAVA : Oracle : Window s XP
Project Output: The output of employee the Linear Sequential Model is not just final program and the documentation to use it. There are a number of intermediate outputs that must be produce. For the successful completion of the project, the follow ing are required --- Requirement Analysis Document Project Management Plan System Requirement Specification System Design Document Detail Design Document Test Plan & Test Report Final Code
3.4
Project Organization:3.4.1
Processes Model: In order to solv e a problem, a Software engineer must incorporate a development strategy that encompasses the processes, the method and tool, layers and general phases. This strategy is referred to as a processes mod el, or software engineering paradigm. The processes model appropriate for this project Stock Management and Inventory Control System is the Linear Sequential Model
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM Linear Sequential Model
Linear Sequential Model suggests a systematic sequential approach to software development that begins at the system level and progress through analy sis, design, coding, testing and maintenance. Linear Sequential Model encompasses the following activity--- System Engineering: It encompasses requir ement gathering at the system level w ith a small amount of top-level design and analysis. System Requirement Analysis: Requirement gathering processes is defined and focused specially on the follow ing to understand the nature of the program; the software engineering must understand the information domain for the software, as well as requirement function performance and interface. Design: Softw are design is actually a multi-step a process that focuses on four distinct attributes of a program. The designing process requirements into a representation of software that can be assessed for quality before coding begins. Coding: The design must be translated into machine readable form. The coding step performs this task. If design is performed in a detailed manner, code generation can be accomplished mechanistically. Testing: Once code has been generated, program testing begins. The testing processes focused on the logical internal of the software, ensuring that all the statement have been tested and on the functional exter nal, that is, conducting test to uncover errors and ensure that define input will produce actual result that agree with required result. Maintenance: software will undoubtedly undergo change it is delivered to the customer. Change w ill occur because error have been encountered or because the software must be adapted to accommodate changes in its external environment or the customer requires functional or performance enhancements. Maintenance re-applies each of the preceding phases to the existing phases to modify the existing program rather than a new one.
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
Diagram of Processes Model
Feasibility Study
Requirement Analysis & Specification
Design & Specification
Coding & Module Testing
Integrating & system Testing
Delivery
Maintenance
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM The Phase of the Module can be classified as:
Index 1. Phase Requirement Determination What is done during Phase Determination to be meeting by system being contemplated Draw an understandable plan of what the system w ill provide the output. Determine needs and priority by consensus among the end- user Taking into account available resource such as human, computer, time and money. Find whether specified requirement End Set of requirement and their priorities. Detailed specification of information to be provided Feasibility document specif ication recourses need and availability. Expected cost vs. benefit of the system Functional specif ication budget time schedule. Physical requirements such as storages and processor Hardw are configuration disks space, CPU pow er Logical design of program database and test plan Evolution report w ith suggestion for improvement Evolution report w ith suggestion for improvement Improvement system containing modification and maintenance
2.
Requirement Specific ation
3.
Feasibility Analysis
4.
System Specif ication
Obtain functional specif ication based on revis ed user requirement and feasibility analysis
5.
Hardw are study
Determine Hardw are requirement for the system Logical system of program, design of database, test & implementation plane Writing programs, creating database, testing program and operation plans documenting system. Training user data conversion if needed Find out from user if system meet their needs Changing system, adding or deleting features of satisfying user needs.
6.
System Design
7.
System Implementation
8.
System Evolution System Modification/Maintenan ce
9.
3.4.2
Organizational Structure: Prepared By
--
1. Subhamoy Ghosh (PL) 2. Bipru Thakur (DPL) 3. Sujoy Majumder 4. Nisanta Buxi 5. Debmalya Ghosh 6. Kallol
3.5
Managerial Process:3.5.1 Management Objective & Priority:The main goals of software management plan are as follows: To ensure smooth execution of project The end product deliver on the time unique effective tool & method The method need the quality requirements of the respective company
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
3.5.2
Assumption & Dependences : Availability of recommended & hard work on time Each developer is capable of completing dales or assign task on time otherw is e he or she volunteer to take the commitment of the task Potential changes on a degree w ill be indicate configured control are & not be Project review will be taking place Team member are communicating w ith each other 7 each have responsible understanding of ones project element as a hole The exit criteria of a project are depended of finial exemption testing the project closing date is extended may be based on exception report as recusal from product management. If the bugs are identify the expectation testing the project closing date is extended may be based on expectance report as receiv ed from product management. Follow ing are the constancy for the successful combination of the project Time require of competition project Resource needed to completing project
Software requirement: Microsoft Windows XP Microsoft Word Java Oracle Hardw are Requirement: Minimum Pentium IV Processor 1.8 GHz. Minimum 512MB Ram Display Device Input device Printer
3.5.3
Risk M anagement:Risk Category Shortage of Technic al Manpow er 6 Insufficient business knowledge 9 Unclear requirement Risk Maintenance Plane Maintenance Buffer of Extra Resources Define the project Conduct cross Training Session Ensure that multipurpose has assign of Key Project Area Have team building session Rotate job among team member Keep extra recourses as backup Proper documentation of individual work Define performance criteria clearly review by client Define standard up to be followed to meet performance criteria Stimulate or prototype performance of criteria traction Conceder a phase of delivery? Provide training in new technology Externally driven decision forced on the project Outline disadvantages with the supporting fact or data & negotiate w ith the person responsible to forcing the decis ion Increases instruction with the client & ensure a adequate know ledge transfer Organized domain know ledge training Stimulate business trusting & get it approved Negotiate a better schedule Identify a personal task Negotiate client on actual effort Identify areas that can be automated Set proper exception w ith client Plan ached for link load Use experience logic to make some assumption & keep the client information to about signoff Develop prototype to get the requirement to review the client Obtain signoff initial requirement speciation as client Convince the client to the changes the requirement changes Negotiate payment on actual report
Sl No
Non popular apparition 2 Non meeting performance requirement
Working on new technology
Risk 5
Unrealistic Schedule
Link failure Or slow performance
10
Too many requirement changes
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
3.5.4
Monitoring & Controlling:-
Monitoring & Controlling are alw ays & important issue for develop the project. The major particular point on whic h monitoring & controlling on project is based on are as follows Monthly project review meeting headed by the group leader took place to ensure smooth execution of the project Project leader design a project schedule for the team member to follow . Which will continue a follow up an instruction & report? The scientific ally design schedule & instruction sheet for the team member that contain the forget work to be achieved effort put individual team member & others reach team member. The project team leader did the frequent tracking & updating in the project schedule. The project leader used to give the instruction for the proper implement of the schedule changes that where necessary in the schedule made under the guidance of the project leader. The 4th night project status report was sent by the project leader to the concern person in the order to inform the progress of project. Technical Processes: Method: This project is designed using JAVA as the front end tool and ORACLE (Database) as the back end tool Tools: The tools are command Button, labels, combo box, check box, text area etc. Techniques: Different type of data base accessing and code handling and authentication are used.
3.5.5
Effort Estimation:-
Effort estimation report prepaid to track the amount of time consumes to develop the project ( Stock Management and Inventory Control System). The report categorized the no of activity, the starting date & finishing date The Start Date: The Finish Date: Activity RA PMP SRS SDD CODING TESTING RA PMP SRS SDD No of Person 6 6 6 6 6 6 = = = = 29th August, 2009 27th November, 2009 Days 8 10 4 10 40 8
st
Start Date 1 September 2009 11th September 2009 16th September 2009 25t September 2009 2nd November 2009 17th November 2009
th
Finish Date 10 September 2009 15th September 2009 24th September 2009 1st November 2009 16th November 2009 22nd November 2009
Requirement Analysis Project Management Plan System Requirement Specification System Design Document : 2.5 months : 4 hours/day : 290 hours
Project Duration Week Hour/Day Total Effort Estimation
3.6
Technical Process 3.6.1 Methods,Tools,Techniques
Method: This project is designed using JAVA as the front end tool and ORACLE (Database) as the back end tool Tools: The tools are command Button, labels, combo box, check box, text area etc. Techniques: Different type of data base accessing and code handling and authentication are used.
The structured system analysis design is used to develop the system . Tool is used to : Support the prescribed set of steps to go ahead to goal and completion of development of software .
10
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
3.7
Client Involvement:For 1. PMP 2. SRS 3. SDD Yes Yes Yes No No No
3.8 Reuse: -- The involvement of reusability features for the project itself or any of the project modules or its containing part is not applicable. 3.9 Traceability Matrix:-Configuration Item Identification GC/<APN>/RA/D/C1 GC/<PN>/PMD/D/C1 GC/<PN>/SRS/D/C1 GC/<PN>/SDD/D/C1 Copy Hard Soft File File File File C:/MP C:/MP C:/MP C:/MP
Sl NO 1 2 3 4
Version 1.0 1.0 1.0 1.0
Date of Release 01st September 2009 10th September 2009 15th September 2009 25 September 2009
th
Comment Current Current Current Current
3.10
Status Report:Project Status Report: 01 Project Name : - Stock Management and Inventory Control System Period of reporting : - 1st September to 10th September SI NO 1. Activity Name Requirement Analysis Project Management Plan P: Planed Problem Faced: NA Duration P| A 8 8 Starting Date P| A 1st September 2009 11th September 2009 1st September 2009 11th September 2009 Finishing Date P| A 10th September 2009 10th September 2009 Status D
2.
10
10
A: Actual Problem Resolving: NA
D: DONE
E: E XECUTING
Project Status Report: 02 Project Name : - Stock Management and Inventory Control System Period of reporting : - 11th September to 24th September SI Duration Starting Date Finishing Date Activity Name NO P| A P| A P| A th th Project 11 11 15th 15th 1. Management 10 10 September September September September Plan 2009 2009 2009 2009 th th th System 16 16 24 24th 2. Requirement 4 4 September September September September Specific ation 2009 2009 2009 2009 25t 25t System Design 3. 10 10 September September Document 2009 2009 P: Planed Problem Faced: NA A: Actual Problem Resolving: NA D: DONE
Status D D
E E: E XECUTING
11
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
Project Status Report: 03 Project Name : - Stock Management and Inventory Control System Period of reporting : - 25th September to 1st November SI NO 1. 2. Activity Name System Design Document CODING Duration P|A 10 40 10 40 Starting Date P|A 25t 25t September September 2009 2009 2nd 2nd November November 2009 2009 Finishing Date P|A 1st 1st November November 2009 2009 ----Status D E
P: Planed Problem Faced: NA
A: Actual Problem Resolving: NA
D: DONE
E: E XECUTING
Project Status Report: 04 Project Name : - Stock Management and Inventory Control System Period of reporting : - 2nd November to 16th November SI NO 1. Activity Name Duration P|A 40 40 Starting Date P| A 2nd November 2009 2nd November 2009 Finishing Date P|A 16th November 2009 16th November 2009 Status
CODING
P: Planed Problem Faced: NA
A: Actual Problem Resolving: NA
D: DONE
E: E XECUTING
Project Status Report: 05 Project Name : - Stock Management and Inventory Control System Period of reporting : - 17th November to 22nd November SI NO 1. Activity Name TESTING P: Planed Problem Faced: NA Duration P| A 7 7 Starting Date P| A 17th 17th November November 2009 2009 Finishing Date P| A 22nd 22nd November November 2009 2009 D: DONE Status D E: E XECUTING
A: Actual Problem Resolving: NA
12
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
4.0 System Requirement S pecification
Project name Version Date Prepared By : : : : Stock management and Inventory Control System 1.0 16th September, 2009 1. Subhamoy Ghosh (PL) 2. Bipru Thakur (DPL) 3. Sujoy Majumder 4. Nisanta Buxi 5. Debmalya Ghosh 6. Kallol Chakraborty NA
Client Distribution
4.1
Project Overview :-
Todays world is running w ith a great speed and concept of existence is most important everywhere. In this great struggle of keeping existence, the whole society is in the glorious proceeding just getting COMPUTERIZATION as the only tool. Computerization w ith its newer and newer solution, has given the modern of great success and victory. Basically this system is built in that w ay that it is suitable for any enterpris e. Transactions will be too much easier using this system. It keeps all the tracks of the creditors, retailers, distributors as well as of the sales and the damages stocks and stores them in the database permanently. The databases are also flexible. The addition & deletion is also done automatically. So this ystem provides less overhead for the user. Below Level Aw areness: From various surveys it has found that through about the use of computer to control a companys stock is much easier and faster than previous manual controlling the stock system. Indian Scenario: Business society and government cannot afford to ignore the digital society just because its current impact is difficult to measure. Our project is based on SALES MONITORING & INVENTORY CONTROL strategy manufacturing company who supply / dispatch products to those customers (clients) who pay a minimum demanded advance to the company. To implement this mechanism w e use Oracle as backend for database table. In this project we use number of Java classes to transform data from client side to database and vic e-versa. Mechanism of the project is that authorized user can login to main platform to maintain the total process. After login, the logged user will have all rights to do work within this platform related w ith the project.
4.2
Objective:Sales Management helps to faster transaction between customer & company. In this case business transaction cost became lesser. In this case business ordering cost als o became lesser. In this case client as well as company saves their valuable time. In this case total cost of business of company comes down. Client gets the facility to choose the maximum number of item w ith minimum eff ort. Through this client is able to purchase or sale anything at anytime if the stock permits!
4.3
Major W ork Activities:Sl. No. 1. 2. 3. 4. 5. Phases Requirement Analysis Design Coding Testing Documentation Description Deciding features to be included and examination the feasibility Designing system architecture and creating user interface Creating a database, connectivity and coding of modules Testing and debugging of modules and integrating them, final performance testing Submission of final reports, finalizing the project report and hence complete documentation
13
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
5.0 M odule Overview:-
Table: USERLOGIN: FIELD NAME USERNAME PASSWORD DATA TYPE TEXT TEXT DESCRIPTION VARCHAR2, 10 DIGITS VARCHAR2, 10 DIGITS
Table: CREDITORMASTER FIELD NAME CREDITORID CREDITORNAME CREDITORADDRESS CONTACTNO DATA TYPE TEXT TEXT TEXT TEXT DESCRIPTION VARCHAR2, 5 DIGITS VARCHAR2, 20 DIGITS VARCHAR2, 40 DIGITS VARCHAR2, 10 DIGITS
Table: RETAILERMASTER FIELD NAME RETAILERID RETAILERNAME RETAILERADDRESS CONTACTNO DATA TYPE TEXT TEXT TEXT TEXT DESCRIPTION VARCHAR2, 5 DIGITS VARCHAR2, 20 DIGITS VARCHAR2, 40 DIGITS VARCHAR2, 10 DIGITS
Table: DISTRIBUTORMASTER FIELD NAME DISTRIBUTORID DISTRIBUTORNAME DISTRIBUTORADDRESS CONTACTNO DATA TYPE TEXT TEXT TEXT TEXT DESCRIPTION VARCHAR2, 5 DIGITS VARCHAR2, 20 DIGITS VARCHAR2, 40 DIGITS VARCHAR2, 10 DIGITS
Table: CATEGORY FIELD NAME CATEGORYID CATEGORY_NAME DATA TYPE TEXT TEXT DESCRIPTION VARCHAR2, 5 DIGITS VARCHAR2, 20 DIGITS
14
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
Table: SUBCATEGORY FIELD NAME SUBCATEGORYID SUBCATEGORY_NAME DATA TYPE TEXT TEXT DESCRIPTION VARCHAR2, 5 DIGITS VARCHAR2, 5 DIGITS
Table: STOCK FIELD NAME CATEGORYID SUBCATEGORYID QTY UNITPRICE PURCHASEDATE PURCHASEID DATA TYPE TEXT TEXT TEXT TEXT DATE TEXT DESCRIPTION VARCHAR2, 5 DIGITS VARCHAR2, 5 DIGITS VARCHAR2, 4 DIGITS VARCHAR2, 4 DIGITS VARCHAR2,10 DIGITS VARCHAR2,5 DIGITS
Table: SALES FIELD NAME BILLNO BILL_DATE CATEGORYID SUBCATEGORYID RETAILERID QTY_SOLD UNIT_PRICE DATA TYPE TEXT TEXT TEXT TEXT TEXT TEXT TEXT DESCRIPTION VARCHAR2, 5 DIGITS DATE VARCHAR2, 40 DIGITS VARCHAR2, 10 DIGITS VARCHAR2, 10 DIGITS VARCHAR2, 10 DIGITS VARCHAR2, 10 DIGITS
Table: DAMAGEDRET URN FIELD NAME RETURN_DATE RETAILERID AGAINST_BILL_NO CATEGORYID SUBCATEGORY QTY_RETURNED DATA TYPE TEXT TEXT TEXT TEXT TEXT TEXT DESCRIPTION VARCHAR2, 5 DIGITS VARCHAR2, 20 DIGITS VARCHAR2, 40 DIGITS VARCHAR2, 10 DIGITS VARCHAR2, 10 DIGITS VARCHAR2, 10 DIGITS
15
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
6.0 System Design Docu ment
Project name Version Date Prepared By : : : : Stock management and Inventory Control System 1.0 25th September 2009 [Link] Ghosh (PL) 2. Bipru Thakur (DPL) 3. Sujoy Majumder 4. Nisanta Buxi 5. Debmalya Ghosh 6. Kallol Chakraborty NA
Client Distribution
Feasibility Study
Feasibility analysis involves eight steps:1. Form a project team and appoint a project leader. 2. Prepare system flowchart. 3. Enumerate potential candidate system. 4. Describe and identif y characteristic s of candidate systems. 5. Describe and evaluate performance and cost effectiveness of each candidate system. 6. Weight system performance and cost data. 7. Select the best candidate system. 8. Prepare and report final project directive to management. Three keys considerations are involved in the feasibility analysis: 1) Technical 2) Operational 3) Economic 1) Technical Feasibility: - It specifies whether the proposed solution in the project is possible to be implemented using available hardware and softw are. 2) Operational Feasibility: - It considers the factor that how it could be changed for future requirements and the operational factors of the computer. 3) Econom ic Feasibility: - It defines the measurement cost effectiv eness of the project: (A). Direct Cost (B). Indirect Cost
ECONOMIC FEASIBILITY OF THE PROJECT:1). Initial cost for development is not so high since a machine required configuration is available in the instruction. 2). S/W for back-end and front-end are also readily available.
COST-BENEFIT ANALYSIS
The development of any project is to be done keeping in mind the cost and benefits associated with any project. A project will not be Viable if its costs exceed its benefits. Thus cost-benefit analysis is very critical for every project. As w ith every project the need for cost-benefit analysis was als o felt w ith project. A suitable analysis has been outlined below . COSTS: Cost associated w ith project may be classified as analysis costs, development costs, testing and pilot costs, implementation costs, training Costs, system maintenance cost and other related costs. For finding out the total costs involv ed with this project we div ide the costs as under:1. Hardw are and Software. 2. Development Charges (calculated as per man-hours utilized) 3. Training Cost (calculated as per no. of personal trained) 4. System Implementation and maintenance costs. 5. Stationary Charges. 6. Other Pre and Post Implementation costs. 7. Of the above except 3 and 4, all are direct costs and their value can be found out very specific ally. For other costs, the cost can be found out by taking the general rate paid to the development staff. Benefits:The benefits of this system have already been enumerated. Let us now discuss them one by one:1. Initial costs for development are not so high since a machine w ith required configuration and software for back-end and front-end are available. 2. This system w ould help to simplify the various important operations of a Library management system. Thereby it reduces the consumption of time and energy which are very valuable. Finally w e can conclude that benefits are much more than the costs associated w ith this project. Hence the project is viable and worthy of being developed.
16
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
Feasibility Study
Requirement analysis and specification
Design
Coding and unit testing
Integration and system testing
Maintenance
17
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
CreditorID, name, address, contact_ no
RetailerID, name, address, contact_ no
DistributorID, name, address, contact_ no
CategoryID, Sub-CategoryID, qty, price, date
Creditor
Retailer
Distributor
Stock
Creditor Database
Retailer Database
Di stributor Database
Stock Database
CategoryID, Sub-CategoryID, name
CategoryID, name
Subcategory
RetailerID, name, address
CategoryID, SubCategory, qty
Category
Category Database
Sub-Categor y Database
Sales
Damaged Return Database
Bill_Date, price
Damaged Return
Sales Database
Date, RetailerID, Billno, CategoryID, qty
18
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
6.1 System Architecture:Query Designer is based upon three tier architecture, comprising of: 1. JAVA 2. Oracle Detail Design:6.2.1 Module Overview: Table: USERLOGIN FIELD NAME USERNAME PASSWORD DATA TYPE TEXT TEXT DESCRIPTION VARCHAR2, 10 DIGITS VARCHAR2, 10 DIGITS
6.2
Table: CREDITORMASTER FIELD NAME CREDITORID CREDITORNAME CREDITORADDRESS CONTACTNO Table: RETAILERMASTER FIELD NAME RETAILERID RETAILERNAME RETAILERADDRESS CONTACTNO Table: DISTRIBUTORMASTER FIELD NAME DISTRIBUTORID DISTRIBUTORNAME DISTRIBUTORADDRESS CONTACTNO Table: CATEGORY FIELD NAME CATEGORYID CATEGORY_NAME Table: SUBCATEGORY FIELD NAME SUBCATEGORYID SUBCATEGORY_NAME Table: STOCK FIELD NAME CATEGORYID SUBCATEGORYID QTY UNITPRICE PURCHASEDATE PURCHASEID DATA TYPE TEXT TEXT TEXT TEXT DATE TEXT DESCRIPTION VARCHAR2, 5 DIGITS VARCHAR2, 5 DIGITS VARCHAR2, 4 DIGITS VARCHAR2, 4 DIGITS DATE VARCHAR2,5 DIGITS DATA TYPE TEXT TEXT DESCRIPTION VARCHAR2, 5 DIGITS VARCHAR2, 5 DIGITS DATA TYPE TEXT TEXT DESCRIPTION VARCHAR2, 5 DIGITS VARCHAR2, 20 DIGITS DATA TYPE TEXT TEXT TEXT TEXT DESCRIPTION VARCHAR2, 5 DIGITS VARCHAR2, 20 DIGITS VARCHAR2, 40 DIGITS VARCHAR2, 10 DIGITS DATA TYPE TEXT TEXT TEXT TEXT DESCRIPTION VARCHAR2, 5 DIGITS VARCHAR2, 20 DIGITS VARCHAR2, 40 DIGITS VARCHAR2, 10 DIGITS DATA TYPE TEXT TEXT TEXT TEXT DESCRIPTION VARCHAR2, 5 DIGITS VARCHAR2, 20 DIGITS VARCHAR2, 40 DIGITS VARCHAR2, 10 DIGITS
19
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
Table: SALES FIELD NAME BILLNO BILL_DATE CATEGORYID SUBCATEGORYID RETAILERID QTY_SOLD UNIT_PRICE Table: DAMAGEDRET URN FIELD NAME RETURN_DATE RETAILERID AGAINST_BILL_NO CATEGORYID SUBCATEGORY QTY_RETURNED DATA TYPE TEXT TEXT TEXT TEXT TEXT TEXT DESCRIPTION VARCHAR2, 5 DIGITS VARCHAR2, 20 DIGITS VARCHAR2, 40 DIGITS VARCHAR2, 10 DIGITS VARCHAR2, 10 DIGITS VARCHAR2, 10 DIGITS DATA TYPE TEXT TEXT TEXT TEXT TEXT TEXT TEXT DESCRIPTION VARCHAR2, 5 DIGITS DATE VARCHAR2, 40 DIGITS VARCHAR2, 10 DIGITS VARCHAR2, 10 DIGITS VARCHAR2, 10 DIGITS VARCHAR2, 10 DIGITS
6.2.2
DTC DESCRIPTION:
This system does not have any specific DTC, The user can create tables according to one need and hence it can be said that the data said that the data structure is dynamic. 6.2.3 DESIGN
DATA FLOW DIAGRAM: Graphical description of a systems data and how the process transforms the data is know n as Data Flow Diagram. A DFD models is a system using by using external entities from w hic h data flows to a process which transforms the data and creates output data flows whic h go to other processes or external entities or data store. Stored data may also flow or a process as input. LOGICAL & PHYSICAL DFD:DFD that specify various logical processes performed on the data, i.e. typed of operations performed is called logical DFD. It specifies what the system does and not how it does. A physical DFD specifies how the systems requirements are implemented. It is drawn during the system design phase. It is a good starting point and involves operational task and techniques. A logical DFD is derived from physic al DFD. At first step, an entire system connects all the data sources with proper direction of flow data. This DFD is called Context Level DFD or Zero level DFD. In the follow ing steps the entire system is broken into several sub-systems. The DFD that contains more than one process is referred to as Level 1, Level 2 and so on.
SYMBOLS USED IN DFD: To construct a DFD the follow ing system are used: 1. Functional System 2. External entity symbol 3. Data flow symbol 4. Data store symbol A data store : any stored data but w ith no reference to the physic al method of the physical method of storing A data flow : identifies flow of data An external entity: source or destination of date. which is external to the system
A process: converts data into information.
20
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
USER
SALES MONITORING & INVENTORY CONTROL
DATABASE
21
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
22
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
[Link]:
This is the User login page in which a valid username and password is needed to log in into th system. Only a valid user canl go to the main page of Sales Monitoring and Inventory Control System. Th password field is edited with a * for the security purpose.
23
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
//[Link] import [Link].*; import [Link].*; public class UserLogin extends [Link] { public UserLogin() { initComponents(); centre(); } public void centre() { Dimension screenSize = [Link]().getScreenSize(); int x = (int) ([Link]() / 2 - getWidth() / 2); int y = (int) ([Link]() / 2 - getHeight() / 2); setLocation(x, y); } pri vate void initComponents() { label1 = new [Link](); button1 = new [Link](); button2 = new [Link](); te xtField1 = new [Link](); te xtField2 = new [Link](); label2 = new [Link](); label3 = new [Link](); label5 = new [Link](); label6 = new [Link](); setAlwaysOnTop(true); setBackground(new [Link](153, 204, 255)); setBounds(new [Link](300, 300, 300, 300)); setCursor(new [Link]([Link].DEFAULT_CURSOR)); setIconImages(null); setMinimumSize(new [Link](400, 250)); setResizable(false); setTitle("User Login"); addWindowListener(new [Link]() { public void windowActivated([Link].e [Link] evt) { formWindowActivated(evt); } public void windowClosing([Link] evt) { e xitForm(evt); } }); setLayout(null); [Link](new [Link]("Dialog", 1, 24)); [Link]("User Login"); add(label1); [Link](140, 50, 130, 30); [Link](new [Link](204, 204, 204));
24
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
[Link](new [Link]("Felix Titling", 1, 12)); // NOI18N [Link]("Ok"); [Link](new [Link]() { public void actionPerformed([Link] evt) { button1ActionPerformed(evt); } }); add(button1); [Link](200, 210, 60, 23); [Link](new [Link](204, 204, 204)); [Link](new [Link]("Felix Titling", 1, 12)); // NOI18N [Link]("Cancel"); [Link](new [Link]() { public void actionPerformed([Link] evt) { button2ActionPerformed(evt); } }); add(button2); [Link](270, 210, 70, 23); add(textField1); te [Link](130, 90, 200, 20); add(textField2); te [Link](130, 120, 200, 20); te [Link]('*'); [Link](new [Link]("Dialog", 1, 14)); [Link]("User ID :"); add(label2); [Link](10, 90, 60, 23); [Link](new [Link]("Dialog", 1, 14)); [Link]("Password :"); add(label3); [Link](10, 120, 80, 23); [Link](new [Link]("Felix Titling", 1, 12)); // NOI18N [Link](new [Link](255, 0, 51)); [Link]("WRONG!! PLEASE TR Y AGAIN..."); [Link](false); add(label5); [Link](130, 150, 180, 19); [Link](new [Link]("Felix Titling", 1, 12)); // NOI18N [Link](new [Link](255, 0, 51)); [Link]("SORRY! ENTER ID & PASSWORD TO LOGIN..."); [Link](false); add(label6); [Link](70, 150, 340, 19); pack(); } pri vate void exitForm([Link] evt) { [Link](0); } pri vate void button2ActionPerformed([Link] e vt) { [Link](0); } pri vate void formWindowActivated([Link] evt) { } pri vate void button1ActionPerformed([Link] e vt) { if (te [Link]().equals("") && [Link]().equals("")) {
25
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
[Link](true); [Link](false); } Connection con; Statement stmt; try { [Link](new [Link]()); con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); stmt = [Link](); String sql = ("select userid,userpassword from userlogin where userid='" + [Link]() + "' and userpassword='" + [Link]() + "'"); ResultSet rs = [Link](sql); if ([Link]() == false) { [Link](true); } else { XYZEnt xyze = new XYZEnt(); [Link](false); [Link](true); } } catch (SQLException e) { [Link](e); } } public static void main(String args[]) { [Link](new Runnable() { public void run() { new UserLogin().setVisible(true); } }); } // Variables declaration pri vate [Link] button1; pri vate [Link] button2; pri vate [Link] label1; pri vate [Link] label2; pri vate [Link] label3; //private ja [Link] label4; pri vate [Link] label5; pri vate [Link] label6; pri vate [Link] xtField textField1; pri vate [Link] xtField textField2; }
26
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
[Link]:
This is the main page of Sales Monitoring and Control System. Here a logged user can do different tasks .
27
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
//[Link] va import [Link].*; import [Link].*; public class XYZEnt e xtends [Link] implements Runnable { Thread t, t1; public void start() { t = new Thread(this); [Link](); } public void run() { t1 = [Link](); while (t1 == t) { Calendar cal = new GregorianCalendar(); String hour = [Link]([Link]([Link])); String minute = [Link]([Link]([Link])); String second = [Link]([Link]([Link])); [Link](hour + ":" + minute + ":" + second); try { [Link](1000); } catch (InterruptedException e) { } } } public XYZEnt() { initComponents(); centre(); //centers this form on screen start(); } pri vate void initComponents() { label1 = new [Link](); label2 = new [Link](); menuBar1 = new [Link](); menu1 = new [Link](); menuItem1 = new [Link](); menuItem2 = new [Link]();
28
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
menuItem3 = new [Link](); menu4 = new [Link](); menuItem4 = new [Link](); menuItem11 = new [Link](); menuItem7 = new [Link](); menuItem12 = new [Link](); menu5 = new [Link](); menuItem9 = new [Link](); menuItem10 = new [Link](); menuItem14 = new [Link](); menuItem8 = new [Link](); menu2 = new [Link](); menuItem5 = new [Link](); menuItem6 = new [Link](); menu3 = new [Link](); menuItem13 = new [Link](); menuItem15 = new [Link](); menuItem16 = new [Link](); setAlwaysOnTop(true); setBackground(new [Link](153, 204, 255)); setBounds(new [Link](300, 100, 0, 0)); setIconImages(null); setMinimumSize(new [Link](750, 500)); setResizable(false); setTitle("Sales Monitoring & Inventory Control System"); addWindowListener(new [Link]() { public void windowActivated([Link].e [Link] evt) { formWindowActivated(evt); } public void windowClosing([Link] evt) { e xitForm(evt); } }); setLayout(null); [Link]([Link]); [Link](new [Link]("Dialog", 1, 60)); [Link]("hh/mm/ss"); add(label1); [Link](240, 230, 300, 70); [Link](new [Link]("Algerian", 0, 36)); [Link]("mm/dd/yyyy"); add(label2); [Link](310, 300, 230, 40); [Link]("| Master Maintainance |"); [Link](new [Link]() { public void actionPerformed([Link] evt) { menu1ActionPerformed(evt); } }); [Link]("Creditor Master"); [Link](new [Link]() { public void actionPerformed([Link] evt) { menuItem1ActionPerformed(evt); } }); [Link](menuItem1); [Link]();
29
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
[Link]("Retailer Master"); [Link](new [Link]() { public void actionPerformed([Link] evt) { menuItem2ActionPerformed(evt); } }); [Link](menuItem2); [Link](); [Link]("Distributor Master"); [Link](new [Link]() { public void actionPerformed([Link] evt) { menuItem3ActionPerformed(evt); } }); [Link](menuItem3); [Link](); [Link]("Item Group Master Maintainance"); [Link](new [Link]() { public void actionPerformed([Link] evt) { menu4ActionPerformed(evt); } }); [Link]("Add New Category"); [Link](new [Link]() { public void actionPerformed([Link] evt) { menuItem4ActionPerformed(evt); } }); [Link](menuItem4); [Link](); [Link]("Delete Category"); [Link](new [Link]() { public void actionPerformed([Link] evt) { menuItem11ActionPerformed(evt); } }); [Link](menuItem11); [Link](); [Link]("Add New Sub-Category"); [Link](new [Link]() { public void actionPerformed([Link] evt) { menuItem7ActionPerformed(evt); } }); [Link](menuItem7); [Link](); [Link]("Delete Sub-Category"); [Link](new [Link] tionListener() { public void actionPerformed([Link] evt) { menuItem12ActionPerformed(evt); } }); [Link](menuItem12); [Link](menu4); [Link]("Stock Master Maintainance"); [Link]("Add New Stock"); [Link](new [Link]() { public void actionPerformed([Link] evt) { menuItem9ActionPerformed(evt); }
30
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
}); [Link](menuItem9); [Link](); [Link]("Delete Stock"); [Link](new [Link]() { public void actionPerformed([Link] evt) { menuItem10ActionPerformed(evt); } }); [Link](menuItem10); [Link](menu5); [Link]("User Maintainance"); [Link](new [Link]() { public void actionPerformed([Link] evt) { menuItem14ActionPerformed(evt); } }); [Link](menuItem14); [Link]("Exit"); [Link](new [Link]() { public void actionPerformed([Link] evt) { menuItem8ActionPerformed(evt); } }); [Link](menuItem8); [Link](menu1); [Link]("| Transactions |"); [Link]("Sales"); [Link](new [Link]() { public void actionPerformed([Link] evt) { menuItem5ActionPerformed(evt); } }); [Link](menuItem5); [Link](); [Link]("Damaged Stock Returned"); [Link](new [Link]() { public void actionPerformed([Link] evt) { menuItem6ActionPerformed(evt); } }); [Link](menuItem6); [Link](menu2); [Link]("| Help |"); [Link]("Help Contents"); [Link](new [Link]() { public void actionPerformed([Link] evt) { menuItem13ActionPerformed(evt); } }); [Link](menuItem13); [Link](); [Link]("Start Page"); [Link](new [Link]() { public void actionPerformed([Link] evt) { menuItem15ActionPerformed(evt); } }); [Link](menuItem15);
31
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
[Link](); [Link]("About"); [Link](new [Link]() { public void actionPerformed([Link] evt) { menuItem16ActionPerformed(evt); } }); [Link](menuItem16); [Link](menu3); setMenuBar(menuBar1); pack(); } /** Exit the Application */ pri vate void exitForm([Link] evt) { UserLogin ul = new UserLogin(); [Link](true); [Link](false); } pri vate void menuItem1ActionPerformed([Link] e vt) { [Link](false); CreditorMaintainanace cm = new CreditorMaintainanace(); [Link](true); } pri vate void menuItem2ActionPerformed([Link] e vt) { [Link](false); RetailerMaintainance rm = new RetailerMaintainance(); [Link](true); } pri vate void menuItem3ActionPerformed([Link] e vt) { DistributorMaintainanace dm = new DistributorMaintainanace(); [Link](false); [Link](true); } pri vate void menu1ActionPerformed([Link] evt) { } pri vate void menuItem8ActionPerformed([Link] e vt) { [Link](0); } pri vate void menu4ActionPerformed([Link] evt) { } pri vate void menuItem6ActionPerformed([Link] e vt) { DamagedReturn dr = new DamagedReturn(); [Link](false); [Link](true); } pri vate void menuItem5ActionPerformed([Link] e vt) { Sales sl = new Sales(); [Link](true); [Link](false); } pri vate void menuItem14ActionPerformed([Link] evt) { AddNewUser anu = new AddNewUser(); [Link](false); [Link](true); } pri vate void menuItem13ActionPerformed([Link] evt) { HelpContents hp = new HelpContents(); [Link](false); [Link](true); } pri vate void menuItem4ActionPerformed([Link] e vt) {
32
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
AddNewCategory anc = new AddNewCategory(); [Link](true); [Link](false); } pri vate void menuItem7ActionPerformed([Link] e vt) { AddNewSubCategory ansc = new AddNewSubCategory(); [Link](true); [Link](false); } pri vate void menuItem11ActionPerformed([Link] evt) { DeleteCategory dc = new DeleteCategory(); [Link](true); [Link](false); } pri vate void menuItem12ActionPerformed([Link] evt) { DeleteSubCategory dsc = new DeleteSubCategory(); [Link](true); [Link](false); } pri vate void menuItem9ActionPerformed([Link] e vt) { AddStock ans = new AddStock(); [Link](true); [Link](false); } pri vate void menuItem10ActionPerformed([Link] tionEvent evt) { DeleteStock ds = new DeleteStock(); [Link](true); [Link](false); } pri vate void menuItem15ActionPerformed([Link] evt) { HelpStartPage hsp = new HelpStartPage(); [Link](true); [Link](false); } pri vate void menuItem16ActionPerformed([Link] evt) { HelpAbout ha = new HelpAbout(); [Link](true); [Link](false); } pri vate void formWindowActivated([Link] evt) { [Link]([Link]()); } public void centre() { Dimension screenSize = [Link]().getScreenSize(); int x = (int) ([Link]() / 2 - getWidth() / 2); int y = (int) ([Link]() / 2 - getHeight() / 2); setLocation(x, y); } public static void main(String args[]) { [Link](new Runnable() { public void run() { new XYZEnt().setVisible(true); } }); }
// Variables declaration
33
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
pri vate [Link] label1; pri vate [Link] label2; pri vate [Link] menu1; pri vate [Link] menu2; pri vate [Link] menu3; pri vate [Link] menu4; pri vate [Link] menu5; pri vate [Link] menuBar1; pri vate [Link] menuItem1; pri vate [Link] menuItem10; pri vate [Link] menuItem11; pri vate [Link] menuItem12; pri vate [Link] menuItem13; pri vate [Link] menuItem14; pri vate [Link] menuItem15; pri vate [Link] menuItem16; pri vate [Link] menuItem2; pri vate [Link] menuItem3; pri vate [Link] menuItem4; pri vate [Link] menuItem5; pri vate [Link] menuItem6; pri vate [Link] menuItem7; pri vate [Link] menuItem8; pri vate [Link] menuItem9; }
34
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
[Link]:
User can keep the record of Companys creditor in creditor maintenance part.
35
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
//[Link] import [Link].*; import [Link].*; public class CreditorMaintainanace extends [Link] { public CreditorMaintainanace() { initComponents(); centre(); } public void centre() { Dimension screenSize = [Link]().getScreenSize(); int x = (int) ([Link]() / 2 - getWidth() / 2); int y = (int) ([Link]() / 2 - getHeight() / 2); setLocation(x, y); } pri vate void initComponents() { label1 = new [Link](); label2 = new [Link](); label3 = new [Link](); te xtField1 = new [Link](); te xtField2 = new [Link](); te xtField3 = new [Link](); label4 = new [Link](); button1 = new [Link](); te xtArea1 = new [Link] xtArea(); label5 = new [Link](); button3 = new [Link](); label6 = new [Link](); te xtField4 = new [Link](); setAlwaysOnTop(true); setBackground(new [Link](153, 204, 255)); setBounds(new [Link](300, 200, 0, 0)); setMinimumSize(new [Link](570, 470)); setResizable(false); setTitle("Creditor Maintainance"); addWindowListener(new [Link]() { public void windowActivated([Link].e [Link] evt) { formWindowActivated(evt); } public void windowClosing([Link] evt) { e xitForm(evt);
36
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
} }); setLayout(null); [Link](new [Link]("Dialog", 1, 18)); [Link]("Creditor Maintainance"); add(label1); [Link](210, 40, 210, 20); [Link]("Creditor Name"); add(label2); [Link](40, 100, 150, 20); [Link]("Creditor Address"); add(label3); [Link](40, 130, 150, 20); add(textField1); te [Link](210, 70, 210, 20); add(textField2); te [Link](210, 100, 210, 20); add(textField3); te [Link](210, 130, 210, 20); [Link]("Creditor Conatact no."); add(label4); [Link](40, 160, 160, 20); [Link]("Add"); [Link](new [Link]() { public void actionPerformed([Link] evt) { button1ActionPerformed(evt); } }); add(button1); [Link](450, 80, 50, 24); add(textArea1); te [Link](20, 230, 510, 180); [Link](new [Link]("Dialog", 1, 14)); [Link]("Current Creditors"); add(label5); [Link](220, 200, 130, 23); [Link]("Exit"); [Link](new [Link]() { public void actionPerformed([Link] evt) { button3ActionPerformed(evt); } }); add(button3); [Link](450, 110, 50, 24); [Link]("Creditor ID"); add(label6); [Link](40, 70, 100, 20); add(textField4); te [Link](210, 160, 210, 20); pack(); } pri vate void exitForm([Link] evt) { XYZEnt xyz = new XYZEnt(); [Link](true); [Link](false); }
37
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
pri vate void button3ActionPerformed([Link] e vt) { XYZEnt xyz = new XYZEnt(); [Link](true); [Link](false); } pri vate void button1ActionPerformed([Link] e vt) { try { [Link](new [Link]()); Connection con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); Statement stmt = [Link](); String sql = "insert into creditormaster values('" + te [Link]() + "','" + te [Link]() + "','" + [Link]() + "','" + [Link]() + "')"; int records_updated = [Link](sql); [Link](); } catch (SQLException e) { [Link](e); } te [Link](""); te [Link](""); te [Link](""); te [Link](""); refresh(); } pri vate void formWindowActivated([Link] evt) { int no_of_times = 0; try { [Link](new [Link]()); Connection con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); Statement stmt = [Link](); ResultSet rs = [Link]("select * from creditormaster order by creditorid"); no_of_times++; if (no_of_times == 1) { [Link]("Creditor ID" + " " + "Creditor Name" + " " + "Creditor Address" + " " + "Creditor Contact no."); } while ([Link]()) { [Link]("\n" + " " + [Link](1) + " " + [Link](2) + " " + [Link](3) + " " + [Link](4)); } } catch (SQLException e) { } } pri vate void refresh() { te [Link](""); te [Link](""); te [Link](""); te [Link](""); te [Link](""); try { [Link](new [Link]()); Connection con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); Statement stmt = [Link](); ResultSet rs = [Link]("select * from creditormas ter order by creditorid"); [Link]("Creditor ID" + " " + "Creditor Name" + " " + "Creditor Address" + " "+ "Creditor Contact no."); while ([Link]()) { [Link]("\n" + " " + [Link](1) + " " + [Link](2) + " " + [Link](3) + " " + [Link](4)); }
38
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
} catch (SQLException e) { } } public static void main(String args[]) { [Link](new Runnable() { public void run() { new CreditorMaintainanace().setVisible(true); } }); } // Variables declaration pri vate [Link] button1; pri vate [Link] button3; pri vate [Link] label1; pri vate [Link] label2; pri vate [Link] label3; pri vate [Link] label4; pri vate [Link] label5; pri vate [Link] label6; pri vate [Link] xtArea te xtArea1; pri vate [Link] xtField textField1; pri vate [Link] xtField textField2; pri vate [Link] xtField textField3; pri vate [Link] xtField textField4; }
39
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
[Link]:
User can keep the record of Companys retailer in retailer maintenance part.
40
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
//[Link] import [Link].*; import [Link].*; public class RetailerMaintainance extends [Link] { public RetailerMaintainance() { initComponents(); centre(); } public void centre() { Dimension screenSize = [Link]().getScreenSize(); int x = (int) ([Link]() / 2 - getWidth() / 2); int y = (int) ([Link]() / 2 - getHeight() / 2); setLocation(x, y); } private void initComponents() { label1 = new [Link](); label2 = new [Link](); label3 = new [Link](); te xtField1 = new [Link](); te xtField2 = new [Link](); te xtField3 = new [Link](); label4 = new [Link](); button1 = new [Link](); te xtArea1 = new [Link] xtArea(); label5 = new [Link](); button3 = new [Link](); label6 = new [Link](); te xtField4 = new [Link](); setAlwaysOnTop(true); setBackground(new [Link](153, 204, 255)); setBounds(new [Link](300, 200, 0, 0)); setMinimumSize(new [Link](575, 440)); setResizable(false); setTitle("Retailer Maintainance"); addWindowListener(new [Link]() { public void windowActivated([Link].e [Link] evt) { formWindowActivated(evt); } public void windowClosing([Link] evt) { exitForm(evt); } });
41
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
setLayout(null); [Link](new [Link]("Dialog", 1, 18)); [Link]("Retailer Maintainance"); add(label1); [Link](190, 30, 210, 28); [Link]("Retailer Name"); add(label2); [Link](30, 100, 140, 20); [Link]("Retailer Address"); add(label3); [Link](30, 130, 140, 20); add(textField1); te [Link](200, 70, 210, 20); add(textField2); te [Link](200, 100, 210, 20); add(textField3); te [Link](200, 130, 210, 20); [Link]("Retailer Conatact no."); add(label4); [Link](30, 160, 150, 20); [Link]("Add"); [Link](new [Link]() { public void actionPerformed([Link] evt) { button1ActionPerformed(evt); } }); add(button1); [Link](440, 90, 50, 24); add(textArea1); te [Link](20, 220, 510, 180); [Link](new [Link]("Dialog", 1, 14)); [Link]("Current Retailers"); add(label5); [Link](200, 190, 130, 23); [Link]("Exit"); [Link](new [Link]() { public void actionPerformed([Link] evt) { button3ActionPerformed(evt); } }); add(button3); [Link](440, 120, 50, 24); [Link]("Retailer ID"); add(label6); [Link](30, 70, 62, 20); add(textField4); te [Link](200, 160, 210, 20); pack(); } pri vate void exitForm([Link] evt) { XYZEnt xyz = new XYZEnt(); [Link](true); [Link](false); } pri vate void button3ActionPerformed([Link] e vt) { XYZEnt xyz = new XYZEnt(); [Link](true); [Link](false); }
42
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
pri vate void button1ActionPerformed([Link] e vt) { try { [Link](new [Link]()); Connection con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); Statement stmt = [Link](); String sql = "insert into retailerm aster values('" + te [Link]() + "','" + [Link]() + "','" + te [Link]() + "','" + te [Link]() + "')"; int records_updated = [Link](sql); [Link](); } catch (SQLException e) { } te [Link](""); te [Link](""); te [Link](""); te [Link](""); refresh(); } pri vate void formWindowActivated([Link] evt) { try { [Link](new [Link]()); Connection con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl","scott", "tiger"); Statement stmt = [Link](); ResultSet rs = [Link]("select * from retailermaster order by retailerid"); [Link]("Retailer ID" + " " + "Retailer Name" + " " + "Retailer Address" + " "+ "Retailer Contact no."); while ([Link]()) { [Link]("\n" + " " + [Link](1) + " " + [Link](2) + " " + [Link](3) + " " + [Link](4)); } } catch (SQLException e) { } } private void refresh(){ te [Link](""); te [Link](""); te [Link](""); te [Link](""); te [Link](""); try { [Link](new [Link]()); Connection con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); Statement stmt = [Link](); ResultSet rs = [Link]("select * from retailermaster order by retailerid"); [Link]("Retailer ID" + " " + "Retailer Name" + " " + "Retailer Address" + " "+ "Retailer Contact no."); while ([Link]()) { [Link]("\n" + " " + [Link](1) + " " + [Link](2) + " " + [Link](3) + " " + [Link](4)); } } catch (SQLException e) { } } public static void main(String args[]) { [Link](new Runnable() { public void run() { new RetailerMaintainance().setVisible(true); } }); }
43
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
// Variables declaration pri vate [Link] button1; //private ja [Link] button2; pri vate [Link] button3; pri vate [Link] label1; pri vate [Link] label2; pri vate [Link] label3; pri vate [Link] label4; pri vate [Link] label5; pri vate [Link] label6; pri vate [Link] xtArea te xtArea1; pri vate [Link] xtField textField1; pri vate [Link] xtField textField2; pri vate [Link] xtField textField3; pri vate [Link] xtField textField4; }
44
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
[Link]:
User can keep the record of Companys distributor in distributor maintenance part.
45
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
//[Link] import [Link].*; import [Link].*; public class DistributorMaintainanace extends [Link] { public DistributorMaintainanace() { initComponents(); centre(); } public void centre() { Dimension screenSize = [Link]().getScreenSize(); int x = (int) ([Link]() / 2 - getWidth() / 2); int y = (int) ([Link]() / 2 - getHeight() / 2); setLocation(x, y); } pri vate void initComponents() { label1 = new [Link](); label2 = new [Link](); label3 = new [Link](); te xtField1 = new [Link](); te xtField2 = new [Link](); te xtField3 = new [Link](); label4 = new [Link](); button1 = new [Link](); //button2 = new [Link](); te xtArea1 = new [Link] xtArea(); label5 = new [Link](); button3 = new [Link](); label6 = new [Link](); te xtField4 = new [Link](); setAlwaysOnTop(true); setBackground(new [Link](153, 204, 255)); setBounds(new [Link](300, 200, 0, 0)); setMinimumSize(new [Link](600, 470)); setResizable(false); setTitle("Distributor Master Maintainance"); addWindowListener(new [Link]() { public void windowActivated([Link].e [Link] evt) { formWindowActivated(evt); } public void windowClosing([Link] evt) {
46
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
e xitForm(evt); } }); setLayout(null); [Link](new [Link]("Dialog", 1, 16)); [Link]("Distributor Maintainance"); add(label1); [Link](190, 30, 220, 25); [Link]("Distributor Name"); add(label2); [Link](30, 110, 140, 20); [Link]("Distributor Address"); add(label3); [Link](30, 140, 140, 20); add(textField1); te [Link](200, 80, 210, 20); add(textField2); te [Link](200, 110, 210, 20); add(textField3); te [Link](200, 140, 210, 20); [Link]("Distributor Conatact no."); add(label4); [Link](30, 170, 150, 20); [Link]("Add"); [Link](new [Link]() { public void actionPerformed([Link] evt) { button1ActionPerformed(evt); } }); add(button1); [Link](440, 90, 50, 24); add(textArea1); te [Link](30, 230, 510, 180); [Link](new [Link]("Dialog", 1, 13)); [Link]("Current Distributors"); add(label5); [Link](210, 200, 150, 22); [Link]("Exit"); [Link](new [Link]() { public void actionPerformed([Link] evt) { button3ActionPerformed(evt); } }); add(button3); [Link](440, 120, 50, 24); [Link]("Distributor ID"); add(label6); [Link](30, 80, 80, 20); add(textField4); te [Link](200, 170, 210, 20); pack();
47
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
} pri vate void exitForm([Link] evt) { XYZEnt xyz = new XYZEnt(); [Link](true); [Link](false); } private void button3ActionPerformed([Link] evt) { XYZEnt xyz = new XYZEnt(); [Link](true); [Link](false); } pri vate void formWindowActivated([Link] evt) { try { [Link](new [Link]()); Connection con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger") ; Statement stmt = [Link](); ResultSet rs = [Link]("select * from distributormaster order by distributorid"); [Link]("Distributor ID" + " " + "Distributor Name" + " " + "Distributor Address" + " " + "Distributor Contact no."); while ([Link]()) { [Link]("\n" + " " + [Link](1) + " " + [Link](2) + " " + [Link](3) + " " + [Link](4)); } } catch (SQLException e) { } } pri vate void button1ActionPerformed([Link] e vt) { try { [Link](new [Link]()); Connection con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); Statement stmt = [Link](); String sql = "insert into distributormaster values('" + te [Link]() + "','" + te [Link]() + "','" + [Link]() + "','" + [Link]() + "')"; int records_updated = [Link](sql); [Link](); } catch (SQLException e) { } te [Link](""); te [Link](""); te [Link](""); te [Link](""); refresh(); } pri vate void refresh() { te [Link](""); te [Link](""); te [Link](""); te [Link](""); te [Link](""); try { [Link](new [Link]()); Connection con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); Statement stmt = [Link](); ResultSet rs = [Link]("select * from distributormaster"); [Link]("Distributor ID" + " " + "Distributor Name" + " " + "Distributor Address" + " " + "Distributor Contact no."); while ([Link]()) { [Link]("\n" + " " + [Link](1) + " " + [Link](2) + " " + [Link](3) + " " + [Link](4)); } } catch (SQLException e) { } } public static void main(String args[]) {
48
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
[Link](new Runnable() { public void run() { new DistributorMaintainanace().setVisible(true); } }); } // Variables declaration pri vate [Link] button1; //private ja [Link] button2; pri vate [Link] button3; pri vate [Link] label1; pri vate [Link] label2; pri vate [Link] label3; pri vate [Link] label4; pri vate [Link] label5; pri vate [Link] label6; pri vate [Link] xtArea te xtArea1; pri vate [Link] xtField textField1; pri vate [Link] xtField textField2; pri vate [Link] xtField textField3; pri vate [Link] xtField textField4; // End of variables declaration }
49
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
[Link]:
User can add new category of product into category database using this form. Step to be followed to get this form as follows: Master Maintenance > Item Group Master Maintenance >Add New Category.
50
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
Before Addition: After Addition:
//AddNewCategory .java import [Link].*; import [Link].*; public class AddNewCategory e xtends [Link] { /** Creates new form AddNewCategory */ public AddNewCategory() { initComponents(); centre(); } pri vate void initComponents() { label1 = new [Link](); button1 = new [Link](); te xtField1 = new [Link](); button2 = new [Link](); label2 = new [Link](); label3 = new [Link](); te xtField2 = new [Link](); label4 = new [Link](); setBackground(new [Link](153, 204, 255)); setMinimumSize(new [Link](400, 200)); setTitle("Add New Category"); addWindowListener(new [Link]() { public void windowClosing([Link] evt) { e xitForm(evt); } }); setLayout(null); [Link](new [Link]("Dialog", 1, 16)); [Link]("Add New Category"); add(label1); [Link](120, 30, 150, 25); [Link]("Save"); [Link](new [Link]() { public void actionPerformed([Link] evt) { button1ActionPerformed(evt); } }); add(button1); [Link](230, 150, 43, 24); te [Link](new [Link]() { public void mouseClicked([Link] evt) { textField1MouseClicked(evt); } });
51
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
te [Link](new [Link] yAdapter() { public void keyTyped([Link] yEvent e vt) { textField1KeyTyped(evt); } }); add(textField1); te [Link](160, 80, 190, 20); [Link]("Back"); [Link](new [Link]() { public void actionPerformed([Link] evt) { button2ActionPerformed(evt); } }); add(button2); [Link](280, 150, 50, 24); [Link]("Category ID"); add(label2); [Link](20, 80, 70, 20); [Link]("Category Name"); add(label3); [Link](20, 110, 90, 20); add(textField2); te [Link](160, 110, 190, 20); [Link](new [Link](204, 255, 204)); [Link]("Record Saved"); [Link](false); add(label4); [Link](20, 160, 170, 20); pack(); } pri vate void exitForm([Link] evt) { XYZEnt xyz = new XYZEnt(); [Link](true); [Link](false); } pri vate void button1ActionPerformed([Link] e vt) { try { [Link](new [Link]()); Connection con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); Statement stmt = [Link](); ResultSet rs = [Link]("select * from category where categoryid='" + [Link]() + "'"); if (![Link]()) { [Link](); String sql = "insert into Category values('" + te [Link]() + "','" + te [Link]() + "')"; int records_updated = [Link](sql); [Link](); } } catch (SQLException e) { [Link](e); } te [Link](""); te [Link](""); [Link](true); [Link]("Category Added"); }
52
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
pri vate void button2ActionPerformed([Link] e vt) { XYZEnt xyz = new XYZEnt(); [Link](true); [Link](false); } pri vate void textField1KeyTyped([Link] yEvent e vt) { [Link](fals e); } pri vate void textField1MouseClicked([Link] evt) { [Link](false); } public void centre() { Dimension screenSize = [Link]().getScreenSize(); int x = (int) ([Link]() / 2 - getWidth() / 2); int y = (int) ([Link]() / 2 - getHeight() / 2); setLocation(x, y); } public static void main(String args[]) { [Link](new Runnable() { public void run() { new AddNewCategory().setVisible(true); } }); } // Variables declaration pri vate [Link] button1; pri vate [Link] button2; pri vate [Link] label1; pri vate [Link] label2; pri vate [Link] label3; pri vate [Link] label4; pri vate [Link] xtField textField1; pri vate [Link] xtField textField2; // End of variables declaration }
53
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
[Link]:
User can delete category of product from category database using this form. Step to be followed to get this form as follows: Master Maintenance > Item Group Master Maintenance >Delete Category.
54
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
Before Deletion: After Deletion:
//[Link] import [Link].*; import [Link].*; public class DeleteCategory extends [Link] e { public DeleteCategory() { initComponents(); centre(); } public void centre() { Dimension screenSize = [Link]().getScreenSize(); int x = (int) ([Link]() / 2 - getWidth() / 2); int y = (int) ([Link]() / 2 - getHeight() / 2); setLocation(x, y); } pri vate void initComponents() { button1 = new [Link](); choice1 = new [Link](); button2 = new [Link](); label1 = new [Link](); label2 = new [Link](); label3 = new [Link](); te xtField1 = new [Link](); label4 = new [Link](); setBackground(new [Link](153, 204, 255)); setMinimumSize(new [Link](380, 210)); setTitle("Category Deletion"); addWindowListener(new [Link]() { public void windowActivated([Link].e [Link] evt) { formWindowActivated(evt); } public void windowClosing([Link] evt) { e xitForm(evt); } }); setLayout(null); [Link]("Ok"); [Link](new [Link]() { public void actionPerformed([Link] evt) { button1ActionPerformed(evt); } }); add(button1); [Link](170, 160, 60, 24); [Link](new [Link]() { public void mouseClicked([Link] evt) { choice1MouseClicked(evt); }
55
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
public void mouseEntered([Link] evt) { choice1MouseEntered(evt); } }); [Link](new [Link]() { public void itemStateChanged([Link] e vt) { choice1ItemStateChanged(evt); } }); add(choice1); [Link](160, 90, 140, 20); [Link]("Back"); [Link](new [Link]() { public void actionPerformed([Link] evt) { button2ActionPerformed(evt); } }); add(button2); [Link](240, 160, 60, 24); [Link](new [Link]("Dialog", 1, 16)); [Link]("Category Deletion"); add(label1); [Link](130, 40, 140, 25); [Link]("Category"); add(label2); [Link](20, 90, 60, 20); [Link](new [Link]("Dialog", 0, 11)); [Link](new [Link](204, 255, 204)); add(label3); [Link](20, 160, 110, 19); add(textField1); te [Link](160, 120, 140, 20); [Link]("Category Name"); add(label4); [Link](20, 120, 100, 20); pack(); } /** Exit the Application */ pri vate void exitForm([Link] evt) { XYZEnt xyze = new XYZEnt(); [Link](false); [Link](true); } pri vate void formWindowActivated([Link] evt) { Connection con; Statement stmt; try { [Link](new [Link]()); con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); stmt = [Link](); ResultSet rs = [Link]("select CategoryID from Category order by CategoryID"); while ([Link]()) { String s1 = [Link]("CategoryID"); [Link](s1); } } catch (SQLException e) { } }
56
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
pri vate void button1ActionPerformed([Link] e vt) { try { [Link](new [Link]()); Connection con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); Statement stmt = [Link](); String sql = "delete from subcategory where categoryid= '" + [Link]() + "'"; int records_updated = stm [Link](sql); sql = "delete from category where categoryid= '" + [Link]() + "'"; records_updated = [Link](sql); [Link](true); [Link]("Category Deleted !"); } catch (SQLException e) { } } pri vate void button2ActionPerformed([Link] e vt) { XYZEnt xyze = new XYZEnt(); [Link](false); [Link](true); } pri vate void choice1ItemStateChanged([Link] e vt) { Connection con; Statement stmt; try { [Link](new [Link]()); con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); stmt = [Link](); ResultSet rs = [Link]("select Category_name from category where CategoryID ='" + [Link]() + "' "); while ([Link]()) { String s = [Link]("Category_name"); [Link](s); } } catch (SQLException e) { } } pri vate void choice1MouseClicked([Link] evt) { } pri vate void choice1MouseEntered([Link] evt) { [Link](false); } public static void main(String args[]) { [Link](new Runnable() { public void run() { new DeleteCategory().setVisible(true); } }); } // Variables declaration pri vate [Link] button1; pri vate [Link] button2; pri vate [Link] choice1; pri vate [Link] label1; pri vate [Link] label2; pri vate [Link] label3; pri vate [Link] label4; pri vate [Link] xtField textField1; // End of variables declaration }
57
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
[Link]:
User can add new Sub-category of an existing product Category into Sub-category database using this form. Step to be followed to get this form as follows: Master Maintenance > Item Group Master Maintenance >Add New Sub Category.
58
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
Before Addition: After Addition:
//[Link] import [Link].*; import [Link].*; public class AddNewSubCategory extends [Link] { public AddNewSubCategory() { initComponents(); centre(); } pri vate void initComponents() { label1 = new [Link](); label2 = new [Link](); label3 = new [Link](); label4 = new [Link](); choice1 = new [Link](); te xtField1 = new [Link](); te xtField2 = new [Link](); button1 = new [Link](); button2 = new [Link](); label5 = new [Link](); setBackground(new [Link](153, 204, 255)); setMinimumSize(new [Link](400, 260)); setTitle("Add New SubCategory"); addWindowListener(new [Link]() { public void windowActivated([Link].e [Link] evt) { formWindowActivated(evt); } public void windowClosing([Link] evt) { e xitForm(evt); } }); setLayout(null); [Link](new [Link]("Dialog", 1, 14)); [Link]("Add New Sub-Category"); add(label1); [Link](110, 40, 170, 23); [Link]("Category"); add(label2); [Link](10, 100, 60, 20); [Link]("Sub-Category ID"); add(label3); [Link](10, 130, 94, 20); [Link]("Sub-Category Name"); add(label4); [Link](10, 160, 120, 20);
59
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
[Link](new [Link]() { public void mouseEntered([Link] evt) { choice1MouseEntered(evt); } }); add(choice1); [Link](160, 100, 160, 20); add(textField1); te [Link](160, 130, 160, 20); add(textField2); te [Link](160, 160, 160, 20); [Link]("Ok"); [Link](new [Link]() { public void actionPerformed([Link] evt) { button1ActionPerformed(evt); } }); add(button1); [Link](180, 200, 50, 24); [Link]("Back"); [Link](new [Link]() { public void actionPerformed([Link] evt) { button2ActionPerformed(evt); } }); add(button2); [Link](240, 200, 57, 24); [Link](new [Link](204, 255, 204)); [Link]("Sub-Category Added"); [Link](false); add(label5); [Link](10, 200, 140, 20); pack(); } pri vate void exitForm([Link] evt) { XYZEnt xyz = new XYZEnt(); [Link](true); [Link](false); } pri vate void formWindowActivated([Link] evt) { Connection con; Statement stmt; try { [Link](new [Link]()); con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); stmt = [Link](); ResultSet rs = [Link]("select CategoryID from Category order by CategoryID"); while ([Link]()) { String s = [Link]("CategoryID"); [Link](s); } } catch (SQLException e) { } } pri vate void button1ActionPerformed([Link] e vt) { try { [Link](new [Link]()); Connection con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); Statement stmt = [Link]();
60
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
String sql = "insert into Subcategory values('" + [Link]() + "','" + [Link]() + "','" + [Link]() + "')"; int records_updated = [Link](sql); [Link](); } catch (SQLException e) { } [Link](true); te [Link](""); te [Link](""); } pri vate void button2ActionPerformed([Link] e vt) { XYZEnt xyz = new XYZEnt(); [Link](true); [Link](false); } pri vate void choice1MouseEntered([Link] evt) { [Link](false); } public void centre() { Dimension screenSize = [Link]().getScreenSize(); int x = (int) ([Link]() / 2 - getWidth() / 2); int y = (int) ([Link]() / 2 - getHeight() / 2); setLocation(x, y); } public static void main(String args[]) { [Link](new Runnable() { public void run() { new AddNewSubCategory().setVisible(true); } }); } // Variables declaration pri vate [Link] button1; pri vate [Link] button2; pri vate [Link] choice1; pri vate [Link] label1; pri vate [Link] label2; pri vate [Link] label3; pri vate [Link] label4; pri vate [Link] label5; pri vate [Link] xtField textField1; pri vate [Link] xtField textField2; // End of variables declaration }
61
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
[Link]:
User can delete sub-category of product from subcategory database using this form. Step to be followed to get this form as follows: Master Maintenance > Item Group Master Maintenance >Delete Sub Category.
62
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
Before Deletion: After deletion:
//[Link] import [Link].*; import [Link].*; public class DeleteSubCategory extends [Link] { public DeleteSubCategory() { initComponents(); centre(); } public void centre() { Dimension screenSize = [Link]().getScreenSize(); int x = (int) ([Link]() / 2 - getWidth() / 2); int y = (int) ([Link]() / 2 - getHeight() / 2); setLocation(x, y); } pri vate void initComponents() { label1 = new [Link](); label2 = new [Link](); label3 = new [Link](); choice1 = new [Link](); choice2 = new [Link](); button1 = new [Link](); button2 = new [Link](); te xtField1 = new [Link](); label4 = new [Link](); label5 = new [Link](); setBackground(new [Link](153, 204, 255)); setMinimumSize(new [Link](400, 280)); setTitle("Delete Sub-Category"); addWindowListener(new [Link]() { public void windowActivated([Link].e [Link] evt) { formWindowActivated(evt); } public void windowClosing([Link] evt) { e xitForm(evt); } }); addMouseMotionListener(new [Link]() { public void mouseMoved([Link] evt) { formMouseMoved(evt); } }); setLayout(null); [Link](new [Link]("Dialog", 1, 16)); [Link]("Delete Sub-Category"); add(label1);
63
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
[Link](120, 50, 170, 25); [Link]("Category"); add(label2); [Link](60, 100, 53, 20); [Link]("Sub-Category"); add(label3); [Link](60, 130, 79, 20); [Link](new [Link]() { public void itemStateChanged([Link] e vt) { choice1ItemStateChanged(evt); } }); add(choice1); [Link](200, 130, 140, 20); [Link](new [Link]() { public void itemStateChanged([Link] e vt) { choice2ItemStateChanged(evt); } }); add(choice2); [Link](200, 100, 140, 20); [Link]("Ok"); [Link](new [Link]() { public void actionPerformed([Link] evt) { button1ActionPerformed(evt); } }); add(button1); [Link](220, 200, 60, 24); [Link]("Back"); [Link](new [Link]() { public void actionPerformed([Link] evt) { button2ActionPerformed(evt); } }); add(button2); [Link](290, 200, 50, 24); te [Link](new [Link](204, 255, 255)); te [Link](false); add(textField1); te [Link](200, 160, 140, 20); [Link]("Sub-Category Name"); add(label4); [Link](60, 160, 120, 20); [Link](new [Link](204, 255, 204)); [Link]("Sub-Category Deleted"); [Link](false); add(label5); [Link](60, 200, 130, 20); pack(); }
64
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
/** Exit the Application */ pri vate void exitForm([Link] evt) { XYZEnt xyz = new XYZEnt(); [Link](true); [Link](false); } pri vate void formWindowActivated([Link] evt) { Connection con; Statement stmt; try { [Link](new [Link]()); con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); stmt = [Link](); ResultSet rs1 = [Link]("select CategoryID from Category order by CategoryID"); while ([Link]()) { String s1 = [Link]("CategoryID"); [Link](s1); } [Link](); } catch (SQLException e) { } } pri vate void choice2ItemStateChanged([Link] e vt) { Connection con; Statement stmt; [Link](); try { [Link](new [Link]()); con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger") ; stmt = [Link](); ResultSet rs = [Link]("select SUbCategoryID from Subcategory where CategoryID ='" + [Link]() + "' order by SUbCategoryID"); while ([Link]()) { String s = [Link]("SUbCategoryID"); [Link](s); } [Link](); } catch (SQLException e) { } } pri vate void button1ActionPerformed([Link] e vt) { try { [Link](new [Link]()); Connection con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); Statement stmt = [Link](); String sql1 = ("delete from Subcategory where subCategoryID ='" + [Link]() + "' and categoryid='" + [Link]() + "'"); int records_updated = [Link](sql1); te [Link](""); [Link](true); } catch (SQLException e) { } } pri vate void button2ActionPerformed([Link] e vt) { XYZEnt xyz = new XYZEnt(); [Link](true); [Link](false); } pri vate void choice1ItemStateChanged([Link] e vt) { Connection con; Statement stmt; try { [Link](new [Link]()); con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger");
65
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
stmt = [Link](); ResultSet rs = [Link]("select SUbCategory_name from Subcategory where subCategoryID ='" + [Link]() + "'"); while ([Link]()) { String s = [Link]("SUbCategory_name"); //[Link](s); [Link](s); } } catch (SQLException e) { } } pri vate void formMouseMoved([Link] evt) { [Link](false); } public static void main(String args[]) { [Link](new Runnable() { public void run() { new DeleteSubCategory().setVisible(true); } }); } // Variables declaration pri vate [Link] button1; pri vate [Link] button2; pri vate [Link] choice1; pri vate [Link] choice2; pri vate [Link] label1; pri vate [Link] label2; pri vate [Link] label3; pri vate [Link] label4; pri vate [Link] label5; pri vate [Link] xtField textField1; // End of variables declaration }
66
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
[Link]:
to maintain the stock of XYZEnterprise, its badly needed to keep the information about stock during addition / deletion of stock. Here we are going to add a new product of existing category or sub-category to stock database.
67
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
Before Addition: After Addition :
//[Link] import [Link].*; import [Link].*; public class AddStock extends [Link] { /** Creates new form AddStock */ public AddStock() { initComponents(); centre(); } public void centre() { Dimension screenSize = [Link]().getScreenSize(); int x = (int) ([Link]() / 2 - getWidth() / 2); int y = (int) ([Link]() / 2 - getHeight() / 2); setLocation(x, y); } pri vate void initComponents() { label1 = new [Link](); label2 = new [Link](); label3 = new [Link](); choice1 = new [Link](); choice2 = new [Link](); label4 = new [Link](); label5 = new [Link](); te xtField1 = new [Link](); te xtField2 = new [Link](); label6 = new [Link](); te xtField3 = new [Link](); button1 = new [Link](); button2 = new [Link](); label7 = new [Link](); te xtField4 = new [Link](); label8 = new [Link](); setBackground(new [Link](153, 204, 255)); setMinimumSize(new [Link](450, 380)); setResizable(false); setTitle("Add Stock"); addMouseListener(new [Link]() { public void mouseEntered([Link] evt) { formMouseEntered(evt); } }); addWindowListener(new [Link]() {
68
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
public void windowActivated([Link].e [Link] evt) { formWindowActivated(evt); } public void windowClosing([Link] evt) { e xitForm(evt); } }); setLayout(null); [Link](new [Link]("Dialog", 1, 16)); [Link]("Add Stock"); add(label1); [Link](170, 50, 90, 25); [Link]("Category"); add(label2); [Link](100, 100, 53, 20); [Link]("Sub-Category"); add(label3); [Link](100, 130, 79, 20); [Link](new [Link]() { public void itemStateChanged([Link] e vt) { choice1ItemStateChanged(evt); } }); add(choice1); [Link](230, 100, 90, 20); [Link](new [Link]() { public void itemStateChanged([Link] e vt) { choice2ItemStateChanged(evt); } }); add(choice2); [Link](230, 130, 90, 20); [Link]("Quantity"); add(label4); [Link](100, 160, 60, 20); [Link]("Unit Price"); add(label5); [Link](100, 190, 60, 20); te [Link](new [Link] yAdapter() { public void keyPressed([Link] yEvent evt) { textField1KeyPressed(evt); } }); add(textField1); te [Link](230, 160, 160, 20); te [Link](new [Link] yAdapter() { public void keyPressed([Link] yEvent evt) { textField2KeyPressed(evt); } }); add(textField2); te [Link](230, 190, 160, 20); [Link]("Purchase Date"); add(label6); [Link](100, 220, 90, 20);
69
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
te [Link](new [Link](204, 204, 204)); te [Link](false); te [Link](false); add(textField3); te [Link](230, 220, 160, 20); [Link]("Ok"); [Link](new [Link]() { public void actionPerformed([Link] evt) { button1ActionPerformed(evt); } }); add(button1); [Link](270, 280, 60, 24); [Link]("Back"); [Link](new [Link]() { public void actionPerformed([Link] evt) { button2ActionPerformed(evt); } }); add(button2); [Link](340, 280, 60, 24); [Link]("Purchase ID"); add(label7); [Link](100, 250, 72, 20); te [Link](new [Link] yAdapter() { public void keyPressed([Link] yEvent evt) { textField4KeyPressed(evt); } }); add(textField4); te [Link](230, 250, 160, 20); [Link](new [Link](204, 255, 204)); [Link]("label8"); add(label8); [Link](10, 330, 470, 40); pack(); } pri vate void exitForm([Link] evt) { XYZEnt xyz = new XYZEnt(); [Link](true); [Link](false); } pri vate void formWindowActivated([Link] evt) { Connection con; Statement stmt; te [Link]([Link]()); [Link]("Select Category !"); [Link](true); try { [Link](new [Link]()); con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); stmt = [Link](); ResultSet rs = [Link]("select CategoryID from Category order by CategoryID"); while ([Link]()) { String s1 = [Link]("CategoryID"); [Link](s1);
70
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
} [Link](); } catch (SQLException e) { } } pri vate void choice1ItemStateChanged([Link] e vt) { Connection con; Statement stmt; [Link]("Select Sub-Category !"); try { [Link](new [Link]()); con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); stmt = [Link](); ResultSet rs = [Link]("select SUbCategoryID from Subcategory where CategoryID ='" + [Link]() + "' order by SUbCategoryID"); while ([Link]()) { String s = [Link]("SUbCategoryID"); [Link](s); } [Link](); } catch (SQLException e) { } } pri vate void button1ActionPerformed([Link] e vt) { Connection con; Statement stmt; int v_qty = 0, records_updated; try { [Link](new [Link]()); con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); stmt = [Link](); String sql = "select qty from stock where categoryid='" + [Link]() + "' and subcategoryid='" + [Link]() + "'"; ResultSet rs = [Link](sql); if ([Link]()) { v_qty = [Link](1); [Link](); records_updated = [Link]("update stock set qty=" + (v_qty + [Link]([Link]())) + " where categoryid='" + [Link]() + "' and subcategoryid='" + ch [Link]() + "'"); } else { sql = "insert into stock values('" + [Link]() + "','" + [Link]() + "','" + [Link]() + "','" + [Link]() + "','" + [Link]() + "','" + [Link]() + "')"; records_updated = [Link](sql); [Link](); } } catch (SQLException e) { } [Link]("Stock added to Database Successfully '\n' Select category to add new stock"); te [Link](""); te [Link](""); te [Link](""); } pri vate void button2ActionPerformed([Link] e vt) { XYZEnt xyz = new XYZEnt(); [Link](false); [Link](true); } pri vate void choice2ItemStateChanged([Link] e vt) { [Link]("Gi ve Quantity !"); }
71
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
pri vate void textField1KeyPressed([Link] yEvent evt) { [Link]("Gi ve price !"); } pri vate void textField2KeyPressed([Link] yEvent evt) { [Link]("Gi ve the Purchase Id !"); } pri vate void textField4KeyPressed([Link] yEvent evt) { [Link]("Press Ok to Add Stock !"); } pri vate void formMouseMoved([Link] evt) { } pri vate void formMouseEntered([Link] evt) { } public static void main(String args[]) { [Link](new Runnable() { public void run() { new AddStock().setVisible(true); } }); } // Variables declaration pri vate [Link] button1; pri vate [Link] button2; pri vate [Link] choice1; pri vate [Link] choice2; pri vate [Link] label1; pri vate [Link] label2; pri vate [Link] label3; pri vate [Link] label4; pri vate [Link] label5; pri vate [Link] label6; pri vate [Link] label7; pri vate [Link] label8; pri vate [Link] xtField textField1; pri vate [Link] xtField textField2; pri vate [Link] xtField textField3; pri vate [Link] xtField textField4; // End of variables declaration }
72
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
[Link]:
this form is used to delete stock of XYZEnterprise of
existing category or sub-category from stock database.
73
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
Before Delete: After Delete:
Category Deleted
//[Link] import [Link].*; import [Link].*; public class DeleteStock extends [Link] { public DeleteStock() { initComponents(); centre(); } public void centre() { Dimension screenSize = [Link]().getScreenSize(); int x = (int) ([Link]() / 2 - getWidth() / 2); int y = (int) ([Link]() / 2 - getHeight() / 2); setLocation(x, y); } pri vate void initComponents() { label1 = new [Link](); label2 = new [Link](); label3 = new [Link](); te xtField2 = new [Link](); choice1 = new [Link](); label4 = new [Link](); button1 = new [Link](); button2 = new [Link](); choice2 = new [Link](); label5 = new [Link](); setBackground(new [Link](153, 204, 255)); setMinimumSize(new [Link](350, 250)); setResizable(false); setTitle("Delete Stock"); addWindowListener(new [Link]() { public void windowActivated([Link].e [Link] evt) { formWindowActivated(evt); } public void windowClosing([Link] evt) { e xitForm(evt); } }); addMouseMotionListener(new [Link]() { public void mouseMoved([Link] evt) { formMouseMoved(evt); } }); setLayout(null);
74
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
[Link](new [Link]("Dialog", 1, 16)); [Link]("Delete Stock"); add(label1); [Link](120, 40, 140, 20); [Link]("Category "); add(label2); [Link](70, 90, 80, 20); [Link]("Sub-Category"); add(label3); [Link](70, 120, 80, 20); te [Link](new [Link](255, 255, 255)); te [Link](""); te [Link](new [Link]() { public void mouseClicked([Link] evt) { textField2MouseClicked(evt); } }); te [Link](new [Link]() { public void mouseMoved([Link] evt) { textField2MouseMoved(evt); } }); add(textField2); te [Link](160, 150, 130, 20); [Link](new [Link]() { public void itemStateChanged([Link] e vt) { choice1ItemStateChanged(evt); } }); add(choice1); [Link](160, 90, 130, 20); [Link]("Quantity"); add(label4); [Link](70, 150, 70, 20); [Link]("Ok"); [Link](new [Link]() { public void actionPerformed([Link] evt) { button1ActionPerformed(evt); } }); add(button1); [Link](160, 180, 60, 24); [Link]("Back"); [Link](new [Link]() { public void actionPerformed([Link] evt) { button2ActionPerformed(evt); } }); add(button2); [Link](230, 180, 43, 24); [Link](new [Link]() { public void itemStateChanged([Link] e vt) { choice2ItemStateChanged(evt); } });
75
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
add(choice2); [Link](160, 120, 130, 20); [Link](new [Link](204, 255, 204)); [Link]("Stock Deleted !"); add(label5); [Link](40, 210, 280, 20); pack(); } pri vate void exitForm([Link] evt) { XYZEnt xyz = new XYZEnt(); [Link](false); [Link](true); } pri vate void button2ActionPerformed([Link] e vt) { XYZEnt xyz = new XYZEnt(); [Link](false); [Link](true); } pri vate void formWindowActivated([Link] evt) { Connection con; Statement stmt; [Link](); try { [Link](new [Link]()); con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); stmt = [Link](); ResultSet rs = [Link]("select CategoryID from Category order by CategoryID"); while ([Link]()) { String s1 = [Link]("CategoryID"); [Link](s1); } [Link](); } catch (SQLException e) { } } pri vate void choice1ItemStateChanged([Link] e vt) { Connection con; Statement stmt; [Link](); try { [Link](new [Link]()); con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); stmt = [Link](); ResultSet rs = [Link]("select subCategoryID from stock where CategoryID ='" + [Link]() + "'"); while ([Link]()) { String s = [Link]("subCategoryID"); [Link](s); [Link](); [Link](); } } catch (SQLException e) { } } private void choice2ItemStateChanged([Link] evt) { Connection con; Statement stmt; try { [Link](new [Link]()); con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); stmt = [Link]();
76
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
ResultSet rs = [Link]("select qty from stock where subCategoryID ='" + [Link]() + "' order by subcategoryid"); while ([Link]()) { String s = [Link]("qty"); te [Link](s + " left"); } [Link](); } catch (SQLException e) { } } pri vate void button1ActionPerformed([Link] e vt) { [Link](); te [Link](""); try { [Link](new [Link]()); Connection con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); Statement stmt = [Link](); String sql1 = ("delete from stock where CategoryID ='" + [Link]() + "' and subcategoryid='" + [Link]() + "'"); int records_updated = [Link](sql1); [Link](true); } catch (SQLException e) { } } public static void main(String args[]) { [Link](new Runnable() { public void run() { new DeleteStock().setVisible(true); } }); } // Variables declaration pri vate [Link] button1; pri vate [Link] button2; pri vate [Link] choice1; pri vate [Link] choice2; pri vate [Link] label1; pri vate [Link] label2; pri vate [Link] label3; pri vate [Link] label4; pri vate [Link] label5; pri vate [Link] xtField textField2; // End of variables declaration }
77
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
[Link]:
This will help to add a new user to be an authorized user. Data will be added to the UserLogin database.
78
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
//[Link] import [Link].*; import [Link].*; public class AddNewUser extends [Link] { public AddNewUser() { initComponents(); centre(); } public void centre() { Dimension screenSize = [Link]().getScreenSize(); int x = (int) ([Link]() / 2 - getWidth() / 2); int y = (int) ([Link]() / 2 - getHeight() / 2); setLocation(x, y); } pri vate void initComponents() { label1 = new [Link](); te xtField1 = new [Link](); te xtField2 = new [Link](); label2 = new [Link](); label3 = new [Link](); button1 = new [Link](); button2 = new [Link](); setAlwaysOnTop(true); setBackground(new [Link](153, 204, 255)); setBounds(new [Link](300, 300, 300, 300)); setIconImages(null); setMinimumSize(new [Link](400, 200)); setResizable(false); setTitle("Adding New User"); addWindowListener(new [Link]() { public void windowClosing([Link] evt) { e xitForm(evt); } }); setLayout(null); [Link](new [Link]("Dialog", 1, 16)); // NOI18N [Link](new [Link](0, 0, 0)); [Link]("Add New User"); add(label1); [Link](150, 40, 110, 25); add(textField1); te [Link](110, 90, 200, 20); add(textField2); te [Link](110, 120, 200, 20); [Link](new [Link]("Dialog", 1, 12)); // NOI18N [Link]("User ID"); add(label2); [Link](30, 90, 60, 20); [Link](new [Link]("Dialog", 1, 12)); // NOI18N [Link]("Password");
79
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
add(label3); [Link](30, 120, 60, 20); [Link]("Save"); add(button1); [Link](200, 150, 50, 24); [Link]("Exit"); [Link](new [Link]() { public void actionPerformed([Link] evt) { button1ActionPerformed(evt); } }); [Link](new [Link]() { public void actionPerformed([Link] evt) { button2ActionPerformed(evt); } }); add(button2); [Link](260, 150, 50, 24); pack(); } pri vate void exitForm([Link] evt) { UserLogin ul = new UserLogin(); [Link](false); [Link](true); } pri vate void button2ActionPerformed([Link] e vt) { XYZEnt ul = new XYZEnt(); [Link](false); [Link](true); } pri vate void button1ActionPerformed([Link] e vt) { try { [Link](new [Link]()); Connection con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); Statement stmt = [Link](); [Link]("Database is online now"); String sql = "insert into userlogin values('" +[Link]() + "','" + [Link]() + "')"; [Link](sql); int records_updated = [Link](sql); [Link](); } catch (SQLException e) { } te [Link](""); te [Link](""); } public static void main(String args[]) { [Link](new Runnable() { public void run() { new AddNewUser().setVisible(true); } }); } // Variables declaration pri vate [Link] button1; pri vate [Link] button2; pri vate [Link] label1; pri vate [Link] label2; pri vate [Link] label3; pri vate [Link] xtField textField1; pri vate [Link] xtField textField2; }
80
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
[Link]:
This form appears in Transaction menu of XYZEnterprise main page which keeps track of the data sold & stores in sales database.
81
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
//[Link] import [Link].*; import [Link].*; public class Sales extends [Link] { static int qoh1, qoh2, qoh3; public Sales() { initComponents(); centre(); } public void centre() { Dimension screenSize = [Link]().getScreenSize(); int x = (int) ([Link]() / 2 - getWidth() / 2); int y = (int) ([Link]() / 2 - getHeight() / 2); setLocation(x, y); } pri vate void initComponents() { label1 = new [Link](); label2 = new [Link](); label3 = new [Link](); button1 = new [Link](); button2 = new [Link](); button3 = new [Link](); te xtField1 = new [Link](); te xtField2 = new [Link](); label4 = new [Link](); label5 = new [Link](); choice1 = new [Link](); choice2 = new [Link](); checkbox1 = new [Link](); choice3 = new [Link](); label6 = new [Link](); label7 = new [Link](); choice4 = new [Link](); te xtField3 = new [Link](); label8 = new [Link](); label9 = new [Link](); label10 = new [Link](); te xtField4 = new [Link](); te xtField5 = new [Link](); checkbox2 = new [Link](); choice5 = new [Link](); choice6 = new [Link]();
82
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
te xtField6 = new [Link](); te xtField7 = new [Link](); te xtField8 = new [Link](); checkbox3 = new [Link](); choice7 = new [Link](); choice8 = new [Link](); te xtField9 = new [Link](); te xtField10 = new [Link](); te xtField11 = new [Link](); label11 = new [Link](); choice11 = new [Link](); label12 = new [Link](); label13 = new [Link](); setBackground(new [Link](153, 204, 255)); setMinimumSize(new [Link](550, 440)); setResizable(false); setTitle("Sales Entry"); addWindowListener(new [Link]() { public void windowActivated([Link].e [Link] evt) { formWindowActivated(evt); } public void windowClosing([Link] evt) { e xitForm(evt); } }); setLayout(null); [Link]("Sale Date"); add(label1); [Link](40, 80, 60, 20); [Link]("Bill No."); add(label2); [Link](40, 130, 43, 20); [Link](new [Link]("Dialog", 0, 14)); [Link]("Retailer Information"); add(label3); [Link](250, 90, 140, 23); [Link](false); [Link]("Ok"); [Link](new [Link]() { public void actionPerformed([Link] evt) { button1ActionPerformed(evt); } }); add(button1); [Link](310, 350, 50, 24); [Link]("Refresh"); [Link](new [Link]() { public void actionPerformed([Link] evt) { button2ActionPerformed(evt); } }); add(button2); [Link](370, 350, 60, 24); [Link]("Back"); [Link](new [Link]() { public void actionPerformed([Link] evt) {
83
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
button3ActionPerformed(evt); } }); add(button3); [Link](440, 350, 43, 24); te [Link](false); add(textField1); te [Link](40, 100, 110, 20); add(textField2); te [Link](40, 150, 110, 20); [Link](" Name"); add(label4); [Link](180, 150, 41, 20); [Link]("Address"); add(label5); [Link](180, 180, 50, 20); add(choice1); [Link](250, 150, 190, 20); add(choice2); [Link](250, 180, 190, 20); [Link](new [Link]() { public void itemStateChanged([Link] e vt) { checkbox1ItemStateChanged(evt); } }); [Link](new [Link]() { public void caretPositionChanged([Link] e vt) { } public void inputMethodTextChanged([Link] odEvent e vt) { checkbox1InputMethodTe xtChanged(evt); } }); [Link](new [Link]() { public void propertyChange([Link] evt) { checkbox1PropertyChange(evt); } }); add(checkbox1); [Link](30, 240, 30, 20); [Link](false); [Link](new [Link]() { public void itemStateChanged([Link] e vt) { choice3ItemStateChanged(evt); } }); [Link](new [Link]() { public void caretPositionChanged([Link] e vt) { choice3CaretPositionChanged(evt); } public void inputMethodTextChanged([Link] e vt) { } }); add(choice3); [Link](80, 240, 70, 20); [Link]("Catg."); add(label6); [Link](100, 220, 33, 20);
84
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
[Link](""); // NOI18N [Link]("Sub-Catg."); add(label7); [Link](180, 220, 60, 20); [Link](false); [Link](new [Link]() { public void itemStateChanged([Link] e vt) { choice4ItemStateChanged(evt); } }); add(choice4); [Link](160, 240, 80, 20); te [Link](false); te [Link](new [Link] yAdapter() { public void keyPressed([Link] yEvent evt) { textField3KeyPressed(evt); } }); add(textField3); te [Link](260, 240, 70, 20); [Link]("Qty."); add(label8); [Link](280, 220, 38, 20); [Link]("U/Price"); add(label9); [Link](360, 220, 44, 20); [Link]("Total Amt."); add(label10); [Link](440, 220, 58, 20); te [Link](false); te [Link](new [Link]() { public void actionPerformed([Link] evt) { textField4ActionPerformed(evt); } }); add(textField4); te [Link](350, 240, 60, 20); te [Link](false); te [Link](false); te [Link](new [Link]() { public void actionPerformed([Link] evt) { textField5ActionPerformed(evt); } }); add(textField5); te [Link](430, 240, 70, 20); [Link](new [Link]() { public void itemStateChanged([Link] e vt) { checkbox2ItemStateChanged(evt); } }); add(checkbox2); [Link](30, 270, 30, 20);
85
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
[Link](false); [Link](new [Link]() { public void itemStateChanged([Link] e vt) { choice5ItemStateChanged(evt); } }); add(choice5); [Link](80, 270, 70, 20); [Link](false); [Link](new [Link]() { public void itemStateChanged([Link] e vt) { choice6ItemStateChanged(evt); } }); add(choice6); [Link](160, 270, 80, 20); te [Link](false); te [Link](new [Link] yAdapter() { public void keyPressed([Link] yEvent evt) { textField6KeyPressed(evt); } }); add(textField6); te [Link](260, 270, 70, 20); te [Link](false); te [Link](new [Link]() { public void actionPerformed([Link] evt) { textField7ActionPerformed(evt); } }); add(textField7); te [Link](350, 270, 60, 20); te [Link](false); te [Link](false); add(textField8); te [Link](430, 270, 70, 20); [Link](new [Link]() { public void itemStateChanged([Link] e vt) { checkbox3ItemStateChanged(evt); } }); add(checkbox3); [Link](30, 300, 30, 20); [Link](false); [Link](new [Link]() { public void itemStateChanged([Link] e vt) { choice7ItemStateChanged(evt); } }); add(choice7); [Link](80, 300, 70, 20); [Link](false); [Link](new [Link]() {
86
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
public void itemStateChanged([Link] e vt) { choice8ItemStateChanged(evt); } }); add(choice8); [Link](160, 300, 80, 20); te [Link](false); te [Link](new [Link] yAdapter() { public void keyPressed([Link] yEvent evt) { textField9KeyPressed(evt); } }); add(textField9); te [Link](260, 300, 70, 20); te [Link](false); te [Link](new [Link]() { public void actionPerformed([Link] evt) { textField10ActionPerformed(evt); } }); add(textField10); te [Link](350, 300, 60, 20); te [Link](false); te [Link](false); add(textField11); te [Link](430, 300, 70, 20); [Link]("ID"); add(label11); [Link](180, 120, 45, 20); add(choice11); [Link](250, 120, 60, 20); [Link](new [Link]("Dialog", 1, 18)); [Link]("Sales"); add(label12); [Link](240, 40, 60, 28); add(label13); [Link](50, 350, 240, 20); pack(); } pri vate void exitForm([Link] evt) { XYZEnt xyz = new XYZEnt(); [Link](true); [Link](false); } pri vate void checkbox1ItemStateChanged([Link] e vt) { boolean b = [Link](); if (b) { [Link](b); Connection con; Statement stmt; try { Dri [Link](new [Link]()); con = Dri [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); stmt = [Link]();
87
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
ResultSet rs = [Link]("select CategoryID from Category order by CategoryID"); while ([Link]()) { String s1 = [Link]("CategoryID"); [Link](s1); } } catch (SQLException e) { } } else { [Link](false); [Link](false); te [Link](false); te [Link](false); te [Link](false); [Link](false); } } pri vate void textField4ActionPerformed([Link] e vt) { te [Link](true); [Link](true); te [Link]([Link]([Link]([Link]()) * [Link]([Link]()))); } pri vate void textField5ActionPerformed([Link] e vt) { } pri vate void checkbox1PropertyChange([Link] evt) { } pri vate void button3ActionPerformed([Link] e vt) { XYZEnt xyz = new XYZEnt(); [Link](false); [Link](true); } pri vate void formWindowActivated([Link] evt) { te [Link]([Link]()); Connection con; Statement stmt; [Link](); try { [Link](new [Link]()); con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); stmt = [Link](); ResultSet rs = [Link]("select retailername from retailermaster order by retailername"); while ([Link]()) { String s = [Link]("retailername"); [Link](s); } [Link](); rs = [Link]("select retaileraddress from retailermaster order by retaileraddress"); while ([Link]()) { String s1 = [Link]("retaileraddress"); [Link](s1); } [Link](); rs = [Link]("select retailerid from retailermaster order by retailerid"); while ([Link]()) { String s2 = [Link]("retailerid"); [Link](s2); } } catch (SQLException e) { } } pri vate void checkbox1InputMethodTextChanged([Link] e vt) { } pri vate void choice3CaretPositionChanged([Link] e vt) { } pri vate void choice3ItemStateChanged([Link] e vt) { [Link](true);
88
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
[Link](); Connection con; Statement stmt; try { [Link](new [Link]()); con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); stmt = [Link](); ResultSet rs = [Link]("select SUbCategoryID from stock where CategoryID ='" + [Link]() + "'"); while ([Link]()) { String s = [Link]("SUbCategoryID"); [Link](s); } [Link](); } catch (SQLException e) { } } pri vate void choice4ItemStateChanged([Link] e vt) { te [Link](true); try { [Link](new [Link]()); Connection con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); Statement stmt = [Link](); ResultSet rs = [Link]("select qty from stock where categoryid='" + [Link]() + "' and subcategoryid='" + [Link]() + "'"); [Link](); qoh1 = [Link](1); [Link]("You have " + qoh1 + " units left"); [Link](); [Link](); } catch (SQLException e) { } } pri vate void checkbox2ItemStateChanged([Link] e vt) { boolean b = [Link](); if (b) { [Link](true); Connection con; Statement stmt; try { Dri [Link](new [Link]()); con = Dri [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); stmt = [Link](); ResultSet rs = [Link]("select CategoryID from Category order by CategoryID"); while ([Link]()) { String s1 = [Link]("CategoryID"); [Link](s1); } } catch (SQLException e) { } } else { [Link](false); [Link](false); te [Link](false); te [Link](false); te [Link](false); [Link](false); } } pri vate void choice5ItemStateChanged([Link] e vt) { [Link](true); Connection con; Statement stmt;
89
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
try { [Link](new [Link]()); con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); stmt = [Link](); ResultSet rs = [Link]("select SUbCategoryID from Subcategory where CategoryID ='" + [Link]() + "' order by SUbCategoryID"); while ([Link]()) { String s = [Link]("SUbCategoryID"); [Link](s); } [Link](); } catch (SQLException e) { } } pri vate void checkbox3ItemStateChanged([Link] e vt) { boolean b = [Link](); if (b) { [Link](true); Connection con; Statement stmt; try { Dri [Link](new [Link]()); con = Dri [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); stmt = [Link](); ResultSet rs = [Link]("select CategoryID from Category order by CategoryID"); while ([Link]()) { String s1 = [Link]("CategoryID"); [Link](s1); } } catch (SQLException e) { } } else { [Link](false); [Link](false); te [Link](false); te [Link](false); te [Link](false); [Link](false); } } pri vate void choice7ItemStateChanged([Link] e vt) { [Link](true); Connection con; Statement stmt; try { [Link](new [Link]()); con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger") ; stmt = [Link](); ResultSet rs = [Link]("select SUbCategoryID from Subcategory where CategoryID ='" + [Link]() + "' order by SUbCategoryID"); while ([Link]()) { String s = [Link]("SUbCategoryID"); [Link](s); } [Link](); } catch (SQLException e) { } } pri vate void choice6ItemStateChanged([Link] e vt) { te [Link](true); }
90
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
pri vate void textField7ActionPerformed([Link] e vt) { te [Link](true); [Link](true); te [Link]([Link]([Link]([Link]()) * [Link]([Link]()))); } pri vate void choice8ItemStateChanged([Link] e vt) { te [Link](true); } pri vate void textField10ActionPerformed([Link] evt) { te [Link](true); [Link](true); te [Link]([Link]([Link]([Link]()) * [Link]([Link]()))); } pri vate void textField9KeyPressed([Link] yEvent evt) { te [Link](true); } private void te xtField6KeyPressed([Link] e vt) { te [Link](true); } pri vate void textField3KeyPressed([Link] yEvent evt) { te [Link](true); } pri vate void button2ActionPerformed([Link] e vt) { [Link](false); [Link](false); [Link](false); [Link](false); [Link](false); [Link](false); [Link](false); [Link](false); [Link](false); te [Link](false); te [Link](false); te [Link](false); te [Link](false); te [Link](false); te [Link](false); te [Link](null); te [Link](null); te [Link](null); te [Link](null); te [Link](null); te [Link](null); te [Link](null); te [Link](null); te [Link](null); [Link](false); } pri vate void button1ActionPerformed([Link] e vt) { boolean b2 = [Link](); boolean b3 = [Link](); if ([Link]() == true) { try { Dri [Link](new [Link]()); Connection con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); Statement stmt = [Link](); String sql = "insert into sales(billno,bill_date,retailerID,categoryid,subcategoryid,qty_sold,unit_price) values('" + [Link]() + "','" + [Link]() + "','" + [Link] m() + "','" + [Link]() + "','" + [Link]() + "','" + te [Link]() + "','" + te [Link]() + "')";
91
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
int records_updated = [Link](sql); records_updated = [Link]("update stock set qty=" + (qoh1 - [Link]([Link]())) + " where categoryid='" + [Link]() + "' and subcategoryid='" + [Link]() + "'"); [Link](); } catch (SQLException e) { [Link](e); } } if (b2) { try { Dri [Link](new [Link]()); Connection con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); Statement stmt = [Link](); String sql = "insert into sales" + "(billno,bill_date,retailerID,categoryid,subcategoryid,qty_sold,unit_price)" + "values('" + [Link]() + "','" + [Link]() + "','" + [Link]() + "','" + [Link]() + "','" + [Link]() + "','" + te [Link]() + "','" + te [Link]() + "')"; int records_updated = [Link](sql); [Link](); } catch (SQLException e) { [Link](e); } } if (b3) { try { Dri [Link](new [Link]()); Connection con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); Statement stmt = [Link](); String sql = "insert into sales(billno,bill_date,retailerID,categoryid,subcategoryid,qty_sold,unit_price) values('" + [Link]() + "','" + [Link]() + "','" + [Link]() + "','" + [Link]() + "','" + [Link]() + "','" + te [Link]() + "','" + te [Link]() + "')"; int records_updated = [Link](sql); [Link](); } catch (SQLException e) { } } } public static void main(String args[]) { [Link](new Runnable() { public void run() { new Sales().setVisible(true); } }); } // Variables declaration pri vate [Link] button1; pri vate [Link] button2; pri vate [Link] button3; pri vate [Link] checkbox1; pri vate [Link] checkbox2; pri vate [Link] checkbox3; pri vate [Link] choice1; pri vate [Link] choice11; pri vate [Link] choice2; pri vate [Link] choice3; pri vate [Link] choice4; pri vate [Link] choice5; pri vate [Link] choice6; pri vate [Link] choice7;
92
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
pri vate [Link] choice8; pri vate [Link] label1; pri vate [Link] label10; pri vate [Link] label11; pri vate [Link] label12; pri vate [Link] label13; pri vate [Link] label2; pri vate [Link] label3; pri vate [Link] label4; pri vate [Link] label5; pri vate [Link] label6; pri vate [Link] label7; pri vate [Link] label8; pri vate [Link] label9; pri vate [Link] xtField textField1; pri vate [Link] xtField textField10; pri vate [Link] xtField textField11; pri vate [Link] xtField textField2; pri vate [Link] xtField textField3; pri vate [Link] xtField textField4; pri vate [Link] xtField textField5; pri vate [Link] xtField textField6; pri vate [Link] xtField textField7; pri vate [Link] xtField textField8; pri vate [Link] xtField textField9; // End of variables declaration }
93
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
[Link]:
This form is in Transaction menu of XYZEnterprise main page which keeps information about returned product.
94
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
//[Link] import [Link].*; import [Link].*; public class DamagedReturn extends [Link] { public DamagedReturn() { initComponents(); centre(); } public void centre() { Dimension screenSize = [Link]().getScreenSize(); int x = (int) ([Link]() / 2 - getWidth() / 2); int y = (int) ([Link]() / 2 - getHeight() / 2); setLocation(x, y); } private void initComponents() { label1 = new [Link](); label2 = new [Link](); label3 = new [Link](); label4 = new [Link](); label5 = new [Link](); te xtArea1 = new [Link] xtArea(); button1 = new [Link](); button2 = new [Link](); button3 = new [Link](); te xtField4 = new [Link](); te xtField5 = new [Link](); label6 = new [Link](); choice1 = new [Link](); label7 = new [Link](); choice2 = new [Link](); choice3 = new [Link](); setAlwaysOnTop(true); setBackground(new [Link](153, 204, 255)); setMinimumSize(new [Link](600, 400)); setResizable(false); setTitle("Damaged Stock Return"); addWindowListener(new [Link]() { public void windowActivated([Link].e [Link] evt) { formWindowActivated(evt); } public void windowClosing([Link] evt) { e xitForm(evt); } }); setLayout(null); [Link]("Bill No.");
95
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
add(label1); [Link](60, 90, 43, 20); [Link]("Return Date"); add(label2); [Link](270, 140, 70, 20); [Link]("Category ID"); add(label3); [Link](270, 180, 68, 20); [Link]("Sub-Category"); add(label4); [Link](270, 220, 79, 20); [Link]("Qty. Returned"); add(label5); [Link](270, 260, 80, 20); add(textArea1); te [Link](10, 140, 250, 210); [Link]("Search"); [Link](new [Link]() { public void actionPerformed([Link] evt) { button1ActionPerformed(evt); } }); add(button1); [Link](240, 90, 55, 24); [Link](false); [Link]("Ok"); [Link] tener(new [Link]() { public void actionPerformed([Link] evt) { button2ActionPerformed(evt); } }); add(button2); [Link](430, 300, 50, 24); [Link]("Back"); [Link](new [Link]() { public void actionPerformed([Link] evt) { button3ActionPerformed(evt); } }); add(button3); [Link](490, 300, 43, 24); te [Link](false); te [Link](new [Link] yAdapter() { public void keyPressed([Link] yEvent evt) { textField4KeyPressed(evt); } }); add(textField4); te [Link](380, 260, 170, 20); te [Link](false); te [Link](false); add(textField5); te [Link](380, 140, 170, 20); [Link]("Bill Details"); add(label6);
96
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
[Link](100, 120, 70, 20); add(choice1); [Link](110, 90, 110, 20); [Link](new [Link]("Dialog", 1, 16)); [Link]("Damaged Stock Return"); add(label7); [Link](220, 30, 181, 30); [Link](new [Link]() { public void itemStateChanged([Link] e vt) { choice2ItemStateChanged(evt); } }); add(choice2); [Link](380, 180, 90, 20); add(choice3); [Link](380, 220, 90, 20); pack(); } pri vate void exitForm([Link] evt) { XYZEnt xyz = new XYZEnt(); [Link](true); [Link](false); } pri vate void formWindowActivated([Link] evt) { Connection con; Statement stmt; te [Link]([Link]()); try { [Link](new [Link]()); con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); stmt = [Link](); ResultSet rs = [Link]("select distinct billno from sales order by billno"); while ([Link]()) { String s = [Link]("billno"); [Link](s); } rs = [Link]("select CategoryID from Category order by CategoryID"); while ([Link]()) { String s1 = [Link]("CategoryID"); [Link](s1); } } catch (SQLException e) { } } pri vate void button1ActionPerformed([Link] e vt) { try { [Link](new [Link]()); Connection con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); Statement stmt = [Link](); ResultSet rs = [Link]("select * from sales where billno ='" + [Link]() + "'"); [Link](); te [Link](""); te [Link]("Bill no: " + [Link]("billno") + "\n" + "Bill Date: " + [Link]("bill_date")); [Link](true); } catch (SQLException e) { } } private void choice2ItemStateChanged([Link] e vt) { Connection con; Statement stmt; try {
97
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
[Link](new [Link]()); con = [Link]("jdbc:oracle:thin:@localhost:1521:o rcl", "scott", "tiger"); stmt = [Link](); ResultSet rs = [Link]("select SUbCategoryID from Subcategory where CategoryID ='" + [Link]() + "' order by SUbCategoryID"); while ([Link]()) { String s = [Link]("SUbCategoryID"); [Link](s); } [Link](); } catch (SQLException e) { } } pri vate void button3ActionPerformed([Link] e vt) { XYZEnt xyze = new XYZEnt(); [Link](false); [Link](true); } pri vate void button2ActionPerformed([Link] e vt) { try { [Link](new [Link]()); Connection con = [Link]("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); Statement stmt = [Link](); String sql = "insert into DamagedReturn(return_date,Against_Bill_no,categoryid,subcategory,qty_returned)values('" +textFiel [Link]() + "','" + [Link]() + "','" + [Link]() + "','" + [Link]() + "','" + [Link]() + "')"; [Link](sql); int records_updated = [Link](sql); [Link](); } catch (SQLException e) { } } pri vate void textField4KeyPressed([Link] yEvent evt) { [Link](true); } public static void main(String args[]) { [Link](new Runnable() { public void run() { new DamagedReturn().setVisible(true); } }); } // Variables declaration pri vate [Link] button1; pri vate [Link] button2; pri vate [Link] button3; pri vate [Link] choice1; pri vate [Link] choice2; pri vate [Link] choice3; pri vate [Link] label1; pri vate [Link] label2; pri vate [Link] label3; pri vate [Link] label4; pri vate [Link] label5; pri vate [Link] label6; pri vate [Link] label7; pri vate [Link] xtArea te xtArea1; pri vate [Link] xtField textField4; pri vate [Link] xtField textField5; // End of variables declaration }
98
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
[Link]:
This part of Sales helps user to know about the software in details. This is represents the over all steps which are to be done through this software. This is used to show about the project,project coordinator and development team name.
[Link]:
[Link]:
99
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
//[Link] import [Link].*; public class HelpContents extends [Link] { public HelpContents() { initComponents(); centre(); } public void centre() { Dimension screenSize = [Link]().getScreenSize(); int x = (int) ([Link]() / 2 - getWidth() / 2); int y = (int) ([Link]() / 2 - getHeight() / 2); setLocation(x, y); } pri vate void initComponents() { te xtArea1 = new [Link] xtArea(); label1 = new [Link](); setAlwaysOnTop(true); setBackground(new [Link](153, 204, 255)); setBounds(new [Link](0, 0, 0, 0)); setMinimumSize(new [Link](470, 320)); setResizable(false); setTitle("Help Contents"); addWindowListener(new [Link]() { public void windowClosing([Link] evt) { e xitForm(evt); } }); setLayout(null); te [Link](new [Link](204, 255, 255)); te [Link](false); te [Link](new [Link]("Dialog", 0, 13)); // NOI18N te [Link](" This \"Stock Management & Inventory Control System \" is prepared with\n some basic options that is needed in any transaction. It checks for proper \n user ID to Login into th [Link] can also add a new user after successful \n [Link] can also add Creditor,Distributor,Retailer details to the database,\n It can also keep track on the transactions i.e. sales & returns of damage\n stocks.\n\t\tThe system keeps track of the items purchased as \n well as sold by a trading company. This includes various master mainten-\n ance modules, including inventory management and transaction entry.\n Various reports are also generated to aid the management in its decision \n making process. "); add(textArea1); te [Link](10, 80, 440, 200); [Link](new [Link]("Dialog", 1, 16)); [Link]("Help Contents"); add(label1);
100
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
[Link](160, 50, 110, 20); pack(); } pri vate void exitForm([Link] evt) { XYZEnt xyz = new XYZEnt(); [Link](true); [Link](false); } public static void main(String args[]) { [Link](new Runnable() { public void run() { new HelpContents().setVisible(true); } }); } // Variables declaration pri vate [Link] label1; pri vate [Link] xtArea te xtArea1; // End of variables declaration }
Start Page
//[Link] import [Link].*; public class HelpStartPage extends [Link] { public HelpStartPage() { initComponents(); centre(); } public void centre() { Dimension screenSize = [Link]().getScreenSize(); int x = (int) ([Link]() / 2 - getWidth() / 2); int y = (int) ([Link]() / 2 - getHeight() / 2); setLocation(x, y);
101
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
} pri vate void initComponents() { te xtArea1 = new [Link] xtArea(); setBackground(new [Link](153, 204, 255)); setMinimumSize(new [Link](525, 600)); setResizable(false); setTitle("Start Page"); addWindowListener(new [Link]() { public void windowActivated([Link].e [Link] evt) { formWindowActivated(evt); } public void windowClosing([Link] evt) { e xitForm(evt); } }); setLayout(null); te [Link](new [Link](204, 255, 255)); te [Link](new [Link]("Arial", 0, 12)); // NOI18N add(textArea1); te [Link](30, 40, 472, 550); pack(); } pri vate void exitForm([Link] evt) { XYZEnt xyz = new XYZEnt(); [Link](true); [Link](false); } pri vate void formWindowActivated([Link] evt) { te [Link](false); te [Link]("This \"Sales Monitoring and Inventory Controlling System \" would require a\nUSER ID & PASSWORD " + "to connect to the " + "\n\"Sales Monitoring and Inventory Controlling System\" Main Menu." + "\n________________________________________________________________ \nAfter the successfull insertion of " + "USER ID & PASSWORD\nit will be in the \"Sales Monitoring and Inventory Controlling System \" Main Menu." + "\n________________________________________________________________ \nOn the \"Sales Monitoring and Inventory Controlling System \" " + "Main Menu a\nEND-USER is provided with a MENU BAR." + "\n________________________________________________________________ \nFrom the Menu Bar " + "named \" Master Maintenence\" user will find a lot of options to \n" + "do different jobs. The menu Master Maintenence Have the given MenuItem & Sub-\nMenu Item." + " Their Jobs Are As Follows :--\n" + "\nCreditorMaster :\t\t To Add or Delete Creditor to Creditor database." + "\nRetailerMaster :\t\t To Add or Delete Retailer to Retailer database." + "\nDisributorMaster :\t To Add od Delete Distributor to Distrobutor database." + "\n________________________________________________________________ \n" + "From the MenuItem named \"Item Group Master Maintenence\"" + "\nthe user will find another four Sub-Menu Items, these are as follows :\n" + "\n Add New Category :\t To Add a new Category to Category database." + "\nDelete Category : \t To Delete an Exis ting Category from category database." + "\n Add new Sub-Category :\t To Add a new Sub-Category to Sub-Category database." + "\nDelete Sub-Category :\t To Delete an Existing Sub-Category from Sub-Category \n\t\t\t database." + "\n_______________________________________________________________ \n" + "From the MenuItem named \" Stock Master Maintenence \" " + "the user will get two Sub-\nmenu Items, they are :--\n" + "Add Stock :\t\t To Add an item's CategoryId,Sub-categoryId, " + "quantity,\n\t\t\t price & purchase date to stock database" + "\nDelete Stock :\t\t To Delete An Existing entire stockItem from " + "stock-\n\t\t\t database" + " \n_______________________________________________________________\n" +
102
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
"\n The MenuItem \"User Maintenence\" the authorised users can add a new user" + "\n\t\t\t or remove an existing user." + "\n________________________________________________________________ \n\n" + "The last option of Master maintenence can help an user to EXIT from main window" + "\n\t\t\tby clicking on the \"Exit\" menuItem.\n" + "\n________________________________________________________________" + "\n________________________________________________________________ \n" + "Here the Menu named \"Transactions\" helps to :--\n" + "Sales :\t\t\t To sale an item with the proper tracking report kept on\n" + "\t\t\t \"sales\" database." + "\n________________________________________________________________ \n" + "Damaged Stock Return :\t \"sales Monitoring & Inventory Controling System \"kept\n" + "\t\t\t the records of damaged items for better transaction.\n" + "\n________________________________________________________________ \n" + ""); } public static void main(String args[]) { [Link](new Runnable() { public void run() { new HelpStartPage().setVisible(true); } }); } // Variables declaration pri vate [Link] xtArea te xtArea1; // End of variables declaration }
About
//[Link] import [Link].*; public class HelpAbout extends [Link] { public HelpAbout() { initComponents(); centre(); } public void centre() { Dimension screenSize = [Link]().getScreenSize(); int x = (int) ([Link]() / 2 - getWidth() / 2); int y = (int) ([Link]() / 2 - getHeight() / 2); setLocation(x, y); } pri vate void initComponents() { te xtArea1 = new [Link] xtArea();
103
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
label1 = new [Link](); setBackground(new [Link](153, 204, 255)); setMinimumSize(new [Link](400, 400)); setResizable(false); setTitle("About"); addWindowListener(new [Link]() { public void windowActivated([Link].e [Link] evt) { formWindowActivated(evt); } public void windowClosing([Link] evt) { e xitForm(evt); } }); setLayout(null); te [Link](new [Link](204, 255, 255)); te [Link](false); te [Link](new [Link]("Lucida Fax", 0, 12)); te [Link](" Application Details :-\n\t\t\t The system keeps track of the items \n purchased as well as sold by a trading company. This includes \n various master maintenance modules, including inventory man-\n agement and transaction entry. Various reports are also gene-\n rated to aid the management in its decision-making process. \n\n About this project development:-\n\t\t\tThis \"Sales Monitoring and Inventory \n Controling System \" project has been developed as the Minor - \n Project by the Students Of George College (Group H). \n\t\t\tWe are thankfull to George College \n for providing us such an opportunity where we get to know about\n many of the practical circumstances taking places in the IT indust-\n ries rapidly now a days!\n\n Group H-\n [Link] Ghosh\t\t(Team Leader & Coder)\n [Link] Thakur \t\t\t(Deputy Team Leader & Coder)\n [Link] Majumder\t\t(Maintainer & Designer)\n [Link] Buxi\t\t\t(Tester & Designer) \n [Link] Ghosh\t\t(Data Manipulatior)\n \n Project Developed Under-\n\n [Link] Kr. Bhattacharjee . without his kind help this project\n would never be done."); add(textArea1); te [Link](10, 40, 385, 300); [Link](new [Link]("Dialog", 1, 14)); [Link]("Help About"); add(label1); [Link](160, 10, 170, 20); pack(); } pri vate void exitForm([Link] evt) { XYZEnt xyz = new XYZEnt(); [Link](true); [Link](false); } pri vate void formWindowActivated([Link] evt) { te [Link](" Application Details :-" + "\n\t\t\t The system keeps track of the \n" + "items purchased as well as sold by a trading company.\n" + " This includes various master maintenance modules, \n " + "including inventory management and transaction entry.\n" + " Various reports are also generated to aid the management in its \n" + "decision-making process. " + "\n\n About this project development:-\n" + "\t\t\tThis \"Sales Monitoring and \nInventory Controling System \" project has been " + "developed \n as the Minor Project by the Students Of George College \n(Group H). " + "\n\t\t\tWe are thankfull to George College \nfor providing us such an " + "opportunity where we get to know \nabout many of the practical" + " circumstances taking places \nin the IT industries rapidly" + " now a days!\n\nGroup H-\[Link] Ghosh\t\t(Team Leader & Coder)\n2." + "Bipru Thakur \t\t\t(Deputy Team Leader & Coder)\[Link] Majumder\t\t" + "(Maintainer & Documentation)\[Link] Buxi\t\t\t(Tester & Designer)" + "\[Link] Ghosh\t\t(Tester)\[Link] Chakraborty\t\t(Designer)" + "\n\nProject Developed Under-\n\n" + "Our respectable principle [Link] Kr. Bhattacharjee . without his " + "kind help this \nproject would never be done."); }
104
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
public static void main(String args[]) { [Link](new Runnable() { public void run() { new HelpAbout().setVisible(true); } }); } // Variables declaration pri vate [Link] label1; pri vate [Link] xtArea te xtArea1; // End of variables declaration }
105
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
8.0
Testing:Introduction:
Testing is approved of executing a program w ith the explicit intention of finding error, i.e. making the program fail. Testing is a complex processes. In order to make this processes simpler, the testing are broken into smaller activities.
Techniques:
Testing means the processes of analy zing the softw are item to detect the different between existing or required condition and evaluate the features of the software item. Through testing of the system before release of the software needs to be done to vide the various test case and modes so that the software becomes devoid of bugs uses minimum space requirement as w ell as minimum time to perform. The test cases were selected before hand with expected result defined and actual result recorded for comparison. The selection of test cases is done vide White Box Testing techniques to check internal programming logic and effic iency vide Black Box Testing techniques to check softw are requirement fulfillment w ith intention of finding maximum number of errors with minimum effort of time. Although test case are design by considering the cyclomatic complexity, conditional test, still the software code is not in its optional form, as all other possible alternative parts in the software are not consider. At the integration level, software to the third party tests, which further enhance the software optimality and efficiency.
Test Data Implementation and Their Resolution:
The quality and standardization of the software package dependent truly on the version predefined testing norms and on the performance of the software over the norms. There are various standard exis ting in the software industry the engineering and product end product strives to achieve. ISO 9002, SEI, CMM, Level 5 etc. these standard are achieve only when the concern software fulfils the test as per as the respectiv e testing norms predefined in them vide the various test cases and parameter using the CASE tool.
The follow ing flow graph methodology was used while testing the software:
Here each circle represents one or more non-branching procedural language or source code Statement in flow graph. While performing condition testing, domain-testing methodology was selected. While performing loop testing, simple loops concatenated loops, nes ted and unstructured loops were tested thoroughly.
Test Characters:
A A A A good test has a probability of finding an error. good test is not redundant. good test should be best of breed. good test should be neither too simple nor too complex.
106
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
Black Box Testing:
A Black Box Test examines some fundamental aspect of a system w ith little regard for the internal logical structure of the software. Black Box Testing is used to find the errors in the follow ing categories Incorrect or missing function Interface error Error in data structure/external database access Memory access error Initializing and termination error
White Box Testing:
White Box Testing of software is predic ated on close examination of procedural detail. White Box Testing is used to find the error in the follow ing Categories Ensure that all independent parts w ithin the module have been exercis ed at least once. Exercise all logical decisions on their true and fals e side. Exercise all loops at their boundaries and within operational bound. Exercise internal data structure to ensure their validity.
8.2
Test Plan:-
Testing means the processes of analyzing software item to detect the difference betw een the exis ting and required permission and to evaluate of the software item. Once test plan and the test case are completely designed, different of testing starts.
Unit Te sting:
The unit testing is performed to test the validity to the individual units. This is done in the coding phase w ith the interactive testing maintain uniformity throughout the screen. screen. Specific Test: This testing is done on the functional part of the object in the General Testing: This testing is performed on the interface design to
Integration testing:
to the desired benchmarked. When the integration test phase is stared the interface between the modules are tested. System Testing: It incorporates the performance stress testing so as to meet the product criteria w ith respect Recovery Test: It test the response of the system to the presence of the faults, or loss of power, devic es, services, data, etc. the system is subjected to the loss of the mentioned resources in order to check if the system recover satisfactory. Security Test: It is carried out to ensure the security of the SRS document and prevent unauthorized access. Stress Test: It is know n as endurance testing. It evaluates system performance when it is stressed for short period of time. Perform ance Test: It is carried out to check whether the system meets the nonfunctional requirement identified in the SRS document. Test case Generation: provides with an outright failure or whether some of the expected result of the test were actually observed.
Validation Testing:
Tests were performed to find conformity with the requirement. Plans and procedure were designed to ensure that all functional requirements are satisfied. Alpha Test: The alpha test is conducted at the developer site by a customer under the control of the developer. Beta Test: In Beta testing the developer system is to be tested by the user or customer for whom the system is developed.
8.3
Test Log:Testing Phase Component Function to be tested Checked w hether the method returns the expected value Checked w hether all the method are running properly Checked the w hole system is working according to the user requirement Scheduled 17th November, 2009 19th November, 2009 Actual Date 17th November, 2009 19th November, 2009 Comment Properly Working
Integrated Testing
Properly Working
System Testing
20th November, 2009
22th November, 2009
Properly Working
107
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
9.0
User Manual:-
USER :
A user will not able to log into the system without any ID & PASSWORD. User have to turn the system off properly otherwise bad data or sudden crash may occur to the system. No keyboard shortcuts are provided.
Frequently Asked questions (FAQ):
Q. RECORD NOT S AVED? A. YOU MAY HAVE TO ENTE R DE TA ILS AS BEFORE CLICK ING ADD BUTTON.
Q. IT IS NOT ACCEPTI NG ME AS A US ER? A. YOU MAY HAVE FORGOTTE N THE ID & PASSWORD. YOU ARE ENTE RING INVA LID OR INCORRECT PASSWORD O R YOU MAY CHECK ON THE CAPS LOCK B UTTON TO BE OFF OF THE KEYBOARD. OR ASK THE SYSTEM USER FOR ID & PASSWORD.
108
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
Conclusion
Todays world is running with a great speed and concept of existence is most important everywhere. In this great struggle of keeping existence, the whole society is in the glorious proceeding just getting COMPUTERIZATION as the only tool. Computerization with its newer and newer solution, has given the modern of great success and victory.
Computerization is a new vision, new challenge to modern world. It is a tools to develop and prosper to a decide level in terms of efficiency and productivity.
Computerization makes the whole business process faster, simple and easy to operate. Now any type of queries and transaction can be done within a fraction of second. There are a lot of scope for modification, cancelling and structured way on maintaining stock management. This process will save lot of time, give satisfaction, ensure effective management and lastly high security. So we have the confidence that the project Stock management and inventory control system will give the complete satisfaction to user as well as to the enterprise.
109
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
Bibliography
Books referred: Herbert Schildt JAVA 2 complete reference. Website Referred: Wikipedia and Google search on java,jdbc for some help and reference.
110
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
SIGNATURE
This is to certify that the project entitled Stock management and Inventory Control System has been prepared according to the regulation of degree of Bachelor in Computer Application (BCA) under West Bengal University of Technology (WBUT). The project is being submitted by student of BCA 3rd year 1st semester, George College (Affiliated to WBUT) have fulfilled the requirement for submission of this project. 1. 2. 3. 4. 5. 6. Subhamoy Ghosh (PL) Bipru Thakur (DPL) Sujoy Majumder Nisanta Buxi Debmalya Ghosh Kallol Chakraborty
The whole procedure has been carried out under my supervision. I have gone through the project & have seen that it is fulfilling the requirement of minor project under WBUT.
Approved By: Date:
Dr. Nirmalya Bhattacharya
______________________________________ (Principal and Project -In-Charge)
111
STOCK MANAGEMENT AND INVENTORY CONTROL SYSTEM
Project Report:
Prepared by Subhamoy Ghosh(Project Leader)
Student Name Subhamoy Ghosh Bipru Thakur Sujoy Majumder Nisanta Buxi Kallol Chakraborty Debmalya Ghosh Work Done Coding Coding Documentation Testing Maintenance Testing Work Done Work done successfully Work done successfully Work done successfully Work done successfully Work done successfully Work done successfully
______________________________________
Signature of Group Leader
112