Sie sind auf Seite 1von 111

REAL-ESTATE WEBSITE

A PROJECT REPORT
Submitted in partial fulfillment to complete the 6th Semester. Of

BACHELOR OF COMPUTER APPLICATIONS


By

TUSHAR JAISWAL
(Enrollment Number: 05821202009)

Department of Computer Science Maharaja Surajmal Institute C 4, Janakpuri, New Delhi - 110058
May 2012

ii

Candidates Declaration

I, Tushar Jaiswal Enrollment number 05821202009 , hereby declare that the work which is being presented in the project report entitled Real Estate Website in partial fulfillment of the requirement to complete the 5 th semester of Bachelor of Computer Applications submitted in Maharaja Surajmal Institute, C 4, Janakpuri, New Delhi 58, is an authentic record of my work carried out during the period from 20 February 2012 to 17 April 2012 under the guidance of Mr. Harjender Singh Assistant Professor, Department Of Computer Science, Maharaja Surajmal Institute. The matter embodied in this report has not been submitted by me for the award of any other degree.

Tushar Jaiswal Enrollment Number - 05821202009 B.C.A. VI SEM Department of Computer Science Maharaja Surajmal Institute C 4, Janakpuri, New Delhi 58

CERTIFICATE

This is to certify that the above statement made by the candidate is correct to the best of our knowledge.

Harjendar Singh Assistant Professor Deptt. Of Computer Science Maharaja Surajmal Institute C 4, Janakpuri, New Delhi

Acknowledgement

ACKNOWLEDGEMENT
I take this opportunity to express my profound sense of gratitude and respect to all those who helped me throughout the duration of my project. The beatitude, bliss and euphoria that accompany the successful completion of any task would not be completed without the expression of appreciation of simple gratitude to the organization and people who made it possible. I am highly indebted to Maharaja Surajmal Institute for providing me with such a intellectual platform and support to carry out my project work successfully. I wish to express my deep sense of gratitude to, Mr. Harjendar Singh, Assistant Professor, Maharaja Surajmal Institute for his able guidance and useful suggestions, which helped me in completing the project work, in time. I express my heartfelt thanks and gratitude to the director of the institute Prof. Azad S. Chhillar, for giving me an opportunity to undertake this project. Words are inadequate in offering thanks to all my teachers for their constant guidance and support throughout this project work. Finally, yet importantly, I would like to express my heartfelt thanks to my beloved parents for their blessings, my friends for their help and wishes for the successful completion of this project.

Tushar Jaiswal Enrollment Number - 05821202009 B.C.A. VI SEM

ii

Contents

CONTENTS DECLARATION -----------------------------------------------------------------i CERTIFICATE-------------------------------------------------------------------i ACKNOWLEDGEMENT----------------------------------------------------- ii Chapters Page Numbers

Chapter 1: Introduction ----------------------------------------------------------------1 1.1 Introduction 1.2 Objectives 1.3 Scope of Project Chapter 2: Design and Implementation --------------------------------------------10 2.1 System Analysis 2.2 System Design 2.3 Table Structure Chapter 3: Flow Charts and DFDS -------------------------------------------------22 3.1 System Flow Charts 3.2 Data Flow Diagrams 3.3 Entity Relationship Diagram Chapter 4: Testing ---------------------------------------------------------------------31 4.1 System Testing 4.2 Test Levels 4.3 Testing Methods 4.4 Test Cases Chapter 5: Samples --------------------------------------------------------------------49 5.1 User Forms Chapter 6: Conclusion ----------------------------------------------------------------57 6.1 Conclusion 6.2 Future Scope of the system

iii

Contents

Appendix I: Overview-----------------------------------------------------------------60 A.I.1 Software Specification A.I.2 Physical Specification Appendix II: Coding ------------------------------------------------------------------70 A.II.1 Coding Bibliography ---------------------------------------------------------------------------103

iv

Chapter I: Introduction

1.1 Introduction
Modern technology has been developed to the extent that even search for land ,apartments is made possible over the internet. The process of searching of dream house or apartment can be done over the internet .. Customer looking to buy or rent a new home, apartment or any other property can search over the internet.

Customer looking to buy or rent a new home, apartment or any other property can search over the internet. while sitting at their home. Now customers will not have to go to the agents personally they can search for their desired home or apartment of a reasonable rate which suits their pocket.

Customer looking to buy or rent a new home, apartment or any other property can search over the internet. Customer can search for desired plot or house in a particular area. They can specify the no of rooms ,bathroom they need and then can make the search They can also describe what all facilities they want near there house like schools, malls ,garage etc They can search for apartment or plot which suits there budget they can aso speciy the amont by entering the cost . . Now customers will not have to go to the agents personally they can search for their desired home or apartment of a reasonable rate which suits their pocket. And they can also have the view of apartment online

The application will be a windows-based, self-contained and independent software product.

Request for Data

HTML/ASP Page over Client Machine

Database

.aspx page with the result (Server)

Retrieve Data

BLOCK DIAGRAM

Search property Who are we contact

home user login Realestate website Employee Login staff Username & password login

Product &services About us speciality

Employee profile

View property

Search property

Contact us Update property listing Add new property listing Register new user Quick search

address telephone Email id Enter zip code or city name

1.2 Objectives

The major objective of real estate website is the convenience it offers. By sitting back at home customer looking to buy or rent a new home, apartment or any other property can search the desired property by several clicks of mouse buttons. Customers do not have to go to the. to the agents personally they can save their time by making an online search To make the website user friendly. To reduce paper work To integrate all information which customer needs in the website To save people time To allow user to enter the acres of land & desired amount for which he wishes to spend To allow the customers to have a pictorial view of the apartment he wishes to buy To overcome the limitations being faced during the manual system of handling the entire records of the company manager and to manage the work schedule as well effectively and efficiently.

To provide more accuracy. To provide more security by implementation of various validations. To provide easy updating of property listing that involves very little expertise or knowledge. To provide quick and efficient listing of properties. To eliminate eligible handwriting, paper work and manual entry.

1.3 Scope of Project


To design a real estate website of a particular agency using information collected through internet To design a website which integrates all the information needed by user To make the website user friendly. To allow the user to search plot & land according to his needs The user can specify the location where he wants the land To save user s time by allowing easy access to the site Shortens the time between data collection and data analysis. Reduces workload An advanced yet handy tool with an easy-to-use interface. Quickly and easily manages property listings . Contributes hugely in saving the time and enhances data quality. Data inconsistency almost eliminated Storage requirement highly reduced

1.4 ADVANTAGES

Customer can do 24*7 searching. More productive and efficient work. High degree of Authenticity. User friendly Time efficient Paper saving

1.5 METHDOLOGY USED FOR DATA COLLECTION

Data collection can be done through various sources like interviews, questionnaire, document analysis or Internet. 1. Primary Data: Interview and Internet 2. Secondary Data: Document Analysis

1.5.1 DATA COLLECTED BY INTERNET Data about the brief description of organization is collected through Internet i.e. through the existing website of real estates like: Makaan .com 99 acres.com Magic bricks.com Om properties.com

1.5.2 DATA COLLECTION THROUGH INTERVIEW Interview is an easy way to interact with the customer. The objective of conducting an interview is to understand the customers expectations from the software. Are you satisfied with current website? 1. If not, what is the problem you are facing? 2. What all improvements are suggested? 3. Any suggestion to improve this website? 4. Any special feature that you want to be added to website?

1.5.3 DATA COLLECTED THROUGH DOCUMENT ANALYSIS Data is also collected by various documents which demonstrate the working of the system and through the newspaper Times Property

Chapter II: Design & Implementation

10

2.1 System Analysis


2.1.1 DESCRIPTION OF THE PROCESSES

Following are the 5 main generalized processes involved in this information system:
1.

Employee Login process

2. Property Searching Process 3 .Registering New User Process 4. Property Update Process 5. Updating New Property process

LOGIN PROCESS

Inputs: The input to the login process will be the login information entered into the system. Outputs: The output to the login process will be user access to the system utilities.

2.1.2 PROPERTY SEARCHING PROCESS

Inputs: The inputs to this process will be the user input for the search for a particular property listing Outputs:

11

The result of the property searched

2.1.3 REGISTERING NEW USER PROCESS

Inputs: The inputs to this process will be the desired data required. For registering a new user Outputs: The output to this process is that if data is correctly provided the new user is registered

2.1.4 . PROPERTY UPDATE PROCESS

Inputs: The inputs to this process will be the changes to be made in the currently existing property details Outputs: The new property listing with modified details

2.1.5 UPDATING NEW PROPERTY PROCESS

Inputs: The inputs to this process will be details of anew propert Outputs: The output of this process is new property updated

12

DESCRIPTION OF INPUT TO AND OUTPUT OF OF PROCESSES


Employee Login Process

EMPLOYEE USERNAME, PASSWORD

ACCESS TO SYSTEM

Role

(input)

Login Process

(output)

Property Searching Process


SPECIFY PROPERTY (input) TO BE SEARCHED

Searching Process

(output)

SEARCH RESULT

Registering New User Process


ENTER NEW EMPLOYEE DETAILS STORE THE DETAILS

(Input)

Account Creation Process

(Output)

(Saved to reg table)

Update property listing process PROPERTY UPDATED (input)


UPDATE LISTING

Data File (Output) (saved )

Updating New Property Process NEW PROPERTY UPDATED


UPDATE LISTING

Data File

13

(input)

(Output)

(saved )

14

PRODUCT FUNCTIONS

A summary of the major functions that the website will perform: I t will help user in knowing the company enables the user to know the employees & contact them View property page enables the user to search for specific property Contact us page gives map &driving direction & allows the user to email to a desire employee In quick search the user can make a search of the desired property by typing zip code or city name Employee login page allows employee to access by giving user name & password

15

VALIDITATION CHECKS

Every user has unique username& password For making quick search user has to enter either zip code or city When updating a listing price has to be in numbers Zipcode has to be in numbers When registering a new user first name is mandatory There should be no spaces in between the phone no The date format should be mm/ dd / yy The email id of employees should always end with .bennett.com like tusharjaiwal@bennett.com

16

2.2 System Design


The system objective outlined during the system analysis serve as the basis from which the work of system design is initiated. Much of the activities involved at this stage is of technical nature requiring a certain amount of degree of experience in designing systems, sound knowledge of computer related technology and thorough understanding of computers related technology. Nevertheless a system cannot be designed in isolation without the active involvement of the user. The user has a vital role to play at this stage too. As we know that data collected during the system requirement analysis will be utilized systematically at this stage. Depending on the plan of system analysis, the level of detailed study will vary and the system design stage will also vary in the amount of investigations that still need to be done. This investigation is generally an activity during the system design as the designer need to study the minute details in all aspects of the system . Designing a new system is a creative process which calls for logical as well as lateral thinking. The logical approach involves systematic moves towards the end product keeping in mind the capabilities of the personnel and the equipment at each decision making step. Lateral thought implies encompassing of ideas beyond the usual functions and equipments.

17

2.2.1 SYSTEM DESIGN CONSTRAINTS

The system design process is not a step by step adherence of clear procedures and guidelines. When designer starts working on system design he will face different types of problems. Many of these will be due to the constraints imposed by the use or limitations of the hardware and software available in the market.

2.2.2 THE PRIMARY OBJECTIVE OF THE DESIGN IS:

Of course to deliver the requirements as specified in the SRS. In general, the following design objectives should be kept in mind: Practicality: The system must be stable and can be operated by people with average IQ. Efficiency: This involves accuracy, timeliness and comprehensiveness of the system output. Cost: It is desirable to aim for a system with a minimum cost subject to the condition that it must satisfy all the requirements. Flexibility: The system should be modifiable depending on the changing needs of the user. Security: This is very important aspect of the design and should cover areas of hardware reliability, fall back procedures, physical security of data and provision for detection of fraud and abuse.

18

2.2.3 MAJOR SYSTEM DESIGN ACTIVITIES

Several development activities are carried out during structured design. They are data base design, implementation planning, system test preparation, system interface specification and user documentation.

Database Design: This activity deals with the design of the physical database. A key is to determine how the access paths are to be implemented.

Program Design: In conjunction with database design is a decision on the programming language to be used and the flowcharting, coding and the debugging procedure prior to conversion. The operating system limits the programming languages that will run of the system.

System and Program Test Preparation: Each aspect of the system has a separate test requirement. System testing is done after all programming and testing is completed. The test cases cover every aspect of the proposed system, actual operations user interface and so on.

19

2.2.4 Use case Diagram: A use case diagram is a diagram which consists of set of usecases and actors enclosed by system boundary, and association between usecases and actors. Usecases diagram especially important in organizing, modeling the behavior of the system. Use case is a set of scenarious tied together by a common user goal. A scenario is a sequence of steps describing the interaction between a user and system. Use case Diagram:

HOME PAGE

REAL ESTATE WEBSITE

VIEW PROPERTIES

user
ENTER DETAILS FOR DESIRED PROPERTY

CONTACT THE AGENCY

20

Add listing

Update listing

Delete listing

View details

Employee

21

2.3 Table Structures


CATEGORY
Category ID Category Name Categorydescription

Auto number

Text

text

EMPLOYEE

Empid

Fname

Lname

Password

Areacode Phone

Email

Gender

Username Datestarted

Auto number

text

text

Text

text

text

text

text

text

text

LIST PROPERTY

Listgid

Desclong Avaliability Acres Sqrfeet Catergoryid Schooldist Price

Numbath Numbed Access

Streetnum

Street

Zip

Auto no memo Text

text number number number

Empid

text

Proprtyid

text

text

number text

currency currency Auto no Auto no

PROPERTY
Propertyid Propertyname Propertydescription

Auto number text

Text

CONTACT

22

emailid

subject

query Text

text

text

Chapter III: Flowcharts & Data Flow Diagrams

23

3.1 System Flow Charts


A flow chart is defined as a pictorial representation describing a process being studied or even used to plan stages of a project. Flow charts tend to provide people with a common language or reference point when dealing with a project or process. Four particular types of flow charts have proven useful when dealing with a process analysis: top-down flow chart, detailed flow chart, work flow diagrams, and a deployment chart. Each of the different types of flow charts tends to provide a different aspect to a process or a task. Flow charts provide an excellent form of documentation for a process, and quite often are useful when examining how various steps in a process work together. When dealing with a process flow chart, two separate stages of the process should be considered: the finished product and the making of the product. In order to analyze the finished product or how to operate the process, flow charts tend to use simple and easily recognizable symbols. The basic flow chart symbols below are used when analyzing how to operate a process.

24

USER SEARCH FOR PROPERTY

25

VIEW PLOT DETAILS

26

3.2 Data Flow Diagrams


A graphical tool used to describe and analyze the moment of data through a system manual or automated including the process, stores of data, and delays in the system. Data Flow Diagrams are the central tool and the basis from which other components are developed. The transformation of data from input to output, through processes, may be described logically and independently of the physical components associated with the system. The DFD is also known as a data flow graph or a bubble chart. A graphical tool used to describe and analyze the moment of data through a system manual or automated including the process, stores of data, and delays in the system. Data Flow Diagrams are the central tool and the basis from which other components are developed. The transformation of data from input to output, through processes, may be described logically and independently of the physical components associated with the system. The DFD is also known as a data flow graph or a bubble chart. Context Diagram The top-level diagram is often called a context diagram. It contains a single process, but it plays a very important role in studying the current system. The context diagram defines the system that will be studied in the sense that it determines the boundaries. Anything that is not inside the process identified in the context diagram will not be part of the system study.

27

DFD LEVEL 0

Users

REAL ESTATE Website

PROPERTY. DETAILS

DFD LEVEL 1

REGISTERING NEW EMPLOYEE

Figure No.-4 : DFD Level1.1

28

DFD LEVEL 1 EMPLOYEE LOGIN

DFD LEVEL 1 EMPLOYEE UPDATING / CREATING NEW LISTING

29

DFD LEVEL 1 USER SEACRHES FOR PROPERTY

30

3.3 Entity Relationship Diagram

31

Chapter IV: Testing

32

4.1 System Testing

33

In this stages the test group of the development team, using the cases and the test data already prepared will test the programs. Only after all the functions are tested singularly, an integrated testing will be performed to see that inter-function dependability is satisfied. Separate test cases and test data will be worked out for the integrated testing. Any system, to be successful, must be thoroughly tested, and well managed test plan should be prepared before actual testing is being performed. Modules have been developed and need to be tested in a manner that can reduce occurring of defects as low as possible. Following are the activities we planned to test the system.

1. This system is indeed an evolutionary system so every unit of the system is continuously under testing phase. 2. One test activity Basis Path Testing that will try to cover all paths in the system. This activity identifies all paths that provide different functionality of the system, and also other paths to reach at that functionality. 3. Other testing activity isControl Structure Testing, which will test each and every condition with positive and negative data combination. 4. This testing activity will also perform Data Flow Testing in which it will be tested how the data re following the system. And will also check whether the data entered from one procedure, is reflected whenever it requires or not. 5. All conditions will be tested with Boundary Value Analysis where different input will be given to test whether the system is functioning with boundary values or not. 6. Along with the boundary value analysis, the system is also tested with Range Value Tested where editable values will be tested with ranges of values. 7. The system is being tested in Unit Testing manner where at the completion of one unit that is tested thoroughly with above mentioned testing activities. 8. The integration testing will also be performed to ensure that the integrated unit is working properly with other units or not.

4.2 Test Levels

34

4.2.1 CONTENT TESTING: Errors in Project content can be as trivial as minor typographical error as incorrect information, improper organization or validation of intellectual property laws. Content Testing attempt to uncover this and many other problems before the user encounter them. Content Testing Objectives: There are three types of objectives. To uncover syntactic errors in text-based documents, graphical representation and other media. To uncover semantic errors in any content object represented as navigation error. To find errors in organization or structure of content that is presented to the end-user

4.2.2 INTERFACE TESTING: Interface design model is reviewed to ensure that generic quality criteria established for all user interfaces have been achieved and that application specific interface design issue has been properly addressed. Interface testing strategy: The overall strategy for interface testing is to (1) Uncover error related to specific Interface mechanisms (2) uncover errors in the way the interface implements the semantics of navigation, Web Application functionality, or content display. To accomplish this strategy, a number of objectives must be achieved:

Interface futures are tested to ensure that design rules, aesthetics and related visual content are available for the user without error. Individual interface mechanisms are tested in a manner that is analogous to unit testing For example; tests are designed to exercise all forms, client-side scripting, dynamic XML.

Testing Interface Mechanisms:-

35

When a user interacts with a system, the interaction occurs through one or more interface mechanisms. Forms: At a microscopic level, tests are performed to ensure that Labels correctly identified fields within the form and that mandatory fields are identified visually for the user. The server receives all information content within the form and their no data are lost in the transmission between client and server. Appropriate defaults are used when the user does not select from a pull down menu or set of buttons. Browsing functions dont corrupt data entered in the form. Scripts that perform error checking on data entered work. Properly and provide meaningful error message. Client side scripting:Black box tests are conducted to uncover any error in processing as The script is executed. These tests are coupled with forms testing because script input is often derived from data provided as part of forms processing Dynamic XML:Here the data transfer between the systems occurs in the form of XML file. The formatting of the XML file should remain unaltered. Changes in the internal attribute structure can also lead to an error. Hence for this XML parsing functionalities are provided on the client side. Application specific interface mechanisms:Test conforms to a checklist of functionality and features that are defined by the interface mechanism. Boundary test minimum and maximum number of item that can be placed in to shopping chart. Test to determine persistence of image capture contents. Test to determine whether the system can be record co-ordinate content at some future date.

36

4.2.3 USABLITY TESTING:Usability test may be designed by Project engineering team. Define a set of usability testing categories and identify goal for each. Design test that will enable each goal to be evaluated. Select participants who will conduct test. Instrument participants interaction with system while testing is conducted. Develop a mechanism for assessing the usability of the system.

The following test categories and objective illustrate establish testing:Interactivity- Are interaction mechanism easy to understand and use? Layout- Are navigation mechanism, content and function place in a manner that allows the user to find them quickly? Readability- Is the text well written and clear? Aesthetics- Do layout color, typeface, and related characteristics lead to ease of use? Display Characteristics- Does the system make optimal use of screen size and resolution? Time Sensitivity- Can important features, functions and content be used in a timely manner? Accessibility- Is the system accessible to people who have Disabilities?

4.2.4 COMPATIBILITY TESTING:Project must operate within environment that differs from one another. Different computer, display device, OS, browser and network connection speed can have significant on system operation. The Project team derives a series of compatibility, validation tests, derived from existing interface tests, navigation tests, performance tests and security tests.

4.3 Testing Methods

37

Analyze and check system representation such as the requirement document, design diagrams and the program source code. They may be applied at all stages of the process.

Unit Testing

Module Testing

Sub-system Testing System Testing

Acceptance Testing

There are different Models of testing. On the basis of testing methods there are two types of testing: 1. White-box testing. 2. Black-box testing

1. WHITE-BOX TESTING
White-box testing sometimes called glass-box testing, is a test case design method that users the control structure of the procedural design to drive the test case.

38

Logical errors and incorrect assumption are inversely proportional to the probability that a program will be executed. Errors tend to creep into our work we design and implement function, condition or control that is out of the mainstream tends to be well understood. We often believe that a logical path is not likely to be executed when in fact it may be executed on a regular basis. The logical flow of a program times counter intuitive.

2. BLACK-BOX TESTING: For our project periodically we have tested our software using black-box testing. Thinking as a client we have evaluated the software for its easy going and convenience. Unit Testing:

During the programming stages each and every form, modules and class treated unit has been put into the test data. Every module is tested independently. The steps are follows: Manually code is tested like spelling checks, logic and errors. Once the manual checking is over the complication has been done. Syntactical errors if any have to be corrected. After the clean complication the program, some dummy data, as specification, has been used for testing of the module to see if it works as specified. Integration Testing:

After our individuals modules were tested out we go the integrated to create a complete system. This integration process involves building the system and testing the resultant system for problems that arise from component interaction. Performance Testing:

Performance testing is designed to test the runtime performance of the system within the context of the system. These tests were performed as module level as well as system level. Individual modules were tested for required performance.

Condition Testing:

Performance testing is a test case design method that exercises the logical conditions.

39

Interface Testing:

Interface sting is integral part of integration. We examined the code to be tested and explicitly list each call to an external component. In the system standards tests for GUIs have been performed, which are as follows: The position and related labels for all controls were checked. Validations for all inputs were done. Pull down controls was verified for proper functionality. Whether the non-editable text controls disabling and it was also verified that it doesnt exceed the maximum allowed length.

4.4 Test Cases

40

The zip code entered did not gave result


If the user enter the wrong zip code then error will be generated

4.5.2 The city entered did not gave result

41

If the user enter the wrong city name then error will be generated

4.5.3 When a person is not an employee

42

If a user who is not an employee accesses the employee login page & enter wrong user name & password the it will prompt wrong information entered

4.5.3.1 Result of when a person is not an employee

43

4.5.4 The square feet has to be in numbers


If user enters square feets as characters then there is message which promts that square feet has to be in no it is validation check

44

4.5.5 We cannot make an empty search


If user has to search for a property he has to mention the zip code or city name as we cannot make an empty search

45

4.5.6 When registering a new user, user name, email id, password are mandatory
When we register a new user then certain fields like username ,email id ,password are mandatory

46

4.5.7 New user need to specify the password

47

4.5.8 New user need to specify the email id

48

4.5.10 The zip code has to be in numbers

49

If user enters zip code as characters then there is message which prompts that zip code has to be in numbers it is validation check

Chapter V: Samples

50

5.1 Output Samples

51

Home Page

About Us

Staff

52

View Properties

Property Details

53

Contact Us

Email Us

54

Map\Driving Directions

Quick Search

55

Employee login

Update Listing\Register New Employee

56

Update a listing

Register another employee

57

Create a new listing

Chapter VI: Conclusion

58

6.1 Conclusion

59

This Real Estate Web Application is a typical .NET web application using ASP.NET 2.0and ms access 2005 in the vb programming language. It uses a client/server architecture based on the HTTP protocol. It is developed in Microsofts Visual Studio .NET programming environment. The buyer performs a search for the property listings by putting either Zip code/City/State in the search textbox. The business logic tier communicates with the database tier requesting the results of the query sent by it.

The results obtained by the database are displayed on the data grid, by refreshing the grid rather than refreshing the entire web page. Efficiency of the application is improved by the use of web methods that help in separating Application Tier from the Presentation Tier.

The performance of this application is evaluated by rigorously testing it against various test scenarios. Some ways in which this system could be enhanced with additional functionalities are discussed in the section.

6.2 Future Scope of the system

60

This project is developed as a masters project and still gives lot of scope for its extension which could be made to the project if it is going to be developed as commercial product.

We can use pure object-oriented domain model to deal the database access tier using Visual Studio 2005and ms access 2005. In doing this, we can get a better architecture design which will improve code efficiency and running performance.

Besides, we can build XML web service programming model that enables other applications to consume real estate web services built by us using standard protocol such as HTTP, XML, and web services description language(WSDL).

This project just deals with the Home page and Search page to search for property listings, more functionality can be added for searching the agents and offices making it a complete application.

The feature of providing Google Maps within this application adds up to the functionality of the website. With the advancement of technology, dynamic maps can be generated which can help the buyer locate a particular area where the property is located in the Google Map.

Inclusion of all these features would make the application feature rich. The advantages of putting these functionalities in the project are described in detail in the following sections.

Appendix I: Overview

61

APPENDIX-I

62

A I.1 SOFTWARE SPECIFICATION SOFTWARE REQUIREMENTS SPECIFICATION


A Software Requirements Specification (SRS) is a complete description of the behavior of the system to be developed. It includes a set of use cases that describe all the interactions the users will have with the software. Use cases are also known as functional requirements. In addition to use cases, the SRS also contains nonfunctional (or supplementary) requirements. Non-functional requirements are requirements which impose constraints on the design or implementation (such as performance engineering requirements, quality standards, or design constraints).

DESIGN SPECIFICATION
Design specifications are the measurements and characteristics of a structure or object which provide for a workable, sustainable, or pleasing creation or construct. This can apply to a wide variety of manufactured or fabricated objects, such as buildings, automobiles, and clothes and also utility, computing, and distribution systems. Any functional thing made by human beings has certain specific details.

FUNCTIONAL SPECIFICATION
In software development, a functional specification (also, functional spec or specs or functional specifications document (FSD) or Program specification) is the set of documentation that describes the requested behavior of an engineering system. The documentation typically describes what is needed by the system user (design-goal), which internal functions are necessary, as well as, requested properties of inputs and outputs (for ex. of the software system). As a design document, a functional specification does not typically define the inner workings of the proposed system, it

63

means it does not yet include the specification how the system function will be implemented. Instead, it focuses on what various outside agents (people using the program, computer peripherals, or other computers, for example) might "observe" when interacting with the system

PRODUCT DESIGN SPECIFICATION

A product design specification (PDS) is a statement of what a not-yet-designed product is intended to do. Its aim is to ensure that the subsequent design and development of a product meets the needs of the user.[1] The PDS acts as an initial boundary in the development of products. However, it will naturally evolve as it is progressed through the different stages of the design process.[2]

REQUIREMENTS ANALYSIS

In systems engineering and software engineering, requirements analysis encompasses those tasks that go into determining the needs or conditions to meet for a new or altered product, taking account of the possibly conflicting requirements of the various stakeholders, such as beneficiaries or users. Systematic requirements analysis is also known as requirements engineering[1]. It is sometimes referred to loosely by names such as requirements gathering, requirements capture, or requirements specification. The term requirements analysis can also be applied specifically to the analysis proper (as opposed to elicitation or documentation of the requirements, for instance

SOFTWARE DEVELOPMENT PROCESS


A software development process is a structure imposed on the development of a software product. Synonyms include software life cycle and software process. There

64

are several models for such processes, each describing approaches to a variety of tasks or activities that take place during the process.

SPECIFICATION (TECHNICAL STANDARD)


A specification is an explicit set of requirements to be satisfied by a material, product, or service. USE OF A SPECIFICATION In engineering, manufacturing, and business, it is vital for suppliers, purchasers, and users of materials, products, or services to understand and agree upon all requirements. A specification is a type of a standard which is often referenced by a contract or procurement document. It provides the necessary details about the specific requirements. Specifications may be written by government agencies, standards organizations (ASTM, ISO, CEN, etc), trade associations, corporations, and others. A product specification does not necessarily prove the product to be correct. Just because an item is stamped with a specification number does not, by itself, indicate that the item is fit for any particular use. The people who use the item (engineers, trade unions, etc) or specify the item (building codes, government, industry, etc) have the responsibility to consider the available specifications, specify the correct one, enforce compliance, and use the item correctly. Validation of suitability is necessary.

65

SPECIFICATION AND DESCRIPTION LANGUAGE

Specification and Description Language (SDL) is a specification language targeted at the unambiguous specification and description of the behaviour of reactive and distributed systems. It is defined by the ITU-T (Recommendation Z.100.) Originally focused on telecommunication systems, its current areas of application include process control and real-time applications in general. SDL provides both a graphical Graphic Representation (SDL/GR) as well as a textual Phrase Representation (SDL/PR), which are both equivalent representations of the same underlying semantics. A system is specified as a set of interconnected abstract machines which are extensions of finite state machines (FSM).

SYSTEM REQUIREMENTS
To be used efficiently, all computer software needs certain hardware components or other software resources to be present on a computer system. These pre-requisites are known as (computer) system requirements and are often used as a guideline as opposed to an absolute rule. Most software defines two sets of system requirements: minimum and recommended. With increasing demand for higher processing power and resources in newer versions of software, system requirements tend to increase over time. Industry analysts suggest that this trend plays a bigger part in driving upgrades to existing computer systems than technological advancements

66

A I.2 PHYSICAL SPECIFICATIONS DATA FLOW DIAGRAM


It is common practice for a designer to draw a context-level DFD first which shows the interaction between the system and outside entities. The DFD is designed to show how a system is divided into smaller portions and to highlight the flow of data between those parts. This context-level DFD is then "exploded" to show more detail of the system being modeled. Data flow diagrams were invented by Larry Constantine, the original developer of structured design, based on Martin and Estrin's "data flow graph" model of computation. Data flow diagrams (DFDs) are one of the three essential perspectives of Structured Systems Analysis and Design Method SSADM. The sponsor of a project and the end users will need to be briefed and consulted throughout all stages of a system's evolution. With a dataflow diagram, users are able to visualize how the system will operate, what the system will accomplish, and how the system will be implemented. The old system's dataflow diagrams can be drawn up and compared with the new system's dataflow diagrams to draw comparisons to implement a more efficient system. Dataflow diagrams can be used to provide the end user with a physical idea of where the data they input ultimately has an effect upon the structure of the whole system from order to dispatch to restock. How any system is developed can be determined through a dataflow diagram. Developing a DFD helps in identifying the transaction data in the data model.

67

There are different notations to draw data flow diagrams, defining different visual representations for processes, datastores, dataflow, and external entities. It is common practice for a designer to draw a context-level DFD first which shows the interaction between the system and outside entities. The DFD is designed to show how a system is divided into smaller portions and to highlight the flow of data between those parts. This context-level DFD is then "exploded" to show more detail of the system being modeled. Data flow diagrams were invented by Larry Constantine, the original developer of structured design, based on Martin and Estrin's "data flow graph" model of computation. Data flow diagrams (DFDs) are one of the three essential perspectives of Structured Systems Analysis and Design Method SSADM. The sponsor of a project and the end users will need to be briefed and consulted throughout all stages of a system's evolution. With a dataflow diagram, users are able to visualize how the system will operate, what the system will accomplish, and how the system will be implemented. The old system's dataflow diagrams can be drawn up and compared with the new system's dataflow diagrams to draw comparisons to implement a more efficient system. Dataflow diagrams can be used to provide the end user with a physical idea of where the data they input ultimately has an effect upon the structure of the whole system from order to dispatch to restock. How any system is developed can be determined through a dataflow diagram.

68

DFD LEVELS
A context level DFD created using Select SSADM. A Level 0 DFD for the same system. A Level 1 DFD showing the "Process Enquiry" process for the same system.

CONTEXT LEVEL
This level shows the overall context of the system and it's operating environment and shows the whole system as just one process. It does not usually show data stores, unless they are "owned" by external systems, e.g. are accessed by but not maintained by this system, however, these are often shown as external entities.

LEVEL 0
This level shows all processes at the first level of numbering, data stores, external entities and the data flows between them. The purpose of this level is to show the major high level processes of the system and their interrelation. A process model will have one, and only one, level 0 diagram. A level 0 diagram must be balanced with it's parent context level diagram, i.e. there must be the same external entities and the same data flows, these can be broken down to more detail in the level 0, e.g. the "enquiry" data flow could be spilt into "enquiry request" and "enquiry results" and still be valid

LEVEL 1
This level is a decomposition of a process shown in a level 0 diagram, as such there should be a level 1 diagram for each and every process shown in a level 0 diagram. In this example processes 1.1, 1.2 & 1.3 are all children of process 1, together they wholly and completely describe process 1, and combined must perform the full capacity of this parent

69

process. As before, a level 1 diagram must be balanced with it's parent level 0 diagram

ENTITY- RELATIONSHIP MODEL


An entity-relationship model (ERM) is an abstract conceptual representation of structured data. Entity-relationship modeling is a relational schema database modeling method, used in software engineering to produce a type of conceptual data model (or semantic data model) of a system, often a relational database, and its requirements in a top-down fashion. Diagrams created using this process are called entity-relationship diagrams, or ER diagrams or ERDs for short. Originally proposed in 1976 by Peter Chen, many variants of the process have subsequently been devised. The first stage of information system design uses these models during the requirements analysis to describe information needs or the type of information that is to be stored in a database. The data modeling technique can be used to describe any ontology (i.e. an overview and classifications of used terms and their relationships) for a certain universe of discourse (i.e. area of interest). In the case of the design of an information system that is based on a database, the conceptual data model is, at a later stage (usually called logical design), mapped to a logical data model, such as the relational model; this in turn is mapped to a physical model during physical design. Note that sometimes, both of these phases are referred to as "physical design".

An entity may be defined as a thing which is recognised as being capable of an independent existence and which can be uniquely identified. An entity is an abstraction from the complexities of some domain. When we speak of an entity we normally speak of some aspect of the real world which can be distinguished from other aspects of the real world .

70

An entity may be a physical object such as a house or a car, an event such as a house sale or a car service, or a concept such as a customer transaction or order. Although the term entity is the one most commonly used, following Chen we should really distinguish between an entity and an entity-type. An entity-type is a category. An entity, strictly speaking, is an instance of a given entity-type. There are usually many instances of an entity-type. Because the term entity-type is somewhat cumbersome, most people tend to use the term entity as a synonym for this term. Entities can be thought of as nouns. Examples: a computer, an employee, a song, a mathematical theorem. Entities are represented as rectangles. A relationship captures how two or more entities are related to one another. Relationships can be thought of as verbs, linking two or more nouns. Entities and relationships can both have attributes. Examples: an employee entity might have a Social Security Number (SSN) attribute; the proved relationship may have a date attribute. Attributes are represented as ellipses connected to their owning entity sets by a line. Every entity (unless it is a weak entity) must have a minimal set of uniquely identifying attributes, which is called the entity's primary key. Entity-relationship diagrams don't show single entities or single instances of relations. Rather, they show entity sets and relationship sets. Example: a particular song is an entity. The collection of all songs in a database is an entity set. The eaten relationship between a child and her lunch is a single relationship. The set of all such child-lunch relationships in a database is a relationship set. Lines are drawn between entity sets and the relationship sets they are involved in. If all entities in an entity set must participate in the relationship set, a thick or double line is drawn. This is called a participation constraint. If each entity of the entity set can participate in at most one relationship in the relationship set, an arrow is drawn from the entity set to the relationship set. This is called a key constraint. To indicate that each entity in the entity set is involved in exactly one relationship, a thick arrow is drawn.

71

Appendix II: Glossary

72

APPENDIX-II A II.1 CODING


About.aspx
<%@ Page Language="vb" AutoEventWireup="false" Inherits="CBB.about" CodeFile="about.aspx.vb" %> <% Server.Execute("design/header.aspx") %> <% Server.Execute("design/menu.aspx") %> <html> <body> <form id="shadow" method="post" runat="server"> <h1>About Collin B. Bennett Agency</h1> <div style="margin-left: 25px;"> <p><strong>Products & Services:</strong><br> Real Estate</p> <p><strong>Specialties:</strong><br> Residential, Commercial, Real Estate, Insurance </p> <p>Collin B. Bennett Agency was founded in 1963 as a Real Estate Company.&nbsp; Although the company still owned primarily by the Bennett family, they now operate in both the Real Esatate and Insurance industries.&nbsp; Located out of Hartford, the Agency caters to many counties around the state of Connecticut.&nbsp;</p> <p>For contact information, please visit our <a href="contact.aspx">contact page</a>.</p> </div> </form> <% Server.Execute("design/footer.aspx") %> </body> </html>

Addlisting.aspx
<%@ Reference Page="~/email.aspx" %> <%@ Page Language="vb" AutoEventWireup="false" Inherits="CBB.addlisting" CodeFile="addlisting.aspx.vb" %> <% Server.Execute("design/header.aspx") %> <% Server.Execute("design/menu.aspx") %> <html> <body> <form id="shadow" method="post" runat="server"> <h1>Add Listing</h1> <P><STRONG><U>Please Fill Out all Information</U></STRONG></P> <asp:label id="Label2" runat="server" Width="504px" FontSize="Large" Height="10px" ForeColor="Red"></asp:label> <P></P> <P><STRONG>Enter&nbsp;Street Number:&nbsp;

73

<asp:textbox id="streetnum" runat="server" Width="40px"></asp:textbox>&nbsp;Street Name: <asp:textbox id="address" runat="server"></asp:textbox></STRONG></P> <P><STRONG>Location, Choose One:&nbsp; <asp:dropdownlist id="DropDownList1" runat="server" Width="176px"></asp:dropdownlist></STRONG></P> <P><STRONG>If location not listed, enter here: <asp:textbox id="location" runat="server"></asp:textbox> </STRONG></P> <P>&nbsp;</p><p><STRONG>Price:(numbers&nbsp;only)&nbsp; <asp:textbox id="price" runat="server" Width="64px"></asp:textbox> </STRONG></P> <P><STRONG>Assessed Value: <asp:textbox id="assessed" runat="server" Width="56px"></asp:textbox>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Number of Acres:&nbsp;&nbsp; <asp:textbox id="acres" runat="server" Width="40px"></asp:textbox></STRONG></P> <P><STRONG>Short Description:</STRONG> <asp:textbox id="shortd" runat="server" Width="240px"></asp:textbox></P> <P><STRONG>Long Description: <asp:textbox id="longd" runat="server" Width="272px" Height="56px" TextMode="MultiLine"></asp:textbox></STRONG></P> <P><STRONG>Number&nbsp;of Bedrooms: <asp:textbox id="bed" runat="server" Width="32px"></asp:textbox>&nbsp;Number of Baths: <asp:textbox id="bath" runat="server" Width="32px"></asp:textbox>&nbsp;&nbsp; School District: <asp:textbox id="schooldist" runat="server"></asp:textbox></STRONG></P> <P><STRONG>Square Feet: <asp:textbox id="squarefeet" runat="server" Width="32px"></asp:textbox>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp; </STRONG><STRONG>Number of Garages:&nbsp; <asp:textbox id="garage" runat="server" Width="32px"></asp:textbox> </STRONG></P> <P><STRONG>Enter Zipcode: <asp:textbox id="zipcode" runat="server" Width="64px"></asp:textbox>&nbsp;</STRONG></P> <STRONG> <P><STRONG>Avalibility: <asp:radiobutton id="rdonew" runat="server" Text="Just Listed" Checked="True"></asp:radiobutton><asp:radiobutton id="rdosale" runat="server" Text="Sale Pending"></asp:radiobutton><asp:radiobutton id="rdosold" runat="server" Text="Sold"></asp:radiobutton></STRONG></P> <P> <STRONG>Property Type: <asp:radiobutton id="radiocommerical" runat="server" Text="Commercial" groupname="type"></asp:radiobutton>&nbsp;

74

<asp:radiobutton id="radioresidential" runat="server" Text="Residential" groupname="type" Checked="True"></asp:radiobutton>&nbsp; <asp:radiobutton id="radioland" runat="server" Text="Land" groupname="type"></asp:radiobutton>&nbsp; <asp:radiobutton id="radioappt" runat="server" Text="Appartment / Condo" groupname="type"></asp:radiobutton></STRONG></P> <P><STRONG>&nbsp;Two pictures: <INPUT id="file1" type="file" runat="server" NAME="file1">&nbsp;<INPUT id="file2" type="file" runat="server" NAME="file2"></STRONG></P> <P><asp:button id="Button1" runat="server" Text="Submit New Listing"></asp:button></P> </form> <% Server.Execute("design/footer.aspx") %> </body> </html>

Addlistin.aspx.vb
Namespace CBB Partial Class addlisting Inherits System.Web.UI.Page #Region " Web Form Designer Generated Code " 'This call is required by the Web Form Designer. <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() End Sub Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init 'CODEGEN: This method call is required by the Web Form Designer 'Do not modify it using the code editor. InitializeComponent() End Sub #End Region Public dbc As New dbConnnect Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If Session("ok") <> "ok" Then Server.Transfer("error.aspx") End If If IsPostBack = False Then Dim sqlstr As String sqlstr = "select CategoryID, CategoryName from Catergories"

75

Dim dt As DataTable = dbc.RunSelectQuery(sqlstr) Me.DropDownList1.DataSource = dt Me.DropDownList1.DataValueField = "CategoryID" Me.DropDownList1.DataTextField = "CategoryName" Me.DropDownList1.DataBind() End If End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim property_type As Integer Dim saletype As String If Me.radioresidential.Checked = True Then property_type = 1 ElseIf Me.radioland.Checked = True Then property_type = 2 ElseIf Me.radiocommerical.Checked = True Then property_type = 3 Else property_type = 4 End If If Me.rdonew.Checked = True Then saletype = "Just Listed" ElseIf Me.rdosale.Checked = True Then saletype = "Sale Pending" ElseIf Me.rdosold.Checked = True Then saletype = "Sold" End If Dim username, email, areacode, username = Session("username") email = Session("email") areacode = Session("areacode") phone = Session("phone") first = Session("firstname") empid = Session("empid") If streetnum.Text = "" Then Label2.Text = "You need to Exit Sub End If If IsNumeric(streetnum.Text) = Label2.Text = "You need to Number" phone, first, empid As String

enter a street number" False Then enter a number, into Street

End If If address.Text = "" Then Label2.Text = "You need to enter a street address" Exit Sub End If If shortd.Text = "" Then Label2.Text = "You need to fill out a short description" Exit Sub End If If longd.Text = "" Then Label2.Text = "You need to fill out a long description" Exit Sub End If If IsNumeric(bath.Text) = False Then

76

field"

Label2.Text = "You need to enter a number, in the bath Exit Sub End If If IsNumeric(bed.Text) = False Then Label2.Text = "You need to enter a number, in the bed

field"

Exit Sub End If If IsNumeric(zipcode.Text) = False Then Label2.Text = "Only numbers in the zipcode field" Exit Sub End If If IsNumeric(garage.Text) = False Then Label2.Text = "Only numbers in the garage field" Exit Sub End If If IsNumeric(acres.Text) = False Then Label2.Text = "Only numbers in the acres field" Exit Sub End If

Dim x, y, z, sqlstr, name As String Dim location As Integer Dim i As Integer i = Me.DropDownList1.SelectedIndex() If Me.Label2.Text <> "" Then location = Me.DropDownList1.Items.Count name = Me.DropDownList1.SelectedItem.Text sqlstr = "insert into catergories (Categoryname) Values ( '" & name & "')" dbc.RunUpdateDeleteQuery("sqlstr") Else : location = Val(Me.DropDownList1.SelectedIndex) + 1 End If x = System.IO.Path.GetFileName(Me.file1.PostedFile.FileName) y = System.IO.Path.GetFileName(Me.file2.PostedFile.FileName) Me.file1.PostedFile.SaveAs("C:\Inetpub\wwwroot\CBB\images\property\" & x) Me.file2.PostedFile.SaveAs("C:\Inetpub\wwwroot\CBB\images\property\" & y) z = "<img src =" & y & " height =60 width =75>" sqlstr = "insert into Listing(descshort,desclong, avaliability, acres, sqrfeet, numbath, numbed, numgarage,streetnum, street, zip,catergoryid, schooldist, price,accessed,empId,propertyid,picture1,picture2,searchpic)" & _ "Values('" & shortd.Text & "','" & longd.Text & "'," & acres.Text & "'," & squarefeet.Text & "," & bath.Text & "," & _ "" & bed.Text & "," & garage.Text & ",'" & streetnum.Text & "','" & address.Text & "','" & zipcode.Text & "'," & _ "" & location & ",'" & schooldist.Text & "'," & price.Text & ",'" & assessed.Text & "'," & empid & "," & property_type & ",'" & y & "','" & x & "','" & z & "')" Me.Label2.Text = sqlstr dbc.RunUpdateDeleteQuery(sqlstr) Label2.Text = "You have created a new listing "

77

End Sub End Class End Namespace

Contact.aspx
<%@ Page Language="vb" AutoEventWireup="false" Inherits="CBB.contact" CodeFile="contact.aspx.vb" %> <% Server.Execute("design/header.aspx") %> <% Server.Execute("design/menu.aspx") %> <html> <body> <form id="shadow" method="post" runat="server"> <h1>Contact Us</h1> <p><strong>Address</strong></p> <p>Collin Bennett Real Estate<br> 1229 Albany Avenue Suite 1,<br> Hartford, CT 06112</p> <p><a href="http://maps.google.com">Map</a> / <a href="http://maps.google.com">Driving Directions</a></p> <p><strong>Telephone</strong></p> <p>(860) 522-4211</p> <p><strong>Email</strong></p> <P><a href="email.aspx">Click here to contact us by email</a></P> </form> <% Server.Execute("design/footer.aspx") %> </body> </html>

Details.aspx
<%@ Reference Page="~/email.aspx" %> <%@ Page Language="vb" AutoEventWireup="false" Inherits="CBB.Migrated_details" CodeFile="details.aspx.vb" %> <% Server.Execute("design/header.aspx") %> <% Server.Execute("design/menu.aspx") %> <html> <body> <form id="shadow" method="post" runat="server"> <h1>Property Details</h1> <P> <asp:label id="Label3" runat="server" Font-Bold="True" Font-Italic="True" Font-Size="Medium"></asp:label></P> <P> <asp:label id="Label1" runat="server"></asp:label>

78

<asp:label id="Label2" style="PADDING-LEFT: 100px" runat="server" Width="128px"></asp:label></P> <P><asp:label id="Label5" runat="server"></asp:label></P> <P><asp:label id="Label4" runat="server"></asp:label></P> <P> <asp:Label id="Label9" runat="server"></asp:Label></P> <P> <asp:Label id="Label8" runat="server"></asp:Label></P> <P><asp:label id="Label6" runat="server"></asp:label></P> <P><asp:label id="Label7" runat="server"></asp:label></P> </form> <% Server.Execute("design/footer.aspx") %> </body> </html>

Details.aspx.vb
Namespace CBB 'Partial Class details Partial Class Migrated_details Inherits details #Region " Web Form Designer Generated Code " 'This call is required by the Web Form Designer. <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() End Sub Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init 'CODEGEN: This method call is required by the Web Form Designer 'Do not modify it using the code editor. InitializeComponent() End Sub #End Region ' Public dbc As New dbConnnect

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If IsPostBack = False Then Dim sqlstr, listingid, pic1, garage, pic2, longdesc As String Dim squarefeet, price, avaliability, zipcode, schooldist, email, areacode, phone, bedrooms, baths, streetnumber, streetname, location As String location = Context.Items("town") listingid = Context.Items("listingid") sqlstr = "select * from listing a, employee b where listingid = " & listingid & " and a.empid = b.empid"

79

Dim x As DataTable = dbc.RunSelectQuery(sqlstr) Dim r As DataRow For Each r In x.Rows longdesc = r("desclong") pic1 = imgpropdir & r("picture1") pic2 = imgpropdir & r("picture2") streetname = r("street") streetnumber = r("streetnum") squarefeet = r("sqrfeet") price = r("price") bedrooms = r("numbed") baths = r("numbath") email = r("email") phone = r("phone") garage = r("numgarage") areacode = r("areacode") schooldist = r("schoolDist") zipcode = r("zip") avaliability = r("avaliability") Me.Label3.Text = "<strong> " & longdesc & " </strong><br> " Me.Label5.Text = "<h2> Price: " & FormatCurrency(price) & " Avaliability: " & avaliability & " </h2>" Me.Label8.Text = "<h4> Square Feet: " & squarefeet & "</h4>" Me.Label4.Text = "<h4>City: " & location & "<br> Street Number: " & streetnumber & " " & streetname & "</h4> " Me.Label9.Text = "<h4>Zipcode: " & zipcode & " School District: " & schooldist & "</h4>" Me.Label1.Text = "<img src = " & pic1 & " height =150 width =225>" Me.Label2.Text = "<img src = " & pic2 & " height =150 width =225>" Me.Label6.Text = "<h4> Number of Bedrooms: " & bedrooms & " Baths: " & baths & " Garages: " & garage & " </h4>" Me.Label7.Text = "If you are interested in this property please email <a href='email.aspx'> " & email & " </a> or call " & areacode & " - " & phone & "" Session("empid") = email Session("listingid") = r("listingid") Next End If End Sub End Class End Namespace

Email.aspx
<%@ Page Language="vb" AutoEventWireup="false" Inherits="CBB.email" CodeFile="email.aspx.vb" %> <% Server.Execute("design/header.aspx") %> <% Server.Execute("design/menu.aspx") %> <html>

80

<body> <form id="shadow" method="post" runat="server"> <h1>Email Us</h1> <P><STRONG> <asp:Label ID="Label2" runat="server" Font-Size="Large" ForeColor="Red" Height="10px" Width="504px"></asp:Label></STRONG>&nbsp;</P> <p> <strong>Please Choose the agent you wish to Email:</strong></p> <P><asp:dropdownlist id="DropDownList1" runat="server" Width="280px"></asp:dropdownlist></P> <P><STRONG>Subject:</STRONG></P> <P><asp:textbox id="TextBox1" runat="server" Width="192px"></asp:textbox></P> <P><STRONG>Contents:</STRONG></P> <P><asp:textbox id="TextBox2" runat="server" Width="360px" TextMode="MultiLine" Height="144px"></asp:textbox></P> <P><asp:button id="Button1" runat="server" Width="112px" Text="Submit!" Font-Bold="True"></asp:button></P> </form> <% Server.Execute("design/footer.aspx") %> </body> </html>

Email.aspx.vb
Namespace CBB Partial Class email Inherits System.Web.UI.Page #Region " Web Form Designer Generated Code " 'This call is required by the Web Form Designer. <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() End Sub Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init 'CODEGEN: This method call is required by the Web Form Designer 'Do not modify it using the code editor. InitializeComponent() End Sub #End Region Public dbc As New dbConnnect Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If IsPostBack = False Then Dim sqlstr As String

81

Dim dt2 As New DataTable sqlstr = "select empid, email from employee" Dim dt As DataTable = dbc.RunSelectQuery(sqlstr) Me.DropDownList1.DataSource = dt Me.DropDownList1.DataValueField = "empid" Me.DropDownList1.DataTextField = "email" Me.DropDownList1.DataBind() End If If Session("empid") <> "" Then Me.DropDownList1.SelectedItem.Text = Session("empid") Me.TextBox1.Text = "Question about property # " & Session("listingid") End If End Sub Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim emailid, subject, query As String emailid = Session("emailid") subject = Session("subject") query = Session("query") Dim sqlstr As String Dim i As Integer i = Me.DropDownList1.SelectedIndex() sqlstr = "insert into contact(emailid,subject,query)" & _ "Values( '" & Me.DropDownList1.SelectedItem.Text & "','" & TextBox1.Text & "','" & TextBox2.Text & "')" Me.Label2.Text = sqlstr dbc.RunUpdateDeleteQuery(sqlstr) Label2.Text = "You have successfully posted a query. " End Sub End Class End Namespace

Index.aspx
<%@ Page Language="vb" AutoEventWireup="false" Inherits="CBB.index" CodeFile="index.aspx.vb" %> <% Server.Execute("design/header.aspx") %> <% Server.Execute("design/menu.aspx") %> <html> <body> <form id="shadow" method="post" runat="server"> <p class="title">Welcome to Collin B. Bennett Real Estate</p> <div class="indexbox"> <p class="ibt">Search for Properties</p> <p>Looking to buy or rent a new home, apartment or any other property? Search our properties & real estate listings.</p> <p><a href=properties.aspx>Search Property Listings</a></p> </div> <div class="indexbox"> <p class="ibt">Who are We?</p> <p>Unfamiliar with Collin B. Bennett Agency? Get to know us.</p>

82

<p><a href=about.aspx>About CBB</a></p> <p><a href=staff.aspx>Meet our Staff</a></p> </div> <div class="indexbox"> <p class="ibt">Contacting Collin B. Bennett Agency</p> <p>Looking for our address or how to contact us?</p> <p><a href=contact.aspx>Contact Information</a></p> <p><a href=email.aspx>Email Us</a></p> </div> </form> <% Server.Execute("design/footer.aspx") %> </body> </html>

Index.aspx.vb
Namespace CBB Partial Class index Inherits System.Web.UI.Page #Region " Web Form Designer Generated Code " 'This call is required by the Web Form Designer. <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() End Sub Protected WithEvents TextBox1 As System.Web.UI.WebControls.TextBox Protected WithEvents Button1 As System.Web.UI.WebControls.Button Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init 'CODEGEN: This method call is required by the Web Form Designer 'Do not modify it using the code editor. InitializeComponent() End Sub #End Region Public dbc As New dbConnnect Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Put user code to initialize the page here dbc.connectAndDC() End Sub End Class End Namespace

Login.aspx

83

<%@ Reference Page="~/email.aspx" %> <%@ Page Language="vb" AutoEventWireup="false" Inherits="CBB.updatelisting" CodeFile="updatelisting.aspx.vb" %> <% Server.Execute("design/header.aspx") %> <% Server.Execute("design/menu.aspx") %> <html> <body> <form id="shadow" method="post" runat="server"> <h1>Update a Listing</h1> <P><STRONG>Listing Id: <asp:label id="Label1" runat="server" Width="112px"></asp:label>Image 1:&nbsp; <asp:label id="Label2" runat="server" Width="88px"></asp:label>Image 2: <asp:label id="Label3" runat="server"></asp:label></STRONG></P> <P><STRONG>Price:&nbsp;&nbsp; <asp:textbox id="TextBox1" runat="server" Width="80px"></asp:textbox>&nbsp;(only numbers please) </STRONG></P> <P><STRONG>Street Number: <asp:textbox id="TextBox2" runat="server" Width="40px"></asp:textbox>&nbsp;StreetName: <asp:textbox id="TextBox3" runat="server"></asp:textbox></STRONG></P> <P><STRONG>Garages: <asp:textbox id="TextBox4" runat="server" Width="32px"></asp:textbox>&nbsp;Acres: <asp:textbox id="TextBox9" runat="server" Width="32px"></asp:textbox>&nbsp;Zip Code: <asp:textbox id="TextBox13" runat="server" Width="48px"></asp:textbox></STRONG></P> <P><STRONG>Avalibility: <asp:radiobutton id="rdonew" runat="server" Text="Just Listed" groupname="sale" Checked="True"></asp:radiobutton><asp:radiobutton id="rdosale" runat="server" Text="Sale Pending" groupname="sale"></asp:radiobutton><asp:radiobutton id="rdosold" runat="server" Text="Sold" groupname="sale"></asp:radiobutton> </STRONG></P> <P><STRONG>Property Type: <asp:radiobutton id="radiocommerical" runat="server" Text="Commercial" groupname="type"></asp:radiobutton>&nbsp; <asp:radiobutton id="radioresidential" runat="server" Text="Residential" groupname="type"></asp:radiobutton>&nbsp; <asp:radiobutton id="radioland" runat="server" Text="Land" groupname="type"></asp:radiobutton>&nbsp; <asp:radiobutton id="radioappt" runat="server" Text="Appartment / Condo" groupname="type" Checked="True"></asp:radiobutton></STRONG>&nbsp; </P> <P><STRONG>Assessed Value: <asp:textbox id="TextBox10" runat="server" Width="88px"></asp:textbox>&nbsp; School District:

84

<asp:textbox id="TextBox11" runat="server" Width="168px"></asp:textbox> </STRONG></P> <P><STRONG>Baths: <asp:textbox id="TextBox5" runat="server" Width="40px"></asp:textbox>&nbsp;Bedrooms: <asp:textbox id="TextBox6" runat="server" Width="32px"></asp:textbox>&nbsp; SquareFeet: <asp:textbox id="TextBox12" runat="server" Width="48px"></asp:textbox></STRONG></P> <P><STRONG>Long Description: <asp:textbox id="TextBox7" runat="server" Width="232px" TextMode="MultiLine" Height="72px"></asp:textbox></STRONG></P> <P><STRONG>Short Description:&nbsp; <asp:textbox id="TextBox8" runat="server"></asp:textbox></STRONG></P> <P><STRONG>&nbsp;Picture One <INPUT id="File1" type="file" name="File1" runat="server">&nbsp;</STRONG></P> <P><STRONG>&nbsp;Picture Two <INPUT id="File2" type="file" name="File2" runat="server"></STRONG></P> <P><STRONG><asp:button id="Button1" runat="server" Text="Update"></asp:button>&nbsp;&nbsp;&nbsp; <asp:button id="Button2" runat="server" Text="Delete Listing"></asp:button></STRONG></P> <P><STRONG><asp:label id="Label4" runat="server" Width="472px" Height="34px"></asp:label> </STRONG></P> </form> <% Server.Execute("design/footer.aspx") %> </body> </html>

Login.aspx.vb
Namespace CBB Partial Class login Inherits System.Web.UI.Page #Region " Web Form Designer Generated Code " 'This call is required by the Web Form Designer. <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() End Sub Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init 'CODEGEN: This method call is required by the Web Form Designer 'Do not modify it using the code editor. InitializeComponent() End Sub

85

#End Region Public dbc As New dbConnnect Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Put user code to initialize the page here End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim strsql As String Dim I As Integer strsql = "select * from employee where username = """ & Me.TextBox1.Text & """ and password = """ & Me.Pass.Value & """" Dim x As DataTable = dbc.RunSelectQuery(strsql) I = x.Select.GetLength(I) If I = 0 Then Me.Label3.Text = "You Have entered the Wrong Information, Please Try Again" Else Dim r As DataRow For Each r In x.Rows Session("username") = r("username") Session("email") = r("email") Session("areacode") = r("areacode") Session("phone") = r("phone") Session("firstname") = r("fname") Session("ok") = "ok" Session("empid") = r("empid") Session.Timeout = 10 Next Server.Transfer("mylistings.aspx") End If End Sub End Class End Namespace

Mylistiing.aspx
<%@ Reference Page="~/email.aspx" %> <%@ Page Language="vb" AutoEventWireup="false" Inherits="CBB.updatelisting" CodeFile="updatelisting.aspx.vb" %> <% Server.Execute("design/header.aspx") %> <% Server.Execute("design/menu.aspx") %> <html> <body> <form id="shadow" method="post" runat="server"> <h1>Update a Listing</h1>

86

<P><STRONG>Listing Id: <asp:label id="Label1" runat="server" Width="112px"></asp:label>Image 1:&nbsp; <asp:label id="Label2" runat="server" Width="88px"></asp:label>Image 2: <asp:label id="Label3" runat="server"></asp:label></STRONG></P> <P><STRONG>Price:&nbsp;&nbsp; <asp:textbox id="TextBox1" runat="server" Width="80px"></asp:textbox>&nbsp;(only numbers please) </STRONG></P> <P><STRONG>Street Number: <asp:textbox id="TextBox2" runat="server" Width="40px"></asp:textbox>&nbsp;StreetName: <asp:textbox id="TextBox3" runat="server"></asp:textbox></STRONG></P> <P><STRONG>Garages: <asp:textbox id="TextBox4" runat="server" Width="32px"></asp:textbox>&nbsp;Acres: <asp:textbox id="TextBox9" runat="server" Width="32px"></asp:textbox>&nbsp;Zip Code: <asp:textbox id="TextBox13" runat="server" Width="48px"></asp:textbox></STRONG></P> <P><STRONG>Avalibility: <asp:radiobutton id="rdonew" runat="server" Text="Just Listed" groupname="sale" Checked="True"></asp:radiobutton><asp:radiobutton id="rdosale" runat="server" Text="Sale Pending" groupname="sale"></asp:radiobutton><asp:radiobutton id="rdosold" runat="server" Text="Sold" groupname="sale"></asp:radiobutton> </STRONG></P> <P><STRONG>Property Type: <asp:radiobutton id="radiocommerical" runat="server" Text="Commercial" groupname="type"></asp:radiobutton>&nbsp; <asp:radiobutton id="radioresidential" runat="server" Text="Residential" groupname="type"></asp:radiobutton>&nbsp; <asp:radiobutton id="radioland" runat="server" Text="Land" groupname="type"></asp:radiobutton>&nbsp; <asp:radiobutton id="radioappt" runat="server" Text="Appartment / Condo" groupname="type" Checked="True"></asp:radiobutton></STRONG>&nbsp; </P> <P><STRONG>Assessed Value: <asp:textbox id="TextBox10" runat="server" Width="88px"></asp:textbox>&nbsp; School District: <asp:textbox id="TextBox11" runat="server" Width="168px"></asp:textbox> </STRONG></P> <P><STRONG>Baths: <asp:textbox id="TextBox5" runat="server" Width="40px"></asp:textbox>&nbsp;Bedrooms: <asp:textbox id="TextBox6" runat="server" Width="32px"></asp:textbox>&nbsp; SquareFeet:

87

<asp:textbox id="TextBox12" runat="server" Width="48px"></asp:textbox></STRONG></P> <P><STRONG>Long Description: <asp:textbox id="TextBox7" runat="server" Width="232px" TextMode="MultiLine" Height="72px"></asp:textbox></STRONG></P> <P><STRONG>Short Description:&nbsp; <asp:textbox id="TextBox8" runat="server"></asp:textbox></STRONG></P> <P><STRONG>&nbsp;Picture One <INPUT id="File1" type="file" name="File1" runat="server">&nbsp;</STRONG></P> <P><STRONG>&nbsp;Picture Two <INPUT id="File2" type="file" name="File2" runat="server"></STRONG></P> <P><STRONG><asp:button id="Button1" runat="server" Text="Update"></asp:button>&nbsp;&nbsp;&nbsp; <asp:button id="Button2" runat="server" Text="Delete Listing"></asp:button></STRONG></P> <P><STRONG><asp:label id="Label4" runat="server" Width="472px" Height="34px"></asp:label> </STRONG></P> </form> <% Server.Execute("design/footer.aspx") %> </body> </html>

Mylisting.aspx.vb
Namespace CBB Partial Class mylistings Inherits System.Web.UI.Page #Region " Web Form Designer Generated Code " 'This call is required by the Web Form Designer. <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() End Sub Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init 'CODEGEN: This method call is required by the Web Form Designer 'Do not modify it using the code editor. InitializeComponent() End Sub #End Region Public dbc As New dbConnnect Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If Session("ok") <> "ok" Then Server.Transfer("error.aspx")

88

End If Dim sqlstr As String Dim x As New DataTable Dim sessionid As String sessionid = Val(Session("empid")) sqlstr = "select listingid, zip, streetnum, street from listing where empid = " & sessionid & "" x = dbc.RunSelectQuery(sqlstr) Me.DataGrid1.DataSource = x Me.DataGrid1.DataBind() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Server.Transfer("addlisting.aspx") End Sub Private Sub DataGrid1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DataGrid1.SelectedIndexChanged Dim i As Integer context.Items.Add("listingid", Me.DataGrid1.Items(i).Cells(1).Text) Server.Transfer("updatelisting.aspx") End Sub End Class End Namespace

Properties.aspx
<%@ Page Language="vb" AutoEventWireup="false" Inherits="CBB.properties" CodeFile="properties.aspx.vb" %> <% Server.Execute("design/header.aspx") %> <% Server.Execute("design/menu.aspx") %> <html> <body> <form id="shadow" method="post" runat="server"> <h1>View Properties</h1> <P><STRONG><asp:label id="Label2" runat="server" ForeColor="Red" Font-Bold="True" Font-Size="Large" Width="184px" Visible="False"></asp:label></STRONG></P> <P><STRONG>Property Type: <asp:dropdownlist id="DropDownList2" runat="server" Width="208px"></asp:dropdownlist>&nbsp;&nbsp;&nbsp;&nbsp;</STRONG><STR ONG>Region&nbsp;&nbsp;&nbsp;</STRONG> <asp:dropdownlist id="DropDownList1" runat="server" Width="200px"></asp:dropdownlist></P> <P><STRONG>Price:&nbsp; From: </STRONG> <asp:textbox id="btnlow" runat="server" Width="56px"></asp:textbox><STRONG>&nbsp; To: </STRONG>

89

<asp:textbox id="btnhigh" runat="server" Width="72px"></asp:textbox>(<EM>Please Input whole numbers only, ex. 30000)</EM></P> <P><STRONG>Bedrooms: <asp:radiobutton id="radio1" runat="server" groupname="beds" Text="One"></asp:radiobutton>&nbsp;&nbsp; <asp:radiobutton id="radio2" runat="server" groupname="beds" Text="Two"></asp:radiobutton>&nbsp;&nbsp; <asp:radiobutton id="radio3" runat="server" groupname="beds" Text="Three"></asp:radiobutton>&nbsp;&nbsp; <asp:radiobutton id="radio4" runat="server" groupname="beds" Text="Four or more"></asp:radiobutton><asp:radiobutton id="radioany" runat="server" groupname="beds" Text="Any" Checked="True"></asp:radiobutton></STRONG><STRONG></P> <P><STRONG>SquareFeet: From: <asp:textbox id="sqfeetlow" runat="server" Width="48px"></asp:textbox>&nbsp;To: <asp:textbox id="sqfeethigh" runat="server" Width="48px"></asp:textbox></STRONG></P> <P><STRONG><asp:button id="Button1" runat="server" Text="Search Listings"></asp:button></STRONG></P> <P><STRONG> <asp:Label id="Label1" runat="server" FontSize="Medium" Font-Bold="True" ForeColor="Black"></asp:Label></P> <P><asp:datagrid id="DataGrid1" runat="server" FontSize="Smaller" Width="704px" ShowHeader="False" CellSpacing="4" Height="135px" BorderColor="Silver" CellPadding="0" GridLines="None"> <SelectedItemStyle Font-Size="Large" FontNames="Arial" BackColor="Blue"></SelectedItemStyle> <ItemStyle Font-Size="Small" Font-Names="Times New Roman" BackColor="White"></ItemStyle> <HeaderStyle Font-Size="12pt"></HeaderStyle> <Columns> <asp:ButtonColumn Text="Click for More Details" CommandName="Select"> <ItemStyle FontSize="Small"></ItemStyle> </asp:ButtonColumn> </Columns> </asp:datagrid></P> </form> <% Server.Execute("design/footer.aspx") %> </body></html>

Properties.aspx.vb
Namespace CBB Partial Class properties Inherits System.Web.UI.Page #Region " Web Form Designer Generated Code "

90

'This call is required by the Web Form Designer. <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() End Sub Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init 'CODEGEN: This method call is required by the Web Form Designer 'Do not modify it using the code editor. InitializeComponent() End Sub #End Region Public dbc As New dbConnnect Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If IsPostBack = False Then Dim sqlstr As String Catergories" sqlstr = "select CategoryID, CategoryName from Dim dt As DataTable = dbc.RunSelectQuery(sqlstr) Me.DropDownList1.DataSource = dt Me.DropDownList1.DataValueField = "CategoryID" Me.DropDownList1.DataTextField = "CategoryName" Me.DropDownList1.DataBind() sqlstr = "select PropertyId,PropertyName from Property" Dim dt2 As DataTable = dbc.RunSelectQuery(sqlstr) Me.DropDownList2.DataSource = dt2 Me.DropDownList2.DataValueField = "PropertyId" Me.DropDownList2.DataTextField = "PropertyName" Me.DropDownList2.DataBind() End If End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If IsNumeric(Me.sqfeethigh.Text) = False And Me.sqfeethigh.Text <> "" Then Label2.Text = "Only numbers in the squarefeet fields" Label2.Visible = True Exit Sub End If If IsNumeric(Me.sqfeetlow.Text) = False And Me.sqfeetlow.Text <> "" Then Label2.Text = "Only numbers in the squarefeet fields" Label2.Visible = True Exit Sub End If If IsNumeric(Me.btnhigh.Text) = False And Me.btnhigh.Text <> "" Then

91

Then

Label2.Text = "Only numbers in the price fields" Label2.Visible = True Exit Sub End If If IsNumeric(Me.btnlow.Text) = False And Me.btnlow.Text <> "" Label2.Text = "Only numbers in the price fields" Label2.Visible = True Exit Sub End If Dim sqlstr As String Dim i, decide As Integer Dim pricehigh, pricelow, bedrooms, sqrfeetlow, sqrfeethigh As

String

pricehigh = Me.btnhigh.Text pricelow = Me.btnlow.Text If pricehigh <> "" Then pricehigh = " and price < " & pricehigh End If If pricelow <> "" Then pricelow = " and price > " & pricelow End If If pricehigh <> "" And pricelow <> "" Then pricehigh = " and price between " & Me.btnhigh.Text & " and " & Me.btnlow.Text & "" pricelow = "" End If If Me.radio1.Checked = True Then bedrooms = " and numbed =" & 1 ElseIf Me.radio2.Checked = True Then bedrooms = " and numbed =" & 2 ElseIf Me.radio3.Checked = True Then bedrooms = " and numbed =" & 3 End If If Me.sqfeetlow.Text <> "" Then sqrfeetlow = " and sqrfeet > " & Me.sqfeetlow.Text End If If Me.sqfeethigh.Text <> "" Then sqrfeethigh = " and sqrfeet < " & Me.sqfeethigh.Text End If If Me.sqfeethigh.Text <> "" And Me.sqfeetlow.Text <> "" Then sqrfeethigh = " and sqrfeet between " & Me.sqfeethigh.Text & " and " & Me.sqfeetlow.Text sqrfeetlow = "" End If sqlstr = "select listingid, searchpic, streetnum, street, descshort, price from listing where catergoryid =" & Me.DropDownList1.SelectedIndex + 1 & "" & _ " And propertyid =" & Me.DropDownList2.SelectedIndex + 1 & "" + pricelow + bedrooms + pricehigh + sqrfeethigh + sqrfeetlow Me.Label1.Text = sqlstr Dim dt As DataTable = dbc.RunSelectQuery(sqlstr) Me.DataGrid1.DataSource = dt Me.DataGrid1.DataBind() Me.sqfeethigh.Text = "" Me.sqfeetlow.Text = ""

92

Me.btnhigh.Text = "" Me.btnlow.Text = "" If dt.Rows.Count = "0" Then Label1.Text = "Your Search Yielded No Results, Please Try Again" found." ElseIf dt.Rows.Count = "1" Then Label1.Text = " There was " & dt.Rows.Count & " property Else

Label1.Text = " There were " & dt.Rows.Count & " properties found." End If End Sub Private Sub DataGrid1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DataGrid1.SelectedIndexChanged Dim i, j As Integer i = Me.DataGrid1.SelectedIndex j = Me.DropDownList1.SelectedIndex context.Items.Add("listingid", Me.DataGrid1.Items(i).Cells(1).Text) context.Items.Add("town", Me.DropDownList1.Items(j).Text) Server.Transfer("details.aspx") End Sub End Class End Namespace

Quicksearch.aspx
<%@ Page Language="vb" AutoEventWireup="false" Inherits="CBB.quicksearch" CodeFile="quicksearch.aspx.vb" %> <% Server.Execute("design/header.aspx") %> <% Server.Execute("design/menu.aspx") %> <form id="shadow" method="post" runat="server"> <h1>Quick Search Results</h1> <P> <asp:Label id="lblSearchedFor" runat="server"></asp:Label>&nbsp;</P> <P> <asp:label id="lblResultInfo" runat="server"></asp:label> <asp:datagrid id="DataGrid2" runat="server" Width="704px" ShowHeader="False" CellSpacing="4" Height="135px" BorderColor="Silver" CellPadding="0" GridLines="None" Font-Size="Smaller"> <SelectedItemStyle Font-Size="Large" FontNames="Arial" BackColor="Blue"></SelectedItemStyle> <ItemStyle Font-Size="Small" Font-Names="Times New Roman" BackColor="White"></ItemStyle> <HeaderStyle Font-Size="12pt"></HeaderStyle> <Columns> <asp:ButtonColumn Text="Click for More Details" CommandName="Select"> <ItemStyle FontSize="Small"></ItemStyle> </asp:ButtonColumn>

93

</Columns> </asp:datagrid> </P> </form> <% Server.Execute("design/footer.aspx") %>

Quicksearch.aspx.vb
Namespace CBB Partial Class quicksearch Inherits System.Web.UI.Page Public dbc As New dbConnnect #Region " Web Form Designer Generated Code " 'This call is required by the Web Form Designer. <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() End Sub Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init 'CODEGEN: This method call is required by the Web Form Designer 'Do not modify it using the code editor. InitializeComponent() End Sub #End Region Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Put user code to initialize the page here searchString = searchString.Trim() If searchString = "" Then Me.lblSearchedFor.Text = "Please enter a City or Zip to search for." Exit Sub End If Dim sqlstr As String Dim dt2 As DataTable Me.lblSearchedFor.Text = "You searched for: " & searchString If IsNumeric(searchString) = True Then Me.lblSearchedFor.Text &= " (zip)" sqlstr = "select listingid, searchpic, streetnum, street, descshort, price from listing where zip ='" & searchString & "'" dt2 = dbc.RunSelectQuery(sqlstr) Me.DataGrid2.DataSource = dt2 Me.DataGrid2.DataBind() Else Me.lblSearchedFor.Text &= " (city)"

94

sqlstr = "select listingid, searchpic, streetnum, street, descshort, price from catergories a, listing b where categoryname ='" & searchString & "' and a.categoryid = b.catergoryid" dt2 = dbc.RunSelectQuery(sqlstr) Me.DataGrid2.DataSource = dt2 Me.DataGrid2.DataBind() End If If dt2.Rows.Count = "0" Then Me.lblResultInfo.Text = "Your Search Yielded No Results, Please Try Again" ElseIf dt2.Rows.Count = "1" Then lblResultInfo.Text = " There was " & dt2.Rows.Count & " property found." Else lblResultInfo.Text = " There were " & dt2.Rows.Count & " properties found." End If End Sub Private Sub DataGrid1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Dim i As Integer i = Me.DataGrid2.SelectedIndex context.Items.Add("listingid", Me.DataGrid2.Items(i).Cells(1).Text) Server.Transfer("details.aspx") End Sub End Class End Namespace

Register.aspx
<%@ Reference Page="~/email.aspx" %> <%@ Page Language="vb" AutoEventWireup="false" Inherits="CBB.register" CodeFile="register.aspx.vb" %> <% Server.Execute("design/header.aspx") %> <% Server.Execute("design/menu.aspx") %> <html> <body> <form id="shadow" method="post" runat="server"> <h1>Register Another Employee</h1> <STRONG></STRONG><STRONG></STRONG> <P><STRONG> <asp:Label id="Label1" runat="server"></asp:Label></STRONG></P> <P><STRONG> Enter First Name: <asp:TextBox id="first" runat="server"></asp:TextBox> </STRONG></P> <P><STRONG> Enter Last Name: <asp:TextBox id="last" runat="server"></asp:TextBox></STRONG></P> <P><STRONG> Enter Phone Number&nbsp; Areacode:&nbsp; </STRONG>

95

<asp:TextBox id="areacode" runat="server" Width="32px" MaxLength="3"></asp:TextBox><STRONG>&nbsp;&nbsp; Phone: </STRONG> <asp:TextBox id="phone" runat="server" MaxLength="7" Width="64px"></asp:TextBox><EM>(No Spaces)</EM></P> <P><STRONG> Enter Email Address: <asp:TextBox id="email" runat="server"></asp:TextBox></STRONG></P> <P><STRONG>Gender: <asp:RadioButton id="rdomale" runat="server" Text="Male" groupname="gender"></asp:RadioButton>&nbsp;&nbsp; <asp:RadioButton id="rdofemale" runat="server" Text="Female" groupname="gender"></asp:RadioButton></STRONG></P> <P><STRONG>Today's Date: </STRONG> <asp:TextBox id="datestarted" runat="server"></asp:TextBox><STRONG>&nbsp;</STRONG><EM>(Format MM/DD/YYY)</EM></P> <P><STRONG>Create a Username: &nbsp; <asp:TextBox id="username" runat="server"></asp:TextBox> </STRONG></P> <P><STRONG>Create a Password:&nbsp;&nbsp;<INPUT id="pass" type="password" name="Password1" runat="server" size="22"></STRONG></P> <P><STRONG>Enter a brief personal profile:</STRONG></P> <P> <asp:TextBox id="profiles" runat="server" Width="320px" TextMode="MultiLine" Height="72px"></asp:TextBox></P> <P><INPUT id="file1" type="file" runat="server" NAME="file1"></P> <STRONG></STRONG><P><STRONG> <asp:Button id="Submit" runat="server" Text="Submit Your Information" Width="240px" BackColor="DarkGray" FontBold="True"></asp:Button>&nbsp;&nbsp;&nbsp;</STRONG></P> <P>&nbsp;</P> </form> <% Server.Execute("design/footer.aspx") %> </body> </html>

Register.aspx.vb
Namespace CBB Partial Class register Inherits System.Web.UI.Page #Region " Web Form Designer Generated Code " 'This call is required by the Web Form Designer. <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() End Sub

96

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init 'CODEGEN: This method call is required by the Web Form Designer 'Do not modify it using the code editor. InitializeComponent() End Sub #End Region Public dbc As New dbConnnect Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If Session("ok") <> "ok" Then Server.Transfer("error.aspx") End If Me.rdomale.Checked = True End Sub Private Sub Submit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Submit.Click Dim gender As String If Me.rdomale.Checked = True Then gender = "male" Else gender = "female" End If If username.Text = "" Then Label1.Text = "You need to input a username" Exit Sub End If If last.Text = "" Then Label1.Text = "You need a last name" Exit Sub End If If first.Text = "" Then Label1.Text = "You need a first name" Exit Sub End If If pass.Value = "" Then Label1.Text = "You need a password" Exit Sub End If If email.Text = "" Then Label1.Text = "You need to enter an email address" Exit Sub End If Dim strsql As String Dim sqlstr As String Dim I As Integer strsql = "select * from Employee where username = """ & Me.username.Text & """" Dim x As DataTable = dbc.RunSelectQuery(strsql) I = x.Select.GetLength(I) If I = 1 Then

97

again" Else

Me.Label1.Text = "Username Already Taken, Please try

Dim a, b As String b = System.IO.Path.GetFileName(Me.file1.PostedFile.FileName) Me.file1.PostedFile.SaveAs("C:\Inetpub\wwwroot\RealEstate\Employee\" & b) a = " employee\" + b sqlstr = "Insert Into Employee (fname, lname, [password], areacode, phone, email, gender, username, datestarted,profile, picture) " & _ "Values ('" & first.Text & "', '" & last.Text & "','" & pass.Value & "', " & _ "'" & areacode.Text & "','" & phone.Text & "','" & email.Text & "'," & _ "'" & gender & "','" & username.Text & "','" & datestarted.Text & "','" & profiles.Text & "','" & a & "')" Me.Label1.Text = sqlstr If dbc.RunUpdateDeleteQuery(strsql) Then Server.Transfer("success.aspx") Else Server.Transfer("register.aspx") End If End If End Sub End Class End Namespace

Staff.aspx
<%@ Page Language="vb" AutoEventWireup="false" Inherits="CBB.staff" CodeFile="staff.aspx.vb" %> <% Server.Execute("design/header.aspx") %> <% Server.Execute("design/menu.aspx") %> <html> <body> <form id="shadow" method="post" runat="server"> <h1>Collin B. Bennett Staff</h1> <div style="MARGIN-LEFT: 25px"> <table width="100%" CELLSPACING="0" cellpadding="0" border="0" class="table1"> <tr> <td width="30%"> <p>Choose an employee from the list to see their profile.</p> <P><asp:dropdownlist id="dd_EmpList" runat="server" AutoPostBack="True"></asp:dropdownlist></P> </td> <td width="70%"> <div class="empDetails"> <P>(image)<asp:image id="img_emp" runat="server" Height="152px" Width="160px" Visible="False" BorderStyle="Solid">

98

</asp:image></P> <P> <asp:Label id="lbl_EmpName" runat="server"></asp:Label></P> <P> <asp:Label id="lbl_EmpPhone" runat="server"></asp:Label></P> <P> <asp:Label id="lbl_EmpEmail" runat="server"></asp:Label></P> </div> </td> </tr> </table> </div> </form> <% Server.Execute("design/footer.aspx") %> </body></html>

Staff.aspx.vb
Namespace CBB Partial Class staff Inherits System.Web.UI.Page #Region " Web Form Designer Generated Code " 'This call is required by the Web Form Designer. <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() End Sub Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init 'CODEGEN: This method call is required by the Web Form Designer 'Do not modify it using the code editor. InitializeComponent() End Sub #End Region Public dbc As New dbConnnect Dim sqlstr As String 'Dim numberOfEmp As Integer = dbc.numberEmployees Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Me.Label1.Text = "Number Of employees: " & dbc.numberEmployees If Not IsPostBack Then dd_EmpList.DataSource = dbc.EmpTable Me.dd_EmpList.DataTextField = "FullName" Me.dd_EmpList.DataValueField = "empId"

99

Me.dd_EmpList.DataBind() Me.dd_EmpList.SelectedIndex = 0 setEmpDetails() End If End Sub Sub setEmpDetails() Dim x() As String = dbc.EmpDetails(Me.dd_EmpList.SelectedValue) Me.lbl_EmpName.Text = x(0) Me.lbl_EmpPhone.Text = x(1) Me.lbl_EmpEmail.Text = x(2) End Sub Private Sub dd_EmpList_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dd_EmpList.SelectedIndexChanged setEmpDetails() End Sub End Class End Namespace

Updatelisting.aspx
<%@ Reference Page="~/email.aspx" %> <%@ Page Language="vb" AutoEventWireup="false" Inherits="CBB.updatelisting" CodeFile="updatelisting.aspx.vb" %> <% Server.Execute("design/header.aspx") %> <% Server.Execute("design/menu.aspx") %> <html> <body> <form id="shadow" method="post" runat="server"> <h1>Update a Listing</h1> <P><STRONG>Listing Id: <asp:label id="Label1" runat="server" Width="112px"></asp:label>Image 1:&nbsp; <asp:label id="Label2" runat="server" Width="88px"></asp:label>Image 2: <asp:label id="Label3" runat="server"></asp:label></STRONG></P> <P><STRONG>Price:&nbsp;&nbsp; <asp:textbox id="TextBox1" runat="server" Width="80px"></asp:textbox>&nbsp;(only numbers please) </STRONG></P> <P><STRONG>Street Number: <asp:textbox id="TextBox2" runat="server" Width="40px"></asp:textbox>&nbsp;StreetName: <asp:textbox id="TextBox3" runat="server"></asp:textbox></STRONG></P> <P><STRONG>Garages: <asp:textbox id="TextBox4" runat="server" Width="32px"></asp:textbox>&nbsp;Acres: <asp:textbox id="TextBox9" runat="server" Width="32px"></asp:textbox>&nbsp;Zip

100

Code: <asp:textbox id="TextBox13" runat="server" Width="48px"></asp:textbox></STRONG></P> <P><STRONG>Avalibility: <asp:radiobutton id="rdonew" runat="server" Text="Just Listed" groupname="sale" Checked="True"></asp:radiobutton><asp:radiobutton id="rdosale" runat="server" Text="Sale Pending" groupname="sale"></asp:radiobutton><asp:radiobutton id="rdosold" runat="server" Text="Sold" groupname="sale"></asp:radiobutton> </STRONG></P> <P><STRONG>Property Type: <asp:radiobutton id="radiocommerical" runat="server" Text="Commercial" groupname="type"></asp:radiobutton>&nbsp; <asp:radiobutton id="radioresidential" runat="server" Text="Residential" groupname="type"></asp:radiobutton>&nbsp; <asp:radiobutton id="radioland" runat="server" Text="Land" groupname="type"></asp:radiobutton>&nbsp; <asp:radiobutton id="radioappt" runat="server" Text="Appartment / Condo" groupname="type" Checked="True"></asp:radiobutton></STRONG>&nbsp; </P> <P><STRONG>Assessed Value: <asp:textbox id="TextBox10" runat="server" Width="88px"></asp:textbox>&nbsp; School District: <asp:textbox id="TextBox11" runat="server" Width="168px"></asp:textbox> </STRONG></P> <P><STRONG>Baths: <asp:textbox id="TextBox5" runat="server" Width="40px"></asp:textbox>&nbsp;Bedrooms: <asp:textbox id="TextBox6" runat="server" Width="32px"></asp:textbox>&nbsp; SquareFeet: <asp:textbox id="TextBox12" runat="server" Width="48px"></asp:textbox></STRONG></P> <P><STRONG>Long Description: <asp:textbox id="TextBox7" runat="server" Width="232px" TextMode="MultiLine" Height="72px"></asp:textbox></STRONG></P> <P><STRONG>Short Description:&nbsp; <asp:textbox id="TextBox8" runat="server"></asp:textbox></STRONG></P> <P><STRONG>&nbsp;Picture One <INPUT id="File1" type="file" name="File1" runat="server">&nbsp;</STRONG></P> <P><STRONG>&nbsp;Picture Two <INPUT id="File2" type="file" name="File2" runat="server"></STRONG></P> <P><STRONG><asp:button id="Button1" runat="server" Text="Update"></asp:button>&nbsp;&nbsp;&nbsp; <asp:button id="Button2" runat="server" Text="Delete Listing"></asp:button></STRONG></P> <P><STRONG><asp:label id="Label4" runat="server" Width="472px" Height="34px"></asp:label> </STRONG></P> </form> <% Server.Execute("design/footer.aspx") %> </body>

101

</html>

Updatelisting.aspx.vb
Namespace CBB Partial Class updatelisting Inherits System.Web.UI.Page #Region " Web Form Designer Generated Code " 'This call is required by the Web Form Designer. <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() End Sub Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init 'CODEGEN: This method call is required by the Web Form Designer 'Do not modify it using the code editor. InitializeComponent() End Sub #End Region Public dbc As New dbConnnect Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If Session("ok") <> "ok" Then Server.Transfer("error.aspx") End If If IsPostBack = False Then postListinginfo() End If End Sub Sub postListinginfo() Dim sqlstr, acres, zip, schooldist, listingid, pic1, pic2, longdesc As String Dim squarefeet, price, shortdesc, accessed, email, areacode, phone, streetnumber, streetname, location As String Dim garage, bedrooms, baths As Integer location = context.Items("town") listingid = context.Items("listingid") sqlstr = "select * from listing a, employee b where listingid = " & listingid & " and a.empid = b.empid" Dim x As DataTable = dbc.RunSelectQuery(sqlstr) Dim r As DataRow For Each r In x.Rows longdesc = r("desclong") shortdesc = r("descshort") pic1 = r("picture1") pic2 = r("picture2")

102

streetname = r("street") streetnumber = r("streetnum") squarefeet = r("sqrfeet") price = r("price") bedrooms = r("numbed") baths = r("numbath") email = r("email") phone = r("phone") garage = r("numgarage") areacode = r("areacode") acres = r("acres") zip = r("zip") schooldist = r("schooldist") accessed = r("accessed") Me.Label1.Text = context.Items("listingid") Me.Label2.Text = pic1 Me.Label3.Text = pic2 Me.TextBox1.Text = price Me.TextBox2.Text = streetnumber Me.TextBox3.Text = streetname Me.TextBox4.Text = garage Me.TextBox5.Text = baths Me.TextBox6.Text = bedrooms Me.TextBox7.Text = longdesc Me.TextBox8.Text = shortdesc Me.TextBox12.Text = squarefeet Me.TextBox9.Text = acres Me.TextBox13.Text = zip Me.TextBox11.Text = schooldist Me.TextBox10.Text = accessed Next End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim property_type As Integer Dim saletype As String If Me.radioresidential.Checked = True Then property_type = 1 ElseIf Me.radioland.Checked = True Then property_type = 2 ElseIf Me.radiocommerical.Checked = True Then property_type = 3 Else property_type = 4 End If If Me.rdonew.Checked = True Then saletype = "Just Listed" ElseIf Me.rdosale.Checked = True Then saletype = "Sale Pending" ElseIf Me.rdosold.Checked = True Then saletype = "Sold" End If Dim Dim Dim x = y = sqlstr As String listingid As String x, y, z As String System.IO.Path.GetFileName(Me.File1.PostedFile.FileName) System.IO.Path.GetFileName(Me.File2.PostedFile.FileName)

103

If x = "" Then x = Label2.Text Else Me.File1.PostedFile.SaveAs("C:\Inetpub\wwwroot\CBB\images\property\" & x) End If If y = "" Then y = Label3.Text z = "<img src =" & y & " height =60 width =75>" Else Me.File2.PostedFile.SaveAs("C:\Inetpub\wwwroot\CBB\images\property\" & y) z = "<img src =" & "images/property/" & y & " height =60 width =75>" End If listingid = Label1.Text sqlstr = "update listing set price=" & TextBox1.Text & ", streetnum='" & TextBox2.Text & "'," & _ " street ='" & TextBox3.Text & "', propertyid =" & property_type & ",sqrfeet = " & TextBox12.Text & ", numgarage=" & TextBox4.Text & ", avaliability ='" & saletype & "', " & _ " numbath =" & TextBox5.Text & ",zip ='" & TextBox13.Text & "', numbed=" & TextBox6.Text & ", descLong='" & TextBox7.Text & "', searchpic ='" & z & "', " & _ " descShort='" & TextBox8.Text & "', accessed ='" & TextBox10.Text & "',acres ='" & TextBox9.Text & "' , picture1 ='" & x & "' , picture2 ='" & y & "' where listingid = " & listingid Me.Label4.Text = sqlstr dbc.RunUpdateDeleteQuery(sqlstr) Label4.Text = "You have sucessfully updated your listing" postListinginfo() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim sqlstr As String sqlstr = "delete from listing where listingid =" & Me.TextBox1.Text Server.Transfer("update.aspx") End Sub End Class End Namespace

104

Bibliography

BIBLIOGRAPHY
1. Various Real- Estate Websites like (www.99acers.com, www.makaan.com)

2. Book - Essentials of .net


3. MSDN Library (http://msdn.microsoft.com/en-us/library/ms123401.aspx)

4. Search Engine - Google (www.google.com)

SOFTWARE USED: Framework: .net Framework 2.5 or 3.5 Front-end: ASP.net +VB.net (Microsoft Visual Studio 2005 or later) Back-end: Microsoft Access 2003 or 2007

105