Está en la página 1de 84

NATURAL LANGUAGE PROCESSING USING PROBABLISTIC CONTEXT FREE GRAMMER

Submitted in Partial Fulfillment of The Requirements For the Award of the Degree of Bachelor Of Computer Applications In
Submitted By

Under the Guidance of Mrs. MASHIYA AFROZE Msc, M.phil

DEPARTMENT OF COMPUTER APPLICATION


PATRICIAN COLLEGE OF ARTS AND SCIENCE ADYAR

Adyar Chennai 600 020


1

BONAFIDE CERTIFICATE
University Register Number PK74231
This is to Certify that the project work entitled as NATURAL LANGUAG E PROCESSING is the Bonafied Project Work done by R.murugan in Partial Fulfillment for the Award of the Degree Bachelor of Computer Application Year of 2009-2010

Project Guide Department

Head of the

Submitted during the University Project Viva Voce held on ____________________ at Patrician College of Arts & Science, Chennai.

Internal Examiner Examiner


__________________________ _________________________ Date: _____________________ _____________________

External

Date:

CONTENT
S.No Table Of Contents Page No.

1 2

Abstract Introduction 2.1 RSK Enterprises

Project Discription 3.1 Alpha Editor 2008 3.2 Modules in Project 6 7

System Requirements 4.1 System Configuration 4.2 Software Configuration 13 14

Software Concept 5.1 Windows XP 5.2 .Net 5.3 Visual Basic .Net 16 18 19 34 37 69 79 81

6 7 8 9 10

System Diagram Source Code Snap Shot Conclusion Bibliography

ACKNOWLEDGMENT

I thank the God, the Almighty the Creator of life who gives me faith and showers me with blessing on each and every effort I put in. I thank Rev.Bro.M.K.Francis the Correspondent of the institution for his untiring work on endless growth of the college in the matter of Infrastructure and Educational dimension. I express my profound gratitude to my Principal Prof.Eugiene Pinto, principal, Patrician college of Arts and Science for giving me wonderful opportunity to work on this project. I thank Mrs.Geetha Rufus, Vice principal, Patrician college of arts and science for her support to do my project. I ever indepted to B.Anandapriya M.C.A., M.phil,

HOD, computer science department for the encouragement and guidance


I have received I Express my thanks to Mrs. Shanthi.AL Msc, Mphil my project guidance and her continuous support while working on this project. Last but not the Least my sincere thanks to friends who have encouraged to the nice get up of my project.

ABSTRACT
This Service Center project deals with fully computer service. This service center provides Annual Maintenance Contract (AMC)
4

also to the system. AMC is for commercial and residential types. We can also make the service for Non-AMC customers. We can register the complaints and make the service. We can register the complaints and make the service. The customer can renew the AMC No. after the expiry date. The modules present in this project is as follows Login Form
Complaint Registration

AMC Registration
Complaint Status

AMC Activation
Financial Report

This Service Center is implemented using Visual Basic .net 2005 as front end and MS. Access as back end in the platform of Windows XP.

INTRODUCTIO N

PROJECT DESCRIPTION

PROJECT DESCRIPTION

This Service Center project deals with fully computer service. This service center provides Annual Maintenance Contract (AMC) also to the system. AMC is for commercial and residential types. We can also make the service for Non-AMC customers. We can register the complaints and make the service. We can register the complaints and make the service. The customer can renew the AMC No. after the expiry date.

The modules present in this project is as follows Login Form


This form allows only authorized person to enter into the project. If some unauthorized person tries to enter, he cant login.

Product Details
Here we can add new products with its name, its ID, and price. Similarly, we can edit, update, and delete particular product from the database.

Complaint Registration
If the customer is under AMC, then his AMC No. will be retrieved to take his information. The problem suggested is entered to make the rectification easily.

AMC Registration

In this form, we can add the new customer in two ways. They are
1. commercial

2. Residential For commercial customers, the AMC charges will be little high. It is because, the commercial refers to the company, shop, school, college etc. Residential customer refers to the resident. The AMC charges will be little less compared to the commercial.

Complaint Status
We here see the status of the registered complaint weather the service has been defined, under observing, finished. If the problem is finished, then here we can see the price for service. If the customer is under AMC, the service charges wont be applied. If the customer is non AMC, then charges applied.

AMC Activation
The customer gets expiry date of the AMC according to the years they register. After the expiry, if the customer is willing to register, their AMC No. is renewed.

Financial Report
We can see the financial report by selecting the start date to end date. The calculation of the companys financial position is displayed.

SYSTEM
REQUIREMENT S

10

SYSTEM CONFIGURATION

PROCESSOR

Pentium IV

PROCESSOR SPEED

2.66 GHz.

MAIN MEMMORY

256 MB. RAM.

CACHE MEMORY

256 KB.

HARD DISK DRIVE

40 GB.

KEY BOARD

101 Keys.

MOUSE

Optical / Scroll.

11

SOFTWARE CONFIGURATION

OPERATING SYSTEM

WINDOWS XP

FRONT END VERSION

: :

VISUAL BASIC .NET 2005

BACK END VERSION

: :

MS. ACCESS 2003

12

SOFTWARE CONCEPTS

SOFTWERE PROFILE
13

WINDOWS XP
Windows XP is a line of operating systems produced by Microsoft for use on personal computers, including home and business desktops, notebook computers, and media centers. The name "XP" is short for "experience". Windows XP is the successor to both Windows 2000 Professional and Windows Me, and is the first consumer-oriented operating system produced by Microsoft to be built on the Windows NT kernel and architecture. Windows XP was first released on 25 October 2001, and over 400 million copies were in use in January 2006, according to an estimate in that month by an IDC analyst. It is succeeded by Windows Vista, which was released to volume license customers on 8 November 2006, and worldwide to the general public on 30 January 2007. Direct OEM and retail sales of Windows XP ceased on 30 June 2008, although it is still possible to obtain Windows XP from System Builders (smaller OEMs who sell assembled computers) until 31 July 2009 or by purchasing Windows Vista Ultimate or Business and then downgrading to Windows XP.

The most common editions of the operating system are Windows XP Home Edition, which is targeted at home users, and Windows XP Professional, which offers additional features such as support for Windows Server domains and two physical processors,
14

and is targeted at power users, business and enterprise clients. Windows XP Media Center Edition has additional multimedia features enhancing the ability to record and watch TV shows, view DVD movies, and listen to music. Windows XP Tablet PC Edition is designed to run ink-aware applications built using the Tablet PC platform. Two separate 64-bit versions of Windows XP were also released, Windows XP 64-bit Edition for IA-64 (Itanium) processors and Windows XP Professional x64 Edition for x86-64. There is also Windows XP Embedded, a componentized version of the Windows XP Professional, and editions for specific markets such as Windows XP Starter Edition. Windows XP is known for its improved stability and efficiency over the 9x versions of Microsoft Windows. It presents a significantly redesigned graphical user interface, a change Microsoft promoted as more user-friendly than previous versions of Windows. New software management capabilities were introduced to avoid the "DLL hell" that plagued older consumer-oriented 9x versions of Windows. It is also the first version of Windows to use product activation to combat software piracy, a restriction that did not sit well with some users and privacy advocates. Windows XP has also been criticized by some users for security vulnerabilities, tight integration of applications such as Internet Explorer 6 and Windows Media Player, and for aspects of its
15

default user interface. Later versions with Service Pack 2, and Internet Explorer 7 addressed some of these concerns.

During development, the project was codenamed "Whistler", after Whistler, British Columbia, as many Microsoft employees skied at the Whistler-Blackcomb ski resort.

As of the end of November 2008, Windows XP is the most widely used operating system in the world with a 66.31% market share, having peaked at 85% in December 2006.

16

FRONT END
17

Visual studio .net .NET


.net (network) is a generic top-level domain (gTLD) used on the Internet's Domain Name System. The .net gTLD is currently operated by VeriSign. Registrations are processed via accredited registrars and internationalized domain names are also accepted (see details). .net is one of the original top-level domains (despite not being mentioned in RFC 920), created in January 1985. It was initially intended to be used only for the computers of network providers (such as Internet service providers). However, there are no formal restrictions on who can register a .net domain name. Therefore, while still popular with network operators, it is often treated as a second

18

.com. It is currently the third most popular top-level domain, after .com and .de. In addition to being an abbreviation for "network", "net" is also a romanisation of the Russian word ("no" or "not", also commonly romanised as the more authentically pronounced "nyet"), and a domain name like "object.net" can be interpreted as "there is no object". Some domains exploit this fun, for example mozga.net (brain absent). Some online poker or other gambling sites operate real-money games at a .com address and games without actual stakes (promoted as being for fun or education) at the same name in .net. This can be used to get around legal issues regarding the advertising of online gambling in the United States, since the .net site can be promoted legally, but such promotion helps make people aware of the name of the real-money site even in jurisdictions where such things are of questionable legality.[citation needed]

Operation of .net from 2005


VeriSign, the operator of .net after acquiring Network Solutions, had its operational contract expire on June 30, 2005. ICANN, the organization responsible for domain management, sought proposals from organizations to operate it for at least six years beyond that date. VeriSign won the contract bid, and secured its control over the .net registry for another six years.
19

VISUAL BASIC.NET
Visual Basic (VB) is a programming language based on the original DOS language called BASIC (Beginners' All-purpose Symbolic Instruction Code). VB.NET 2005, an offshoot of Visual Basic, is an object-oriented programming language based on VB that is implemented using the Microsoft .NET framework. The basic syntax of the Visual Basic language remains unchanged in VB.NET 2005, but includes additional features such as structured exception handling and short circuited expressions to enhance the infrastructure of the programming language. Developers have found VB.NET to be controversial as some of the software and developmental changes clash with the original language within VB and have caused compatibility issues. Visual Studio .NET is the predominant integrated development environment (IDE) that VB.NET developers employ.

Visual Basic programmers supporting VB.NET indicate that language constructs and user interface features in the newer system have caused programming issues within the original VB system. Developers using VB.NET recognize that the upgraded VB system incorporates contemporary object oriented programming paradigms in a more stable environment than was originally thought possible.
20

Visual Basic .NET is a programming language that can be used to create winforms or webapp applications and create programming based in any object-oriented programming language (OOP), ADO.NET, Multithreading or Windows Services. VB.NET

programming utilizes concepts connected to string encryption, forms inheritance, regular expressions and deployment.

Visual Basic (VB), formerly called Visual Basic .NET (VB.NET), is an object-oriented computer language that can be viewed as an evolution of Microsoft's Visual Basic (VB) implemented on the Microsoft .NET framework. Its introduction has been controversial, as significant changes were made that broke backward compatibility with older versions and caused a rift within the developer community.

Versions of Visual Basic .NET


As of November 2007, there are four versions of Visual Basic .NET that were implemented by The Visual Basic Team Visual Basic .NET (VB 7)

The original Visual Basic .NET was released alongside Visual C# and ASP.NET in 2002. C# widely touted as Microsoft's answer
21

to Java received the lion's share of media attention, while VB.NET (sometimes known as VB7) was not widely covered. As a result, few outside the Visual Basic community paid much attention to it.

Those who did try the first version found a powerful but very different language under the hood, with disadvantages in some areas, including a runtime that was ten times as large to package as the VB6 runtime and an increased memory footprint.

Visual Basic .NET 2003 (VB 7.1)


Visual Basic .NET 2003 was released with version 1.1 of the .NET Framework. New features included support for the .NET Compact Framework and a better VB upgrade wizard. Improvements were also made to the performance and reliability of the .NET IDE (particularly the background compiler) and runtime.

In addition, Visual Basic .NET 2003 was also available in the Visual Studio .NET 2003 Academic Edition (VS03AE). VS03AE is distributed to a certain number of scholars from each country for free.

Visual Basic 2005 (VB 8.0)

22

Visual Basic 2005 is the name used to refer to the update to Visual Basic .NET, Microsoft having decided to drop the .NET portion of the title. For this release, Microsoft added many features, including: Edit and Continue - probably the biggest "missing

feature" from Visual Basic .NET, allowing the modification of code and immediate resumption of execution provides: o easy access to certain areas of the .NET Framework that Design-time expression evaluation The My pseudo-namespace (overview, details), which

otherwise require significant code to access o dynamically-generated classes (notably My.Forms)

Improvements to the VB-to-VB.NET converter The Using

keyword, simplifying the use of objects that require the Dispose pattern to free resources Just My Code, which hides boilerplate code written by the

Visual Studio .NET IDE Data Source binding, easing database client/server

development

23

The above functions (particularly My) are intended to reinforce Visual Basic .NET's focus as a rapid application development platform and further differentiate it from C#.

Visual Basic 2005 introduced features meant to fill in the gaps between itself and other "more powerful" .NET languages, adding: o .NET 2.0 languages features such as: generics Partial classes, a method of defining some parts

of a class in one file and then adding more definitions later; particularly useful for integrating user code with auto-generated code o Nullable Types XML comments that can be processed by tools like NDoc

to produce "automatic" documentation Operator overloading Support for unsigned integer data types commonly used

in other languages

'IsNot' operator patented


One other feature of Visual Basic 2005 is the conversion of 'If Not X Is Y' to 'If X IsNot Y' which gained notoriety when it was found to be the subject of a Microsoft patent application.

24

Visual Basic 2005 Express


As part of the Visual Studio product range, Microsoft created a set of free development environments for hobbyists and novices, the Visual Studio 2005 Express series. One edition in the series is Visual Basic 2005 Express Edition, which was succeeded by Visual Basic 2008 Express Edition in the 2008 edition of Visual Studio Express.

The Express Editions are targeted specifically for people learning a language. They have a streamlined version of the user interface, and lack more advanced features of the standard versions. On the other hand, Visual Basic 2005 Express Edition does contain the Visual Basic 6.0 converter, so it is a way to evaluate feasibility of conversion from older versions of Visual Basic

Visual Basic 2008 (VB 9.0)


Visual Basic 9.0 was released together with the Microsoft .NET Framework 3.5 on November 19, 2007. For this release, Microsoft added many features, including: A true conditional operator If (boolean, value, value) to

replace the IIF function.

25

Anonymous types Support for LINQ Lambda expressions XML Literals Type Inference

Visual Basic 'VBx' (VB 10.0)


Visual Basic 10, also known as VBx, will offer support for the Dynamic Language Runtime (DLR). VB 10 is planned to be part of Silverlight 2.0.

Relation to older versions of Visual Basic (VB6 & previous)


Whether Visual Basic .NET should be considered as just another version of Visual Basic or a completely different language is a topic of debate. This is not obvious, as once the methods that have been moved around and that can be automatically converted are accounted for, the basic syntax of the language has not seen many "breaking" changes, just additions to support new features like structured exception handling and short-circuited expressions. Two important data type changes occurred with the move to VB.NET. Compared to VB6, the Integer data type has been doubled in length from 16 bits to 32 bits, and the Long data type has been doubled in

26

length from 32 bits to 64 bits. This is true for all versions of VB.NET. A 16-bit integer in all versions of VB.NET is now known as a Short. Similarly, the Windows Forms GUI editor is very similar in style and function to the Visual Basic form editor.

The version numbers used for the new Visual Basic (7, 7.1, 8, 9, ...) clearly imply that it is viewed by Microsoft as still essentially the same product as the old Visual Basic.

The things that have changed significantly are the semantics from those of an object-based programming language running on a deterministic, reference-counted engine based on COM to a fully object-oriented language backed by the .NET Framework, which consists of a combination of the Common Language Runtime (a virtual machine using generational garbage collection and a just-intime compilation engine) and a far larger class library. The increased breadth of the latter is also a problem that VB developers have to deal with when coming to the language, although this is somewhat addressed by the My feature in Visual Studio 2005.

The changes have altered many underlying assumptions about the "right" thing to do with respect to performance and
27

maintainability. Some functions and libraries no longer exist; others are available, but not as efficient as the "native" .NET alternatives. Even if they compile, most converted VB6 applications will require some level of refactoring to take full advantage of the new language. Documentation is available to cover changes in the syntax, debugging applications, deployment and terminology.

Comparative samples
The following simple example demonstrates similarity in syntax between VB and VB.NET. Both examples pop up a message box saying "Hello, World" with an OK button.

Classic VB example:
Sub Command1_Click() MsgBox "Hello, World" End Sub

A VB.NET example:
Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click MessageBox.Show("Hello, World") End Sub
28

Note that all procedure calls must be made with

parentheses in VB.NET, whereas in VB6 there were different conventions for functions (parentheses required) and subs (no parentheses allowed, unless called using the keyword Call). Also note that the names Command1 and Button1 are not

obligatory. However, these are default names for a command button in VB6 and VB.NET respectively. In VB.NET, the Handles keyword is used to make the sub

Button1_Click a handler for the Click event of the object Button1. In VB6, event handler subs must have a specific name consisting of the object's name ("Command1"), an underscore ("_"), and the event's name ("Click", hence "Command1_Click"). There is a function called MsgBox in the

Microsoft.VisualBasic namespace which can be used similarly to the corresponding function in VB6. There is a controversy about which function to use as a best practice (not only restricted to showing message boxes but also regarding other features of the

Microsoft.VisualBasic namespace). Some programmers prefer to do things "the .NET way", since the Framework classes have more features and are less language-specific. Others argue that using language-specific features makes code more readable (for example, using int (C#) or Integer (VB.NET) instead of System.Int32).
29

In VB 2008, the inclusion of "Byval sender as Object,

Byval e as EventArgs" has become optional. The following example demonstrates a difference between VB6 and VB.NET. Both examples unload the active window.

Classic VB Example:
Sub cmdClose_Click() Unload Me End Sub

A VB.NET example: Sub btnClose_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnClose.Click Me.Close() End Sub Note the 'cmd' prefix being replaced with the 'btn' prefix, conforming to the new convention previously mentioned. Visual Basic 6 did not provide common operator shortcuts. The following are equivalent:

VB6 Example:
Sub Timer1_Timer() Me.Height = Me.Height - 1
30

End Sub

VB.NET example:
Sub Timer1_Tick(ByVal sender As Object, ByVal e As EventArgs) Handles Timer1.Tick Me.Height -= 1 End Sub

Criticism
Many long-time Visual Basic users have complained about

Visual Basic .NET because initial versions dropped a large number of language constructs and user interface features that were available in VB6 (which is now no longer sold), and changed the semantics of those that remained; for example, in VB.NET parameters are (by default) passed by value, not by reference. Detractors refer pejoratively to VB.NET as Visual Fred or DOTNOT. On March 8, 2005, a petition was set up in response to Microsoft's refusal to extend its mainstream support for VB6.

VB.NET's supporters state that the new language is in most respects more powerful than the original, incorporating modern

31

object oriented programming paradigms in a more natural, coherent and complete manner than was possible with earlier versions. Opponents tend not to disagree with this, instead taking the position that although VB6 has flaws in its object model, the cost in terms of redevelopment effort is too high for any benefits that might be gained by converting to VB.NET. Independent developers producing software for Internet distribution have also taken issue with the size of the runtime.

It is simpler to decompile languages that target Common Intermediate Language, including VB.NET, compared to languages that compile to machine code. Tools like .NET Reflector can provide a close approximation to the original code due to the large amount of metadata provided in CIL.

Microsoft supplies an automated VB6-to-VB.NET converter with Visual Studio .NET, which has improved over time, but it cannot convert all code, and almost all non-trivial programs will need some manual effort to compile. Most will need a significant level of code refactoring to work optimally. Visual Basic programs that are mainly algorithmic in nature can be migrated with few difficulties; those that rely heavily on such features as database support, graphics,
32

unmanaged operations or on implementation details are more troublesome.

However in 2005 ArtinSoft, the company that developed the VB6-to-VB.NET converter for Microsoft that comes with Visual Studio .NET, developed a migration tool called the ArtinSoft Visual Basic Upgrade Companion. This tool expands upon the migration wizard included in Visual Studio .NET by providing some automated code refactoring, such as type inference for late-bound variables producing explicitly typed variablesand conversion to structured error handling, among many other tweaks that improve code quality.

Using artificial intelligence algorithms, it is possible for this new tool to recognize certain code patterns that can be reorganized into more structured versions, potentially yielding a higher quality .NET code. For example, the tool is able to automatically recognize commonly used patterns of On Error GoTo, analyze them, and convert them to code blocks that use Try ... Catch instead of the legacy error handling modelin many cases with no human intervention. However, a line-by-line conversion will not be able to create the object-oriented style of programming that is at the heart of .NET programming. Other tools such as NewCode's use a model33

driven approach to enable users to re-engineer the application structure on a model, prior to .NET code generation. In addition, the required runtime libraries for VB6 programs are provided with Windows 98 SE and above, while VB.NET programs require the installation of the significantly larger .NET Framework. The framework is included with Windows Vista, Windows XP Media Center Edition, Windows XP Tablet PC Edition, Windows Server 2008 and Windows Server 2003. For other supported operating systems such as Windows 2000 or Windows XP (Home or Professional Editions), it must be separately installed.

Microsoft's response to developer dissatisfaction has focused around making it easier to move new development and shift existing codebases from VB6 to VB.NET. Their latest offering is the VBRun website, which offers code samples and articles for: preview Fusion) integrating VB6 and VB.NET solutions (dubbed VB completing common tasks in VB6, like creating a print

34

Cross-platform and open-source development


The creation of open-source tools for VB.NET development have been slow compared to C#, although the Mono development platform provides an implementation of VB.NET-specific libraries and a VB.NET 8.0 compatible compiler written in VB.NET, as well as standard framework libraries such as Windows Forms GUI library.

Hello world example


The following is a very simple VB.NET program, a version of the classic "Hello world" example created as a console application:

Module Module1 Sub Main() Console.WriteLine("Hello, world!") End Sub End Module

The effect is to write the text Hello, world! to the command line. Each line serves a specific purpose, as follows: Module Module1 This is a module definition, a division of code similar to a class, although modules can contain classes. Modules serve as containers of
35

code that can be referenced from other parts of a program. This module matches the name of the code file: Module1.vb Sub Main() This is the entry point where the program begins execution. Sub is an abbreviation for "sub-procedure." Console.WriteLine("Hello, world!") This line performs the actual task of writing the output. Console is a system object, representing a command-line console where a program can input and output text. The program calls the Console method WriteLine, which causes the string passed to it to be displayed on the console.

36

BACK END

37

5.4 MICROSOFT ACCESS


Microsoft Office Access, previously known as Microsoft Access, is a relational database management system from Microsoft that combines the relational Microsoft Jet Database Engine with a graphical user interface and software development tools. It is a member of the 2007 Microsoft Office system. Access stores data in its own format based on the Access Jet Database Engine. It can also import or link directly to data stored in other Access databases, Excel, SharePoint lists, text, XML, Outlook, HTML, dBase, Paradox, Lotus 1-2-3, or any ODBC-compliant data container including Microsoft SQL Server, Oracle, MySQL and PostgreSQL. Software developers and data architects can use it to develop application software and non-programmer "power users" can use it to build simple applications. It supports some object-oriented techniques but falls short of being a fully object-oriented development tool.

38

History
Access version 1.0 was released in November 1992, quickly followed in May of 1993 by an Access 1.1 release to improve compatibility with other Microsoft products and include the Access Basic programming language. Microsoft specified the minimum hardware requirements for Access v2.0: Microsoft Windows v3.0 with 4 MB of RAM required, 6 MB RAM recommended; 8 MB of available hard disk space required, 14 MB hard disk space recommended. The product was shipped on seven 1.44 MB diskettes. The manual shows a 1993 copyright date. Originally, the software worked well with relatively small databases but testing showed some circumstances caused data corruption. For example, file sizes over 10 MB were problematic (note that most hard disks were smaller than 500 MB at the time this was in wide use), and the Getting Started manual warns about a number of circumstances where obsolete device drivers or incorrect

configurations can cause data loss. With the phasing out of Windows 95, 98 and ME, improved network reliability, and Microsoft having released 8 service packs for the Jet Database Engine, the reliability of Access databases has been vastly improved in both size and number of users.

39

With Office 95, Microsoft Access 95 became part of the Microsoft Office Professional Suite joining Microsoft Excel, Word, and PowerPoint and transitioning from Access Basic to Visual Basic for Applications (VBA). Since then, there have been releases of Microsoft Access with each release of Office. This includes Access 97 (version 8.0), Access 2000 (version 9.0), Access 2002 (version 10.0), Access 2003 (version 11.0), and Access 2007 (version 12.0). The native Access database format (the Jet MDB Database) has also evolved over the years. Formats include Access 1.0, 1.1, 2.0, 95, 97, 2000, and 2002-2007. The most significant transition was from the Access 97 to the Access 2000 format which was not backward compatible, and Access 2000 required the new format. Since Access 2000, all newer versions of Access support the Access 2000 format. New features were added to the Access 2002 format which can be used by Access 2002, 2003, and 2007. In Access 2007, a new database format was introduced: ACCDB. The ACCDB supports complex data types such as multivalue and attachment fields. These new field types are essentially recordsets in fields and allow the storage of multiple values in one field. Prior to the introduction of Access, the desktop database market was dominated by Borland with their Paradox and dBase
40

programs, and FoxPro. Microsoft Access was the first mass market database program for Windows. With the purchase of FoxPro and incorporating its Rushmore query optimization routines into Access, Microsoft Access quickly became the dominant database for Windows effectively eliminating the competition which failed to transition from the MS-DOS world. Access's initial codename was Cirrus; the forms engine was called Ruby. This was before Visual Basic - Bill Gates saw the prototypes and decided that the BASIC language component should be co-developed as a separate expandable application, a project called Thunder. The two projects were developed separately as the underlying forms engines were incompatible with each other; however, these were merged together again after VBA. Access was also the name of a communications program from Microsoft, meant to compete with ProComm and other programs. This proved a failure and was dropped.Years later Microsoft reused the name for its database software.

41

5.5 DATABASE
A database is a structured collection of records or data that is stored in a computer system. The structure is achieved by organizing the data according to a database model. The model in most common use today is the relational model. Other models such as the hierarchical model and the network model use a more explicit representation of relationships.

Database management systems


A computer database relies upon software to organize the storage of data. This software is known as a database management system (DBMS). Database management systems are categorized according to the database model that they support. The model tends to determine the query languages that are available to access the database. A great deal of the internal engineering of a DBMS, however, is independent of the data model, and is concerned with managing factors such as performance, concurrency, integrity, and recovery from hardware failures. In these areas there are large differences between products. A Relational Database Management System (RDBMS)

implements the features of the relational model outlined above. In this

42

context,

Date's

"Information

Principle"

states:

"the

entire

information content of the database is represented in one and only one way. Namely as explicit values in column positions (attributes) and rows in relations (tuples). Therefore, there are no explicit pointers between related tables."

Database models Post-relational database models


Products offering a more general data model than the relational model are sometimes classified as post-relational. The data model in such products incorporates relations but is not constrained by the Information Principle, which requires that all information is represented by data values in relations. Some of these extensions to the relational model actually integrate concepts from technologies that pre-date the relational model. For example, they allow representation of a directed graph with trees on the nodes. Some products implementing such models have been built by extending relational database systems with non-relational features. Others, however, have arrived in much the same place by adding relational features to pre-relational systems. Paradoxically, this allows products that are historically pre-relational, such as PICK and
43

MUMPS, to make a plausible claim to be post-relational in their current architecture.

Object database models


In recent years, the object-oriented paradigm has been applied to database technology, creating a new programming model known as object databases. These databases attempt to bring the database world and the application programming world closer together, in particular by ensuring that the database uses the same type system as the application program. This aims to avoid the overhead (sometimes referred to as the impedance mismatch) of converting information between its representation in the database (for example as rows in tables) and its representation in the application program (typically as objects). At the same time, object databases attempt to introduce the key ideas of object programming, such as encapsulation and polymorphism, into the world of databases. A variety of these ways have been tried for storing objects in a database. Some products have approached the problem from the application programming end, by making the objects manipulated by the program persistent. This also typically requires the addition of some kind of query language, since conventional programming languages do not have the ability to find objects based on their

44

information content. Others have attacked the problem from the database end, by defining an object-oriented data model for the database, and defining a database programming language that allows full programming capabilities as well as traditional query facilities.

45

SYSTEM DIAGRAM

46

47

DATABAS E DESIGN

48

AMC: FIELD NAME Date AMCNO Cname CAddress PhNo NOS Years Highest Amount DOE Status Charges: FIELD NAME PC PR DATA TYPE Number Number DATA TYPE Text Text Text Text Text Number Number Number Number Text Number

49

Complaint: FIELD NAME Date Cno Name-ID Address Cdescription Result Visit Pay SerBy Status DATA TYPE Text Text Text Text Text Text Number Number Text Number

50

SOURCE CODE

51

MDI FORM
Imports System.Windows.Forms Public Class ServiceCenter Private Sub RegisterToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RegisterToolStripMenuItem.Click SerForm.Show() Me.TSSL.Text = "Registered Form In Process" End Sub Private Sub ServiceCenter_Disposed(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Disposed Constr.Close() End End Sub Private Sub ServiceCenter_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Try Constr.Open() Dim St As String, Dt As New DataSet St = "Select * from Charges " Dt = GetDataSet(St) Pc = CDbl(Dt.Tables(0).Rows(0).Item(0)) Pr = CDbl(Dt.Tables(0).Rows(0).Item(1)) Catch ex As Exception MsgBox(ex.StackTrace) End Try End Sub Private Sub ResultToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ResultToolStripMenuItem.Click Result.Show() End Sub Private Sub CommercialToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CommercialToolStripMenuItem.Click AMC.Show() AMC.TextBox8.Text = Pc
52

End Sub Private Sub ResidentailToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ResidentailToolStripMenuItem.Click AMCR.Show() AMCR.TextBox8.Text = Pr End Sub Private Sub ServicedToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ServicedToolStripMenuItem.Click St_1 = False Report1.Show() End Sub Private Sub NotServicedToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NotServicedToolStripMenuItem.Click St_1 = True Report1.Show() End Sub Private Sub ActivationToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ActivationToolStripMenuItem.Click St_2 = False Report2.Show() End Sub Private Sub DeActivationToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DeActivationToolStripMenuItem.Click St_2 = True Report2.Show() End Sub Private Sub FinanceToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FinanceToolStripMenuItem.Click Fin.Show() End Sub

53

Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click Constr.Close() End End Sub End Class

SERVICE FORM
Imports System.Data Imports System.Data.OleDb Public Class SerForm Dim Dst, ds As New DataSet Dim J As Integer = 0 Private Sub SerForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.MdiParent = ServiceCenter Dst.Clear() Dst = GetDataSet("Select * from Complaint where status=1") Load_Data(Dst, 0) J=0 Load_List(ListBox1, Dst, 1) End Sub Private Sub Load_Data(ByVal Ds As DataSet, ByVal i As Integer) Try If Ds.Tables(0).Rows.Count > i And i > -1 Then TextBox1.Text = Ds.Tables(0).Rows(i).Item(0) TextBox2.Text = Ds.Tables(0).Rows(i).Item(1) TextBox3.Text = Ds.Tables(0).Rows(i).Item(2) TextBox4.Text = Ds.Tables(0).Rows(i).Item(3) TextBox5.Text = Ds.Tables(0).Rows(i).Item(4) Else MsgBox("No Record Found", MsgBoxStyle.Information) End If Catch ex As Exception End Try End Sub

54

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click TextBox1.Text = Now.Date.ToShortDateString TextBox2.Text = Random_ID(6) TextBox3.Text = "" TextBox4.Text = "" TextBox5.Text = "" End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim St As String = "Insert into Complaint values('" & TextBox1.Text & "','" & TextBox2.Text & "','" & TextBox3.Text & "','" & TextBox4.Text & "','" & TextBox5.Text & "','On Process',0,0,'Not Serviced',1)" MsgBox(St) If ExecuteCmd(St) = 1 Then MsgBox("Complaint registered", MsgBoxStyle.Information) Dst.Clear() Dst = GetDataSet("Select * from Complaint") Load_Data(Dst, 0) J=0 Load_List(ListBox1, Dst, 1) End If End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Dim St As String = "Delete from Complaint where CNo='" & TextBox2.Text & "'" MsgBox(St) If ExecuteCmd(St) = 1 Then MsgBox("Complaint Deleted", MsgBoxStyle.Information) Dst.Clear() Dst = GetDataSet("Select * from Complaint") Load_Data(Dst, 0) J=0 Load_List(ListBox1, Dst, 1) End If End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
55

Dim St As String = "Update Complaint Set Name-ID='" & TextBox3.Text & "',Address='" & TextBox4.Text & "',CDescription='" & TextBox5.Text & "' where CNo='" & TextBox2.Text & "'" MsgBox(St) If ExecuteCmd(St) = 1 Then MsgBox("Complaint registered", MsgBoxStyle.Information) Dst.Clear() Dst = GetDataSet("Select * from Complaint") Load_Data(Dst, 0) Load_List(ListBox1, Dst, 1) End If End Sub Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged Dim St As String = "Select * from Complaint where CNo='" & ListBox1.Text & "'" Dim Dsx As New DataSet Dsx = GetDataSet(St) Load_Data(Dsx, 0) End Sub Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click Me.Close() End Sub Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click Dst.Clear() Dst = GetDataSet("Select * from Complaint where status=1") J=J+1 Load_Data(Dst, J) End Sub Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click Dst.Clear() Dst = GetDataSet("Select * from Complaint where status=1") J=J-1 Load_Data(Dst, J)
56

End Sub Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click Dim St As String = "Select * from Complaint where CNo='" & TextBox6.Text & "'" Dim Dsx As New DataSet Dsx = GetDataSet(St) Load_Data(Dsx, 0) End Sub End Class

RESULT FORM
Public Class Result Dim Dst As DataSet Dim Amcs As Boolean = False Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click Me.Close() End Sub Private Sub Load_Data(ByVal Ds As DataSet) Try TextBox1.Text = Ds.Tables(0).Rows(0).Item(1) ComboBox1.Text = Ds.Tables(0).Rows(0).Item(5) ComboBox2.Text = Ds.Tables(0).Rows(0).Item(6) TextBox2.Text = Ds.Tables(0).Rows(0).Item(7) TextBox3.Text = Ds.Tables(0).Rows(0).Item(8) Catch ex As Exception End Try End Sub Private Sub Result_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.MdiParent = ServiceCenter Dst = GetDataSet("Select * from Complaint where status=1") Load_Data(Dst) Load_List(ListBox1, Dst, 1) End Sub

57

Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged Dim St As String = "Select * from Complaint where CNo='" & ListBox1.Text & "'" Dim Dsx As New DataSet Dsx = GetDataSet(St) Load_Data(Dsx) End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Dim St As String = "Update Complaint Set Result='" & ComboBox1.Text & "',Visit=" & ComboBox2.Text & ",Pay=" & TextBox2.Text & ",SerBy='" & TextBox3.Text & "',Status=0 where CNo='" & TextBox1.Text & "'" MsgBox(St) If ExecuteCmd(St) = 1 Then MsgBox("Complaint Complete", MsgBoxStyle.Information) Dst.Clear() Dst = GetDataSet("Select * from Complaint where status=1") Load_Data(Dst) Load_List(ListBox1, Dst, 1) End If End Sub Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged ComboBox2.Text = 1 If Amcs = False Then TextBox2.Text = "350" End If End Sub Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged ComboBox2.Text = 0 If Amcs = False Then TextBox2.Text = "250" End If End Sub
58

Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged Dim St As String = "Select * from Complaint where CNo='" & TextBox1.Text & "'" Amcs = False Dim Cnox As String Dim Dsx, Dsx2 As New DataSet Dsx = GetDataSet(St) If Dsx.Tables(0).Rows.Count > 0 Then Cnox = Dsx.Tables(0).Rows(0).Item(2) St = "Select * from AMC where AMCNO='" & Cnox & "'and Status=1" Dsx2 = GetDataSet(St) If Dsx2.Tables(0).Rows.Count > 0 Then Amcs = True End If End If End Sub End Class AMC COMMERCIAL FORM Public Class AMC Dim Dst As New DataSet Private Sub AMC_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.MdiParent = ServiceCenter Dst = GetDataSet("Select * from AMC where Highest=" + CStr(Pc)) Load_Data(Dst) Load_List(ListBox1, Dst, 1) End Sub Private Sub Load_Data(ByVal Ds As DataSet) Try TextBox1.Text = Ds.Tables(0).Rows(0).Item(0) TextBox2.Text = Ds.Tables(0).Rows(0).Item(1) Textbox3.Text = Ds.Tables(0).Rows(0).Item(2) TextBox4.Text = Ds.Tables(0).Rows(0).Item(3) TextBox5.Text = Ds.Tables(0).Rows(0).Item(4)
59

TextBox6.Text = Ds.Tables(0).Rows(0).Item(5) TextBox7.Text = Ds.Tables(0).Rows(0).Item(6) TextBox8.Text = Ds.Tables(0).Rows(0).Item(7) TextBox9.Text = Ds.Tables(0).Rows(0).Item(8) TextBox10.Text = Ds.Tables(0).Rows(0).Item(9) Catch ex As Exception End Try End Sub Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged Dim St As String = "Select * from AMC where AMCNO='" & ListBox1.Text & "'" Dim Dsx As New DataSet Dsx = GetDataSet(St) Load_Data(Dsx) End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click TextBox1.Text = Now.Date.ToShortDateString TextBox2.Text = Random_ID(5) Textbox3.Text = "" TextBox4.Text = "" TextBox5.Text = "" TextBox6.Text = "" TextBox7.Text = "" TextBox8.Text = "3500" TextBox9.Text = "" TextBox10.Text = Now.Date.AddYears(1).ToShortDateString End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim St As String St = "Insert into AMC values('" & TextBox1.Text & "','" & TextBox2.Text & "','" & Textbox3.Text & "','" & TextBox4.Text & "','" & TextBox5.Text & "'," St = St + "" + TextBox6.Text & "," & TextBox7.Text & "," & TextBox8.Text & "," & TextBox9.Text & ",'" & TextBox10.Text & "',1)" If ExecuteCmd(St) = 1 Then
60

MsgBox("AMC Record Inserted", MsgBoxStyle.Information) Dst = GetDataSet("Select * from AMC where Highest=" + CStr(Pc)) Load_List(ListBox1, Dst, 1) End If End Sub Private Sub TextBox6_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox6.TextChanged Total_Amt() End Sub Sub Total_Amt() Try TextBox9.Text = CInt(TextBox7.Text) * CInt(TextBox6.Text) * CInt(TextBox8.Text) TextBox10.Text = Now.Date.AddYears(CInt(TextBox7.Text)).ToShortDateString Catch ex As Exception End Try End Sub Private Sub TextBox7_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox7.TextChanged Total_Amt() End Sub Private Sub TextBox8_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox8.TextChanged Total_Amt() End Sub Private Sub TextBox9_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox9.TextChanged Total_Amt() End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
61

Dim St As String St = "Delete from AMC where AMCNO='" & TextBox2.Text & "'" If ExecuteCmd(St) = 1 Then MsgBox("AMC Record Deleted", MsgBoxStyle.Information) Dst = GetDataSet("Select * from AMC where Highest=" + CStr(Pc)) Load_List(ListBox1, Dst, 1) End If End Sub Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click Dim St As String St = "Update AMC Set CName='" & Textbox3.Text & "',CAddress='" & TextBox4.Text & "',PhNo='" & TextBox5.Text & "',NOS=" & TextBox6.Text & ",Years=" & TextBox7.Text & "," St = St + "Highest=" + TextBox8.Text & ",Amount=" & TextBox9.Text & ",DOE='" & TextBox10.Text & "' where AMCNO='" & TextBox2.Text & "'" If ExecuteCmd(St) = 1 Then MsgBox("AMC Record Update", MsgBoxStyle.Information) End If End Sub Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click Dst = GetDataSet("Select * from AMC where Highest=" + CStr(Pc)) Load_List(ListBox1, Dst, 1) End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Dim St As String = "Select * from AMC where AMCNO = '" & TextBox11.Text & "'" Dim Dsx As New DataSet Dsx = GetDataSet(St) Load_Data(Dsx) End Sub Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
62

Me.Dispose() End Sub Private Sub TextBox11_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox11.GotFocus TextBox11.Text = "" End Sub End Class

AMC RESIDENTIAL FORM


Public Class AMCR Dim Dst As New DataSet Private Sub AMCR_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.MdiParent = ServiceCenter Dst = GetDataSet("Select * from AMC where Highest=" + CStr(Pr)) Load_Data(Dst) Load_List(ListBox1, Dst, 1) End Sub Private Sub Load_Data(ByVal Ds As DataSet) Try TextBox1.Text = Ds.Tables(0).Rows(0).Item(0) TextBox2.Text = Ds.Tables(0).Rows(0).Item(1) Textbox3.Text = Ds.Tables(0).Rows(0).Item(2) TextBox4.Text = Ds.Tables(0).Rows(0).Item(3) TextBox5.Text = Ds.Tables(0).Rows(0).Item(4) TextBox6.Text = Ds.Tables(0).Rows(0).Item(5) TextBox7.Text = Ds.Tables(0).Rows(0).Item(6) TextBox8.Text = Ds.Tables(0).Rows(0).Item(7) TextBox9.Text = Ds.Tables(0).Rows(0).Item(8) TextBox10.Text = Ds.Tables(0).Rows(0).Item(9) Catch ex As Exception End Try End Sub Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
63

Dim St As String = "Select * from AMC where AMCNO='" & ListBox1.Text & "'" Dim Dsx As New DataSet Dsx = GetDataSet(St) Load_Data(Dsx) End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click TextBox1.Text = Now.Date.ToShortDateString TextBox2.Text = Random_ID(5) Textbox3.Text = "" TextBox4.Text = "" TextBox5.Text = "" TextBox6.Text = "" TextBox7.Text = "" TextBox8.Text = "2500" TextBox9.Text = "" TextBox10.Text = Now.Date.AddYears(1).ToShortDateString End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim St As String St = "Insert into AMC values('" & TextBox1.Text & "','" & TextBox2.Text & "','" & Textbox3.Text & "','" & TextBox4.Text & "','" & TextBox5.Text & "'," St = St + "" + TextBox6.Text & "," & TextBox7.Text & "," & TextBox8.Text & "," & TextBox9.Text & ",'" & TextBox10.Text & "',1)" If ExecuteCmd(St) = 1 Then MsgBox("AMC Record Inserted", MsgBoxStyle.Information) Dst = GetDataSet("Select * from AMC where Highest=" + CStr(Pr)) Load_List(ListBox1, Dst, 1) End If End Sub Private Sub TextBox6_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox6.TextChanged Total_Amt() End Sub
64

Sub Total_Amt() Try TextBox9.Text = CInt(TextBox7.Text) * CInt(TextBox6.Text) * CInt(TextBox8.Text) TextBox10.Text = Now.Date.AddYears(CInt(TextBox7.Text)).ToShortDateString Catch ex As Exception End Try End Sub Private Sub TextBox7_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox7.TextChanged Total_Amt() End Sub Private Sub TextBox8_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox8.TextChanged Total_Amt() End Sub Private Sub TextBox9_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox9.TextChanged Total_Amt() End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Dim St As String St = "Delete from AMC where AMCNO='" & TextBox2.Text & "'" If ExecuteCmd(St) = 1 Then MsgBox("AMC Record Deleted", MsgBoxStyle.Information) Dst = GetDataSet("Select * from AMC where Highest=" + CStr(Pr) Load_List(ListBox1, Dst, 1) End If End Sub

65

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click Dim St As String St = "Update AMC Set CName='" & Textbox3.Text & "',CAddress='" & TextBox4.Text & "',PhNo='" & TextBox5.Text & "',NOS=" & TextBox6.Text & ",Years=" & TextBox7.Text & "," St = St + "Highest=" + TextBox8.Text & ",Amount=" & TextBox9.Text & ",DOE='" & TextBox10.Text & "' where AMCNO='" & TextBox2.Text & "'" If ExecuteCmd(St) = 1 Then MsgBox("AMC Record Update", MsgBoxStyle.Information) End If End Sub Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click Dst = GetDataSet("Select * from AMC where Highest=" + CStr(Pr)) Load_List(ListBox1, Dst, 1) End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Dim St As String = "Select * from AMC where AMCNO = '" & TextBox11.Text & "'" Dim Dsx As New DataSet Dsx = GetDataSet(St) Load_Data(Dsx) End Sub Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click Me.Dispose() End Sub Private Sub TextBox11_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox11.GotFocus TextBox11.Text = "" End SubEnd Class

COMPLAINT STATUS REPORT


Imports System.Data.OleDb Imports System.Data
66

Public Class Report1 Private Sub Report1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.MdiParent = ServiceCenter Dim st As String If St_1 = True Then st = "Select * from Complaint where Status=1" Else st = "Select * from Complaint where Status=0" End If Dim Da1 As New OleDbDataAdapter(st, Constr) Dim Ds1 As New DataTable Dim Dst As New DataSet Da1.Fill(Ds1) : Da1.Fill(Dst) Load_Combo(ComboBox1, Dst, 1) DataGridView1.DataSource = Ds1 End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim st As String If St_1 = True Then st = "Select * from Complaint where CNo='" & ComboBox1.Text & "' and Status=1" Else st = "Select * from Complaint where CNo='" & ComboBox1.Text & "' and Status=0" End If Dim Da1 As New OleDbDataAdapter(st, Constr) Dim Ds1 As New DataTable Da1.Fill(Ds1) If Ds1.Rows.Count < 0 Then MsgBox("Bill not found", MsgBoxStyle.Information) End If DataGridView1.DataSource = Ds1 End Sub Private Sub ComboBox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox1.TextChanged Dim st As String If St_1 = True Then

67

st = "Select * from Complaint where CNo like '" & ComboBox1.Text & "%' and Status=1" Else st = "Select * from Complaint where CNo like '" & ComboBox1.Text & "%' and Status=0" End If Dim Da1 As New OleDbDataAdapter(st, Constr) Dim Ds1 As New DataTable Da1.Fill(Ds1) If Ds1.Rows.Count < 0 Then End If DataGridView1.DataSource = Ds1 End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Me.Dispose() End Sub End Class

ACTIVATION FORM
Imports System.Data.OleDb Imports System.Data Public Class Report2 Private Sub Report2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.MdiParent = ServiceCenter Dim st As String If St_2 = True Then st = "Select * from AMC where Status=1" Else st = "Select * from AMC where Status=0" End If Load_Combo(ComboBox1, GetDataSet(st), 1) DataGridView1.DataSource = GetDataTable(st) End Sub

68

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim st As String If St_2 = True Then st = "Select * from AMC where AMCNO='" & ComboBox1.Text & "' and Status=1" Else st = "Select * from AMC where AMCNO='" & ComboBox1.Text & "' and Status=0" End If If GetDataSet(st).Tables(0).Rows.Count < 0 Then MsgBox("Bill not found", MsgBoxStyle.Information) End If DataGridView1.DataSource = GetDataTable(st) End Sub Private Sub ComboBox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox1.TextChanged Dim st As String If St_2 = True Then st = "Select * from AMC where AMCNO like '" & ComboBox1.Text & "%' and Status=1" Else st = "Select * from AMC where AMCNO like '" & ComboBox1.Text & "%' and Status=0" End If DataGridView1.DataSource = GetDataTable(st) End Sub Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged Dim st As String If St_2 = True Then st = "Select * from AMC where AMCNO='" & ComboBox1.Text & "' and Status=1" Else
69

st = "Select * from AMC where AMCNO='" & ComboBox1.Text & "' and Status=0" End If DataGridView1.DataSource = GetDataTable(st) End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Me.Dispose() End Sub End Class

FINIANCIAL REPORT
Public Class Fin Private Sub Fin_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.MdiParent = ServiceCenter End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim TotAmt, TotAmt1 As Long, i As Integer TotAmt = 0 : TotAmt1 = 0 Dim Ds1, Ds2 As New DataSet Dim St As String = "Select * from Complaint" Ds1 = GetDataSet(St) St = "Select * from AMC" Ds2 = GetDataSet(St) Dim Dt1, Dt2 As Date, dif1, dif2, dif3 As Integer Dt1 = CDate(DateTimePicker1.Text) Dt2 = CDate(DateTimePicker2.Text) dif1 = DateDiff(DateInterval.Day, Dt1, Dt2) For i = 0 To Ds1.Tables(0).Rows.Count - 1 dif2 = DateDiff(DateInterval.Day, Dt1, CDate(Ds1.Tables(0).Rows(i).Item(0)))

70

dif3 = DateDiff(DateInterval.Day, CDate(Ds1.Tables(0).Rows(i).Item(0)), Dt2) If dif2 <= dif1 And dif1 >= dif3 Then TotAmt = TotAmt + CLng(Ds1.Tables(0).Rows(i).Item(7)) End If Next TotAmt1 = TotAmt For i = 0 To Ds2.Tables(0).Rows.Count - 1 dif2 = DateDiff(DateInterval.Day, Dt1, CDate(Ds2.Tables(0).Rows(i).Item(0))) dif3 = DateDiff(DateInterval.Day, CDate(Ds2.Tables(0).Rows(i).Item(0)), Dt2) If dif2 <= dif1 And dif1 >= dif3 Then TotAmt = TotAmt + CLng(Ds2.Tables(0).Rows(i).Item(7)) End If Next Label3.Text = "Total Amount = " & CStr(TotAmt) Label4.Text = "Total Amount By Service = " & CStr(TotAmt1) Label5.Text = "Total Amount By AMC = " & CStr(TotAmt - TotAmt1) End Sub End Class

71

SNAP SHOT

72

LOGIN FORM

MDI FORM

73

REGISTER COMPLAINT FORM

74

RESULT FORM

75

AMC COMMERCIAL FORM

76

AMC RESIDENTIAL FORM

77

SERVICE REPORT

78

ACTIVATION REPORT

79

FINIANCIAL REPORT

80

CONCLUSIO N

81

CONCLUSION
In this fast moving era of sophisticated technologies in the computer development in the world, there is a need for every thing to be made available for this generation relevant to the developments. This project will definitely fulfill the requirement of service center and finally, I conclude that this project will compromise the actual requirements to service center.

82

BIBLIOGRAPH Y

83

BIBLIOGRAPHY

Web Site : www.a1vbcode.com

84