Professional Documents
Culture Documents
1. INTRODUCTION
Honda motors and auto agencies plays a major role between Honda Auto Pvt Ltd and customers. It brings the vehicle models of Honda up to customers. Honda motors maintains details of customers, products, inquiry, order, issues bills like sales invoices, certificate, receipt, maintains servicing record and issues servicing bills. These all take a lot of time and man power. In order to overcome this difficulties Honda motors need to be computerized. Honda motors have approached us to build software for their auto agency. This agency is running since 10 years. It has yearly turnover of approximately 50 lakh. This agency is authorized dealer of Honda auto Pvt Ltd. This project is the small effort to satisfy the needs of advertisement agency which has overcome the difficulties of estimating and maintenance of cost and details respectively. Finally the advertisement agency has been satisfied with the effort for building the software. Foreword Having come to the final episode of this project, I am trying to get all my acts together towards preparing the documentation for my project, the premier. Documentation in the field of software is not mere a crown jewel rather a paramount important as it is met Murphy into a faculty of science from being that of art. Hope this documentation will go long away in acquaint and maintaining the software successfully during this softwares life cycle as all the relevant information data being put into it with almost call and after a great deal of deliberation. The chapter system design deals with the methodology adopted and includes all the details regarding the data base design, code design, process design any another document which is essential in finding of the design process. The chapter system implementation confined itself in explaining the prose implementation by providing details regarding system testing changing over and user training. User manuals for operating the packages along with the bibliography for further development.
Page 1
1.1 Abstract
Project titled as AUTOMATION OF HONDA SHOW ROOM using VB as front end ORACLE as back end. This project shows how the process of sales and servicing of vehicle in showroom. This project contains forms and reports with one basic MDI FORM which consists of menu bar. This project stores the details of customers and products, accept the orders from the customers that which type of vehicle they wants, bill like sales invoices, certificate and receipt are issued to the customers when they purchase a vehicle, and deals with servicing the vehicles and also issues the service bills to the customer. It provides the following reports: Product report Sales report Daily report Weekly report Order report
Page 2
MCA 3RD SEM Product report Sales report Daily report Weekly report Order report
Page 3
2 .SYSTEM STUDY
2.1 Existing System:
Typically the sequencing process is a combination of manual effort using spread sheets with support from computer based systems which mainly provide data analysis.
These systems can be "hard wired", which makes it difficult to keep pace with the changing business environment. For example, if a new car model is added, then many steps in the process may have to be changed. Or the introduction of a new colour may require extensive reworking of the preferred colour change matrix.
In a manual system it is difficult to consider all the constraints. The focus is on satisfying the higher priority constraints. Ignoring a constraint can lead to increased cost and loss of productivity. Consider the case of a supplier of leather interiors who can ship at most 100 sets per day. If this constraint is ignored then the daily requirement of leather interiors will be uneven which, in turn, will require that a buffer stock is maintained.
The repetitive task of manually sequencing several thousand units can introduce errors. This will also lead to increased costs and loss of productivity.
Each iteration of the sequence requires a significant amount of time - it can take from 1 to 3 days to make 1 sequence. Consequently
o
Schedulers are not able to spend adequate time in communication and management of the sequencing process.
There is usually not enough time to generate different scenarios. A potentially good sequence may be ignored.
Similarly, there will be insufficient flexibility to respond to demand, production or supplier problems.
In conclusion, the competitive business environment and the need for quick response will push the complexity of the sequencing problem beyond the capability of legacy systems.
Page 4
Page 5
Page 6
allowing more freedom to the user and developer, features such as easier comprehension user friendliness faster application. The visual basic programming language is not unique to visual basic. The visual basic programming system application edition included in Microsoft excel, Microsoft access and many others window applications uses the same language, the visual programming system, scripting edition(VB) for web page designing in the internet programming is a subset of visual basic will carry over to other areas. Whether your goal is to create a small utility for yourselves or; your work group, a large enterprise-wide system are even distributed applications spanning the globe via internet, visual basic has the tools you need. Data access features allow you to create databases and front end applications for most popular database formats, including Microsoft SQL server and other enterprise level database. Active TM technologies allow; you to use the functionality provided by other application such as Microsoft word, word processor, Microsoft excel spread sheet, and other windows applications. We can even automate applications and objects created using the professional or enterprise editions of visual basic. Internet capabilities make it easy provide access to documents and applications across the internet from within your applications. Your finished application is a true.exe file that uses runtime dynamic link library (dell) that you can freely distribute. Visual basic editions: Visual basic comes in three flavours: The Visual basic learning edition. The Visual basic professional edition. The Visual basic enterprise edition. The Visual basic learning edition allows programmers to easily create powerful applications for Microsoft windows98 and Windows NT. It includes all intrinsic controls, documentation provided with this edition includes learn VB now. A printed programmers guide, online help, plus visual basic books online. The professional edition provides computer professing with a full featured set of tools for developing solutions for others. It includes all the features of the learning edition, plus addition active controls, including internet controls and crystals report writer. Documentation provided with the professional edition includes the programmers guide, online help, the component tool guide and the crystal reports for visual basic manual. GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 7
Learning the ins and outs of the development environment before you learn visual basic is somewhat like learning the parts of an automobile before you learn to drive; you might have a tendency to skip the terms and jump into the fray. If, however, you take the time to learn some of the development environments more fundamental principles, you will be better able to learn visual basic. You then will be more comfortable within VBs environment and will have a better understanding of the related words when subsequent lessons refer to the windows and tools in the development environment. As you can see from the menu and toolbar, Visual basic looks somewhat like other windows programs on the market. Many of Visual basics menu bar commands wor k just as they do in other applications such as Microsoft word. For example, you can select edit cut and edit paste to cut and paste text from one location to another. These same menu bar commands appear on almost every other windows program on the market today. Standard: The Menu Bar and Toolbar Visual basics menu bar and toolbars work just as you except them to. You can click or press a menu bar options hotkey to see a pull-down list of menu options that provides either commands, another level of menus, or dialog boxes. Many of the menu options have shortcut keys such as ctrl+S for the file save option. When you press an accelerator key, you dont first have to display the menu to access the option. The toolbar provides one-button access to many common menu commands. Instead of selecting edit paste, for example, you could click the pate toolbar button. As with most of todays windows applications, visual basic supports a wide range of toolbars. Select view toolbars to see a list of available toolbars. Each one that is currently showing will appear with a checkmark by its name. Visual Basic Database Basics: Rarely do visual basic programmers use the file-related controls that you see on the toolbar such as the list box control. More often, programmers use the file open and file save dialog boxes you can produce from the common dialog box control. The dialog box gives users the ability to select files and link to other networked computers and files. You must make additional file-related decisions besides which controls to use select files. In additional to the controls you display for the use, you must decide if you want to write file-access routines yourself or use database controls that come with visual basic. The file routines are tedious
Page 8
and old-fashioned and difficult to debug; the database controls are sometimes overkill, especially if you dont use an external database or if your application uses only a small data file. This lesson gives you the best of both worlds. You will learn how to write file-access routines for small file-related data and youll master the database control as well. Even if you dont work with files at the file-access level, the first part of this lesson prepares you for the concepts you need to use the data control. What file terms you need to master When you open and close files How to write to a file How to read from a file When to use the data control What bound controls offer.
MCA 3RD SEM 5. Storage management 6. Space, object and transaction management 7. Backup and recovery manageability 8. Enhance oracle data guard infrastructure
9. Reduce downtime application and database upgrades 10. Business applications Advantages: 1. very lightweight installation kit (~150 MB vs. ~1700 GB for 11gR1) 2. very easy installation 3. not very intrusive, much less memory used compared to 11gR1 4. very recommended for the application development process 5. very recommended as a MySQL replacement 6. same code as paid versions, just with some hard-coded limitations Disadvantages: 1. its not supported by Oracle support 2. it is working on just one processor core, no matter how many you have 3. it will not use more than 1 GB of RAM, no matter how much RAM you have 4. you cannot store more than 4 GB of user data, hard-coded limitation 5. youll not find patches for it 6. not yet a 11g version
SQL: SQL was invented and developed by IBM in early 1970s. SQL stands for structured query language. In order to communicate with database; SQL supports the following categories of command: DDL- create, alter, drop commands DML- insert, select, delete and update commands TCL- commit, save point and rollback commands DCL- grant and revoke commands
Page 10
4.3 Purpose
The aim of the software requirement specification document is to list out the user requirement in an organized manner. It defines all the constraint and software requirements needed to understand this application and documentation. It also has to give the overall design plan. The use should be able to understand the proposed system after going through the SRS document and should be in a position to incorporate some changes if required. Further it should be used as the theme of software design and development.
4.4 Scope
GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 11
Software requirement specification is the only written document that describes the requirements of the system. It is meant for use by developers and will be the basis for validating the final delivered system. Any changes made to the requirements in the future will have to go through a formal change approval process. The developer is responsible for clarification, whatever necessary, and will not make any alternatives without the permission of the client. It allows the user to analyze the future enhancements in the system.
4.5 Technologies
Microsoft-SQL Server: Database that is ORACLE 10g Visual Studio 6.O
This module maintains all that information which belongs to the customers who are retailing with the company. It also takes care about list of customers with their details and to generate pay slips. Purchases Module: This module maintains all the information to manage purchases done in the company. All the purchases are recorded to database and can be viewed as a report that displays all the purchases made by the customers. Sales and Services Module: This module deals with major and crucial part which includes sales of vehicles and services provided to customers. This module provides interface to add/update the sales transactions and also the services provided to customers. Also shows the information of the models available and provide facility to choose their model.
Page 12
Reporting Module: This module used to provide reports like product details report, sales invoice report, receipt report which are required by the higher management. And also to generate dynamic reports like VAT on purchases and VAT on sales application design.
Efficiency: o As the application doesnt require so much of memory it is quite efficient and can be stored easily in minimal amount of disk space.
Usability:
o The interface is user friendly and easy to access and easy to understand for new user as well.
Maintainability:
o Maintaining the application is not tedious as the whole application is based on technologies readily available and very potent.
Flexibility:
o The application is compatible to work in an environment within a intranet resource to work on it.
o Use single application instance and databases for every client. 4.8 Performance Requirement
The System is capable to support all types of environments and supports above interfaces and the performance should be reachable to the end user.
Page 13
Technical feasibility centres on the existing computer system (hardware, software, etc.) and to what extent it can support the proposed addition. It is also technically feasible to provide accuracy, reliability and data security in the computerized management system. The project has to install the hardware that is necessary for working of the developed software project. This will help in improving the present manually operated system.
Page 14
5. SYSTEM DESIGN
5.1 Introduction
System Design is the process of defining the architecture, components, modules, interfaces, and data for a system to satisfy specified requirements. One could see it as the application of systems theory to product development. The purpose of system design is to create technical solution that satisfies functional requirements for the system. At this point in the project lifecycle there should be a Functional Specification, written primarily in business terminology, containing a complete description of the operational needs of the various organizational entities that will use the new system. The challenge is to translate all of this information into Technical Specifications that accurately describe the design of the system, and that can be used as input to System construction.
Page 15
Conception, Initiation, Analysis, Design, Construction, Testing, Production/Implementation,, and Maintenance. The waterfall development model originates in the manufacturing and construction industries; highly structured physical environments in which after-the-fact changes are prohibitively costly, if not impossible. Since no formal software development methodologies existed at the time, this hardwareoriented model was simply adapted for software development. The waterfall model is a popular version of the systems development life cycle model for software engineering. Often considered the classic approach to the systems development life cycle, the waterfall model describes a development method that is linear and sequential. Waterfall development has distinct goals for each phase of development. Imagine a waterfall on the cliff of a steep mountain. Once the water has flowed over the edge of the cliff and has begun its journey down the side of the mountain, it cannot turn back. It is the same with waterfall development. Once a phase of development is completed, the development proceeds to the next phase and there is no turning. The advantage of waterfall development is that it allows for departmentalization and managerial control. A schedule can be set with deadlines for each stage of development and a product can proceed through the development process like a car in a carwash, and theoretically, be delivered on time. Development moves from concept, through design, implementation, testing, installation, troubleshooting, and ends up at operation and maintenance. Each phase of development proceeds in strict order, without any overlapping or iterative steps.
collected and organized into a group of similar data once identified input media are selected for processing.
DFD
Details
Sales
Service
Report
Cstdetails
Or details
Prd details
Saldetails
Salinvoice
Repdetails
Page 17
Page 18
ENTITY-RELATIONSHIP DIAGRAM
VEHICLE Is sold
SALES
VID
VCOLOR
VID
DATE
ETYPE
VTYPE
VNAME
CNAME
MILEAGE VNAME
CEMAIL ID
Page 19
6. SOURCE CODE
Login form: Dim con As ADODB.Connection Dim rs As ADODB.Recordset Private Sub cmdclick_Click () Set rs = New ADODB.Recordset Set con = New ADODB.Connection con.ConnectionString = "Driver= {Microsoft ODBC for Oracle}; Server=mrs-7100f24e6e4; UID=system;PWD=manager" con.Open rs.Open "select PASS from LOGIN where uname ='" & txtun.Text & "'", con, adOpenDynamic, adLockOptimistic If (rs.EOF = True And rs.BOF = True) Then MsgBox "Username not found" txtun.Text = "" txtpwd.Text = "" txtun.SetFocus Else If (rs!pass = txtpwd.Text) Then MDIForm1.Show Unload Me Else MsgBox "Invalid Username and password Plz re-enter it" txtun.Text = "" txtpwd.Text = "" txtun.SetFocus End If GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 20
MCA 3RD SEM End If End Sub Private Sub cmdclick_KeyPress(KeyAscii As Integer) If (txtun.Text = "" Or txtpwd.Text = "") Then
MsgBox "Plz enter Username and password correctly", vbOKOnly, "Honda Messahe" End If End Sub Private Sub Form_Load() Set con = New ADODB.Connection End Sub
MDI form: Private Sub ab_Click() about.Show End Sub Private Sub cdts_Click() form1.Show End Sub Private Sub MDIForm_Load() End Sub Private Sub odts_Click() form3.Show End Sub Private Sub pdts_Click() form2.Show End Sub Private Sub prpt_Click() Set rs = New ADODB.Recordset Set con = New ADODB.Connection con.ConnectionString = "Driver={Oracle in XE};DSN=mrs7100f24e6e4;UID=system;PWD=manager" con.Open DataReport1.Show End Sub Private Sub rcpt_Click() form6.Show GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 21
MCA 3RD SEM End Sub Private Sub rrpt_Click() DataReport3.Show End Sub Private Sub sbl_Click() form8.Show End Sub Private Sub sbrpt_Click() DataReport4.Show End Sub Private Sub sdts_Click() form4.Show End Sub Private Sub siv_Click() form5.Show End Sub Private Sub sivrpt_Click() DataReport2.Show End Sub Private Sub srd_Click() form7.Show End Sub
Customer details: Dim con As New ADODB.Connection Dim rs As New ADODB.Recordset Dim rs1 As New ADODB.Recordset Dim rs2 As New ADODB.Recordset Dim rs3 As New ADODB.Recordset Dim rs5 As New ADODB.Recordset Dim n As Integer Private Sub cmdadd_Click() Set rs1 = New ADODB.Recordset Set rs5 = New ADODB.Recordset Dim n As Integer rs5.Open "select max(cid) from CUSTABLE", con, adOpenKeyset, adLockOptimistic GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 22
MCA 3RD SEM If (rs.RecordCount = 0) Then Text1.Text = 1 Else Text1.Text = rs5.Fields(0) + 1 End If If Text1.Text = "" Then MsgBox ("Plz enter the cid number") Text1.SetFocus ElseIf Text2.Text = "" Then MsgBox "Plz enter customer name" Text2.SetFocus ElseIf Text3.Text = "" Then MsgBox "Plz enter customer Address" Text3.SetFocus ElseIf Text4.Text = "" Then MsgBox "Plz enter customer Phoneno" Text4.SetFocus ElseIf Text5.Text = "" Then MsgBox "Plz enter customer Email-id" Text5.SetFocus ElseIf Text6.Text = "" Then MsgBox "Plz enter name of the vehicle purchased" Text6.SetFocus ElseIf Combo1.Text = "" Then MsgBox "Select any of the mail-id" Combo1.SetFocus Else
rs1.Open "insert into CUSTABLE values(" & Text1.Text & ",'" & Text2.Text & "','" & Text3.Text & "'," & Text4.Text & ",'" & Text5.Text & "','" & Text6.Text & "')", con, adOpenKeyset, adLockOptimistic MsgBox "Addded successfully" cmdclear_Click End If End Sub
MCA 3RD SEM Text1.Enabled = True Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text6.Text = "" Combo1.Text = "" cmdupdate.Enabled = False End Sub
Private Sub cmddelete_Click() Dim n, j As Integer Dim X As String Set rs4 = New ADODB.Recordset rs4.Open "select * from CUSTABLE", con, adOpenKeyset, adLockOptimistic j=0 n = InputBox("Enter Customer-ID to delete record") If (rs4.RecordCount > 0) Then While Not rs4.EOF If n = "" Then Exit Sub Else If rs4!cid = (n - 0) Then X = MsgBox("This record is existing,do u want to delete it", vbYesNo + vbQuestion) If X = vbYes Then rs4.Delete j=1 GoTo last End If End If rs4.MoveNext End If Wend last: If j = 1 Then GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 24
MCA 3RD SEM cmdclear_Click MsgBox "Record is deleted", vbOKOnly, "message" Else End If Else MsgBox "no record found" End If End Sub
Private Sub cmdfirst_Click() If rs.BOF Then MsgBox "u r in the first record", vbInformation, "Honda" Else Text1.Enabled = True rs.MoveFirst Text1.Text = (rs!cid) Text2.Text = (rs!cname) Text3.Text = (rs!caddr) Text4.Text = (rs!cphno) Text5.Text = (rs!cemail) Text6.Text = (rs!vmodel) End If End Sub Private Sub cmdlast_Click() If rs.EOF = True Then MsgBox " U r in the last record", vbInformation, "Honda" Else rs.MoveLast Text1.Enabled = True Text1.Text = (rs!cid) Text2.Text = (rs!cname) Text3.Text = (rs!caddr) Text4.Text = (rs!cphno) Text5.Text = (rs!cemail) Text6.Text = (rs!vmodel) End If GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 25
MCA 3RD SEM End Sub Private Sub cmdnext_Click() If rs.RecordCount > 0 Then rs.MoveNext If rs.EOF = True Then
MsgBox "This is the last record", vbOKOnly, "message" Else Text1.Enabled = True Text1.Text = (rs!cid) Text2.Text = (rs!cname) Text3.Text = (rs!caddr) Text4.Text = (rs!cphno) Text5.Text = (rs!cemail) Text6.Text = (rs!vmodel) End If Else MsgBox "No records found", vbOKOnly, "message" End If End Sub Private Sub cmdprevious_Click() If rs.RecordCount > 0 Then rs.MovePrevious If rs.BOF = True Then MsgBox "This is the First record", vbOKOnly, "message" Else Text1.Enabled = True Text1.Text = (rs!cid) Text2.Text = (rs!cname) Text3.Text = (rs!caddr) Text4.Text = (rs!cphno) Text5.Text = (rs!cemail) Text6.Text = (rs!vmodel) End If Else MsgBox "No Records found", vbOKOnly, "message" End If GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 26
MCA 3RD SEM End Sub Private Sub cmdshow_Click() Dim n, j as Integer Dim X As String Set rs = New ADODB.Recordset
rs.Open "select * from CUSTABLE", con, adOpenKeyset, adLockOptimistic j=0 n = InputBox("Enter Customer-ID to get the details of record") If (rs.RecordCount > 0) Then While Not rs.EOF If n = "" Then Exit Sub Else If rs!cid = (n - 0) Then Text1.Text = (rs!cid) Text2.Text = (rs!cname) Text3.Text = (rs!caddr) Text4.Text = (rs!cphno) Text5.Text = (rs!cemail) Text6.Text = (rs!vmodel) j=1 GoTo last End If End If rs.MoveNext Wend last: If j = 1 Then MsgBox "Record is displayed", vbOKOnly, "message" Else MsgBox "Record is not found" End If End If cmdupdate.Enabled = True End Sub
Page 27
MCA 3RD SEM Private Sub cmdupdate_Click() Text1.Enabled = True Set rs2 = New ADODB.Recordset
rs2.Open "Update CUSTABLE set CNAME='" & Text2.Text & "',CADDR= '" & Text3.Text & "',CPHNO= " & Text4.Text & ", CEMAIL= '" & Text5.Text & "',VMODEL= '" & Text6.Text & "' where CID=" & Text1.Text & " ", con, adOpenKeyset, adLockOptimistic MsgBox "updated successfully" End Sub Private Sub Combo1_KeyPress(KeyAscii As Integer) If Combo1.Text = "" Then MsgBox "Select any one of the email-id" Combo1.SetFocus Else Exit Sub End If End Sub Private Sub Form_Load() Set rs = New ADODB.Recordset Set con = New ADODB.Connection con.ConnectionString = "Driver={Microsoft ODBC for Oracle};Server=mrs7100f24e6e4;UID=system;PWD=manager" con.Open rs.Open "select * from CUSTABLE", con, adOpenKeyset, adLockOptimistic If (rs.EOF = False) Then Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text6.Text = "" Combo1.Text = "" Else MsgBox "No entries in the table" End If End Sub Private Sub Text2_KeyPress(KeyAscii As Integer) GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 28
If ((KeyAscii > 64 And KeyAscii < 91) Or (KeyAscii > 95 And KeyAscii < 123) Or (KeyAscii > 7 And KeyAscii < 9)) Then Exit Sub Else MsgBox "Enter the character", vbOKOnly, "Honda Message" KeyAscii = 0 End If End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) Dim res As Integer If ((KeyAscii > 47 And KeyAscii < 58) Or (KeyAscii > 7 And KeyAscii < 9)) Then Exit Sub Else res = MsgBox("Enter the Numeric value", vbOKOnly, "Honda Message") If (res = 1) Then KeyAscii = 0 End If End If End Sub Private Sub Text4_KeyPress(KeyAscii As Integer) Dim leng As Integer If ((KeyAscii > 47 And KeyAscii < 58) Or (KeyAscii > 7 And KeyAscii < 9)) Then leng = Len(Text4.Text) If (leng < 10) Then Exit Sub Else MsgBox "U can enter only 10 digit" KeyAscii = 0 End If Else MsgBox "Enter the numeric value", vbOKOnly, "Honda Message" KeyAscii = 0 End If End Sub Private Sub Text4_LostFocus() Dim leng As Integer GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 29
MCA 3RD SEM leng = Len (Text4.Text) If (leng < 10) Then
MsgBox "U have to enter only 10 digit", vbOKOnly, "Honda Message" Text4.SetFocus End If End Sub Private Sub Text5_Click() Text5.Text = Text5.Text & Combo1.Text Exit Sub End Sub Private Sub Text6_KeyPress(KeyAscii As Integer) If ((KeyAscii > 64 And KeyAscii < 91) Or (KeyAscii > 95 And KeyAscii < 123) Or (KeyAscii > 7 And KeyAscii < 9)) Then Exit Sub Else MsgBox "Enter the character", vbOKOnly, "Honda Message" KeyAscii = 0 End If End Sub
Product details Dim con As ADODB.Connection Dim rs As ADODB.Recordset Dim rs1 As ADODB.Recordset Dim rs2 As ADODB.Recordset Dim rs3 As ADODB.Recordset Dim rs5 As ADODB.Recordset Private Sub cmdaddnew_Click() Set rs1 = New ADODB.Recordset Set rs5 = New ADODB.Recordset Dim n As Integer rs5.Open "select max(vid) from PDTABLE", con, adOpenKeyset, adLockOptimistic If (rs.RecordCount = 0) Then Text1.Text = 1 Else Text1.Text = rs5.Fields(0) + 1 GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 30
MCA 3RD SEM End If If Text1.Text = "" Then MsgBox ("Plz enter the vid number") Text1.SetFocus ElseIf Text2.Text = "" Then MsgBox "Plz enter vehicle name" Text2.SetFocus ElseIf Combo1.Text = "" Then MsgBox "Plz enter Vehicle type" Combo1.SetFocus ElseIf Text4.Text = "" Then MsgBox "Plz enter vehicle price" Text4.SetFocus ElseIf Combo2.Text = "" Then MsgBox "Plz enter Engine type" Combo2.SetFocus ElseIf Text6.Text = "" Then MsgBox "Plz enter Mileage" Text6.SetFocus ElseIf Text7.Text = "" Then MsgBox "Plz enter Fuel tank capacity" Text7.SetFocus ElseIf Text8.Text = "" Then MsgBox "Plz enter Fuel use" Text8.SetFocus ElseIf Combo3.Text = "" Then MsgBox "Plz enter Vehicle model" Combo3.SetFocus Else
rs1.Open "insert into PDTABLE values(" & Text1.Text & ",'" & Text2.Text & "','" & Combo1.Text & "'," & Text4.Text & ",'" & Combo2.Text & "'," & Text6.Text & "," & Text7.Text & ",'" & Text8.Text & "','" & Combo3.Text & "')", con, adOpenKeyset, adLockOptimistic MsgBox "Addded successively" cmdclear_Click End If End Sub GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 31
Private Sub cmdclear_Click() Text1.Text = "" Text2.Text = "" Combo1.Text = "" Text4.Text = "" Combo2.Text = "" Text6.Text = "" Text7.Text = "" Text8.Text = "" Combo3.Text = "" End Sub Private Sub cmddelete_Click() Dim n, j As Integer Dim X As String Set rs3 = New ADODB.Recordset rs3.Open "select * from PDTABLE", con, adOpenKeyset, adLockOptimistic j=0 n = InputBox("Enter Vehicle-ID to delete record") If (rs3.RecordCount > 0) Then While Not rs3.EOF If n = "" Then Exit Sub Else If rs3!vid = (n - 0) Then X = MsgBox("This record is existing,do u want to delete it", vbYesNo + vbQuestion) If X = vbYes Then rs3.Delete j=1 GoTo last End If End If rs3.MoveNext End If Wend last: GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 32
MCA 3RD SEM If j = 1 Then cmdclear_Click MsgBox "Record is deleted", vbOKOnly, "message" Else End If Else MsgBox "no record found" End If End Sub
Private Sub cmdfirst_Click() If rs.BOF Then MsgBox "u r in the first record", vbInformation, "Honda" display Else Text1.Enabled = True rs.MoveFirst display End If End Sub Private Sub cmdlast_Click() Text1.Enabled = True If rs.EOF = True Then MsgBox " U r in the last record", vbInformation, "Honda" Else rs.MoveLast display End If End Sub
Private Sub cmdnext_Click() If rs.RecordCount > 0 Then rs.MoveNext If rs.EOF = True Then MsgBox "This is the last record", vbOKOnly, "message" Else GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 33
MCA 3RD SEM display End If Else MsgBox "No records found", vbOKOnly, "message" End If End Sub
Private Sub cmdprevious_Click() If rs.RecordCount > 0 Then rs.MovePrevious If rs.BOF = True Then MsgBox "This is the First record", vbOKOnly, "message" Else display End If Else MsgBox "No Records found", vbOKOnly, "message" End If End Sub
Private Sub cmdshow_Click() Dim n, j As Integer Dim X As String Set rs = New ADODB.Recordset rs.Open "select * from PDTABLE", con, adOpenKeyset, adLockOptimistic j=0 n = InputBox("Enter Vehicle-ID to get the details of record") If (rs.RecordCount > 0) Then While Not rs.EOF
If n = "" Then Exit Sub Else If rs!vid = (n - 0) Then display j=1 GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 34
MCA 3RD SEM GoTo last End If rs.MoveNext End If Wend last: If j = 1 Then MsgBox "Record is displayed", vbOKOnly, "message" Else MsgBox "Record is not found" End If End If cmdupdate.Enabled = True End Sub
Private Sub cmdupdate_Click() Text1.Enabled = True Set rs2 = New ADODB.Recordset rs2.Open "Update PDTABLE set VNAME='" & Text2.Text & "',VTYPE= '" & Combo1.Text & "',VPRICE= " & Text4.Text & ", ENGTYPE= '" & Combo2.Text & "',MILEAGE= " & Text6.Text & ",FTANKCAP= " & Text7.Text & ",FUELUSE= '" & Text8.Text & "',VMODEL='" & Combo3.Text & "' where VID=" & Text1.Text & " ", con, adOpenKeyset, adLockOptimistic MsgBox "updated successfully" End Sub
Private Sub Command9_Click() DataReport1.Show End Sub Private Sub display() Text1.Text = (rs!vid) Text2.Text = (rs!vname) Combo1.Text = (rs!vtype) Text4.Text = (rs!vprice) Combo2.Text = (rs!engtype) Text6.Text = (rs!mileage) Text7.Text = (rs!ftankcap) GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 35
Private Sub Form_Load() Set rs = New ADODB.Recordset Set con = New ADODB.Connection con.ConnectionString = "Driver={Microsoft ODBC for Oracle};DSN=mrs7100f24e6e4;UID=system;PWD=manager" con.Open
rs.Open "select * from PDTABLE", con, adOpenKeyset, adLockOptimistic If (rs.EOF = False) Then Else MsgBox "No entries in the table" End If Combo1.AddItem "Geared" Combo1.AddItem "Ungeared" Combo2.AddItem "2 Stroke" Combo2.AddItem "3 Stroke" Combo3.AddItem "civic sedan" Combo3.AddItem "CR-Z" Combo3.AddItem "Accord-coupe" Combo3.AddItem "CR-V" Combo3.AddItem "Fit-13" End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer) Dim res As Integer If ((KeyAscii > 47 And KeyAscii < 58) Or (KeyAscii > 7 And KeyAscii < 9)) Then Exit Sub Else res = MsgBox("Enter the Numeric value", vbOKOnly, "Message") If (res = 1) Then KeyAscii = 0 End If GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 36
Private Sub Text2_KeyPress(KeyAscii As Integer) If ((KeyAscii > 64 And KeyAscii < 91) Or (KeyAscii > 95 And KeyAscii < 123) Or (KeyAscii > 7 And KeyAscii < 9)) Then Exit Sub Else MsgBox "Enter the character", vbOKOnly, "Honda Message" KeyAscii = 0 End If End Sub Private Sub Text4_KeyPress(KeyAscii As Integer) Dim res As Integer If ((KeyAscii > 47 And KeyAscii < 58) Or (KeyAscii > 7 And KeyAscii < 9)) Then Exit Sub Else res = MsgBox("Enter the Numeric value", vbOKOnly, "Message") If (res = 1) Then KeyAscii = 0 End If End If End Sub Private Sub Text6_KeyPress(KeyAscii As Integer) Dim res As Integer If ((KeyAscii > 47 And KeyAscii < 58) Or (KeyAscii > 7 And KeyAscii < 9)) Then Exit Sub Else res = MsgBox("Enter the Numeric value", vbOKOnly, "Message") If (res = 1) Then KeyAscii = 0 End If End If End Sub Private Sub Text7_KeyPress(KeyAscii As Integer) GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 37
If ((KeyAscii > 47 And KeyAscii < 58) Or (KeyAscii > 7 And KeyAscii < 9)) Then Exit Sub Else res = MsgBox("Enter the Numeric value", vbOKOnly, "Message") If (res = 1) Then KeyAscii = 0 End If End If End Sub Private Sub Text8_KeyPress(KeyAscii As Integer) If ((KeyAscii > 64 And KeyAscii < 91) Or (KeyAscii > 95 And KeyAscii < 123) Or (KeyAscii > 7 And KeyAscii < 9)) Then Exit Sub Else MsgBox "Enter the character", vbOKOnly, "Honda Message" KeyAscii = 0 End If End Sub
Order details: Dim con As ADODB.Connection Dim rs As ADODB.Recordset Dim rs1 As ADODB.Recordset Dim rs2 As ADODB.Recordset Private Sub cmdanotherorder_Click() text1.Enabled = True text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Combo1.Text = "" Combo2.Text = "" Text5.Text = "" Text6.Text = "" Text2.Text = Now() GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 38
MCA 3RD SEM End Sub Private Sub cmddelete_Click() Dim n, j As Integer Dim X As String Set rs2 = New ADODB.Recordset
rs2.Open "select * from ODRTABLE", con, adOpenKeyset, adLockOptimistic j=0 n = InputBox("Enter order number to delete record") If (rs2.RecordCount > 0) Then While Not rs2.EOF If n = "" Then Exit Sub Else If rs2!ordno = (n - 0) Then X = MsgBox("This record is existing,do u want to delete it", vbYesNo + vbQuestion) If X = vbYes Then rs2.Delete j=1 GoTo last End If End If rs2.MoveNext End If Wend last: If j = 1 Then cmdanotherorder_Click MsgBox "Record is deleted", vbOKOnly, "message" Else End If Else MsgBox "no record found" End If End Sub
MCA 3RD SEM Set rs1 = New ADODB.Recordset Set rs5 = New ADODB.Recordset Dim n As Integer
rs5.Open "select max(ordno) from ODRTABLE", con, adOpenKeyset, adLockOptimistic If (rs.RecordCount = 0) Then text1.Text = 1 Else text1.Text = rs5.Fields(0) + 1 End If If text1.Text = "" Then MsgBox ("Plz enter the order number") text1.SetFocus ElseIf Text2.Text = "" Then MsgBox "Plz enter date" Text2.SetFocus ElseIf Text3.Text = "" Then MsgBox "Plz enter customer Name" Text3.SetFocus ElseIf Text4.Text = "" Then MsgBox "Plz enter customer Address" Text4.SetFocus ElseIf Combo1.Text = "" Then MsgBox "Plz enter vehicle model" Combo1.SetFocus ElseIf Combo2.Text = "" Then MsgBox "Plz enter vehicle color" Combo2.SetFocus ElseIf Text5.Text = "" Then MsgBox "Plz enter vehicle Name" Text5.SetFocus ElseIf Text6.Text = "" Then MsgBox "Plz enter Advance" Text6.SetFocus Else
Page 40
rs1.Open "insert into ODRTABLE values(" & text1.Text & ",'" & Text2.Text & "','" & Text3.Text & "','" & Text4.Text & "' ,'" & Combo1.Text & "','" & Combo2.Text & "','" & Text5.Text & "'," & Text6.Text & ")", con, adOpenKeyset, adLockOptimistic MsgBox "Addded successively" cmdanotherorder_Click End If End Sub
Private Sub cmdshow_Click() Dim n, j As Integer Dim X As String Set rs = New ADODB.Recordset rs.Open "select * from ODRTABLE", con, adOpenKeyset, adLockOptimistic j=0 n = InputBox("Enter Order number to get the details of record") If (rs.RecordCount > 0) Then While Not rs.EOF If n = "" Then Exit Sub Else If rs!ordno = (n - 0) Then display j=1 GoTo last End If rs.MoveNext End If Wend last: If j = 1 Then MsgBox "Record is displayed", vbOKOnly, "message" Else MsgBox "Record is not found" End If End If End Sub GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 41
Private Sub Form_Load() Set rs = New ADODB.Recordset Set con = New ADODB.Connection con.ConnectionString = "Driver={Microsoft ODBC for Oracle};Server=mrs7100f24e6e4;UID=system;PWD=manager" con.Open cmdanotherorder_Click rs.Open "select * from ODRTABLE", con, adOpenKeyset, adLockOptimistic If (rs.EOF = False) Then Else MsgBox "No entries in the table" End If Combo1.AddItem "CR-Z" Combo1.AddItem "Accord-coupe" Combo1.AddItem "CR-V" Combo1.AddItem "Fit-13" Combo2.AddItem "red" Combo2.AddItem "black" Combo2.AddItem "yellow" Combo2.AddItem "white" Text2.Text = Now() End Sub
Private Sub display() text1.Enabled = True text1.Text = (rs!ordno) Text2.Text = (rs!date1) Text3.Text = (rs!cname) Text4.Text = (rs!caddr) Combo1.Text = (rs!vmodel) Combo2.Text = (rs!vcolor) Text5.Text = (rs!vname) Text6.Text = (rs!advance) End Sub Private Sub Frame1_DragDrop(Source As Control, X As Single, Y As Single) GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 42
MCA 3RD SEM End Sub SALES details Dim con As New ADODB.Connection Dim rs As New ADODB.Recordset Dim rs1 As New ADODB.Recordset Dim rs2 As New ADODB.Recordset Dim rs3 As New ADODB.Recordset
Private Sub cmdadd_Click() Set rs1 = New ADODB.Recordset Set rs5 = New ADODB.Recordset Dim n As Integer rs5.Open "select max(sno) from SLTABLE", con, adOpenKeyset, adLockOptimistic If (rs.RecordCount = 0) Then Text1.Text = 1 Else Text1.Text = rs5.Fields(0) + 1 End If If Text1.Text = "" Then MsgBox ("Plz enter the sno number") Text1.SetFocus ElseIf Text2.Text = "" Then MsgBox "Plz enter current date" Text2.SetFocus ElseIf Text3.Text = "" Then MsgBox "Plz enter vehicle id" Text3.SetFocus ElseIf Combo2.Text = "" Then MsgBox "Plz enter vehicle model" Combo2.SetFocus ElseIf Text5.Text = "" Then MsgBox "Plz enter vehicle price" Text5.SetFocus ElseIf Combo1.Text = "" Then GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 43
MCA 3RD SEM MsgBox "Plz enter vehicle engine type" Combo1.SetFocus ElseIf Text7.Text = "" Then MsgBox "Plz enter customer name" Text7.SetFocus ElseIf Text8.Text = "" Then MsgBox "Plz enter customer address" Text8.SetFocus Else
rs1.Open "insert into SLTABLE values(" & Text1.Text & ",'" & Text2.Text & "'," & Text3.Text & ",'" & Combo2.Text & "' ," & Text5.Text & ",'" & Combo1.Text & "','" & Text7.Text & "', '" & Text8.Text & "')", con, adOpenKeyset, adLockOptimistic MsgBox "Addded successively" disp End If End Sub
Private Sub cmdclear_Click() Text1.Enabled = True Text1.Text = "" Text2.Text = "" Text3.Text = "" Combo2.Text = "" Text5.Text = "" Combo1.Text = "" Text7.Text = "" Text8.Text = "" Cmdupdate.Enabled = False cmdnext.Enabled = False End Sub
Private Sub cmddelete_Click() Dim n, j As Integer Dim X As String GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 44
rs3.Open "select * from SLTABLE", con, adOpenKeyset, adLockOptimistic j=0 n = InputBox("Enter SNO to delete record") If (rs3.RecordCount > 0) Then While Not rs3.EOF If n = "" Then Exit Sub Else If rs3!sno = (n - 0) Then X = MsgBox("This record is existing,do u want to delete it", vbYesNo + vbQuestion) If X = vbYes Then rs3.Delete j=1 GoTo last End If End If rs3.MoveNext End If Wend last: If j = 1 Then cmdclear_Click MsgBox "Record is deleted", vbOKOnly, "message" Else End If Else MsgBox "no record found" End If End Sub
Private Sub cmdnext_Click() If rs.RecordCount > 0 Then rs.MoveNext If rs.EOF = True Then MsgBox "This is the last record", vbOKOnly, "message" GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 45
MCA 3RD SEM Else Text1.Enabled = True Text1.Text = (rs!sno) Text2.Text = (rs!date1) Text3.Text = (rs!vid) Combo2.Text = (rs!vmodel) Text5.Text = (rs!price) Combo1.Text = (rs!engtype) Text7.Text = (rs!cname) Text8.Text = (rs!caddr) End If Else MsgBox "No records found", vbOKOnly, "message" End If End Sub
Private Sub cmdshow_Click() Dim n, j As Integer Dim X As String Set rs = New ADODB.Recordset rs.Open "select * from SLTABLE", con, adOpenKeyset, adLockOptimistic j=0 n = InputBox("Enter SNO to get the details of record") If (rs.RecordCount > 0) Then While Not rs.EOF If n = "" Then Exit Sub Else If rs!sno = (n - 0) Then disp1 j=1 GoTo last End If rs.MoveNext End If Wend GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 46
MCA 3RD SEM last: If j = 1 Then MsgBox "Record is displayed", vbOKOnly, "message" Else MsgBox "Record is not found" End If End If Cmdupdate.Enabled = True
End Sub
Set rs2 = New ADODB.Recordset Text1.Enabled = True rs2.Open "Update SLTABLE set date1='" & Text2.Text & "',VID=" & Text3.Text & ",VMODEL='" & Combo2.Text & "',PRICE=" & Text5.Text & ",ENGTYPE='" & Combo1.Text & "',CNAME='" & Text7.Text & "',CADDR='" & Text8.Text & "' where SNO = " & Text1.Text & " ", con, adOpenKeyset, adLockOptimistic MsgBox "updated successfully" End Sub
Private Sub Form_Load() Set rs = New ADODB.Recordset Set con = New ADODB.Connection con.ConnectionString = "Driver={Microsoft ODBC for Oracle};Server=mrs7100f24e6e4;UID=system;PWD=manager" con.Open GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 47
rs.Open "select * from SLTABLE", con, adOpenKeyset, adLockOptimistic If (rs.EOF = False) Then Text1.Text = "" '(rs!sno) Text2.Text = "" '(rs!date1) Text3.Text = "" '(rs!vid) Combo2.clear ' (rs!vmodel) Text5.Text = "" '(rs!price) Combo1.clear ' (rs!engtype) Text7.Text = "" '(rs!cname) Text8.Text = "" '(rs!caddr) Else MsgBox "No entries in the table" End If Text2.Text = Now() Combo1.AddItem "2 Stroke" Combo1.AddItem "3 Stroke" Combo2.AddItem "civic sedan" Combo2.AddItem "CR-Z" Combo2.AddItem "Accord-coupe" Combo2.AddItem "CR-V" Combo2.AddItem "Fit-13" End Sub
Private Sub disp() Text1.Enabled = True Text1.Text = "" Text2.Text = "" Text3.Text = "" Combo2.clear Text5.Text = "" Combo1.clear Text7.Text = "" Text8.Text = "" End Sub
Page 48
MCA 3RD SEM Private Sub disp1() Text1.Text = (rs!sno) Text2.Text = (rs!date1) Text3.Text = (rs!vid) Combo2.Text = (rs!vmodel) Text5.Text = (rs!price) Combo1.Text = (rs!engtype) Text7.Text = (rs!cname) Text8.Text = (rs!caddr) End Sub
Sales-invoice details: Dim con As New ADODB.Connection Dim rs As New ADODB.Recordset Dim rs1 As ADODB.Recordset Dim rs2 As ADODB.Recordset
Private Sub cmdadd_Click() Set rs1 = New ADODB.Recordset Set rs5 = New ADODB.Recordset Dim n As Integer rs5.Open "select max(ino) from SITABLE", con, adOpenKeyset, adLockOptimistic If (rs.RecordCount = 0) Then Text1.Text = 1 Else Text1.Text = rs5.Fields(0) + 1 End If If Text1.Text = "" Then MsgBox ("Plz enter the Invoice number") Text1.SetFocus ElseIf Text2.Text = "" Then MsgBox "Plz enter Current date" Text2.SetFocus ElseIf Text3.Text = "" Then MsgBox "Plz enter customer Name" Text3.SetFocus GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 49
MCA 3RD SEM ElseIf Text4.Text = "" Then MsgBox "Plz enter quantity" Text4.SetFocus ElseIf Text5.Text = "" Then MsgBox "Plz enter description" Text5.SetFocus ElseIf Text6.Text = "" Then MsgBox "Plz enter values" Text6.SetFocus ElseIf Text8.Text = "" Then MsgBox "Plz enter total" Text8.SetFocus ElseIf Combo1.Text = "" Then MsgBox "Plz enter vehicle color" Combo1.SetFocus ElseIf Combo2.Text = "" Then MsgBox "Plz enter vehicle engine type" Combo2.SetFocus Else
rs1.Open "insert into SITABLE values(" & Text1.Text & ",'" & Text2.Text & "','" & Text3.Text & "'," & Text4.Text & " ,'" & Text5.Text & "','" & Combo1.Text & "'," & Text8.Text & ",'" & Combo2.Text & "' )", con, adOpenKeyset, adLockOptimistic MsgBox "Addded successively" clear End If End Sub
Private Sub cmdclear_Click() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text6.Text = "" Text7.Text = "" Combo1.Text = "" GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 50
MCA 3RD SEM Text8.Text = "" Combo2.Text = "" Text2.Text = Now() End Sub
Private Sub cmdnext_Click() If rs.RecordCount > 0 Then rs.MoveNext If rs.EOF = True Then MsgBox "This is the last record", vbOKOnly, "message" Else Text1.Enabled = True display End If Else MsgBox "No records found", vbOKOnly, "message" End If End Sub
Private Sub cmdshow_Click() Dim n, j As Integer Dim X As String Set rs = New ADODB.Recordset rs.Open "select * from SITABLE", con, adOpenKeyset, adLockOptimistic j=0 n = InputBox("Enter Invoice number to get the details of record") If (rs.RecordCount > 0) Then While Not rs.EOF If n = "" Then Exit Sub Else If rs!ino = (n - 0) Then display j=1 GoTo last GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 51
MCA 3RD SEM End If rs.MoveNext End Sub Wend last: If j = 1 Then MsgBox "Record is displayed", vbOKOnly, "message" Else MsgBox "Record is not found" End If End If cmdupdate.Enabled = True End Sub
Private Sub cmdtotal_Click() Dim rs As New ADODB.Recordset Text8.Text = Val(Text6.Text) + Val(Text7.Text) End Sub Text1.Enabled = True Set rs2 = New ADODB.Recordset Private Sub cmdupdate_Click() rs2.Open "Update SITABLE set DATE1='" & Text2.Text & "',STO='" & Text3.Text & "',QTY=" & Text4.Text & ",DES='" & Text5.Text & "',VCOLOR='" & Combo1.Text & "',TOTAL=" & Text8.Text & ",ENGTYPE='" & Combo2.Text & "' where INO = " & Text1.Text & " ", con, adOpenKeyset, adLockOptimistic MsgBox "updated successfully" Clear End Sub
Private Sub Form_Load() Set rs = New ADODB.Recordset Set con = New ADODB.Connection GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 52
rs.Open "select * from SITABLE", con, adOpenKeyset, adLockOptimistic If (rs.EOF = False) Then Text1.Text = "" '(rs!ino) Text2.Text = "" '(rs!date1) Text3.Text = "" '(rs!sto) Text4.Text = "" '(rs!qty) Text5.Text = "" '(rs!des) Combo1.Text = "" '(rs!vcolor) Text8.Text = "" '(rs!total) Combo2.Text = "" '(rs!engtype) Text2.Text = Now() Else MsgBox "No entries in the table" End If Text2.Text = Now() Combo2.AddItem "Geared" Combo2.AddItem "Ungeared" Combo1.AddItem "White" Combo1.AddItem "Red" Combo1.AddItem "Gray" Combo1.AddItem "Black" End Sub Private Sub clear() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Combo1.Text = "" Text8.Text = "" Combo2.Text = "" Text2.Text = Now() GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 53
MCA 3RD SEM End Sub Private Sub display() Text1.Text = (rs!ino) Text2.Text = (rs!date1) Text3.Text = (rs!sto) Text4.Text = (rs!qty) Text5.Text = (rs!des) Combo1.Text = (rs!vcolor) Text8.Text = (rs!total) Combo2.Text = (rs!engtype) End Sub
Receipt page: Dim con As New ADODB.Connection Dim rs As New ADODB.Recordset Dim rs1 As New ADODB.Recordset Private Sub cmdadd_Click() Set rs1 = New ADODB.Recordset Set rs5 = New ADODB.Recordset Dim n As Integer rs5.Open "select max(rno) from RCTABLE", con, adOpenKeyset, adLockOptimistic If (rs.RecordCount = 0) Then Text1.Text = 1 Else Text1.Text = rs5.Fields(0) + 1 End If If Text1.Text = "" Then MsgBox ("Plz enter the receipt number") Text1.SetFocus ElseIf Text2.Text = "" Then MsgBox "Plz enter customer name" Text2.SetFocus ElseIf Text3.Text = "" Then MsgBox "Plz enter customer Name" Text3.SetFocus ElseIf Text4.Text = "" Then GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 54
MCA 3RD SEM MsgBox "Plz enter name of the vehicle purchased" Text4.SetFocus ElseIf Text5.Text = "" Then MsgBox "Plz enter price of the vehicle" Text5.SetFocus Else
rs1.Open "insert into RCTABLE values(" & Text1.Text & ",'" & Text2.Text & "','" & Text3.Text & "','" & Text4.Text & "' ," & Text5.Text & ")", con, adOpenKeyset, adLockOptimistic MsgBox "Addded successively" clear End If End Sub
Private Sub cmdclear_Click() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text2.Text = Now() End Sub
Private Sub cmdshow_Click() Dim n, j As Integer Dim X As String Set rs = New ADODB.Recordset rs.Open "select * from RCTABLE", con, adOpenKeyset, adLockOptimistic j=0 n = InputBox("Enter Reciept numbet to get the details of record") If (rs.RecordCount > 0) Then While Not rs.EOF If n = "" Then Exit Sub Else If rs!rno = (n - 0) Then display GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 55
MCA 3RD SEM j=1 GoTo last End If rs.MoveNext Wend last: If j = 1 Then MsgBox "Record is displayed", vbOKOnly, "message" Else MsgBox "Record is not found" End If End If cmdupdate.Enabled = True End Sub
Private Sub cmdupdate_Click() Text1.Enabled = True Set rs = New ADODB.Recordset rs.Open "Update RCTABLE set DATE1='" & Text2.Text & "',CNAME='" & Text3.Text & "',VNAME='" & Text4.Text & "',VPRICE=" & Text5.Text & ",where RNO = " & Text1.Text & " ", con, adOpenKeyset, adLockOptimistic MsgBox "updated successfully" End Sub
Private Sub Form_Load() Set rs = New ADODB.Recordset Set con = New ADODB.Connection con.ConnectionString = "Driver={Microsoft ODBC for Oracle};Server=mrs7100f24e6e4;UID=system;PWD=manager" con.Open rs.Open "select * from RCTABLE", con, adOpenKeyset, adLockOptimistic GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 56
MCA 3RD SEM If (rs.EOF = False) Then Text1.Text = (rs!rno) Text2.Text = (rs!date1) Text3.Text = (rs!cname) Text4.Text = (rs!vname) Text5.Text = (rs!vprice) Else MsgBox "No entries in the table" End If Text2.Text = Now() End Sub
Private Sub clear() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text2.Text = Now() End Sub Private Sub display() Text1.Text = (rs!rno) Text2.Text = (rs!date1) Text3.Text = (rs!cname) Text4.Text = (rs!vname) Text5.Text = (rs!vprice) End Sub
Servicing record: Dim con As New ADODB.Connection Dim rs As New ADODB.Recordset Dim rs1 As New ADODB.Recordset Dim rs2 As New ADODB.Recordset Dim rs3 As New ADODB.Recordset GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 57
Private Sub cmdclear_Click() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Check1.Value = 0 Check2.Value = 0 Check3.Value = 0 Text6.Text = "" Combo1.Text = "" End Sub
Private Sub cmdsave_Click() Set rs1 = New ADODB.Recordset Set rs5 = New ADODB.Recordset Dim n As Integer rs5.Open "select max(jcno) from SVRTABLE", con, adOpenKeyset, adLockOptimistic If (rs.RecordCount = 0) Then Text1.Text = 1 Else Text1.Text = rs5.Fields(0) + 1 End If If Text1.Text = "" Then MsgBox ("Plz enter the Service record number") Text1.SetFocus ElseIf Text2.Text = "" Then MsgBox "Plz enter current date" Text2.SetFocus ElseIf Text3.Text = "" Then MsgBox "Plz enter Register number" Text3.SetFocus ElseIf Text4.Text = "" Then GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 58
MCA 3RD SEM MsgBox "Plz enter Customer name" Text4.SetFocus ElseIf Text5.Text = "" Then MsgBox "Plz enter Vehicle name" Text5.SetFocus ElseIf Text6.Text = "" Then MsgBox "Plz enter current kms" Text6.SetFocus
ElseIf (Check1.Value = 0 And Check2.Value = 0 And Check3.Value = 0) Then MsgBox "Plz Click atleast one Checkbox" Check1.SetFocus Check2.SetFocus Check3.SetFocus ElseIf (Combo1.Text = "") Then MsgBox "Select payment mode" Combo1.SetFocus Else rs1.Open "insert into SVRTABLE values(" & Text1.Text & ",'" & Text2.Text & "','" & Text3.Text & "','" & Text4.Text & "' ,'" & Text5.Text & "'," & Check1.Value & "," & Check2.Value & "," & Check3.Value & "," & Text6.Text & ",'" & Combo1.Text & "')", con, adOpenKeyset, adLockOptimistic MsgBox "Addded successively" clear End If End Sub
Private Sub cmdshow_Click() Dim n, j As Integer Dim X As String Set rs = New ADODB.Recordset rs2.Open "select * from SVRTABLE", con, adOpenKeyset, adLockOptimistic j=0 n = InputBox("Enter job card number to get the details of record") If (rs2.RecordCount > 0) Then While Not rs2.EOF If n = "" Then GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 59
MCA 3RD SEM Exit Sub Else If rs2!jcno = (n - 0) Then Text1.Text = (rs2!jcno) Text2.Text = (rs2!date1) Text3.Text = (rs2!rno) Text4.Text = (rs2!cname) Text5.Text = (rs2!model) Check1.Value = (rs2!wservice) Check2.Value = (rs2!gencheck) Check3.Value = (rs2!repairs) Text6.Text = (rs2!ckms) Combo1.Text = (rs2!pmode) j=1 GoTo last End If rs2.MoveNext End If Wend last: If j = 1 Then MsgBox "Record is displayed", vbOKOnly, "message" Else MsgBox "Record is not found" End If End If cmdnext.Enabled = True 'rs3 = rs2 rs2.Close End Sub
Private Sub Combo1_KeyPress(KeyAscii As Integer) If ((KeyAscii > 65 And KeyAscii < 90) Or (KeyAscii > 95 And KeyAscii < 122) Or (KeyAscii > 7 And KeyAscii < 9)) Then Exit Sub Else GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 60
MsgBox "Enter the character", vbOKOnly, "Honda Message" KeyAscii = 0 End If End Sub
Private Sub Form_Load() Set rs = New ADODB.Recordset Set con = New ADODB.Connection con.ConnectionString = "Driver={Microsoft ODBC for Oracle};Server=mrs7100f24e6e4;UID=system;PWD=manager" con.Open rs.Open "select * from SVRTABLE", con, adOpenKeyset, adLockOptimistic If (rs.EOF = False) Then clear Else MsgBox "No entries in the tableEnd If Text2.Text = Now() End Sub
Private Sub clear() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Check1.Value = 0 Check2.Value = 0 Check3.Value = 0 Text6.Text = "" Combo1.Text = "" End Sub
Private Sub disp() Text1.Text = (rs!jcno) Text2.Text = (rs!date1) GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 61
MCA 3RD SEM Text3.Text = (rs!rno) Text4.Text = (rs!cname) Text5.Text = (rs!model) Check1.Value = (rs!wservice) Check2.Value = (rs!gencheck) Check3.Value = (rs!repairs) Text6.Text = (rs!ckms) Combo1.Text = (rs!pmode) End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer) Dim res As Integer If ((KeyAscii > 47 And KeyAscii < 58) Or (KeyAscii > 7 And KeyAscii < 9)) Then Exit Sub Else res = MsgBox("Enter the Numeric value", vbOKOnly, "Honda Message") If (res = 1) Then KeyAscii = 0 End If End If End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer) Dim res As Integer If ((KeyAscii > 47 And KeyAscii < 58) Or (KeyAscii > 7 And KeyAscii < 9)) Then Exit Sub Else res = MsgBox("Enter the Numeric value", vbOKOnly, "Honda Message") If (res = 1) Then KeyAscii = 0 End If End If GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 62
Private Sub Text4_KeyPress(KeyAscii As Integer) If ((KeyAscii > 64 And KeyAscii < 91) Or (KeyAscii > 95 And KeyAscii < 123) Or (KeyAscii > 7 And KeyAscii < 9)) Then Exit Sub Else MsgBox "Enter the character", vbOKOnly, "Honda Message" KeyAscii = 0 End If End Sub
Private Sub Text5_KeyPress(KeyAscii As Integer) If ((KeyAscii > 64 And KeyAscii < 91) Or (KeyAscii > 95 And KeyAscii < 123) Or (KeyAscii > 7 And KeyAscii < 9)) Then Exit Sub Else MsgBox "Enter the character", vbOKOnly, "Honda Message" KeyAscii = 0 End If End Sub Private Sub Text6_KeyPress(KeyAscii As Integer) Dim res As Integer If ((KeyAscii > 47 And KeyAscii < 58) Or (KeyAscii > 7 And KeyAscii < 9)) Then Exit Sub Else res = MsgBox("Enter the Numeric value", vbOKOnly, "Honda Message") If (res = 1) Then KeyAscii = 0 End If End If End Sub GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 63
Servicing bill form: Dim con As New ADODB.Connection Dim rs As New ADODB.Recordset Dim rs4 As New ADODB.Recordset Dim rs1 As New ADODB.Recordset Dim rs2 As New ADODB.Recordset Dim rs3 As New ADODB.Recordset
Private Sub cmdaddnew_Click() Set rs = New ADODB.Recordset con.Execute "insert into SRBTABLE values(" & Text1.Text & ",'" & Text2.Text & "','" & Text3.Text & "','" & Text4.Text & "','" & Text5.Text & "'," & Text19.Text & ")" If (Text7.Text <> "" And Text8.Text <> "" And Text9.Text <> "" And Text10.Text <> "") Then con.Execute "insert into SRB1TABLE values(" & Text1.Text & "," & Text7.Text & ",'" & Text8.Text & "'," & Text9.Text & "," & Text10.Text & ")" End If If (Text11.Text <> "" And Text12.Text <> "" And Text13.Text <> "" And Text14.Text <> "") Then con.Execute "insert into SRB1TABLE values(" & Text1.Text & "," & Text11.Text & ",'" & Text12.Text & "'," & Text13.Text & "," & Text14.Text & ")" End If If (Text15.Text <> "" And Text16.Text <> "" And Text17.Text <> "" And Text18.Text <> "") Then con.Execute "insert into SRB1TABLE values(" & Text1.Text & "," & Text15.Text & ",'" & Text16.Text & "'," & Text17.Text & "," & Text18.Text & ")" End If MsgBox "Addded successively" clear 'End If End Sub
Private Sub cmdclear_Click() Text1.Text = "" Text2.Text = "" Text3.Text = "" GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 64
MCA 3RD SEM Text4.Text = "" Text5.Text = "" Text7.Text = "" Text8.Text = "" Text9.Text = "" Text10.Text = "" Text11.Text = "" Text12.Text = "" Text13.Text = "" Text14.Text = "" Text15.Text = "" Text16.Text = "" Text17.Text = "" Text18.Text = "" Text19.Text = "" Text4.Text = Now() End Sub
Private Sub cmdshow_Click() Dim n As String n = InputBox("Enter Bill-No to get the details of record") If (n = "") Then Exit Sub Else Text1.Enabled = True Set rs3 = New ADODB.Recordset rs3.Open "select * from SRBTABLE where bno=" & n & " ", con, adOpenKeyset, adLockOptimistic If rs3.EOF = True Then MsgBox "Record not found" Else Text1.Text = rs3!bno display rs3 rs1.Open "select * from SRB1TABLE where bno=" & n & " ", con, adOpenKeyset, adLockOptimistic If (rs1.EOF <> True) Then Text7.Text = rs1!sno Text8.Text = rs1!par GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 65
MCA 3RD SEM Text9.Text = rs1!qty Text10.Text = rs1!amt rs1.MoveNext If (rs1.EOF <> True) Then Text11.Text = rs1!sno Text12.Text = rs1!par Text13.Text = rs1!qty Text14.Text = rs1!amt rs1.MoveNext If (rs1.EOF <> True) Then Text15.Text = rs1!sno Text16.Text = rs1!par Text17.Text = rs1!qty Text18.Text = rs1!amt End If Else End If Else End If End If End If End Sub
Private Sub cmdupdate_Click() Text1.Enabled = True Set rs2 = New ADODB.Recordset rs2.Open "update SEVBTABLE set CNAME='" & Text2.Text & "',CADDR='" & Text3.Text & "',DATE1='" & Text4.Text & "',VMODEL='" & Text5.Text & "',JCNO=" & Text6.Text & ",SNO1=" & Text7.Text & ",PAR1='" & Text8.Text & "',QTY1=" & Text9.Text & ",AMT1=" & Text10.Text & ",SNO2=" & Text11.Text & ",PAR2='" & Text12.Text & "',QTY2=" & Text13.Text & ",AMT2=" & Text14.Text & ",SNO3=" & Text15.Text & ",PAR3='" & Text16.Text & "',QTY3=" & Text17.Text GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 66
& ",AMT3=" & Text18.Text & ",TOTAL=" & Text19.Text & " where BNO=" & Text1.Text & "", con, adOpenKeyset, adLockOptimistic MsgBox "updated successfully" End Sub
Private Sub Form_Load() Set rs = New ADODB.Recordset Set con = New ADODB.Connection con.ConnectionString = "Driver={Microsoft ODBC for Oracle};Server=mrs7100f24e6e4;UID=system;PWD=manager" con.Open Text4.Text = Now() End Sub
Private Sub clear() Text1.Enabled = True Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text7.Text = "" Text8.Text = "" Text9.Text = "" Text10.Text = "" Text11.Text = "" Text12.Text = "" Text13.Text = "" Text14.Text = "" Text15.Text = "" Text16.Text = "" Text17.Text = "" Text18.Text = "" Text19.Text = "" End Sub GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 67
MCA 3RD SEM Private Sub display(rsd As ADODB.Recordset) Text1.Text = rsd!bno Text2.Text = (rsd!cname) Text3.Text = (rsd!caddr) Text4.Text = (rsd!date1) Text5.Text = (rsd!vmodel) Text19.Text = (rsd!total) End Sub
Private Sub Text1_Click() rs.Open "select max(bno) from SRBTABLE ", con, adOpenKeyset, adLockOptimistic If (rs.RecordCount = 0) Then Text1.Text = 1 Else Text1.Text = rs.Fields(0) + 1 End If End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer) Dim res As Integer If ((KeyAscii > 47 And KeyAscii < 58) Or (KeyAscii > 7 And KeyAscii < 9)) Then Exit Sub Else res = MsgBox("Enter the Numeric value", vbOKOnly, "Honda Message") If (res = 1) Then KeyAscii = 0 End If End If End Sub
Private Sub Text16_KeyPress(KeyAscii As Integer) If ((KeyAscii > 64 And KeyAscii < 91) Or (KeyAscii > 95 And KeyAscii < 123) Or (KeyAscii > 7 And KeyAscii < 9)) Then Exit Sub GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 68
MsgBox "Enter the character", vbOKOnly, "Honda Message" KeyAscii = 0 End If End Sub
7. DATABASE TABLES
Customer Table
Col umn Name
CID CNAME CADDR CPHNO CEMAIL VMODEL
Data Type
NUMBER VARCHAR2(4000) VARCHAR2(4000) NUMBER VARCHAR2(4000) VARCHAR2(4000)
Null able
No No No No No No
Primary Key
1 -
Product Table
Col umn Name
VID VNAME VTYPE VPRICE ENGTYPE MILEAGE FTANKCAP FUELUSE VMODEL
Data Type
NUMBER VARCHAR2(4000) VARCHAR2(4000) NUMBER VARCHAR2(4000) NUMBER NUMBER VARCHAR2(4000) VARCHAR2(4000)
Null able
No No No No No No No No No
Primary Key
1 -
Order Table
Page 69
Data Type
NUMBER VARCHAR2(4000) VARCHAR2(4000) VARCHAR2(4000) VARCHAR2(4000) VARCHAR2(4000) VARCHAR2(4000) NUMBER
Null able
No No No No No No No No
Primary Key
1 -
Sales Table
Col umn Name
SNO DATE1 VID VMODEL PRICE ENGTYPE CNAME CADDR
Data Type
NUMBER VARCHAR2(4000) NUMBER VARCHAR2(4000) NUMBER VARCHAR2(4000) VARCHAR2(4000) VARCHAR2(4000)
Null able
No No No No No No No No
Primary Key
1 -
Data Type
NUMBER VARCHAR2(4000) VARCHAR2(4000) NUMBER VARCHAR2(4000) VARCHAR2(4000) NUMBER(10,2) VARCHAR2(4000)
Null able
No No No No No No No Yes
Primary Key
1 -
Page 70
Data Type
NUMBER VARCHAR2(4000) VARCHAR2(4000) VARCHAR2(4000) NUMBER
Null able
No No No No No
Primary Key
1 -
Data Type
NUMBER VARCHAR2(4000) VARCHAR2(4000) VARCHAR2(4000) VARCHAR2(4000) NUMBER NUMBER NUMBER NUMBER VARCHAR2(4000)
Null able
No No No No No Yes Yes Yes No No
Def ault
-
Primary Key
1 -
Data Type
NUMBER VARCHAR2(4000) VARCHAR2(4000) VARCHAR2(4000) VARCHAR2(4000) NUMBER
Null able
No Yes Yes Yes Yes No
Def ault
-
Primary Key
1 -
Page 71
Data Type
NUMBER NUMBER VARCHAR2(4000) NUMBER NUMBER
Null able
No Yes Yes Yes Yes
8. SYSTEM TESTING
The purpose of testing is to discover errors. Testing is the process of trying to discover every conceivable fault or weakness in a work product. It provides a way to check the functionality of components, sub-assemblies, assemblies and/or a finished product It is the process of exercising software with the intent of ensuring that the Software system meets its requirements and user expectations and does not fail in an unacceptable manner. There are various types of test. Each test type addresses a specific testing requirement.
Integration testing
Integration tests are designed to test integrated software components to determine if they actually run as one program. Testing is event driven and is more concerned with the basic outcome of screens or fields. Integration tests demonstrate that although the components were individually satisfaction, as shown by successfully unit testing, the combination of components is correct and GLOBAL INSTITUTE OF MANAGEMENT SCIENCES Page 72
MCA 3RD SEM consistent. Integration testing is specifically aimed at combination of components.
AUTOMATION OF HONDA SHOW-ROOM exposing the problems that arise from the
Functional test
Functional tests provide systematic demonstrations that functions tested are available as specified by the business and technical requirements, system documentation, and user manuals. Functional testing is centered on the following items: Valid Input : identified classes of valid input must be accepted.
Invalid Input : identified classes of invalid input must be rejected. Functions Output : identified functions must be exercised. : identified classes of application outputs must be exercised.
Systems/Procedures: interfacing systems or procedures must be invoked. Organization and preparation of functional tests is focused on requirements, key functions, or special test cases. In addition, systematic coverage pertaining to identify Business process flows; data fields, predefined processes, and successive processes must be considered for testing. Before functional testing is complete, additional tests are identified and the effective value of current tests is determined.
System Test
System testing ensures that the entire integrated software system meets requirements. It tests a configuration to ensure known and predictable results. An example of system testing is the configuration oriented system integration test. System testing is based on process descriptions and flows, emphasizing pre-driven process links and integration points.
specification or requirements document. It is a testing in which the software under test is treated, as a black box .you cannot see into it. The test provides inputs and responds to outputs without considering how the software works.
Features to be tested Verify that the entries are of the correct format No duplicate entries should be allowed All links should take the user to the correct page.
Login Module
sno 1
Pass/Fail Pass
sno 1
Pass/Fail Pass
2
Contact number alphabetic
Pass
3
Contact number more than 10 digit
Pass
Pass
Page 75
9. SCREENSHOTS
Page 76
Page 77
Page 78
REPORTS
Page 79
Page 80
Page 81
10.
Software scope and beyond: The scope of the project has been described and can be executed to give flexibility of performing the maintenance of the department with its functionalities. Future Enhancements: This project can either be enhanced to provide greater flexibility and performances with certain modifications whenever necessary. In future, whenever the Honda motors and auto agencies wishes to update the above application, it is left open with a scope to add new modules or to delete existing modules easily without affecting the other modules. Agency can add modules like, profit and loss accounting of the agency, balance sheet etc. Facilities like credit balance; debit balance to the client, accepting cheques/demands can be incorporated in the project in future.
Page 82
11. CONCLUSION
The project currently developed in vb, oracle10g.Active-x controls overcome the problems. Which is being faced? It has been my endeavour throughout this software to provide the user an ease use. Flexible, robust, user friendly packages for the sound functioning of the organization.
The task of development of this application software is as simple as it seems to be. It requires knowledge of computer programming but also a clear understanding of Active-X controllers and user controls. As such application leads of distributed processing this sometimes adds another degree of challenge.
The project offered to me has been completed successfully under proper guidance. We have tried to smoothen all possible ranges in the system and tested software volumes of input data of all possible conditions and results have been found to be executed.
We feel a lot of difference is existing between theoretical concept and real life situation. However, the entire effort of the system development process was enjoyable and whole experience was proved to be useful.
Page 83
12. BIBLIOGRAPHY:
Page 84