Top Banner
 TERM PAPER Of Cap407(v.b.net)  Topic: - TELEPHONE DIRECTORY Submitted To: - Submitted By:- Mr. pankaj Name:- nupur sood Lect. lpu Roll No:-rd3802a27 Regd No:-10809510 1
22

RD3802A27

Apr 09, 2018

Download

Documents

Ankur Singh
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: RD3802A27

8/7/2019 RD3802A27

http://slidepdf.com/reader/full/rd3802a27 1/22

 TERM PAPER

Of 

Cap407(v.b.net) Topic: - TELEPHONE DIRECTORY

Submitted To: - Submitted By:-

Mr. pankaj Name:- nupur sood

Lect. lpu Roll No:-rd3802a27

Regd No:-10809510

1

Page 2: RD3802A27

8/7/2019 RD3802A27

http://slidepdf.com/reader/full/rd3802a27 2/22

ACKNOWLEDGEMENT

It is not until you undertake the project like this one that you realize how

massive the effort it really is, or how much you must rely upon the Selfless

efforts and goodwill of others. There are many who helped us with this

 project, and we want to thank them all from the core of our Hearts.

We owe special words of thanks to our Teachers Mr. pankaj for their 

vision, thoughtful counseling and encouragement at every step of the

 project. We are also thankful to the teachers of the Department for givingus the best of knowledge and guidance throughout the project.

And last but not the least, we find no words to acknowledge the financial

assistance & moral support rendered by our parents in making the effort a

success. All this has become reality because of their blessings and above

all by the grace of god.

 Nupur sood 

ROLL NO:-RD3802

REGD.ID:-10809510

 

2

Page 3: RD3802A27

8/7/2019 RD3802A27

http://slidepdf.com/reader/full/rd3802a27 3/22

TABLE OF CONTENTS

S.No

Content Page no.

1 Introduction 42 System

Requirement 8

3 System Description 9  4 System Design 105 Source code 11

6 Output 297 Testing 32

8 Future scope 33

 

3

Page 4: RD3802A27

8/7/2019 RD3802A27

http://slidepdf.com/reader/full/rd3802a27 4/22

 INTRODUCTION:

We have discussed so far various features of V.B.NET and are ready to

write and execute program of modest complexity. However, before

attempting to develop complex programs, it is worthwhile to consider some

 programming techniques that would help design efficient and error free.

The program development process includes three important stages, namely,

 program design, program coding and program testing. All the three stages

contribute to the production of high quality program.

In “TELEPHONE DIRECTORY” we have done system design, source

coding, and program testing and added many more features to facilitate the

user with the best. We have given the user the facility to enter the person’s

record and providing the option to save and delete that record and many

more options.

We can improve the efficiency of the system, thus overcome the

drawbacks of the existing system.

· Less human error 

· Strength and strain of manual labour can be reduced

· High security

· Data consistency

· Easy to handle

· Easy data updating

· Easy record keeping

· Backup data can be easily genera

OVERVIEW TO V.B.NET

4

Page 5: RD3802A27

8/7/2019 RD3802A27

http://slidepdf.com/reader/full/rd3802a27 5/22

HISTORY OF V.B.NET:

 

Visual Basic is a "visual programming" environment for developing Windows (alsoWeb now) applications. Visual Basic makes it possible to develop complicated

applications very quickly. The programmer designs windows graphically, drags

 program elements from the Visual Basic Toolbox and writes basic code for each

element. Visual Basic is "event-driven" which means that procedures are called

automatically when the end user chooses menu items, clicks the mouse, moves

objects on the screen, etc.

Why is Visual Basic popular? 

Programmers have undergone a major change in many years of programming variousmachines. For example, what could take days to create an application in other 

 programming languages like C, C++ could be done in hours with Visual Basic. Visual

Basic provides many interesting sets of tools to aid us in building exciting

applications. Visual Basic provides these tools to make our life far more easier 

 because all the real hard code is already written for us.

Visual Basic is not only a programming language but also a true graphical

development environment. This environment allows programmers with little

 programming experience to quickly develop powerful Windows applications. VisualBasic also has the ability to develop programs that can be used as a front-end

application to a database system, serving as the user interface which collects user 

input and displays formatted output in a more appealing and useful form.

Visual Basic is very popular for the ease with which it allows the programmer to

create nice looking graphical programs with less coding unlike many other languages

that take thousands of lines of programmer keyed code. As the programmer works in

the graphical environment much of the program code is automatically generated by

the Visual Basic program.

IMPORTANCE OF V.B.NET:

the name makes me feel that it is something special. In the History of Computing

world no other product sold more copies than Visual Basic did. Such is the

5

Page 6: RD3802A27

8/7/2019 RD3802A27

http://slidepdf.com/reader/full/rd3802a27 6/22

importance of that language which clearly states how widely it is used for developing

applications. Visual Basic is very popular for it's friendly working (graphical)

environment. Visual Basic. NET is an extension of Visual Basic programming

language with many new features in it. The changes from VB to VB .NET are huge,

ranging from the change in syntax of the language to the types of projects we can

create now and the way we design applications. Visual Basic .NET was designed totake advantage of the .NET Framework base classes and runtime environment. It

comes with power packed features that simplify application development.

Briefly on some changes:

The biggest change from VB to VB .NET is, VB .NET is Object-Oriented

now. VB .NET now supports all the key OOP features like Inheritance,

Polymorphism, Abstraction and Encapsulation. We can now create classes and

objects, derive classes from other classes and so on. The major advantage of OOP is

code reusabilityThe Command Button now is Button and the TextBox is TextBox instead of Text

as in VB6

Many new controls have been added to the toolbar to make application development

more efficient

VB .NET now adds Console Applications to it apart from Windows and Web

Applications. Console applications are console oriented applications that run in the

DOS version

All the built-in VB functionality now is encapsulated in a Namespace (collection of 

different classes) called  System  New keywords are added and old one's are either removed or renamed

VB .NET is strongly typed which means that we need to declare all the variables by

default before using them

VB .NET now supports structured exception handling using Try...Catch...Finally

syntax

The syntax for procedures is changed. Get and Let are replaced by Get and Set

Event handling procedures are now passed only two parameters

Introduction of TELEPHONE directory

This Directory never be complete without These tools

6

Page 7: RD3802A27

8/7/2019 RD3802A27

http://slidepdf.com/reader/full/rd3802a27 7/22

•  Pointer - Used to select and edit objects.

•  Picture box - Display device which can contain bit-mapped pictures, text 

and line drawings.

•  Label - Used to display text that cannot be changed  

• Text box - A text input device which accepts keyboard input and supports

editing.

• .Frame - An object which allows other controls to be arranged in logical 

 groups.

• Command button - Operates like a push button, which is pressed by

clicking the mouse on it.

• Option button - Used in a group of similar controls to select between a

numbers of mutually exclusive options.

•  List box - Just like the list part of a combo box.

•  Directory list box -Used to display files in a specified directory.

• File list box - Used to select a list of files by their attributes.

•  Shape - Used to add objects such as circles, rectangles and rounded boxes

to a form.

•  Image - Similar to picture box with less events. Used to display bitmaps.

•  Data control - used to access DBs.

•  ADO.NET - used to access with external Database

• Connection: Data Source name Which Create Connectivity

SYSTEM REQUIREMENTS

Operating System: Windows 2000/NT/Xp/Vista

7

Page 8: RD3802A27

8/7/2019 RD3802A27

http://slidepdf.com/reader/full/rd3802a27 8/22

RAM: 256 MB or more

HARD DISK 40 GB or more

Processor P3 or High

Compiler Standard C++ Compiler 

SYSTEM DESCRIPTION

THE OPERATING SYSTEM USED IN THIS PROJECT IS

WINDOWSXPIT HAS MICROSOFT OFFICE INSTALLED IN IT. IT

HAS RAM OF 2GB. HARD DISK CAPACITY OF OPERATING

SYSTEM IS 250GB. IT CONSISTS OF PENTIUM-4 PROCESSOR.THE

8

Page 9: RD3802A27

8/7/2019 RD3802A27

http://slidepdf.com/reader/full/rd3802a27 9/22

Page 10: RD3802A27

8/7/2019 RD3802A27

http://slidepdf.com/reader/full/rd3802a27 10/22

IF YES  IF 

NO

SOURCE CODE

Form 1 

Public Class Form1

Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As

System.EventArgs)

End Sub

  Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As

System.EventArgs) Handles Button1.Click 

10

ENTER YOUR

CHOICE

NEW 

DISPLAY 

 AN ENTRY 

DELETE

 AN

DISPLAY 

 ALL

EMPTY 

THE

SAVELOAD

ENTRIEEND

STO

P

IF U

WANT TO

CONTINU

E

Page 11: RD3802A27

8/7/2019 RD3802A27

http://slidepdf.com/reader/full/rd3802a27 11/22

If RadioButton1.Checked = True Then

Form2.Visible = True

Me.Visible = False

ElseIf RadioButton2.Checked = True Then

Form4.Visible = TrueMe.Visible = False

End If 

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As

System.EventArgs) Handles Button2.Click 

Me.Close()

End Sub

End Class

Form 2

Public Class Form2

aa

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As

System.EventArgs) Handles Button2.Click 

Form1.Visible = True

Me.Visible = FalseEnd Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As

System.EventArgs) Handles Button3.Click 

Me.Close()

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As

System.EventArgs) Handles Button1.Click 

If TextBox1.Text = "jayantsinha7" And TextBox2.Text = "password" Then

Form3.Visible = True

Me.Visible = False

Else

MessageBox.Show("UserName And Password Are Wrong!")

End If 

End Sub

11

Page 12: RD3802A27

8/7/2019 RD3802A27

http://slidepdf.com/reader/full/rd3802a27 12/22

End Class

Form 3

Imports System.Data.Odbc

Public Class Form3

 

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As

System.EventArgs) Handles Button5.Click 

Me.Close()

End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As

System.EventArgs) Handles Button4.Click 

Form2.Visible = TrueMe.Visible = False

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As

System.EventArgs) Handles Button1.Click 

 

Dim vcon As New OdbcConnection("dsn=jay")

Dim vqry As String

Dim ch1, ch2, ch3, ch4 As Integer vcon.Open()

If RadioButton1.Checked = True Then

ch2 = TextBox1.Text

vqry = "select* from dir where a='" & TextBox1.Text & "'"

Dim vcom As New OdbcCommand(vqry, vcon)

vcom.ExecuteNonQuery()

Dim dr As OdbcDataReader 

dr = vcom.ExecuteReader 

If dr.HasRows ThenWhile dr.Read

ch1 = dr.Item("A_No.")

End While

End If 

vqry = "select* from dir where P_Number='" & TextBox2.Text & "'"

vcom = New OdbcCommand(vqry, vcon)

vcom.ExecuteNonQuery()

dr = vcom.ExecuteReader 

If ch2 = ch1 Then

MessageBox.Show("This Number is Allready Allocated")

12

Page 13: RD3802A27

8/7/2019 RD3802A27

http://slidepdf.com/reader/full/rd3802a27 13/22

Else

 

ch4 = TextBox2.Text

If ch4 = ch3 Then

MessageBox.Show("This Number is Allready Existed!")

ElseIf dr.HasRows Then

While dr.Read

ch3 = dr.Item("P_Number")

End While

vcon.Close()

End If 

If ch4 = ch3 Then

MessageBox.Show("This Number Existed Allready!")

Else

Dim con As New OdbcConnection("dsn=jay")

Dim qry As String

con.Open()

qry = "insert into

dir(A_No.,P_Number,H_Name,Address,Connection)values('" + TextBox1.Text + "','"

+ TextBox2.Text + "','" + TextBox3.Text + "','" + RichTextBox1.Text + "','" +

TextBox4.Text + "')"

Dim com As New OdbcCommand(qry, con)com.ExecuteNonQuery()

con.Close()

MessageBox.Show("Congrats Your Data Are Submitted To

DataBase!")

End If 

End If 

End If 

ElseMessageBox.Show("Check Enter Option Then Click On Show!!")

End If 

End Sub

Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As

System.EventArgs) Handles Button6.Click 

If RadioButton1.Checked = RadioButton2.Checked = RadioButton3.Checked =

False ThenButton1.Enabled = False

Button2.Enabled = False

13

Page 14: RD3802A27

8/7/2019 RD3802A27

http://slidepdf.com/reader/full/rd3802a27 14/22

Button3.Enabled = False

TextBox2.Enabled = False

TextBox3.Enabled = False

TextBox4.Enabled = False

RichTextBox1.Enabled = False

 ElseIf RadioButton1.Checked = True Then

Button1.Enabled = True

Button2.Enabled = False

Button3.Enabled = False

TextBox2.Enabled = True

TextBox3.Enabled = True

TextBox4.Enabled = True

RichTextBox1.Enabled = True

 

ElseIf RadioButton2.Checked = True Then

Button1.Enabled = False

Button2.Enabled = True

Button3.Enabled = False

TextBox2.Enabled = True

TextBox3.Enabled = True

TextBox4.Enabled = True

RichTextBox1.Enabled = True

 

ElseIf RadioButton3.Checked = True ThenButton1.Enabled = False

Button2.Enabled = False

Button3.Enabled = True

TextBox2.Enabled = False

TextBox3.Enabled = False

TextBox4.Enabled = False

RichTextBox1.Enabled = False

 

End If End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As

System.EventArgs) Handles Button2.Click 

If RadioButton2.Checked = True Then

Dim con As New OdbcConnection("dsn=jay")

Dim qry As Stringcon.Open()

14

Page 15: RD3802A27

8/7/2019 RD3802A27

http://slidepdf.com/reader/full/rd3802a27 15/22

qry = "update dir set P_Number='" + TextBox2.Text + "',H_Name='" +

TextBox3.Text + "',Address='" + RichTextBox1.Text + "',Connection='" +

TextBox4.Text + "' where Al_No.='" & TextBox1.Text & "'"

Dim com As New OdbcCommand(qry, con)

com.ExecuteNonQuery()

con.Close()MessageBox.Show("Record Is Updated!")

Else

MessageBox.Show("Check Update Option Then Click On Show Button")

End If 

End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As

System.EventArgs) Handles Button3.Click 

If RadioButton3.Checked = True Then

Dim con As New OdbcConnection("dsn=jay")

Dim qry As String

con.Open()

qry = "delete from dir where Al_no.='" & TextBox1.Text & "'"

Dim com As New OdbcCommand(qry, con)

com.ExecuteNonQuery()

con.Close()

MessageBox.Show("This record Is Deleted")

Else

MessageBox.Show("Check Delete Option Then Click On Show Button")End If 

End Sub

End Class

Form 4

Imports System.Data.Odbc

Public Class Form4Dim t1, t2 As Boolean

Private Sub Form4_Load(ByVal sender As System.Object, ByVal e As

System.EventArgs) Handles MyBase.Load

t1 = RadioButton1.AutoCheck 

t2 = RadioButton2.AutoCheck 

If t1 = True Then

Label1.Visible = True

TextBox1.Visible = True

ElseIf t2 = True Then

Label2.Visible = True

15

Page 16: RD3802A27

8/7/2019 RD3802A27

http://slidepdf.com/reader/full/rd3802a27 16/22

TextBox2.Visible = True

Else

Label1.Visible = False

TextBox1.Visible = False

Label2.Visible = False

TextBox2.Visible = FalseEnd If 

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As

System.EventArgs) Handles Button2.Click 

If RadioButton1.Checked = True Then

Label1.Enabled = True

TextBox1.Enabled = True

Label2.Enabled = False

TextBox2.Enabled = False

ElseIf RadioButton2.Checked = True Then

Label1.Enabled = False

TextBox1.Enabled = False

Label2.Enabled = True

TextBox2.Enabled = True

End If End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As

System.EventArgs) Handles Button3.Click 

Me.Visible = False

Form1.Visible = True

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button1.Click 

Dim con As New OdbcConnection("dsn=jay")

Dim qry As String

Dim dr As OdbcDataReader 

con.Open()

If RadioButton1.Checked = True Then

qry = "select* from dir where P_Number='" & TextBox1.Text & "'"

Dim com As New OdbcCommand(qry, con)

com.ExecuteNonQuery()dr = com.ExecuteReader 

If dr.HasRows Then

16

Page 17: RD3802A27

8/7/2019 RD3802A27

http://slidepdf.com/reader/full/rd3802a27 17/22

While dr.Read

MessageBox.Show("Name:" & dr.Item("H_Name") & vbNewLine &

"Address:" & dr.Item("Address") & vbNewLine & "Connection:" &

dr.Item("Connection"))

End While

End If ElseIf RadioButton2.Checked = True Then

qry = "select* from dir where H_Name='" & TextBox2.Text & "'"

Dim com As New OdbcCommand(qry, con)

com.ExecuteNonQuery()

dr = com.ExecuteReader 

If dr.HasRows Then

While dr.Read

MessageBox.Show("Number:" & dr.Item("P_number") & vbNewLine &

"Address:" & dr.Item("Address") & vbNewLine & "Connection:" &

dr.Item("Connection"))

End While

Else

MessageBox.Show("Selection Undefined!")

End If 

End If 

con.Close()

End Sub

End Class

17

Page 18: RD3802A27

8/7/2019 RD3802A27

http://slidepdf.com/reader/full/rd3802a27 18/22

OUTPUT

18

Page 19: RD3802A27

8/7/2019 RD3802A27

http://slidepdf.com/reader/full/rd3802a27 19/22

19

Page 20: RD3802A27

8/7/2019 RD3802A27

http://slidepdf.com/reader/full/rd3802a27 20/22

20

Page 21: RD3802A27

8/7/2019 RD3802A27

http://slidepdf.com/reader/full/rd3802a27 21/22

TESTING

THE SOURCECODE DECLARED ABOVE FOR THE PROGRAM OF

TELEPHONE DIRECTORY HAS BEEN TESTED AND IT HAS BEEN

FOUND THAT THE ABOVE SOURCE CODE IS OKAY ANDCORRECT.THE PROGRAM INVOLVES MANY TYPE OF

CONVERSIONS. THESE CONVERSIONS HAS TO DONE

CAREFULLY.

MAINLY THERE ARE TWO TYPES OF TESTING:

1-SYSTEM TESTING AND

2-INTEGRATION TESTING

SYSTEM TESTING INVOLVES WHOLE TESTING OF PROGRAM AT

ONCE AND INTEGRATION TESTING INVOLVES THE BREAKING

OF PROGRAM INTO MODULES & THEN TEST.

21

Page 22: RD3802A27

8/7/2019 RD3802A27

http://slidepdf.com/reader/full/rd3802a27 22/22

 

FUTURE SCOPE

In future one change can be done by adding the fingerprints of the persons

of which the address is entered.And one more major change which can be

done in this project is that to add the snaps of the person of which the

address is entered.We can also add or subtract details of the individual.