A PROJECT REPORT ON
“ AUTOMOBILE SERVICE CENTER ”
Bachelor Bachelor Of Engineering in Computer Computer Science 6TH SEM SESSION
2010-2011
GUIDED BY: SUBMITTED BY:
MRS. PRIYANKA PRIYAN KA AGRAWAL SINGH RAJPUT
NEERAJ MEGHA SHRI SAO
DEPARTMENT OF COMPUTER SCIENCE ENGINEERING
CHHATTISGARH INSTITUTE OF MANAGEMENT AND TECHNOLOGY GANIYARI , BHILAI-3 (C.G.)
CERTIFICATE
ACKNOWLEDGEMENT
SYNOPSIS Name of Project:- Automobile Service center. Language used :Frontend- Microsoft Visual Basic . Backend –Microsoft Access.
Desc Descri ript ptio ion n of proj projec ectt :- This This proj projec ectt is base based d on customer record service . By this we can store the data of availability of automobiles models , customers bike’s servicing , servicing report , customers reports etc .
Technique used:- It is based on data entry management .
Utility of the project:Since the project is based on the customer record requirement , it is user friendly too .
Future Enhancement:In future it can be used to maintain the record of the customer. customer.
HARDWARE REQUIREMENT
Monitor
SVGA Monitor or VGA monitor
Keyboard
101 keys
Mouse
One PC mouse
Processor
Pentium III
RAM
128 MB
Disk space
20 GB
SOFTWARE REQUIREMENT
Operating system
- Windows 98
- Windows 20 2000
- Windows XP
Front End
- Visual Basic 6.0
Back End
- MS ACCESS
INTRODUCTION
INTRODUCTION TO FRONT END VISUAL BASIC 6.0 Visual basic is primarily a visual design (GUI) envir environm onmen ent. t. Visua Visuall Basic Basic is objec object-o t-ori rient ented, ed, i.e. i.e. it revo revolve lvess around ready-made objects, and it is event driven, i.e. all the activities in a program are triggered by one event or another. Each object has its own properties, determining its position, size, color, the appearance and nature of its text, and much more. Each object also has its own event handling procedures. The Visual Basic system knows what a button is and how it works. It also knows how to handle images, menus, dialog boxes, drives and directory lists, and much else. The programmer’s job is to determine where, how and when an object appears on screen, what its caption reads, and what happens when an event occurs, that event might be opening of the form, the user clicking on a button or typing text into a box. The programmer programmer does not have to write code to trap these events- the system does that automatically. Because the program code runs in response to events, and as at any point on a whole range of events might be possible, the flow of execution is not as fixed as in a traditional program. Operations do not have to follow a set sequence and can be easily interrupted, suspended abandoned.
ADVANTAGES OF USING VISUAL BASIC 6.0 1.
Visual basic applications are event driven means the user is in control the application. The user generates a steam of event each time he or she clicks with the mouse of presses a key on the the keyb eyboard. ard. Your visu visuaal basi asic app applica licati tio on responds to those events through the code you’ve written and attached to these events.
2.
Visual basic supports the principle of object oriented design. This means that we can compartmentalize different aspects of our application as objects and develop and test those obje object ctss inde indepe pend nden entl tly y of the the rest rest of the the appl applic icat atio ion. n. By modifying certain properties and invoking the methods of those objects, we experts a great deal of control over the user’s interaction with the visual basic.
3.
Programs we we’ve wr written.
4.
Although visual basic does not comply with all concepts and and prin princi cipl plee behi behind nd the the obje object ct-o -ori rien ente ted d deve develo lopm pmen entt model supported by visual C++
5.
Environments, visual basic include enough of these to more than satisfy all but the most ardent followers of Objected Oriented Programming.
6.
Microsoft has visual basic to complete windows application deve develo lopm pmen entt syst system em.. This This mean meanss that that our our visu visual al basi basicc appl applic icat atio ion n will will look look and and behav ehavee lik like othe otherr wind window owss program our users might work with. In other words, our visual basic applications will confirm to the windows look and feel without any extra work on our part. Unlike visual C++ and other development platforms we don’t have to go to extreme measures to employ even the most sophisticated windows features in our visual basic application.
7.
Visu Visual al basi basicc is infi infini nite tely ly exte extens nsib ible le thro throug ugh h the the use use of active-x controls, dynamically linked libraries (DLLs), addins etc. we can create this active-x controls DLLs, and addins with visual basic 6.0 or buy them off the shelf from a large number of third party software vendors. Infact, one of the major influences driving to rapid adoption of visual basic 6 is the desire of many developers to create an activex controls and DLLs for use in other windows applications such excel, word, and access.
INTEGRATED DEVELOPMENT ENVIRONMENT
VB provides IDE (Integrated Development Environment). The IDE is where you do programming in VB-just as the name says; you develop your project in the Integrated Development Envi Enviro ronm nmen ent. t. It is call called ed inte integr grat ated ed beca becaus usee we can can acce access ss virtually all of the development tools that we need from one screen called an interface
Over the years the IDE has become more powerful, and with that power has come complex. The IDE use to be more or less less invi invisi sibl blee to prog progra ramm mmer er but but now now that that they they are are kind kindss of project portion, active-x controls to add, version study. The IDE is also also comm common only ly refe referr rred ed as the the desi design gn envi enviro ronm nmen entt or the the program. The visual basic IDE has three distinct states: 1.
Design
2.
Run
3.
Debug The IDE is composed of these components:
1.
The Menu Bar
2.
The Tool Bar
3.
The Pr Projected Ex Explorer
4.
The Pr Properties Wi Windows
5.
The Fo Form La Layout Wi Windows
6.
The Tool Box
PARTS OF VISUAL BASIC
Projects can become quite advanced in visual basic, even containing sub projects of different types. Visual basic projects usually contain three types of items. 1. Globa Globall Items Items
2. For Forms 3. Modu Module less 1. Glob Global al Ite Items ms
Global items are accessible to all modules and form in a project and you declare them with the PUBLIC keyword. However, Microsoft recommends that you keep the number of global items to an absolute minimum and, infact, suggests there use only when you need to communicate between forms. One reas reason on to avoi avoid d glob lobal vari variab able less in thei theirr acce access ssib ibil ilit ity y from from anywhere in the program while you’re working with a global variable in one part of a program, another part of the program might be busy changing that variable, giving you unpredictable results.
2. Forms
Forms are familiar to all VB programmers, of course- they are templates you base windows on. Besides standard forms, VB also supports multiple documents interface (MDI) forms, as well as whole number of predefined forms.
3. Modules
Modu Module less are are coll collec ecti tion on of code code and and data data that that func functi tion on somethin something g like object object in object-o object-orien riented ted programmi programming ng (OOP), (OOP), but without defining OOP characteristics characteristics like inheritance, inheritance, polymorphism, polymorphism, and so on. The point behind the program. program. We will discuss the importance of doing this later in this project
when we cover VB programming techniques and style breaking a larg largee prog progra ram m into into smal smalle ler, r, self self--cont contai aine ned d modu module less can can be invaluable for creating and maintaining code.
RELATIONAL DATABASE MANAGEMENT SYSTEM Information is the backbone of any organization this need for for mana managi ging ng data data and and retri etriev evin ing g info inform rmat atio ion n has has led led to an extensive use of computer in the business world. Realization the data is major management resource, has led to the invention of various means of the managing them effectively. This is where
relational management database comes into picture. This rdbms has eliminated explicit parent- child relation.
A data base management system offers a systematic approach for managing database or a collection or database of files. A DBMS enables users to access and manipulate information with minimum effort. In such a system, one can easily add data elements to the elements no longer needed. A relational database database is a database that is perceived by the user as collection of time varying, normalized relation pf assorted degrees. In other words, the term relational database means a database for which the operators available to the users or one that operate on relational structures. It does not necessarily means that data is stored in the form of tables.
All data represented in one and only one way, by explicit values. Since the attributes are unique at intersection of a row and a column, there is only one value.
REQUIREMENT ANALYSIS
A requirement determination involves study in the current system to find out how it works where improvement should be made. System study results in an evaluation of how many current methods are working and whether improvements are necessary if possible. They consider consider both computer computer and manual methods. methods.
This is the first and most important phase of the system development. Determining the user’s requirement to develop a system is main objective of this phase.
Requirements determination is done by the following steps:
Studying
manual system
Observing
the system process
Determining
problem faced by the user in the existing system
Determining
the enhancement required in the proposed system.
The existing system and problems faced by the user are known by studying the manual system and interviewing the existing system. Interviewing the user are found very useful and helpful for finding enhancement required in proposed system.
MS Access It is an interactive relational management system for Microsoft windows. windows. It helps to store, find, organize and present data meaning fully.Microsoft fully.Microsoft access is a GUI. Microsoft access takes fully advantage of the graphical power in windows which gives access to data and simple ways to view and works with the information. It is powerful for querying capability that’s helpful to find the information regardless of format or location. You can use one query to work with the data stored in different database and can change query at any time. Ms Access is used for data publishing: WYSIWYG (what you see is what you get) which helps –to produce effective forms and reports to meet your exact specifications. You can data, combine forms and reports into one document.
INTRODUCTION This System int introduce the concept necessar sary for Automobile Service Center. This This syst system em help helpss the the endend-us user er to maint aintai ain n reco record rd of vehic vehicle le and and its servi servicin cing.T g.This his system system helps helps to maint maintain ain detail information of customers. Through this system we maintain the details of customers who appear their vehicle in the service center. This system help help the user user to input input the node nodell entr entry y whic which h relat related ed to customers customers and easily easily to get data with description of model. model. In computer , user has to maintain maintain each indivisual indivisual customer record. Through this system we can easily maintain cutomer record and and servicin servicing g detaile detailess of all custom customer er with time time period. period. And we efficiently efficientl y maintain servicing records . In this system we use Front-End as VISUAL BASIC and Back-End as MS ACCESS.
FLOW CHART
PASS WORD FLOW CHART
START
PW=INPUT PASSWORD
IF PW = VALID PW=VALID
EXIT FROM PROJECT
STOP
YES MAIN MENU
M
MAIN MENU FLOW CHART
M
BUT =INPUT VALUE
IF
YES MODEL ENTRY
BUT=1
NO YES IF BUT=2
CUSTOMER ENTRY
NO
IF BUT= 3
YES SERVICING ENTRY
NO
IF BUT=4
NO
C
YES MODEL REPORT
C
IF BUT= 5
IF
CUSTOMER REPORT
SERVICING
BUT=6
IF BUT= 7
STOP
HELP
CODING & SNAPSHOTS Option Explicit Dim rs As New ADODB.Recordset Dim sql As String
Private Sub cmbcolor_KeyPress(KeyAscii As Integer) valid1 KeyAscii End Sub
Private Sub cmbmodel_Click() If cmbmodel.Locked = True Then Exit Sub If cmbmodel.ListIndex <> -1 Then closeRS rs.Open "select numofserv from freeservice where sno=" & Mid(cmbmodel.Text, 1, InStr(cmbmodel.Text, "-") - 1), con, adOpenKeyset, adLockPessimistic, adCmdText If rs.RecordCount > 0 Then txtnos.Text = rs(0) cmbcolor.SetFocus End If End If End Sub
Private Sub cmdrefresh_Click() cmdsave.Enabled = False
cmdnew.Enabled = True cmdupdate.Enabled = False cmdmod.ZOrder 0 cmdmod.Enabled = True cmdfind.Enabled = True Form_Load End Sub Private Sub cmdclos_Click() Frame5.Visible = False End Sub Private Sub cmdclose_Click() Unload Me End Sub Private Sub cmdfind_Click() Frame5.Visible = True closeRS sql = "select cust_id,cust_name,model,d_o_sold from cust_detl order by cust_id" rs.Open sql, con, adOpenKeyset, adLockPessimistic, adCmdText List1.Clear If rs.RecordCount > 0 Then While rs.EOF = False List1.AddItem rs(0) & " " & Chr(9) & rs(1) & Chr(9) & rs(2) & Chr(9) & rs(3) rs.MoveNext
Wend End If End Sub Private Sub CMDMOD_Click() CMDMOD_Click() dtpDosold.Enabled = True cmdmod.ZOrder 1 locktext Me, False cmdupdate.Enabled = True cmdnew.Enabled = False cmdfind.Enabled = False End Sub
Sub cmdnew_Click() cleartext Me dtpDosold.Value = Date locktext Me, False closeRS cmbmodel.ListIndex = -1 cmbcolor.ListIndex = -1 sql = "select max(cust_id) from cust_detl" rs.Open sql, con, adOpenKeyset, adLockPessimistic, adCmdText If IsNull(rs(0)) Then txtcid.Text = 1 Else txtcid.Text = rs(0) + 1
End If dtpDosold.Enabled = True txtcname.SetFocus cmdnew.Enabled = False cmdupdate.Enabled = False cmdfind.Enabled = False cmdsave.Enabled = True cmdmod.Enabled = False End Sub Private Sub cmdsave_Click() If Len(txtcname.Text) = 0 Then txtcname.SetFocus MsgBox "Plz Enter Customer Name" Exit Sub End If If Len(txtcadd.Text) = 0 Then txtcadd.SetFocus MsgBox "Plz Enter Customer Address" Exit Sub End If txtphno.Text = IIf(Len(txtphno.Text) = 0, "-", txtphno.Text) txtmobno.Text = IIf(Len(txtmobno.Text) = 0, "-", "- ", txtmobno.Text) If Len(txtframeno.Text) = 0 Then txtframeno.SetFocus MsgBox "Plz Enter Frame No"
Exit Sub End If If Len(txtengno.Text) = 0 Then txtengno.SetFocus MsgBox "Plz Enter Engine No" Exit Sub End If If Len(cmbmodel.Text) = 0 Then cmbmodel.SetFocus MsgBox "Plz Select Model Name" Exit Sub End If If Len(cmbcolor.Text) = 0 Then cmbcolor.SetFocus MsgBox "Plz Select Model Color" Exit Sub End If If Len(txtregno.Text) = 0 Then txtregno.SetFocus MsgBox "Plz Enter Registration No" Exit Sub End If If dtpDosold.Value > Date Then dtpDosold.SetFocus MsgBox "Plz Check The Sold Date"
Exit Sub End If sql = "insert into cust_detl values(" & CInt(txtcid.Text) & ",'" & UCase(Trim(txtcname.Text)) & "','" & UCase(Trim(txtcadd.Text)) & "','" & Trim(txtphno.Text) & "','" & Trim(txtmobno.Text) & "','" & UCase(Trim(txtframeno.Text)) & "','" & UCase(Trim(txtengno.Text)) & "','" & cmbmodel.Text & "'," & CInt(txtnos.Text) & ",'" & Trim(cmbcolor.Text) & "','" & UCase(Trim(txtregno.Text)) & "',#" & CDate(dtpDosold.Value) & "#,FALSE)" con.Execute sql MsgBox "Record Succesfully Saved" Form_Load End Sub Private Sub cmdupdate_Click() If Len(txtcname.Text) = 0 Then txtcname.SetFocus MsgBox "Plz Enter Customer Name" Exit Sub End If If Len(txtcadd.Text) = 0 Then txtcadd.SetFocus MsgBox "Plz Enter Customer Address" Exit Sub End If txtphno.Text = IIf(Len(txtphno.Text) = 0, "-", txtphno.Text) txtmobno.Text = IIf(Len(txtmobno.Text) = 0, "-", "- ", txtmobno.Text)
If Len(txtframeno.Text) = 0 Then txtframeno.SetFocus MsgBox "Plz Enter Frame No" Exit Sub End If If Len(txtengno.Text) = 0 Then txtengno.SetFocus MsgBox "Plz Enter Engine No" Exit Sub End If If Len(cmbmodel.Text) = 0 Then cmbmodel.SetFocus MsgBox "Plz Enter Model Name" Exit Sub End If If Len(cmbcolor.Text) = 0 Then cmbcolor.SetFocus MsgBox "Plz Select Model Color" Exit Sub End If If Len(txtregno.Text) = 0 Then txtregno.SetFocus MsgBox "Plz Enter Registration No" Exit Sub End If
If dtpDosold.Value > Date Then dtpDosold.SetFocus MsgBox "Plz Check The Sold Date" Exit Sub End If sql = "update cust_detl set cust_name='" & UCase(Trim(txtcname.Text)) & "',address='" & UCase(Trim(txtcadd.Text)) & "',ph_no='" & Trim(txtphno.Text) & "',mob_no='" & Trim(txtmobno.Text) & "',frame_no='" & UCase(Trim(txtframeno.Text)) & "',engine_no='" & UCase(Trim(txtengno.Text)) & "',model='" & UCase(Trim(cmbmodel.Text)) & "',color='" & UCase(Trim(cmbcolor.Text)) & "',REG_NO='" & UCase(Trim(txtregno.Text)) & "',d_o_sold=#" & CDate(dtpDosold.Value) & "#,nos=" & CInt(txtnos.Text) & " WHERE CUST_ID=" & CLng(txtcid.Text) con.Execute sql MsgBox "Record Succesfully Updated" Form_Load cmdupdate.ZOrder 1 End Sub
Private Sub list1_dblClick() closeRS sql = "select * from cust_detl where cust_id=" & Mid(List1.Text, 1, InStr(List1.Text, " ") - 1) rs.Open sql, con, adOpenKeyset, adLockPessimistic, adCmdText
If rs.RecordCount > 0 Then see Frame5.Visible = False Else Exit Sub End If End Sub Private Sub Form_Load() locktext Me, True centerfrm Me closeRS rs.Open "select sno,modelname from freeservice", con, adOpenKeyset, adLockPessimistic, adCmdText cmbmodel.Clear If rs.RecordCount > 0 Then While rs.EOF = False cmbmodel.AddItem rs(0) & "-" & rs(1) rs.MoveNext Wend End If
closeRS dtpDosold.Value = Date rs.Open "select * from cust_detl", con, adOpenKeyset, adLockPessimistic, adCmdText
If rs.RecordCount = 0 Then cmdsave.Enabled = False cmdnew.Enabled = True cmdupdate.Enabled = False cmdfind.Enabled = False dtpDosold.Enabled = False cmdmod.Enabled = False Else dtpDosold.Enabled = False cmdsave.Enabled = False cmdnew.Enabled = True cmdupdate.Enabled = False cmdmod.Enabled = True cmdfind.Enabled = True see End If End Sub
Private Sub txtcname_KeyPress(KeyAscii As Integer) valid1 KeyAscii End Sub
Private Sub txtmobno_keypress(KeyAscii As Integer) valid KeyAscii End Sub
Private Sub txtmodel_KeyPress(KeyAscii As Integer) valid1 KeyAscii End Sub
Private Sub txtphno_keypress(KeyAscii As Integer) valid KeyAscii End Sub
Private Sub closeRS() If rs.State = 1 Then rs.Close Set rs = Nothing End If End Sub
Private Sub see() txtcid.Text = rs(0) txtcname.Text = rs(1) txtcadd.Text = rs(2) txtphno.Text = rs(3) txtmobno.Text = rs(4) txtframeno.Text = rs(5) txtengno.Text = rs(6)
txtnos.Text = rs(8) cmbcolor.Text = rs(9) txtregno.Text = rs(10) dtpDosold.Value = rs(11) End Sub
LOGIN FORM
Option Explicit Private Sub cmdclose_Click() Unload Me End Sub Private Sub cmdlogin_Click() If Len(txtuname.Text) = 0 Then MsgBox "Plz Enter User Name" txtuname.SetFocus Exit Sub End If If Len(txtpass.Text) = 0 Then MsgBox "Plz Enter Enter Password" txtpass.SetFocus Exit Sub End If If UCase(txtpass.Text) = "RAJPUT" Then MsgBox "Welcome" Unload Me frmSplash.Show
Else MsgBox "Invalid Password ,Try again." txtpass.SetFocus txtpass.Text = "" End If End Sub Private Sub Form_Load() centerfrm Me End Sub
SPLASH SCREEN
Option Explicit
Private Sub Timer1_Timer()
pbar1.Value = pbar1.Value + 10 Label13.Caption = "Loding ....." & pbar1.Value & "%" If pbar1.Value >= 100 Then Timer1.Enabled = False Unload Me frmContainer.Show End If End Sub
MAIN SCREEN
Private Sub cmdCE_Click() Dim cd As New frmcust_detail cd.Show End Sub
Private Sub cmdCR_Click()
If ServiceDataEnv.rscmdcustomer.State = 1 Then ServiceDataEnv.rscmdcustomer.Close ServiceDataEnv.cmdcustomer ServiceDataEnv.rscmdcustomer.Requery (0) custdatareport.Show End Sub
Private Sub cmdH_Click() frmAbout.Show End Sub
Private Sub cmdME_Click() Dim fn As New frmnos fn.Show End Sub
Private Sub cmdMR_Click()
MODEL ENTRY
Private Sub cmdME_Click() Dim fn As New frmnos fn.Show End Sub
CUSTOMER ENTRY
Private Sub cmdCE_Click() Dim cd As New frmcust_detail cd.Show End Sub
SERVICING SERVICING ENTRY
Private Sub cmdSE_Click() Dim sd As New frmsevice_detl sd.Show End Sub
MODEL REPORT
Private Sub cmdMR_Click() If ServiceDataEnv.rscmdfservice.State = 1 Then ServiceDataEnv.rscmdfservice.Close ServiceDataEnv.cmdfservice ServiceDataEnv.rscmdfservice.Requery (0) Fserdatareport.Show End Sub
CUSTOMER REPORT
Private Sub cmdCR_Click() If ServiceDataEnv.rscmdcustomer.State = 1 Then ServiceDataEnv.rscmdcustomer.Close ServiceDataEnv.cmdcustomer ServiceDataEnv.rscmdcustomer.Requery (0) custdatareport.Show End Sub
SERVICING REPORT
Private Sub cmdSR_Click() If ServiceDataEnv.rscmdservice.State = 1 Then ServiceDataEnv.rscmdservice.Close ServiceDataEnv.cmdservice ServiceDataEnv.rscmdservice.Requery (0) ServDataReport.Show End Sub
ABOUT
Private Sub cmdH_Click() frmAbout.Show End Sub
REFERENC REFERENCE E
For the completion of this project we refer to the following Books… 1. Visual Visual Basic Basic 6.0 6.0 Prog Program rammin ming g By Streven Holzner 2. Datab Database ase Progra Programm mming ing with with Visual Visual Basic Basic By Curtis L. Smith 3. Comp Comple lete te Ref Refere erenc ncee By Ivan Baros