Documente Academic
Documente Profesional
Documente Cultură
By
GUIDE
External Examiner
Internal Examiner
Mr. Shashikant Dubey Adminstrator Annamalai University Computer Training Centre (AICTU) , New Delhi
ACKNOWLEDGEMENT
It is with real pleasure that, I record my indebtedness to my project Guide, Sh. Mayapati, Sr. Faculty, Annamalai University Computer Training Centre, Delhi for his counsel and guidance during the preparation of this dissertation. I am grateful to the Director, the Controller of Examination, Annamalai University, Annamalainagar, Sh. Shashikant Dubey, Administrator, Sh. Dharmpal Sr. Faculty, Annamalai University Computer Training Centre, New Delhi for their kind approval and assistance to my topic of project. I wish to record my sincere thanks to my respected Parents my father Sh. Prem Lal Sharma (Retd. Sr. Scientist CFRI, CSIR), mother Mrs. Sushma Sharma, wife Mrs Shraddha Sharma, children Utkarsh and Ankita Sharma for their suggestions and motivation. My thanks are due to Sh. Dharmendra Sharma, Consultant Ramco Systems and staff of Ramco System, New Delhi for allowing me to collect, analyze the concerned data and conduct the personal interviews. I would like to express my sincere thanks to MS. Hemlata and Sh. Alok Gupta PGT (Computer) Kendriya Vidyalaya along with the innumerable people who have helped me in implementing this project. New
Signature of the student Place: New Delhi Date: Rajesh Sharma Enrolment Number - 1360700704
3
DECLARATION
I hereby declare that the project entitled Purchase Order System submitted for the award of the Degree of Post Graduate Diploma in Computer application (PGDCA) is my original work and the project has not formed the basis for the award of any degree, diploma, associate-ship, fellowship or similar other titles. It has not been submitted to any other University or Institution for the award of any degree or diploma.
Signature of the student Place: New Delhi Date: / / Rajesh Sharma Enrolment Number - 1360700704
Certified that the project Purchase Order System is a record of project work done by Mr. Rajesh Sharma during the period of his study under my guidance, and that the project has not previously formed the basis for the award of any degree, diploma, associateship, fellowship or similar other titles and that it is an independent work done by him. This project is really very useful to automate purchase, customer, sales, employee management and related activities of company very effectively and with ease. It is also cost effective.
Table of Contents
Chapter 1. Contents Preliminaries Description Title Page Bona-fide Certificate Acknowledgement Declaration Certificate Table of contents Criteria/reason to opt problem Languages front end and back end used Objectives of Project Scope regarding different parameters Hardware & Software selected to implement this project Existing System Limitations of existing system Proposed system System study on different parameters Feasibility study Result Software Engineering Paradigm applied Data Flow Diagrams Project Coding Input/Output Form Design Screen Design System testing & debugging Various research methods applied Result/Findings of the project Future Scope of proposed project
6
2. 3. 4. 5. 6. 7.
Introduction and selection of problems Language used Objectives Scope and relevance of the study Software and Hardware requirement specifications System Study of Purchase Order System
8. 9.
26-28 29-67
68-69 70-71 72 73
14.
Bibliographical References
that keep company adaptable in every aspect from business practices and to organizational structures, project management, service distribution, and manufacturing. On the basis of above facts in mind I decided to opt problem Purchase order System and to computerize the same. This is one of the areas where most of the companies deals with and require its automation. Automation makes it easy to save lots of time and more importantly it is economical. Purchase Order System enables companies to automate its every operation regarding products of company and enables to generate reports. Transactions enable to automate its sales and purchase.
Chapter 4 Objectives
The objective of the Purchase Order System is to maintain the entire management of purchase of the company. The system objective is to study the whole system of purchase management and analysis of the problem and current requirement that will be accurately taken care by the proposed purchase system. Objectives also include care of employee, customer, product, vendor, reports generations related to purchase activities of the company. The Purchase Order System takes care of management of purchase of company as the heads given below: Firm Administration Employee Management Customer Management Product Purchase Management Product sales Management
10
11
In addition to these features the proposed project is having the following functionalities: Customer related maintenance Customer data maintenance Items information system Updating the items details Insertion of new item in stock List out current status No need of physical calculations
12
Hardware and Operating System used: Proposed system supports Windows NT, Windows XP for its better performance and networking. Processor: Pentium III and above, 450 MHz. Memory: 96 MB RAM, 8 GB Hard Disc 1.44 FDD Software Purchase Order System makes use of Visual Basic 6.0 as front-end and MS-Access as back-end.
13
Visual Basic 6.0 is an ideal, event-driven programming. It is the easiest and fastest way to create applications for Microsoft Windows. Visual Basic provides a complete set of tools to simplify rapid application development. The Visual part in Visual Basic refers to the method used to create the Graphical User Interface (GUI). Rather than writing numerous lines of code to describe the appearance and location of interface elements, one can add pre-built objects into place on screen. The Basic part refers to the BASIC (Basic All-Purpose Symbolic Instruction Code) language, a language used by more programmers than any other language in the history of computing. Visual Basic has evolved from the original BASIC language and now contains several hundred statements, functions, and keywords, many of which relate directly to the Windows GUI.
14
Create your own ActiveX Controls (Professional and Enterprise Edition) Wizards (All Editions) Application Wizard, Set up Wizard, ActiveX Control Wizard, ActiveX Document Migration Wizard, Data Form Wizard, Property Page Wizard. The Set up Wizard has been enhanced to support distribution via the Internet; the installation of remote server components using Distributed COM (DCOM) and Remote Automation. The Professional Edition also comes with the Wizard Toolbar and the Wizard Manager. Extensibility Model (Professional and Enterprise Edition) Declare, Raise, and Handle Your Own Events Code Editor Enhancements (All Editions) New Client/Server Active Data Object (ADO) Features New Remote Data Object (RDO) Features A number of new data access features have been added to Visual basic for version 6.0. These include extensions to ADO, DAO and RDO object models. In addition, a paradigm that is entirely new to data access has been added- event driven programming.
15
Events can be triggered by the users action, by message from the system or other application, or even from the application itself. The working environment in VB is often referred to as the integrated development environment or IDE because it integrates many different functions such as design, editing, compiling and debugging within a common environment. The ReDim statement recognizes the preserve keyword, which forces it to resize the array without discarding the existing data. It has decision making statement such as If..then If..then.else Select..case Looping Statements such as Do while.loop Do loop.while ForNext loop Whilewend Program can be broken in to smaller logical components called procedures. Procedures are divided in to logical units. Dialog boxes are available to display information to the users.
16
MS-Access is opted as a Back-end. Ms-Access is opted primarily because it is simplest and the latest relational database that helps searching and maintenance techniques record. It is capable to store, retrieve and updating of huge data.
MS-Access:
MS Access is a part of Microsoft Office suite. It uses Microsoft Jet database engine. VB a designed application seamlessly connects to Access databases and allows the client to fully exploit the benefits of relational databases running into a few MBs. A DBMS is an application that enables one to maintain data in a database. One of the most popular database management systems is Microsoft Access. Access can store and manipulate large amount of information. An access database consists of tables, queries, forms, reports, pages, macros and modules. The database components are also called database
17
objects. These components are used to store, query and view data. Access is a multi-user DBMS, which means that many users can access data simultaneously from the same database. More than 250 users can simultaneously access data from an Access database. Importing and exporting external files: In Access one can import data from or export data to other database software. Built-in functions: Access includes small programs known as functions that perform simple calculations or data formatting. Built in Security: Security features to handle multiple users are also built.
18
On the basis of system study I can find out the following: Feasibility of proposed system. List of problems in existing system List of requirement through proposed system User ability to handle the proposed system. What kind of platform of project The structure of help that will be provided to end user Kind of training needed to user Total expense in project development
Existing system
The existing system has a lot of manual headache on the company officials and whole employee involved in operations. So it is needed to convert the manual system in to automate one. The proposed system is an effort to make the existing system automate.
19
The system objective is to study the whole system of Purchase Order as in case of present one and analysis of the problem and current requirement that will be accurately taken care by the proposed system. The objective of the system includes taking care of the entire management of the Purchase Order System ranging from customer to products and entire sale purchase management. Slow process Time taking Difficult to retrieve information Difficult to analyze the related data More staff More paper work
Proposed system
The automation of Purchase Order System will help a company to provide timely access and implementation of master tables comprising product, customer, employee, vendor details, improve data collection, effective transactions in terms of sales and purchase management and effective reports generation regarding purchase and sales report and supports data driven decision-making. I build this Purchase Order
20
System in a RDBMS that maintains records on Customer and Product on regular basis. The project would help to keep an eye on the data of each customer and supplier status. The application is also capable of raising invoices, maintaining sales of items and provides statistical information on a range of items, which can be displayed as a number of reports. With the help of this project the administrative function has full control over all data in the system. All Customer data can be entered in the system at the time of transaction. The customer either retrieved from old data or in case of new Customer then should be fresh entry of Customer details. Data in the system can be edited from various menu options present in the system. Item, in various formats, can be displayed and printed from the menu. The company can add and edit the record and generate many different reports. The goal of the application is to create a low cast program that will not break a company budget. This help in saving time and improving the overall efficiency of the company and profit. Including with all above features the proposed system is having the following functionality: System security
21
Customer record maintenance Customer data maintenance Item information system Up-dating of the items rate. Insertion of new items in stock List out the purchase and sales made No need of physical calculations. Employee Record maintenance Employee records can be maintained through supplying their ID, Employee name, Address, Designation, Salary Employee date of Join and phone number. Customer Record maintenance Customer records are maintained through customer ID, Customer Name, Customer address, Customer e-mail and phone number.
Product Sales
22
Proposed system effectively maintains the product sales with the help of Bill Number, Product ID, Customer ID, Bill Date, Price, and Quantity.
Firm administration
Overall firm administration of Purchase order system is maintained through the following fields: Master Tables (Product, Customer, Employee, Vendor details) Transactions (Sales , Purchase) Report (Purchase and sales report)
purchase and its maintenance, this reduces a lot of employee. Previous system required more employees to maintain the same. Technical feasibility of this project The proposed system will be very beneficial in terms of technical because there is no chance for error since it avoids any external calculation of purchase and sales as these all are provided by the system itself. Technically, we can say that the project is excellent due to various analyzed methods used to design the software. On the point of database design the keys are defined on the tables in a manner that the fields can be retrieved very quickly. The indexing method has also been implemented in very practical way. Hence overall we can say that the project is technically feasible. Legal feasibility of this project: The designed system is completely feasible with respect to legal code and conducts. It is sharply analyzed and found that it is sound to qualify for legal feasibility. Time feasibility of this project Since the project has been prepared within the time limit so it is completely feasible with respect to time. Management and operation feasibility of this project
24
Among the proposed many system it is accepted by the management. To implement this project no change in the current organizational structure is required. Specific training to the concerned staff is also not required due to its very user friendly environment. Because of the proposed system is user friendly and less complex the system becomes highly feasible in operation.
The changes on user acceptance For training For implementation For extra forms/reports For all point of views the total cost of the project will be low in comparisons of other projects.
Software requirement specifications to analyze the requirements of proposed system are one of the major sub-stages in any Systems Development Life Cycle (SDLC). Unless we know the requirements of a systems users we can not think of even starting the project. To understand the requirements of any system, only its users can specify better. They know what the requirements of their system are, and what the deficiencies are in the present system. To analyse the problem and defining the problem are the steps of initial investigations. In initial investigations facts are found and users requirements are analyses. For designing the forms of the Purchase Order System, I deeply analysed the various requirement in terms of customer, employee, products, customer sales and purchase.
27
This kind of task distribution is known as modularization of project. Each project should be divided in modules and sub-modules. This is done after system analysis and study after knowing this all input and output. After achieving all the sub modules we set the priority of each module. Then set the input and output of the sub modules. For tracking all the sub modules we should follow a predefined strategy or technique. There are several types of software development strategy known as Software Development Life Cycle, like Iterative Waterfall Recursive Including with SDLC the Software Engineering having a lot of other things like project maintenance. This project will follow the iterative strategy of project development. This includes the final developed product is updated till user satisfaction.
28
29
to produce model or representation of a system which can be used later to build that system. The produced model is called Design of the system. According to Webster, the process of design involves conceiving and planning out in mind and making a drawing pattern or scratch of. In software design there are three distinct types of activities: External Design Architectural Design Detail Design. Architectural design and detailed design are collectively referred as internal design.
File/Database Design
Data Directory: A data directory is a catalog-a repository- of the elements in a system. These elements cater on the data and the way they are structured to meet user requirements and organization needs. A data directory consists of a list of all the elements composing the data flowing through a system. The major elements are data flows. Data stores, and processes. The data dictionary stores details and descriptions of these elements. The web site manages a huge number of records i.e. maintains a database for the information regarding complaints registered by consumer, records
30
of suggestions made by consumer, records of electricity board, water board and the links, various states names and the city names.
Level
rectangle
represents
the
source
or
destination (sink) of data. A suitable name is specified the source or destination. They are external entities and being are not the part of the system.
2. : - Each process is represented using a circle. A process using process logic. A process takes input form a source or a data source, the data is modified inside the process and the processed data is sent to a sink or a data store.
32
a data store or file. It is Temporarily storage of data, which can be retrieved back when, required. A table or data file is created for each file.
4. : -A curved arc with an arrow indicates the path and direction of data flow. Data can flow in other direction, however it shouldnt overlap. In my project following DFD were prepare for different analysis phase.
Context Diagram: -
33
PO Management
Product details
Vendor details
Vendor
Vendor Management
Vendor History
Product Management
Customer System
Customer Information
Vendor
Product Information
Product
35
Product Supply
Supply Report
Product Master
36
(B)
Customer Transaction s/Annual Sales Product Master
Vendor
37
Option Explicit Public LoginSucceeded As Boolean Private Sub cmdCancel_Click() End End Sub Private Sub cmdOK_Click() check for correct password If txtUserName.Text = ra And txtPassword.Text = ak Then place code to here to pass the success to the calling sub setting a global var is the easiest LoginSucceeded = True Me.Hide MDIForm1.Show Else MsgBox Invalid username or invalid password, try again!, , Login txtPassword.SetFocus End If End Sub
38
Option Explicit Private Sub Form_KeyPress(KeyAscii As Integer) Unload Me End Sub Private Sub Frame1_Click() Unload Me frmLogin.Show End Sub
39
Private Sub about_Click() frmAbout.Show End Sub Private Sub Customer_Click() CustomerDetails.Show End Sub Private Sub Employee_Click() EmployeeDetails.Show End Sub Private Sub Exit_Click() End End Sub Private Sub MDIForm_Load() End Sub
40
Private Sub mnupr_Click() Load DataReport2 DataReport2.Visible = True End Sub Private Sub mnusr_Click() Load DataReport1 DataReport1.Visible = True End Sub Private Sub product_Click() ProductDetails.Show End Sub Private Sub Purchase_Click() ProductPurchase.Show End Sub Private Sub Sales_Click() ProductSales.Show End Sub Private Sub vendor_Click() VendorDetails.Show End Sub
41
Dim status As String Dim db As ADODB.Connection Dim rs As ADODB.Recordset Function chk_data() As Boolean If txtCustomerid.Text = Then MsgBox Customer Id is Required, vbOKOnly, Blank Customer ID txtCustomerid.SetFocus chk_data = False ElseIf txtCustomername.Text = Then MsgBox Customer Name is Required, vbOKOnly, Blank Customer Name txtCustomername.SetFocus chk_data = False ElseIf txtCustomeraddress.Text = Then
42
MsgBox Customer Address is Required, vbOKOnly, Blank Customer Address txtCustomeraddress.SetFocus chk_data = False ElseIf txtCustomeremail.Text = Then MsgBox Enter (None) for [no] E-Mail Address is Required, vbOKOnly, Blank E-Mail Address txtCustomeremail.SetFocus chk_data = False ElseIf txtCustomerphone.Text = Then MsgBox Enter (None) for [no] Phone No. is Required, vbOKOnly, Blank Customer Phone No. txtCustomerphone.SetFocus chk_data = False Else chk_data = True End If End Function Function Put_Data() rs!customer_id = txtCustomerid.Text rs!CustomerName = txtCustomername.Text rs!CustomerAddress = txtCustomeraddress.Text rs!Customeremail = txtCustomeremail.Text rs!Customerphone = txtCustomerphone.Text End Function Function Get_Data() txtCustomerid.Text = rs!customer_id txtCustomername.Text = rs!CustomerName txtCustomeraddress.Text = rs!CustomerAddress txtCustomeremail.Text = rs!Customeremail txtCustomerphone.Text = rs!Customerphone End Function Function MyBlank() txtCustomerid.Text = C000 & Val(Right$(rs!customer_id, 4)) + 1 txtCustomername.Text = txtCustomeraddress.Text = txtCustomeremail.Text = txtCustomerphone.Text = End Function Private Sub Command1_Click()
43
rs.MoveFirst Call Get_Data End Sub Private Sub Command2_Click() rs.MovePrevious If rs.BOF = True Then rs.MoveFirst Call Get_Data End Sub Private Sub Command3_Click() rs.MoveNext If rs.EOF = True Then rs.MoveLast Call Get_Data End Sub Private Sub Command4_Click() rs.MoveLast Call Get_Data End Sub Private Sub Command5_Click() rs.MoveLast Call MyBlank txtCustomername.SetFocus status = New End Sub Private Sub Command6_Click() If status = New Then rs.AddNew End If If chk_data = True Then Call Put_Data rs.Update End If End Sub Private Sub Command7_Click() rs.Delete rs.MoveNext If rs.EOF Then rs.MoveLast Call Get_Data End Sub Private Sub Command8_Click()
44
Unload Me End Sub Private Sub Form_Load() Set db = New ADODB.Connection Set rs = New ADODB.Recordset db.Open Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\company.mdb;Persist Security Info=False rs.CursorType = adOpenStatic rs.CursorLocation = adUseClient rs.CursorType = adOpenKeyset rs.LockType = adLockOptimistic rs.LockType = adLockPessimistic rs.Open Customer, db, , , adCmdTable Call Get_Data End Sub
45
Dim status As String Dim db As ADODB.Connection Dim rs As ADODB.Recordset Function chk_data() As Boolean If txtempid.Text = Then MsgBox Employee Id is Required, vbOKOnly, Blank Employee ID txtempid.SetFocus chk_data = False ElseIf txtempname.Text = Then MsgBox Employee Name is Required, vbOKOnly, Blank Employee Name txtempname.SetFocus chk_data = False ElseIf txtempaddress.Text = Then
46
MsgBox Employee Address is Required, vbOKOnly, Blank Employee Address txtempaddress.SetFocus chk_data = False ElseIf txtempdesi = Then MsgBox Employee Designation is Required, vbOKOnly, Blank Employee Designation txtempdesi.SetFocus chk_data = False ElseIf txtempsalary.Text = Then MsgBox Employee Salary is Required, vbOKOnly, Blank Employee Salary txtemp.SetFocus chk_data = False ElseIf txtempdoj.Text = Then MsgBox Employee Date of Join is Required, vbOKOnly, Employee Date of Join txtempdoj.SetFocus chk_data = False ElseIf txtempphone.Text = Then MsgBox Enter (None) for Employee Phone , vbOKOnly, Blank Employee Phone txtempphone.SetFocus chk_data = False Else chk_data = True End If End Function Function Put_Data() rs!emp_id = txtempid.Text rs!Name = txtempname.Text rs!Address = txtempaddress.Text rs!designation = txtempdesi.Text rs!salary = txtempsalary.Text rs!in_date = txtempdoj.Text rs!phone = txtempphone.Text End Function Function Get_Data() txtempid.Text = rs!emp_id txtempname.Text = rs!Name
47
txtempaddress.Text = rs!Address txtempdesi = rs!designation txtempsalary.Text = rs!salary txtempdoj.Text = rs!in_date txtempphone.Text = rs!phone End Function Function MyBlank() txtempid.Text = E000 & rs.RecordCount + 1 txtempname.Text = txtempaddress.Text = txtempdesi = txtempsalary.Text = txtempdoj.Text = txtempphone.Text = End Function Private Sub Command1_Click() rs.MoveFirst Call Get_Data End Sub Private Sub Command2_Click() rs.MovePrevious If rs.BOF = True Then rs.MoveFirst Call Get_Data End Sub Private Sub Command3_Click() rs.MoveNext If rs.EOF = True Then rs.MoveLast Call Get_Data End Sub Private Sub Command4_Click() rs.MoveLast Call Get_Data End Sub Private Sub Command5_Click() rs.MoveLast Call MyBlank txtempname.SetFocus status = New End Sub Private Sub Command6_Click()
48
If status = New Then rs.AddNew End If If chk_data = True Then Call Put_Data rs.Update End If End Sub Private Sub Command7_Click() rs.Delete rs.MoveNext If rs.EOF Then rs.MoveLast Call Get_Data End Sub Private Sub Command8_Click() Unload Me End Sub Private Sub Form_Load() Set db = New ADODB.Connection Set rs = New ADODB.Recordset db.Open Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\company.mdb;Persist Security Info=False rs.CursorType = adOpenStatic rs.CursorLocation = adUseClient rs.CursorType = adOpenKeyset rs.LockType = adLockOptimistic rs.LockType = adLockPessimistic rs.Open employee, db, , , adCmdTable Call Get_Data End Sub
49
Dim status As String Dim db As ADODB.Connection Dim rs As ADODB.Recordset Function chk_data() As Boolean If txtproductid.Text = Then MsgBox Product Id is Required, vbOKOnly, Blank Product ID txtproductid.SetFocus chk_data = False ElseIf txtproductvendorid.Text = Then MsgBox Vendor ID is Required, vbOKOnly, Blank Vendor ID txtproductvendorid.SetFocus chk_data = False ElseIf txtproductname.Text = Then MsgBox Product Name is Required, vbOKOnly, Blank Product Name txtproductname.SetFocus chk_data = False
50
ElseIf txtproductprice.Text = Then MsgBox Product Price is Required, vbOKOnly, Blank Product Price txtproductprice.SetFocus chk_data = False ElseIf txtproductsize.Text = Then MsgBox Product Size is Required, vbOKOnly, Blank Product Size txtproductsize.SetFocus chk_data = False ElseIf txtproductweight.Text = Then MsgBox Product weight is Required, vbOKOnly, Blank Product weight txtproductweight.SetFocus chk_data = False ElseIf txtproductqty.Text = Then MsgBox Product qty is Required, vbOKOnly, Blank Product qty txtproductqty.SetFocus chk_data = False Else txtproductid.SetFocus chk_data = True End If End Function Function Put_Data() rs!Prod_id = Trim(txtproductid.Text) rs!pvendorid = Trim(txtproductvendorid.Text) rs!Name = Trim(txtproductname.Text) rs!price = txtproductprice.Text rs(Size) = Trim(txtproductsize.Text) rs!Weight = txtproductweight.Text rs!qty = txtproductqty.Text End Function Function Get_Data() txtproductid.Text = rs!Prod_id txtproductvendorid.Text = rs!pvendorid txtproductname.Text = rs!Name txtproductprice.Text = rs!price txtproductsize.Text = rs(Size) txtproductweight.Text = rs!Weight txtproductqty.Text = rs!qty
51
End Function Function MyBlank() txtproductid.Text = P000 & rs.RecordCount + 1 txtproductvendorid.Text = txtproductname.Text = txtproductprice.Text = txtproductsize.Text = txtproductweight.Text = txtproductqty.Text = End Function Private Sub Command1_Click() rs.MoveFirst Call Get_Data End Sub Private Sub Command2_Click() rs.MovePrevious If rs.BOF = True Then rs.MoveFirst Call Get_Data End Sub Private Sub Command3_Click() rs.MoveNext If rs.EOF = True Then rs.MoveLast Call Get_Data End Sub Private Sub Command4_Click() rs.MoveLast Call Get_Data End Sub Private Sub Command5_Click() rs.MoveLast Call MyBlank txtproductname.SetFocus status = New End Sub Private Sub Command6_Click() If status = New Then rs.AddNew End If If chk_data = True Then Call Put_Data
52
rs.Update End If End Sub Private Sub Command7_Click() rs.Delete rs.MoveNext If rs.EOF Then rs.MoveLast Call Get_Data End Sub Private Sub Command8_Click() Unload Me End Sub Private Sub Form_Load() Set db = New ADODB.Connection Set rs = New ADODB.Recordset db.Open Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\company.mdb;Persist Security Info=False rs.CursorType = adOpenStatic rs.CursorLocation = adUseClient rs.CursorType = adOpenKeyset rs.LockType = adLockOptimistic rs.LockType = adLockPessimistic rs.Open product, db, , , adCmdTable Call Get_Data End Sub
53
Dim status As String Dim db As ADODB.Connection Dim rs As ADODB.Recordset Function chk_data() As Boolean If txtvendorid.Text = Then MsgBox Vendor Id is Required, vbOKOnly, Blank Vendor ID txtvendorid.SetFocus chk_data = False ElseIf txtvendorname.Text = Then MsgBox Company Name is Required, vbOKOnly, Blank Company Name txtvendorname.SetFocus chk_data = False ElseIf txtvendoraddress.Text = Then MsgBox Company Address is Required, vbOKOnly, Blank Company Address
54
txtvendoraddress.SetFocus chk_data = False ElseIf txtcontectperson = Then MsgBox Contect Person Name is Required, vbOKOnly, Blank Contect Person Name txtcontectperson.SetFocus chk_data = False ElseIf txtvendoremail.Text = Then MsgBox Enter (None) for [no] E-Mail Address is Required, vbOKOnly, Blank E-Mail Address txtvendoremail.SetFocus chk_data = False ElseIf txtcompanyage.Text = Then MsgBox Company Age is Required, vbOKOnly, Blank Company Age txtcompanyage.SetFocus chk_data = False ElseIf txtvendorphone.Text = Then MsgBox Enter (None) for [no] Phone No. is Required, vbOKOnly, Blank Vendor Phone No. txtvendorphone.SetFocus chk_data = False Else chk_data = True End If End Function Function Put_Data() rs!vendor_id = txtvendorid.Text rs!CompanyName = txtvendorname.Text rs!Address = txtvendoraddress.Text rs!contectperson = txtcontectperson.Text rs!email = txtvendoremail.Text rs!age = txtcompanyage.Text rs!phone = txtvendorphone.Text End Function Function Get_Data() txtvendorid.Text = rs!vendor_id txtvendorname.Text = rs!CompanyName txtvendoraddress.Text = rs!Address txtcontectperson = rs!contectperson
55
txtvendoremail.Text = rs!email txtcompanyage.Text = rs!age txtvendorphone.Text = rs!phone End Function Function MyBlank() txtvendorid.Text = V000 & rs.RecordCount + 1 txtvendorname.Text = txtvendoraddress.Text = txtcontectperson = txtvendoremail.Text = txtcompanyage.Text = txtvendorphone.Text = End Function Private Sub Command1_Click() rs.MoveFirst Call Get_Data End Sub Private Sub Command2_Click() rs.MovePrevious If rs.BOF = True Then rs.MoveFirst Call Get_Data End Sub Private Sub Command3_Click() rs.MoveNext If rs.EOF = True Then rs.MoveLast Call Get_Data End Sub Private Sub Command4_Click() rs.MoveLast Call Get_Data End Sub Private Sub Command5_Click() rs.MoveLast Call MyBlank txtvendorname.SetFocus status = New End Sub Private Sub Command6_Click() If status = New Then rs.AddNew
56
End If If chk_data = True Then Call Put_Data rs.Update End If End Sub Private Sub Command7_Click() rs.Delete rs.MoveNext If rs.EOF Then rs.MoveLast Call Get_Data End Sub Private Sub Command8_Click() Unload Me End Sub Private Sub Form_Load() Set db = New ADODB.Connection Set rs = New ADODB.Recordset db.Open Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\company.mdb;Persist Security Info=False rs.CursorType = adOpenStatic rs.CursorLocation = adUseClient rs.CursorType = adOpenKeyset rs.LockType = adLockOptimistic rs.LockType = adLockPessimistic rs.Open vendor, db, , , adCmdTable Call Get_Data End Sub
57
Dim ConnectionString As String Dim status As String Dim db As ADODB.Connection Dim rs As ADODB.Recordset Private Sub Command8_Click() Unload Me End Sub Private Sub DataCombo1_Click(Area As Integer) ConnectionString = Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\company.mdb;Uid=;Pwd= Adodc2.RecordSource = select * from vendor where Dealsin= & DataCombo1.Text & ; Adodc2.ConnectionString = ConnectionString
58
Adodc2.Refresh Adodc2.Caption = Products Adodc2.Visible = False Set DataCombo2.RowSource = Adodc2 DataCombo2.DataField = Vendor_id DataCombo2.BoundColumn = Vendor_id DataCombo2.ListField = Vendor_id Adodc4.RecordSource = SELECT * FROM PRODUCT WHERE PROD_ID= & DataCombo1.Text & Adodc4.ConnectionString = ConnectionString Adodc4.Refresh Adodc4.Caption = Products Adodc4.Visible = False End Sub Private Sub DataCombo2_Click(Area As Integer) Adodc3.RecordSource = select * from vendor where vendor_id= & DataCombo2.Text & Adodc3.ConnectionString = ConnectionString Adodc3.Refresh Adodc3.Caption = Products Adodc3.Visible = False End Sub Private Sub Form_Load() ConnectionString = Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\company.mdb;Uid=;Pwd= Adodc1.RecordSource = SELECT * FROM product Adodc1.ConnectionString = ConnectionString Adodc1.Refresh Adodc1.Caption = Products Adodc1.Visible = False Adodc2.RecordSource = select * from vendor where Dealsin= & DataCombo1.Text & ; Adodc2.ConnectionString = ConnectionString Adodc2.Refresh
59
Adodc2.Caption = Products Adodc2.Visible = False Adodc3.RecordSource = select * from vendor where vendor_id= & DataCombo2.Text & Adodc3.ConnectionString = ConnectionString Adodc3.Refresh Adodc3.Caption = Products Adodc3.Visible = False Adodc4.RecordSource = SELECT * FROM PRODUCT WHERE PROD_ID= & DataCombo1.Text & Adodc4.ConnectionString = ConnectionString Adodc4.Refresh Adodc4.Caption = Products Adodc4.Visible = False Set DataCombo1.RowSource = Adodc1 DataCombo1.DataField = prod_ID DataCombo1.BoundColumn = prod_ID DataCombo1.ListField = prod_ID Set DataCombo2.RowSource = Adodc2 DataCombo2.DataField = Vendor_id DataCombo2.BoundColumn = Vendor_id DataCombo2.ListField = Vendor_id Set db = New ADODB.Connection Set rs = New ADODB.Recordset db.Open Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\company.mdb;Persist Security Info=False rs.CursorType = adOpenStatic rs.CursorLocation = adUseClient rs.CursorType = adOpenKeyset rs.LockType = adLockOptimistic rs.LockType = adLockPessimistic rs.Open productpurchase, db, , , adCmdTable Call Get_Data
60
End Sub Function chk_data() As Boolean If Text1.Text = Then MsgBox PO Number is Required, vbOKOnly, Blank PO Number Text1.SetFocus chk_data = False ElseIf DataCombo1.Text = Then MsgBox Product ID is Required, vbOKOnly, Blank Product ID DataCombo1.SetFocus chk_data = False ElseIf DataCombo2.Text = Then MsgBox Vendor ID is Required, vbOKOnly, Blank Vendor ID DataCombo2.SetFocus chk_data = False ElseIf Text8.Text = Then MsgBox Date of Product Price, vbOKOnly, Blank Product Price Text8.SetFocus chk_data = False ElseIf Text7.Text = Then MsgBox Date of Purchase is Required, vbOKOnly, Blank Date of Purchase Text7.SetFocus chk_data = False ElseIf Text9.Text = Then MsgBox Product Quantity is Required, vbOKOnly, Blank Product Quantity Text9.SetFocus chk_data = False Else chk_data = True End If End Function Function Get_Data() Text1.Text = rs!ponumber DataCombo1.Text = rs!product_id DataCombo2.Text = rs!vendor_id Text8.Text = rs!price Text7.Text = rs!dateofpurchase
61
Text9.Text = rs!qty End Function Function Put_Data() rs!ponumber = Text1.Text rs!product_id = DataCombo1.Text rs!vendor_id = DataCombo2.Text rs!price = Text8.Text rs!dateofpurchase = Text7.Text rs!qty = Text9.Text End Function Function MyBlank() Text1.Text = Text7.Text = Text8.Text = Text9.Text = End Function Private Sub Command1_Click() rs.MoveFirst Call Get_Data End Sub Private Sub Command2_Click() rs.MovePrevious If rs.BOF = True Then rs.MoveFirst Call Get_Data End Sub Private Sub Command3_Click() rs.MoveNext If rs.EOF = True Then rs.MoveLast Call Get_Data End Sub Private Sub Command4_Click() rs.MoveLast Call Get_Data End Sub Private Sub Command5_Click() rs.MoveLast Call MyBlank DataCombo1.SetFocus status = New End Sub
62
Private Sub Command6_Click() 8 If status = New Then rs.AddNew End If If chk_data = True Then Call Put_Data rs.Update End If Adodc4.RecordSource = SELECT PROD_ID, PRICE,QTY FROM PRODUCT WHERE PROD_ID= & TXT.Text & Adodc4.ConnectionString = ConnectionString Adodc4.Refresh Dim X As Integer X = Adodc4.Recordset!qty Adodc4.Recordset!qty = X Val(Text9.Text) Adodc4.Recordset!price = Val(Text8.Text) Adodc4.Recordset.Update End Sub Private Sub Command7_Click() rs.Delete rs.MoveNext If rs.EOF Then rs.MoveLast Call Get_Data End Sub
63
Dim ConnectionString As String Dim status As String Dim db As ADODB.Connection Dim rs As ADODB.Recordset Private Sub Command8_Click() Load DataReport2 DataReport2.Visible = True End Sub Private Sub Command9_Click() Unload Me End Sub
64
Private Sub Form_Load() ConnectionString = Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\company.mdb;Uid=;Pwd= Adodc1.RecordSource = SELECT Prod_ID FROM product Adodc1.ConnectionString = ConnectionString Adodc1.Refresh Adodc1.Caption = Products Adodc1.Visible = False Adodc2.RecordSource = SELECT Customer_ID FROM Customer Adodc2.ConnectionString = ConnectionString Adodc2.Refresh Adodc2.Caption = Customers Adodc2.Visible = False Adodc4.RecordSource = SELECT PROD_ID, PRICE,QTY FROM PRODUCT WHERE PROD_ID= & txtproductid.Text & Adodc4.ConnectionString = ConnectionString Adodc4.Refresh Set txtproductid.RowSource = Adodc1 txtproductid.DataField = prod_ID txtproductid.BoundColumn = prod_ID txtproductid.ListField = prod_ID Set txtcustomerid.RowSource = Adodc2 txtcustomerid.DataField = Customer_ID txtcustomerid.BoundColumn = Customer_ID txtcustomerid.ListField = Customer_ID Adodc1.Recordset.MoveFirst Adodc2.Recordset.MoveFirst Set db = New ADODB.Connection Set rs = New ADODB.Recordset
65
db.Open Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\company.mdb;Persist Security Info=False rs.CursorType = adOpenStatic rs.CursorLocation = adUseClient rs.CursorType = adOpenKeyset rs.LockType = adLockOptimistic rs.LockType = adLockPessimistic rs.Open productSales, db, , , adCmdTable Call Get_Data End Sub Function chk_data() As Boolean If txtBillNo.Text = Then MsgBox Bill No is Required, vbOKOnly, Blank Bill No txtBillNo.SetFocus chk_data = False ElseIf txtproductid.Text = Then MsgBox Product ID is Required, vbOKOnly, Blank Product ID txtproductid.SetFocus chk_data = False ElseIf txtcustomerid.Text = Then MsgBox Customer ID is Required, vbOKOnly, Blank Customer ID txtcustomerid.SetFocus chk_data = False ElseIf txtPrice.Text = Then MsgBox Product Price is Required, vbOKOnly, Blank Product Price txtPrice.SetFocus chk_data = False ElseIf txtBilldate.Text = Then MsgBox Bill Date is Required, vbOKOnly, Blank Bill Date txtBilldate.SetFocus chk_data = False ElseIf txtQty.Text = Then MsgBox Product Quantity is Required, vbOKOnly, Blank Product Quantity txtQty.SetFocus chk_data = False Else
66
chk_data = True End If End Function Function Put_Data() rs!billno = txtBillNo.Text rs!product_id = txtproductid.Text rs!customer_id = txtcustomerid.Text rs!productprice = txtPrice.Text rs!billdate = txtBilldate.Text rs!productqty = txtQty.Text End Function Function Get_Data() txtBillNo.Text = rs!billno txtproductid.Text = rs!product_id txtcustomerid.Text = rs!customer_id txtPrice.Text = rs!productprice txtBilldate.Text = rs!billdate txtQty.Text = rs!productqty End Function Function MyBlank() txtBillNo.Text = B000 & rs.RecordCount + 1 txtproductid.Text = txtcustomerid.Text = txtPrice.Text = txtBilldate.Text = txtQty.Text = End Function Private Sub Command1_Click() rs.MoveFirst Call Get_Data End Sub Private Sub Command2_Click() rs.MovePrevious If rs.BOF = True Then rs.MoveFirst Call Get_Data End Sub Private Sub Command3_Click() rs.MoveNext If rs.EOF = True Then rs.MoveLast Call Get_Data
67
End Sub Private Sub Command4_Click() rs.MoveLast Call Get_Data End Sub Private Sub Command5_Click() rs.MoveLast Call MyBlank txtproductid.SetFocus status = New End Sub Private Sub Command6_Click() If status = New Then rs.AddNew End If If chk_data = True Then Call Put_Data rs.Update End If Adodc4.RecordSource = SELECT PROD_ID, PRICE,QTY FROM PRODUCT WHERE PROD_ID= & txtproductid.Text & Adodc4.ConnectionString = ConnectionString Adodc4.Refresh Dim X As Integer X = Adodc4.Recordset!qty Adodc4.Recordset!qty = X Val(txtQty.Text) Adodc4.Recordset.Update End Sub Private Sub Command7_Click() rs.Delete rs.MoveNext If rs.EOF Then rs.MoveLast Call Get_Data End Sub Private Sub txtproductid_Click(Area As Integer) Adodc4.RecordSource = SELECT PROD_ID, PRICE,QTY FROM PRODUCT WHERE PROD_ID= & txtproductid.Text & Adodc4.ConnectionString = ConnectionString Adodc4.Refresh End Sub
68
Debugging
Debugging is the process of isolating and correcting the causes of known errors. Success of debugging required highly developed problem solving skills.
69
70
71
The data collection is followed by the descriptive analysis on the collected data, which subsequently leads to the finalization of the project. The final report of this project was made on the basis of analyzed data and information collected by the observations and discussions at the time of visiting the concerned authorities. The analyzed data and discussions part is placed in the subsequent chapters. The study was conducted among different department dealing purchase, which reflected the conditions, and environment found in the majority of these activities.
72
Chapter 12 Conclusions
Based upon above all descriptions it can easily be summarized that The Purchase Order System is very useful, handy, more economical for all the small and medium scale companies to handle and automate all their employees, customer, sales and purchase related operations with ease and quite effectively. It saves a lot of useful time of the users which subsequently leads to economy. The coding gets started only after having finalized the study of whole system. This involved interactions among officials dealing with the purchase related activities. This project is easy to handle and use and implement very effectively all the purchase-sales related operations. It takes all the automate care of employee management, customer management, firm login, firm administrative management, product sales, vendor management and most importantly very effective report generations of sales and purchase made.
73
My effective learning through very experienced staff of Annamalai University Computer Training Centre, New Delhi, enables me to complete this project in time and in very effective manner with ease.
future. Hence, the systems scope in future is just not limited as it can be extended in the sense of more information, more functions and more features in the coming future.
Office. PGDCA First Semester. 6. Agrawal, Yogesh and Singh, K.K. Software Engineering. 7. Bruce Eckels. Database Systems 8. Noel Jerke. The complete reference Visual Basic 6.0. Tata McGraw Hill Publishing Co. Ltd., New Delhi, 1999.
75
9. Vine, Michael. Visual Basic Programming for the Absolute Beginner. 10. Kendridya Vidyalaya Sangathan. Computer Literacy Book. Redesigned for KVS by Microsoft India Pvt. Ltd., New Delhi, 2007.
Web References
1. www.microsoft.com/India/Education Project Shiksha-Microsoft
76
77