You are on page 1of 89

Institute of Arts, Science and Technology Computing

LEVEL: 7

MODULE: COM70: DISSERTATION

ASSIGNMENT: Assignment

ISSUE DATE: Module schedule week 1

RETURN DEADLINE: FRIDAY 31
st
JANUARY 2014

LECTURER: J. Worden VERIFIED BY: J. Poulton

To be completed by student

Name: HARDIKBHAI S12003264 Date submitted:31/01/2014

Course: Student Signature:HARDIK

Certification: I certify that the whole of this
work is the result of my individual effort
and that all quotations from books,
periodicals etc. have been acknowledged.
To be completed by lecturer

Comments:










Grade/Mark **


**Note: Please note that the above shown feedback is indicative and that scores may
change when moderated.

Table of Contents
Introduction ..................................................................................................................................... 5
Project Description...................................................................................................................... 5
Objective ..................................................................................................................................... 5
Scope ........................................................................................................................................... 5
As mentioned on Creative Real, decided to have following modules in Property Listing Web
Application. ................................................................................................................................. 6
Module ........................................................................................................................................ 6
Individual Seller/Buyer ........................................................................................................... 6
Agent ....................................................................................................................................... 6
Administrator .......................................................................................................................... 6
System Study .................................................................................................................................. 6
Existing System .......................................................................................................................... 6
Proposed System ......................................................................................................................... 7
Constraints .................................................................................................................................. 7
Assumptions ................................................................................................................................ 7
Hardware & Software Requirements .......................................................................................... 8
Hardware and Software Requirements For Development ................................................... 8
Hardware and Software Requirements For Deployment ..................................................... 8
Technology and Literature Review ............................................................................................. 9
Dot Net Framework ................................................................................................................ 9
Advantages of Dot Net Framework ........................................................................................ 9
Type of Application ................................................................................................................ 9
.NET Framework .................................................................................................................... 9
Literature Review...................................................................................................................... 10
History................................................................................................................................... 10
Staking Claim........................................................................................................................ 10
All Hail the King ................................................................................................................... 10
The King is Dead ...................................................................................................................... 11
Magic Mortgages ...................................................................................................................... 11
Common Language Run ........................................................................................................... 12
The CLR comprises of two main parts ................................................................................. 12
Features of CLR .................................................................................................................... 12
Unified Programming Classes .............................................................................................. 12
ASP.NET .................................................................................................................................. 12
Assembly................................................................................................................................... 13
Managed Code .......................................................................................................................... 13
NET metadata ........................................................................................................................... 13
ASP.NET .............................................................................................................................. 13
ASP.NET Page Framework ...................................................................................................... 14
ASP.NET Web Forms Pages .................................................................................................... 14
Web Forms Pages are made of.............................................................................................. 15
ASP.NET Controls ................................................................................................................ 15
Cross Language Support ........................................................................................................... 15
Event Driven Programming Model ........................................................................................... 15
ASP.NET (XML) Web Service ................................................................................................ 16
Data Access ............................................................................................................................... 16
Session State Management ....................................................................................................... 16
Compilation............................................................................................................................... 16
Configuration ............................................................................................................................ 16
Deployment ............................................................................................................................... 16
Error Handling, Debugging and Tracing .................................................................................. 17
Security ..................................................................................................................................... 17
Caching ..................................................................................................................................... 17
Optimization ............................................................................................................................. 17
AJAX .................................................................................................................................... 17
System Design .............................................................................................................................. 18
Methodology V BELOW ............................................................................................................ 18
Waterfall Life Cycle ................................................................................................................. 18
Use Case Diagram..................................................................................................................... 19
Sequence Diagram .................................................................................................................... 22
Data Flow Diagram ................................................................................................................... 24
E R Diagram .......................................................................................................................... 25
Data Dictionary ......................................................................................................................... 26
MstAdministrator .................................................................................................................. 26
MstAdvertisement ................................................................................................................. 27
MstAgent............................................................................................................................... 27
MstArticle ............................................................................................................................. 27
MstFeature ............................................................................................................................ 28
MstOffer ................................................................................................................................ 28
MstProperty........................................................................................................................... 28
MstPropertySubType ............................................................................................................ 29
MstPropertyType .................................................................................................................. 29
MstSellerBuyer ..................................................................................................................... 29
MstUser ................................................................................................................................. 30
MstUserType......................................................................................................................... 30
TrnAgreement ....................................................................................................................... 30
TrnPropertyFeature ............................................................................................................... 30
TrnPropertyPhotoAlbum....................................................................................................... 30
Stored procedures...................................................................................................................... 31
Screen Design ............................................................................................................................... 59
System Development .................................................................................................................... 72
System testing ........................................................................................................................... 72
Managing quality assurance .......................................................................................................... 72
Testing....................................................................................................................................... 73
Testing Strategies ...................................................................................................................... 73
Code Testing ......................................................................................................................... 73
Specification Testing ............................................................................................................ 73
Types of test data .................................................................................................................. 74
Using live test data ................................................................................................................ 74
Using artificial data ............................................................................................................... 74
Level of testing ......................................................................................................................... 74
Unit Testing .......................................................................................................................... 74
System Testing .......................................................................................................................... 75
My Testing approach ................................................................................................................ 75
Unit Testing: ......................................................................................................................... 76
System Security ........................................................................................................................ 76
Systems Maintenance.................................................................................................................... 77
User Manual .................................................................................................................................. 79
Learning Experience ..................................................................................................................... 87
REFERENCE ................................................................................................................................... 89






Introduction
The aim to develop Property Listing Web Application comes from my support to lean Dot Net
Technology and Visual Studio 2010 for building business logic for web application and SQL
Server 2008 for database designing and stored procedures. It will also help to understand other
emerging technology like AJAX.

The most powerful factor for choosing this web application is to design very interactive and
highly user friendly property search option using java script and AJAX. This web application also
helps me to understand query optimization and high scale data management. It will also help to
understand Image processing like aspect ratio, thumbnail generation and many.

Other challenges in this application are the easy and effective property listing and viewing. We
are going to develop icon base single screen listing and viewing. Revenue generation should be
a prime motivation for any development. Here any builder or any other business can list their
advertisement and which will help to generate revenue

Project Description
The purpose of this Real Estate web application is to provide user friendly interface to users and
remove all the discrepancies present in the existing systems. This web application let the user to
search any property even by complex search query. At the back end SQL Server 2008 database is
being used where all the details related to the property are being stored and when user gives
input in the search field then this input is being matched with stored values and corresponding
values are being fetched.
Objective
The main objective of this application is to understand the web portal.
Application for the analysis and design.
The Web Site and its components will have a database connection.
Business process review and understand the real estate function.
Site Understand the different levels of testing and performance testing.
Gain technology knowledge for Microsoft web technology and AJAX technology.
Scope
The basic goal of this application is to centralize real-estate basic activities like sale, buy, rent
and lease. All users will get end to end solution for his/her real-estate needs. Single user,
broker, and owner of property, all will use this property at their levels. User-friendly interface
and magic search will provide fast and micro level search.

Features of Real Estate Portal as reported on PG Real Estate

Individual Seller/Buyer
Agent
Administrator
As mentioned on Creative Real, decided to have following modules in Property Listing Web
Application.
Module
Individual Seller/Buyer
This module is useful for normal user who wants to sale, purchase, rent, or lease his/her
property. Any new normal user will create first his/her profile. Once he/she done with creation
of his profile, they can access multiple features of portal. Every user has its own dashboard
from where they can search or list any type of property. They can also view other listed
property along with property features list and album.

Agent
This module is useful for property agent who wants to sale, purchase, rent or lease property.
First agent will create profile along with contact details and logo. Once profile created, then
agent will list his/her properties. Agent can also view other listed property and contact details
so he/she can direct contact them. In his/her individual dashboard agent can view and update
self created list.

Administrator
Every web application requires different type of maintenance in term of Add/Edit/Delete its
master entries. Default administrator user will be automatically created during deployment and
this administrator user can create other administrator users. Administrator will also look after
posting of advertisement and article.

System Study

Existing System

The purpose of creating this Real Estate Web Application is to remove all the discrepancies
present in the existing systems on the World Wide Web. One of the basic problems with the
existing applications is the non-interactive environment they usually provide to the users. As
most of the applications involved in Real Estate business use some already made web template
and put content specific to their company and make it communicate with the database to
search the listings for the user. These templates simply use basic web controls to do this task
which make the web page non- interactive.

On the other hand motive of this web application is to allow the user to play with the search
tool and create different combinational search criterion to perform exhaustive search. Another
problem in these applications is the use of traditional user interfaces which make continuous post
backs to the server so each post back makes a call to the server which eventually makes the
application response slow as entire web gets refreshed to display the result. This scenario adds an
extra trade off causing a delay in displaying results. So found a solution for it, decided to make
this application Ajax based, by this user can perform exhaustive search without getting any
delays. The users can easily feel the difference between the Ajax empowered user interface and
traditional user interface.

Scrutinizing the features of the existing systems reveals other problem too, that is when the user
tries to save some property listing for his future reference in this case he is forced to login as a
buyer/ user of this website. Once the user gets logged in only then he can use see his listing

This application also uses the session on as the user perform a search, a new session is created
and then lets the user to select a listing, drag and drop it to the Saved Search tool. This tool
then keeps the track of this until session expires.
Proposed System
The proposed system will have the following life cycle to perform all above mentioned actions

Individual seller and buyer will create their account with require information like name,
address, contact information.
Agent will create their account along with company logo and profile so end user can easy
understand every agent.
Every level user can easily search with normal or advance search option.
Every listed property have individual image album of listed property.
Using common master concept administrator will manage Item and Sub Item.
Dynamic content management will give administrator to flexibility to change poll at
anytime.
Any new news or articles can easy post using user-friendly panel.

Constraints
I cannot provide 24X7 supports for this web portal.
Execution of System depends on the network traffic.
System is not a multilingual so user should know English.
Any guest user can only view the listed property but cannot post.
Registered users only have the rights to access the facilities provided by the system.
The user can access web application from any computer that has internet connection and
internet browsing capabilities.

Assumptions
It is a web application, hosted on live server so when end user wants to use it, it needs
internet connection.
It is being tested almost on all versions of IE9 so it is being assumed that user will use IE9
and its higher version to use this application.
As this application does not provide verification for property images so it is assumed that
user will update correct images for property.


Hardware & Software Requirements
Hardware and Software Requirements For Development
Hardware:
Processor Intel P-IV 2.40GHz
Cache 1 GB
RAM 4 GB
Hard Disk 40 GB
Software:
Server Side:
Technology: ASP.NET 4.0, XML, AJAX
Scripting: C#
IDE: Visual Studio 2010
Database: SQL Server 2008
Web Server: IIS.

Client Side:
Internet Browser IE 8.0+, Mozilla Firefox 15.0+
Hardware and Software Requirements For Deployment
Hardware:
Processor Intel P-IV 2.40GHz
Cache 2 GB
RAM 4 GB
Hard Disk 40 GB
Software:
Server Side:
Technology: ASP.NET 4.0, XML, AJAX
Scripting: C#
Database: SQL Server 2008
Web Server: IIS.

Client Side:
Internet Browser IE 9.0+, Mozilla Firefox 15.0+, Google Chrome.

Technology and Literature Review
II below
Dot Net Framework

What is Dot Net Framework?

NET is Microsoft's strategy for delivering software as a service. NET will enable developers to
create programs that transcend device boundaries and fully harness the connectivity of the
Internet.

NET strategy will bring fundamental changes in the way companies interact with their
customers and partners over the Internet. Microsofts strategy is to move from a client-centric
model to a network-centric model. It frees us from the constraints of hardware by making user
data available from the Internet.

Advantages of Dot Net Framework
NET is multi-lingual
NET Applications are portable
All languages must comply with a common agreement
Managed codes
Interoperability
Type of Application
Console Application
Window Application
Web Application
Web Service
Smart Device Application
.NET Framework

The .NET Framework is an environment for building, deploying, and running Web Services and
other applications. It consists of three main parts:
Common Language Runtime
Framework classes
ASP.NET

Literature Review
History

From centuries, our ancestors always moved with the four-legged food supplies of their
respective areas, leaving only some signs of their lives - a cave painting here, some stone axes
there and the odd carved trinket in the belly of a saber-toothed tiger.

Our ancestors left the hunter-gatherer lifestyle gradually over the period from 30,000 B.C. to
15,000 B.C. This change was far from global, and so some hunter-gatherer societies still survive
in some areas of the world today, but it did mark a transition toward an agrarian society - a
transition that also heralded the advent of home ownerships. In this part, we will look at the
original investment, the birth of homeownership and real estate

Staking Claim
Many agrarian systems progressed like as discussed below:
They staked out fertile plains and get settled in a mighty-makes-right manner in which
those who could defend the land were those who kept it or owned it. Eventually, a system
of tribal leaders developed, and those who had the approval of the tribe used to disperse
lands, settle disputes among people and require a payment from all his subjects. The shift
toward more and more powerful tribal leaders culminated in a pooling of labor along with
a CEO of sorts to direct efforts. Irrigation channels were dug, strongholds were built,
farming methods got improved and temples were erected. With the land improvement,
populations exploded in a great manner. Now, where a family of hunter-gatherers might be
able to support one or two children at best, the farmers could produce several children. The
increased fertility also meant increased available laborers.

The Original Protection Racket
A tribal system was followed by Hunter-gatherers, but scarcity and the uncertainty of the
life meant that a tribe could only support two or three extended families. The amorous
farmers, however, soon were able to find that they could not name everyone in their tribe
anymore. In return for the sacrifice of familiarity, people living in these small societies
gained the safety of numbers. A well-fed army could easily repelled any desperate raiders.
In return for this security, the people all paid homage to the lord or king who claimed
ownership of the land which was the first system of rent. As these farming villages grew into
cities, the leading families maintained ownership by right of lineage and their ancestors had
clubbed all other challengers senseless so becoming the kings, daimyos and the heads of
other feudal dynasties.

All Hail the King
This system of labor for protection were being developed into two separate systems in most
countries: taxes and tenancy. Royal families spread their wealth to their friends, signing
away titles and deeds to lands that allowed the holders to collect the rent being produced by
the peasants living there. On top of this rent, all the people within a ruler's territory were
generally required to pay a tax. Other demands were also being made by ruling leader, such
as military service, and they were met because these rulers owned the land not only by
birthright, but by military might as well. Rulers used to over throw other rulers, and
sometimes by peasants, but when a new ruler would sit on the throne and the average
peasant would rarely used to notice a difference.

It wasn't a bad news for the peasants, however. They were able to trade with other
kingdoms as well and the general level of wealth increased because of trade, giving rise to a
merchant class as well as specialized laborers who were able to earn a living with their skills
and not by their crops. This, in turn, resulted in non-agrarian shops and houses that still
paid rent and taxes to the various lords and kings, but were bought, sold and rented among
the common folk rather than by the royal class. Richer merchants became the first
common-born landlords and gained wealth and status. These merchants didn't own the
land, but they owned the houses of themselves.


The King is Dead
Many aristocracies eventually displaced by displacing an aristocrat's head from the body
with supposed meritocracies a system where the best lead a nation for the good of all. What
happened instead was the creation of politics. Title lands were broken into smaller pieces
and sold on a free market of sorts, but the people with the money to buy the deeds were
either merchants or belonged to former aristocrats who could managed to escape being
shortened by revolutionary fervor. Peasants had yet to make much progress from the
original farming tribesmen 30,000 years before them.

The Age of Machines
The industrial revolution is being considered the greatest in human history, perhaps only
matched by the invention of firearms. The effects of industry, are like a gun, were neither
positive nor negative, but depended on application. The use of machines for manual labor
made peasants free for different other tasks, and allowed privileged to take few time for
education and specialization into new fields of labor opened up by the mechanization of
industry. Cobblers, seamstresses and cabinetmakers found that their once invaluable skills
were now obsolete and leaving them to return to the land and the coal mines beneath it to
try to eke out a living.

People with higher ambitions were able to jump classes and bring some of their low class
sensibilities with them eventually leading to track housing for laborers and a range of
products aimed at the lower classes. The people who made up the classification of peasants
now became middle class, blue collar, white collar, and a handful of other things. They
owned houses, cars, radios and televisions, which suggested what other things they might
want to own.

Magic Mortgages
The invention of mortgages belongs to no particular country. As mortgages existed for a
long time as an exclusive loan given only to nobility. After the industrial revolution, the
wealth of the world increased up to the point where banks opened themselves to "higher-
risk" mortgage loans to common people. This helped individuals to own their own homes
and, if they so desired, to become landlords themselves. It took 30,000 years, but home
ownership is now open to so many people. In fact, it has reached the mark where people
often buy too much or take out too much of a mortgage.

The freedom to own something can be a heady brew, therefore it is important to practice
moderation. Consuming too much debt by way of a mortgage can help you to lose a house
as likely as it will help you own one. (When people take on too much debt, the market can
fall due to loan defaults.
Conclusion
Specifically ownership of land used to be the basis of all the investment opportunities we
see today. Trade and commerce between groups is limited without a stable population and a
set location. Ownership has moved from being established by strength to being something
you can buy, sell, trade and rent. There has always been a tradeoff for tenancy as a fee
paid to the "owner" for the land and its protection. First tribal leaders afforded this
responsibility, then to kings and finally to landlords. Now we have the power to own our
homes, a move that has changed the way people can live.


Common Language Run

The Common Language Runtime (CLR) is the execution engine for NET Framework applications.
The runtime is responsible for managing memory allocation, starting up and killing threads and
processes, enforcing security policy, as well as satisfying any dependencies that the component
might have on other components, while the component is running.

The CLR comprises of two main parts
Common Language Specification (CLS)
Common Type System (CTS)
Features of CLR
Cross-language integration and inheritance
Automatic memory management
Self-describing objects
Platform independence
Unified Programming Classes
The .NET framework provides unified, object oriented, hierarchical, extensible set of class
libraries (APIs). The .NET Framework unify the disparate frameworks by creating a common set
of APIs across all programming languages The .NET Framework enables cross-language
inheritance, error handling, and debugging. All programming languages, from JScript to C++,
become equals and developers are free to choose the language that they want to use.

ASP.NET

ASP.NET is build on the .NET Frameworks programming classes, providing a Web application
model in the form of a set of controls and infrastructure that make it simple to build Web
applications. Developers are exposed to a set of ASP.NET controls that encapsulate common
HTML user interface elements such as text boxes, drop-down menus, and so on.

The ASP.NET controls actually run on the Web server, however, they simply project their user
interface as HTML to a browser. These controls expose themselves on the server as an object-
oriented programming model that brings the richness of object-oriented programming to the
Web developer. ASP.NET also provides infrastructure services such as session state
management and process recycling that reduces the amount of code a developer must write
and increase application reliability.

Assembly

An assembly is a partially compiled code library for use in deployment, versioning and security.
In the Microsoft Windows implementation of .NET, an assembly is a PE (portable executable)
file. There are two types: process assemblies (EXE) and library assemblies (DLL). A process
assembly represents a process which will use classes defined in library assemblies. In version
1.1 of the CLR, classes can only be exported from library assemblies; in version 2.0 this
restriction is relaxed The compiler will have a switch to determine if the assembly is a process
or library and will set a flag in the PE file. .NET does not use the extension to determine if the
file is a process or library. This means that a library may have either .dll or .exe as its extension.
.NET assemblies contain code in CIL, which is generated from .NET languages, which is then
compiled into machine language at runtime by the CLR just-in-time compiler.

Managed Code

Managed code is computer program code that executes under the management of a virtual
machine, unlike unmanaged code, which is executed directly by the computer's CPU. The
benefits of managed code include programmer convenience and enhanced security guarantees.
Managed code is somewhat synonymous with bytecode. Programs in any programming
language could in principle be compiled into either managed or unmanaged code. In practice,
however, each programming language is typically compiled into one type. Microsoft uses
managed code in its CLR virtual machine in the .NET Framework. Microsoft's most common
languages for creating managed code are C# and Visual Basic.NET.

NET metadata

In the Microsoft .NET framework, refers to certain data structures embedded within the
Common Intermediate Language code that describes the high-level structure of the code.
Metadata describes all classes and class members that are defined in the assembly, and the
classes and class members that the current assembly will call from another assembly.
The metadata for a method contains the complete description of the method, including the
class (and the assembly that contains the class), the return type and all of the method
parameters. A .NET language compiler will generate the metadata and store this in the
assembly containing the CIL. When the CLR executes CIL it will check to make sure that the
metadata of the called method is the same as the metadata that is stored in the calling method.
This ensures that a method can only be called with exactly the right number of parameters and
exactly the right parameter types.
ASP.NET

In Todays technology world all know about ASP.NET. ASP.NET is a framework to design server
side web application and web services. ASP.NET is developed by Microsoft and first release was
in January 2002. It is designed basis on classic active server pages technology which was
popular in earlier in 90s. This framework allow to process SOAP messages. The major advantage
of ASP.NET is multilingual so user can use different language as code behind.




ASP.NET Page Framework

The ASP.NET page framework is a programming framework that runs on a web server to
dynamically produce and mange asp.net web forms [ages. These pages are an extension of
started HTML forms. They render dynamic, interactive a database-driven content.
The asp.net page framework creates an abstraction of the traditional client-server web
interaction so that you can program your application using traditional methods and tools that
support rapid application development (RAD) and object-oriented programming (OOP)
Web forms pages can expose html elements as server-side objects with properties methods,
and events. They are displayed as normal html elements and clients can generate events on
them. The events are handled on the sever and the result send to the client. The ASP.NET page
framework and web forms pages also support ASP.NET controls that encapsulate common UI
functionality in easy-to-use reusable controls.

ASP.NET Web Forms Pages

ASP.NET web forms pages are built on the .Net Framework using ASP.NET technology. They
enable you to create programmable Web pages with interactive, dynamic, or database-driven
content that serve as the user interface for your web application.

A Web forms page implements application logic using server-side code. It can render output in
almost any HTTP-capable language, including HTML, XML, and ECMA Script. It can run on any
browser or client device. It automatically renders the correct browser-compliant output for
features such as styles, layout and so on. You can also design your web forms page to target a
specific browser, such as internet explorer, and take advantage of the features of a specific
browser or client device. ASP.NET support mobile controls for web-enabled devices such as
cellular phones handheld computers and personal digital assistants (PDA).

Web Forms Pages are made of
Dynamic User Interface (UI): This is developed using ASP.NET controls and Static HTML.
Application Logic: This includes data access and presentation logic, business logic, and event
handing logic. In other works, it consists of the code used to interact with the form.

This is similar to the way the visual interface of a VB form is separated from the code behind
the form. The two building block of a web page are contained in two separate files. The user
interface is contained in a file with the extension .aspx. The application logic is contained in a
file known as the Code-Behind file. Which has a extension, .aspx.vb, or .aspx.cs.

ASP.NET Controls

ASP.NET provides a number of controls that can be added to web forms pages. These controls
are also known as server-side controls, or server controls because they are executed on the
web server before any content is rendered to the web browser. They are of two types. HTML
controls and Web Controls. You can convert a simple HTML element into a smart server-side or
ASP.NET control by simply adding the attribute, run at with its value set to server. HTML
controls enable you to quickly convert an HTML document into an ASP.NET page. Web controls
are a more rationalized version of HTML controls.

Cross Language Support
When an ASP.NET page is accessed for the first time, it is dynamically compiled into an
intermediate language format. The fact that the source code is compiled to IL and not machine
language enables different languages to be used to write the applications. The runtime
environment understands IL and interprets it to the native machine code before executing it. It
is just necessary to have a compiler that outs code in IL format for a language to be supported
by ASP.NET. The IL format also enables code write in once language to use the code written in
another language.

Event Driven Programming Model

An Event-Driven programming model, as in a traditional visual basic application contains
programmable elements that are initialized and displayed on the form. Users interact with the
elements which cause events to be raised that in turn call event handlers. Such a model extents
the richness of user interfaces and reduces the complexity of the code needed to support it.
ASP provides a linear processing model. An ASP Page is processed line by line in a top to bottom
sequence. User actions cause the page to be posted to the server in a round trip, after every
round trip the server recreates the page. The recreated page is processed in the same top to
bottom sequence as before and therefore the page is not exhibiting true event-driven behavior.

ASP.NET (XML) Web Service

ASP.NET supports XML web services. An XML web service is a component containing business
functionality exposed through internet protocols. It enables you to exchange information
between web based application using standards like http, simple object access protocol and xml
messaging.

Data Access

ASP.NET supports the new data access technology named ADO.NET provided by the .net
framework. ASP.NET continues to support ADO also. For disconnected application ADO.NET
offers performance advantages over disconnected record sets. Whereas ADO requires the
transmitting and receiving components be com objects, ADO.NET transmits data in standard
xml format so that COM marshaling or data-type conversions are not required.

Session State Management

ASP.NET provides intrinsic state management functionality that allows you to save and manage
application specific session specific and developer defined information. This information can be
independent of any controls on the page. It can be shared between pages, such as consumer
information or the contents 0f a shopping card

Compilation

All ASP.NET code including serve r scripts is compiled which allows for strong typing
performance optimizations, and early binding, among other benefits. Once the code has been
compiled, the runtime further compiles asp.net to native code, providing improved
performance.

Configuration

ASP configuration settings are stored in the IIS metabase. The matabase is a file that can be
read by the Web server only. it can only be accessed by web server administrators through the
internet services manager, which provides the interface to the web server, or the equivalent
HTML administration pages. You can make application specific settings including global
variables and event handlers in a test file known as the global.asa file.

Deployment

ASP.NET applications can be deployed by simply copying the file to the appropriate directory on
the web server. Web forms pages, XML web services, and components are compiled into
dynamic-link library file. Once compiled these file do not need to be registered on the web
server on which they run. Visual Studio enables you to build specialized and configurable
deployment projects.

Error Handling, Debugging and Tracing

ASP.NET supports custom error pages that can be specified for a single page using the
ErrorPage Directive or for the entire application in the web.config file. If an error occurs the
error page is loaded instead of the originally request pages.

Security

ASP.NET works in concert with the .NET Framework and IIS to provide web application security.
To secure an ASP.NET application, you must perform the three fundamental functions.
Authentication, Authorization and impersonation

Caching

ASP.NET caches the IL produced by compilers to enhance response time of applications.
ASP.NET also user can be stored in to cache and used to respond to the requests for the page
made by other user. There is also ca custom server-side cache that can be used to hold objects,
value and other content required regularity in an application. This cache is located in the
memory of the server and is not persistent.

Optimization

ASP.NET incorporates a variety of features and tools that allow you to design and implement
high performance web application

AJAX
V BELOW
AJAX Asynchronous JavaScript and XML is a way of web development technique used for
creating interactive and rich web applications. It provides a mechanism for the applications to
interact with the Web Server asynchronously and retrieve the data in the background keeping
the behavior of the application intact in the foreground. AJAX combines XHTML and CSS
standards based presentation, interaction with the page using DOM model, data interchange
with XML and XSLT and JavaScript altogether to incorporate dynamic behavior to the websites

In contrast to the AJAX applications, the classic web application model works like this: Most
user actions in the interface trigger an HTTP request back to a web server. The server does
some processing retrieving data, crunching numbers, talking to various legacy systems
and then returns an HTML page to the client. This approach does not make a great user
experience as it makes the user wait for a long time. But AJAX makes all the difference by
eliminating the start-stop-start-stop nature of interaction on the Web by introducing an
intermediary an AJAX engine between the user and the server. Instead of loading a
webpage, at the start of the session, the browser loads an AJAX engine written in JavaScript
and usually tucked away in a hidden frame. This engine is responsible for both rendering the
interface the user sees and communicating with the server on the users behalf. The AJAX
engine allows the users interaction with the application to happen asynchronously
independent of communication with the server. Thus, the user wait time is negligible. This
scenario is evident in the Following figure



In many applications the sections of pages need to be reloaded rather than reloading the whole
application, AJAX fulfills this requirement allowing for much more responsive webapplications.
Also, the use of AJAX can reduce connections to the server by its extensive use of since scripts
and style sheets which have to be requested once.V BELOW
System Design

Methodology
VII BELOW
Methodology in order to obtain some desired result is a step by step plan. A software system is
usually the key to carrying out activities and people should be included in every activity, which
indicates and what role they play. The procedure is often the entry criteria describe the criteria
and activities/phases are present in each outpost. Term life cycle duration can be used with

Waterfall Life Cycle
In 1966 and then in 1970 was finalized "waterfall life cycle". This model is more common for the
2013s early software development methods. Waterfall life cycle is illustrated below.
. VII BELOW





























Use Case Diagram
VII BELOW

Ivar Jacobson invented use cases. It describes the behavior of the system form users point of
view with help of actions and reactions. It allows the definition of the systems boundary and
the relationships between the system and environments. It removes the drawback of early
modeling techniques where there were no provision to determine requirements. Use case
diagram represents the functions the functionality of the system in context with the action
triggered by an external actor or user.

An actor represents the user of the system. The same person can play many different roles
while using the system. The role is denoted at the bottom of an actor.

There exist four main types of actors

Principle Actors People who use the main functions of the system
Secondary Actors People who perform administration or maintenance of the system
External Hardware This are most essential part of the application and must be used
Other Systems external system with witch the application interacts

Requirements

Design

Maintenance

Verification


Implementation

After identification of actors they must be described precisely and clearly in about three or four
lines. When there are many actors it is advisable to divide them into groups such as manager,
programmer, and tester etc.

UML defines three types of relationships between an actor and the use cases

Communicates Relationship
Uses relationship This relationship indicates that the instance of source uses also includes
behavior of the target use case.
Extends relationship It indicates the source use case extends the behavior of target use
case. The use case diagram shows various relationships between use cases. Transfer of
money by telephone is an extension of transfer operation performed at the bank. Transfer
operation uses the identification process identify each customer

When I require high level system analysis then I will draw use case diagrams. Different type of
functionality can be captured in use case. So in case when I want to define or write functionality
in organize manner I will draw use cases. Actors are nothing but user who is going to interact
with system






Sequence Diagram

This diagram is used to represent the interaction between the objects. Collaboration consists of
the context and the sequence of messages exchanged by the objects. In programming context,
the interaction comprises of arguments local variables created during function call, and the
links between the objects that participate in the interaction. An interaction is implemented by a
group of objects that collaborate by exchanging messages. These messages are shown by links,
using arrow pointing toward the recipient of the message.
It represents the interaction between objects form a temporal standpoint unlike collaboration
diagram the context of the object is not represented explicitly. Also in collaboration diagram
the sequence needs to be indicated explicitly. Emphasis of the collaboration diagram is strictly
on interaction where as sequence diagram emphasizes on the sequence of the messages.
Sequence diagrams can be used for documentation of the application. In such a scenario it
focuses on the description of the interaction in terms of the user. Sequence diagram can also be
used in more software oriented. When used in such a scenario it represents more detailed
interaction between objects indicating the type of messages such as
synchronous/asynchronous etc. The arrow touching to a rectangle points creation of an object.
XII BELOW










Data Flow Diagram
VII BELOW

Information is affecting through the software, it was modified by a series of changes. A data
flow diagram is illustrative presentation of information flow and data moment. It also has a
data flow graph or a bubble chart known as data flow diagrams. All the information moment
and related data can capture in data flow diagrams in symbolic moments.

Data flow diagram a system at any level of abstraction or software can be used to represent. In
fact, increasing information flow and DFDS represent functional details that can be divided into
levels. Therefore, DFD functional modeling as well as the flow of information provides a
mechanism for modeling. In doing so, it satisfies the second operational analysis.

A level 0 DFD, also called a fundamental system model or reference model incoming and
outgoing arrows indicate respectively the input and output data with a single bubble as a whole
represents a software element. Additional process and more details. For example, a level 1 DFD
arrow cross may include five or six with bubbles. 1 level of representation in the context of the
process model is a sub function of the overall system.

VII BELOW








E R Diagram
VII BELOW

Data modelling are relevant to any data processing applications that respond to a set of specific
questions. System for processing primary data objects are? What is the composition of each
data item and description of what object attributes? Where is the object currently live? Each
connection between the project and other items? Objects and convert them to process that are
in relationships between the two?

To answer these questions, data modeling methods using unit connection diagram. Later in this
section described in detail using an ERD, graphical notation data objects and their relationships
to identify software engineer. In the context of structured analysis, ERD, and an application has
entered into are produced within that defines all of the data.

Entity relationship diagram given systems exist that represent a "data network", focuses on
data only (and therefore satisfies the first operational analysis principles). ERD data is
particularly useful for applications in data controls that relationship is complicated. Data flow
diagram, data modeling transforms that data processing data free.

VII BELOW



Data Dictionary
MstAdministrator

Sr.
No Column Name
Data
Type
Max
Length
1 AdministratorId int
2 UserId int
3 FirstName nvarchar 50
4 LastName nvarchar 50
5 AddressLine1 nvarchar 200
6 AddressLine2 nvarchar 200
7 Area nvarchar 50
8 City nvarchar 50
9 ZipCode nvarchar 50
10 PhoneNo nvarchar 50
11 MobileNo nvarchar 50
12 Email nvarchar 50
13 Active bit


MstAdvertisement

Sr.
No Column Name
Data
Type Max Length
1 AdvertisementId int
2 AdvertisementTitle text 2147483647
3 AdvertisementImage nvarchar 100
4 Active bit

MstAgent

Sr.
No Column Name
Data
Type
Max
Length
1 AgentId int
2 UserId int
3 AgentName nvarchar 500
4 AgentLogo nvarchar 100
5 AgentProfile nvarchar 2000
6 ContactPerson nvarchar 500
7 AddressLine1 nvarchar 200
8 AddressLine2 nvarchar 200
9 Area nvarchar 50
10 City nvarchar 50
11 PostCode nvarchar 50
12 PhoneNo nvarchar 50
13 MobileNo nvarchar 50
14 Email nvarchar 50
15 Active bit

MstArticle

Sr.
No Column Name
Data
Type Max Length
1 ArticleId int

2 ArticleTitle nvarchar 1000
3 ArticleDescription text 2147483647
4 Active bit



MstFeature

Sr.
No Column Name
Data
Type
Max
Length
1 FeatureId int
2 PropertyTypeId int
3 PropertySubTypeId int
4 FeatureDescription nvarchar 1000
5 FeatureIcon nvarchar 100
6 InputType int
7 InputList nvarchar 500
8 Active bit

MstOffer

Sr.
No Column Name
Data
Type Max Length
1 OfferId int
2 OfferDescription text 2147483647
3 Active bit

MstProperty

Sr.
No Column Name
Data
Type Max Length
1 PropertyId int
2 PropertyTypeId int
3 PropertySubTypeId int
4 Title nvarchar 100
5 Detail text 2147483647
6 OfferId int
7 PriceRent decimal
8 BuildUpArea nvarchar 100
9 AgeOfProperty int
10 AddressLine1 nvarchar 200
11 AddressLine2 nvarchar 200
12 Area nvarchar 50
13 City nvarchar 50
14 PostCode nvarchar 50
15 PhoneNo nvarchar 50
16 MobileNo nvarchar 50
17 Email nvarchar 50
18 CreatedOn datetime
19 CreatedBy int
20 Active bit

MstPropertySubType

Sr.
No Column Name
Data
Type
Max
Length
1 SubTypeId int
2 TypeId int
3 SubTypeDescription nvarchar 100
4 Active bit

MstPropertyType

Sr.
No Column Name
Data
Type
Max
Length
1 TypeId int
2 TypeDescription nvarchar 100
3 Active bit

MstSellerBuyer

Sr.
No Column Name
Data
Type
Max
Length
1 SellerBuyerId int
2 UserId int
3 FirstName nvarchar 50
4 LastName nvarchar 50
5 AddressLine1 nvarchar 200
6 AddressLine2 nvarchar 200
7 Area nvarchar 50
8 City nvarchar 50
9 PostCode nvarchar 50
10 PhoneNo nvarchar 50
11 MobileNo nvarchar 50
12 Email nvarchar 50
13 Active bit

MstUser

Sr.
No Column Name
Data
Type
Max
Length
1 UserId int
2 UserName nvarchar 50
3 Password nvarchar 50
4 UserType int
5 Active bit

MstUserType

Sr.
No Column Name
Data
Type
Max
Length
1 UserTypeId int
2 UserTypeDescription nvarchar 50
3 Active bit

TrnAgreement

Sr.
No Column Name
Data
Type
Max
Length
1 AgreementId int
2 FromUserId int
3 ToUserId int


TrnPropertyFeature

Sr.
No Column Name
Data
Type
Max
Length
1 PropertyFeatureId int
2 PropertyId int
3 FeatureId int
4 FeatureValue nvarchar 500

TrnPropertyPhotoAlbum

Sr.
No Column Name
Data
Type
Max
Length
1 PropertyPhotoAlbumId int
2 PropertyId int
3 AlbumThumbnailImage nvarchar 100
4 AlbumImage nvarchar 200
5 Active bit


Stored procedures

USE [PropertyPortal]
GO

/****** Object: StoredProcedure [dbo].[usp_AgentGetByAgentId] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create PROCEDURE [dbo].[usp_AgentGetByAgentId]
@AgentID INT
AS
BEGIN
SELECT *
FROM MstAgent
WHERE AgentID = @AgentID
END
GO

/****** Object: StoredProcedure [dbo].[usp_ArticleDelete] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create PROCEDURE [dbo].[usp_ArticleDelete]
@ArticleID INT
AS
BEGIN
UPDATE MstArticle
SET Active = 0
WHERE ArticleID = @ArticleID
END
GO

/****** Object: StoredProcedure [dbo].[usp_ArticleGet] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create PROCEDURE [dbo].[usp_ArticleGet]
AS
BEGIN
SELECT *
FROM MstArticle
WHERE ISNULL(Active, 1) = 1
END
GO

/****** Object: StoredProcedure [dbo].[usp_ArticleGetByArticleId] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create PROCEDURE [dbo].[usp_ArticleGetByArticleId]
@ArticleID INT
AS
BEGIN
SELECT *
FROM MstArticle
WHERE ArticleID = @ArticleID
END
GO

/****** Object: StoredProcedure [dbo].[usp_FeatureInsert] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_FeatureInsert]
@PropertyTypeID INT
,@PropertySubTypeID INT
,@FeatureDescription nvarchar(1000)
,@FeatureIcon nvarchar(100)
,@InputType INT
,@InputList nvarchar(500)
,@Active BIT
AS
BEGIN
INSERT INTO MstFeature
(PropertyTypeID, PropertySubTypeID, FeatureDescription, FeatureIcon
,InputType ,InputList ,Active)
VALUES
(@PropertyTypeID, @PropertySubTypeID, @FeatureDescription,
@FeatureIcon
,@InputType ,@InputList ,@Active)
SELECT @@IDENTITY;
END
GO

/****** Object: StoredProcedure [dbo].[usp_FeatureUpdate] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create PROCEDURE [dbo].[usp_FeatureUpdate]
@FeatureId INT
,@PropertyTypeID INT
,@PropertySubTypeID INT
,@FeatureDescription nvarchar(1000)
,@FeatureIcon nvarchar(100)
,@InputType INT
,@InputList nvarchar(500)
,@Active BIT
AS
BEGIN
UPDATE MstFeature
SET PropertyTypeID = @PropertyTypeID
,PropertySubTypeID = @PropertySubTypeID
,FeatureDescription = @FeatureDescription
,FeatureIcon = @FeatureIcon
,InputType = @InputType
,InputList = @InputList
,Active = @Active
WHERE FeatureId = @FeatureId
END
GO

/****** Object: StoredProcedure [dbo].[usp_FeatureCheckByName] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create PROCEDURE [dbo].[usp_FeatureCheckByName]
@FeatureId INT
,@PropertyTypeID INT
,@PropertySubTypeID INT
,@FeatureDescription nvarchar(1000)
AS
BEGIN
SELECT *
FROM MstFeature
WHERE PropertyTypeID = @PropertyTypeID
AND PropertySubTypeID = @PropertySubTypeID
AND FeatureDescription LIKE @FeatureDescription
AND ISNULL(Active, 1) = 1
AND FeatureId <> @FeatureId
END
GO

/****** Object: StoredProcedure [dbo].[usp_FeatureDelete] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create PROCEDURE [dbo].[usp_FeatureDelete]
@FeatureId INT
AS
BEGIN
UPDATE MstFeature
SET Active = 0
WHERE FeatureId = @FeatureId
END
GO

/****** Object: StoredProcedure [dbo].[usp_FeatureGetByFeatureId] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create PROCEDURE [dbo].[usp_FeatureGetByFeatureId]
@FeatureId INT
AS
BEGIN
SELECT *
FROM MstFeature
WHERE FeatureId = @FeatureId
END
GO

/****** Object: StoredProcedure [dbo].[usp_SellerBuyerGetBySellerBuyerId]******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create PROCEDURE [dbo].[usp_SellerBuyerGetBySellerBuyerId]
@SellerBuyerID INT
AS
BEGIN
SELECT *
FROM MstSellerBuyer
WHERE SellerBuyerID = @SellerBuyerID
END
GO
/****** Object: StoredProcedure [dbo].[usp_FeatureGet] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_FeatureGet]
AS
BEGIN
SELECT MF.*
,CASE WHEN MF.InputType=1 THEN 'Free Text' ELSE 'Selection'
END AS InputTypeName
,PT.TypeDescription AS PropertyType
,PST.SubTypeDescription AS PropertySubType
FROM MstFeature MF
INNER JOIN MstPropertyType PT ON MF.PropertyTypeId = PT.TypeId
INNER JOIN MstPropertySubType PST ON MF.PropertySubTypeId =
PST.SubTypeId
WHERE ISNULL(MF.Active, 1) = 1
ORDER BY FeatureId DESC
END
GO

/****** Object: StoredProcedure [dbo].[usp_PropertySubTypeCheckByName]
******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_PropertySubTypeCheckByName]
@SubTypeID INT
,@SubTypeDescription nvarchar(100)
AS
BEGIN
SELECT *
FROM MstPropertySubType
WHERE SubTypeDescription like @SubTypeDescription
AND (SubTypeID <> @SubTypeID)
AND Active = 1
END
GO

/****** Object: StoredProcedure [dbo].[usp_PropertySubTypeDelete] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create PROCEDURE [dbo].[usp_PropertySubTypeDelete]
@SubTypeId INT
AS
BEGIN
DELETE FROM MstPropertySubType
WHERE SubTypeId = @SubTypeId
END
GO

/****** Object: StoredProcedure [dbo].[usp_PropertySubTypeGetByTypeId]
******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create PROCEDURE [dbo].[usp_PropertySubTypeGetByTypeId]
@TypeId INT
AS
BEGIN
SELECT *
FROM MstPropertySubType
WHERE TypeId = @TypeId AND Active = 1
END
GO

/****** Object: StoredProcedure
[dbo].[usp_PropertySubTypeGetBySubTypeId]******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create PROCEDURE [dbo].[usp_PropertySubTypeGetBySubTypeId]
@SubTypeId INT
AS
BEGIN
SELECT *
FROM MstPropertySubType
WHERE SubTypeId = @SubTypeId
END
GO

/****** Object: StoredProcedure [dbo].[usp_PropertySubTypeInsert] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create PROCEDURE [dbo].[usp_PropertySubTypeInsert]
@TypeId INT
,@SubTypeDescription nvarchar(100)
,@Active bit
AS
BEGIN
INSERT INTO MstPropertySubType
(TypeId, SubTypeDescription, Active)
VALUES(@TypeId, @SubTypeDescription, @Active)
SELECT @@IDENTITY;
END
GO

/****** Object: StoredProcedure [dbo].[usp_PropertySubTypeUpdate] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create PROCEDURE [dbo].[usp_PropertySubTypeUpdate]
@SubTypeId INT
,@TypeId INT
,@SubTypeDescription nvarchar(100)
,@Active bit
AS
BEGIN
UPDATE MstPropertySubType
SET TypeId = @TypeId
,SubTypeDescription = @SubTypeDescription
,Active = @Active
WHERE SubTypeId = @SubTypeId
END
GO


/****** Object: StoredProcedure [dbo].[usp_PropertySearch] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_PropertySearch]
@SearchText NVARCHAR(1000)
,@PropertyTypeID INT
,@PropertySubTypeID INT
,@OfferId INT
,@AgeOfProperty INT
,@PriceRent Decimal
,@City NVARCHAR(50)
,@IsAdvanceSearch INT
AS
BEGIN
IF (@IsAdvanceSearch = 1) --Advance Search
BEGIN
SELECT MP.*, MPT.TypeDescription PropertyType
,MPST.SubTypeDescription PropertySubType
,MO.OfferDescription Offer
FROM MstProperty MP
JOIN MstPropertyType MPT ON MP.PropertyTypeID = MPT.TypeID
JOIN MstPropertySubType MPST ON MP.PropertySubTypeID =
MPST.SubTypeId
JOIN MstOffer MO ON MP.OfferID = MO.OfferID
WHERE (ISNULL(MP.Active,1) = 1
AND (MP.PropertyTypeID = @PropertyTypeID OR
@PropertyTypeID = 0)
AND (MP.PropertySubTypeID = @PropertySubTypeID OR
@PropertySubTypeID = 0)
AND (MP.OfferID = @OfferID OR @OfferID = 0)
AND (MP.AgeOfProperty = @AgeOfProperty OR
@AgeOfProperty = -1)
AND (MP.PriceRent <= @PriceRent OR @PriceRent = 0)
AND (MP.City LIKE '%' + @City + '%' OR @City = '')
)
ORDER BY MP.PropertyID DESC
END
ELSE --Normal Search
BEGIN
SELECT MP.*, MPT.TypeDescription PropertyType
,MPST.SubTypeDescription PropertySubType
,MO.OfferDescription Offer
FROM MstProperty MP
JOIN MstPropertyType MPT ON MP.PropertyTypeID = MPT.TypeID
JOIN MstPropertySubType MPST ON MP.PropertySubTypeID =
MPST.SubTypeId
JOIN MstOffer MO ON MP.OfferID = MO.OfferID
WHERE (MPT.TypeDescription LIKE '%' + @SearchText + '%'
OR MPST.SubTypeDescription LIKE '%' + @SearchText +
'%'
OR MO.OfferDescription LIKE '%' + @SearchText + '%'
OR MP.Title LIKE '%' + @SearchText + '%'
OR MP.Detail LIKE '%' + @SearchText + '%'
OR CAST(MP.PriceRent AS VARCHAR) LIKE '%' +
@SearchText + '%'
OR MP.BuildUpArea LIKE '%' + @SearchText + '%'
OR CAST(MP.AgeOfProperty AS VARCHAR) LIKE '%' +
@SearchText + '%'
OR MP.AddressLine1 LIKE '%' + @SearchText + '%'
OR MP.AddressLine2 LIKE '%' + @SearchText + '%'
OR MP.Area LIKE '%' + @SearchText + '%'
OR MP.City LIKE '%' + @SearchText + '%'
OR ISNULL(@SearchText, '') = ''
)
AND ISNULL(MP.Active,1) = 1
ORDER BY MP.PropertyID DESC
END

END
GO

/****** Object: StoredProcedure [dbo].[usp_FeatureGetByType] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_FeatureGetByType]
@PropertyTypeId INT
,@PropertySubTypeId INT
AS
BEGIN
SELECT MF.*
,CASE WHEN MF.InputType=1 THEN 'Free Text' ELSE 'Selection'
END AS InputTypeName
,PT.TypeDescription AS PropertyType
,PST.SubTypeDescription AS PropertySubType
FROM MstFeature MF
INNER JOIN MstPropertyType PT ON MF.PropertyTypeId = PT.TypeId
INNER JOIN MstPropertySubType PST ON MF.PropertySubTypeId =
PST.SubTypeId
WHERE PropertyTypeId = @PropertyTypeId
AND PropertySubTypeId = @PropertySubTypeId
AND ISNULL(MF.Active,1)=1
ORDER BY FeatureId DESC
END
GO

/****** Object: StoredProcedure [dbo].[usp_PropertyGetByUserId] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_PropertyGetByUserId]
@CreatedBy INT
AS
BEGIN
SELECT MP.*, MPT.TypeDescription PropertyType
,MPST.SubTypeDescription PropertySubType
,MO.OfferDescription Offer
FROM MstProperty MP
JOIN MstPropertyType MPT ON MP.PropertyTypeID = MPT.TypeID
JOIN MstPropertySubType MPST ON MP.PropertySubTypeID =
MPST.SubTypeId
JOIN MstOffer MO ON MP.OfferID = MO.OfferID
WHERE CreatedBy = @CreatedBy
AND ISNULL(MP.Active,1) = 1
ORDER BY MP.PropertyID DESC
END
GO

/****** Object: StoredProcedure [dbo].[usp_PropertyGetDetailByPropertyId]
******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_PropertyGetDetailByPropertyId]
@PropertyId INT
AS
BEGIN
SELECT MP.*, MPT.TypeDescription PropertyType
,MPST.SubTypeDescription PropertySubType
,MO.OfferDescription Offer
FROM MstProperty MP
JOIN MstPropertyType MPT ON MP.PropertyTypeID = MPT.TypeID
JOIN MstPropertySubType MPST ON MP.PropertySubTypeID =
MPST.SubTypeId
JOIN MstOffer MO ON MP.OfferID = MO.OfferID
WHERE MP.PropertyID = @PropertyId
END
GO
/****** Object: StoredProcedure [dbo].[usp_AdministratorInsert] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_AdministratorInsert]
@FirstName nvarchar(50)
,@LastName nvarchar(50)
,@AddressLine1 nvarchar(200)
,@AddressLine2 nvarchar(200)
,@Area nvarchar(50)
,@City nvarchar(50)
,@ZipCode nvarchar(50)
,@PhoneNo nvarchar(50)
,@MobileNo nvarchar(50)
,@Email nvarchar(50)
,@Active BIT
,@UserName nvarchar(50)
,@Password nvarchar(50)
,@UserType INT
AS
BEGIN
DECLARE @UserId INT

INSERT INTO MstUser
(UserName, Password, UserType, Active)
VALUES(@UserName, @Password, @UserType, @Active)

SELECT @UserId = @@IDENTITY;

INSERT INTO MstAdministrator
(UserId, FirstName, LastName, AddressLine1, AddressLine2, Area, City,
ZipCode, PhoneNo, MobileNo, Email, Active)
VALUES(@UserId, @FirstName, @LastName, @AddressLine1,
@AddressLine2, @Area, @City, @ZipCode, @PhoneNo, @MobileNo, @Email,
@Active)
END
GO


/****** Object: StoredProcedure [dbo].[usp_UserCheckForLogin] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_UserCheckForLogin]
@UserName VARCHAR(50)
,@Password VARCHAR(50)
,@UserType INT
AS
BEGIN
IF (@UserType = 1) --Administrator
BEGIN
SELECT MU.*, MA.AdministratorId, MA.FirstName + ' ' +
MA.LastName AS UserFullName
FROM MstUser MU
JOIN MstAdministrator MA ON MU.UserId = MA.UserId
WHERE MU.UserName LIKE @UserName
AND MU.Password LIKE @Password
AND MU.UserType = @UserType
AND ISNULL(MU.Active,1) = 1
AND ISNULL(MA.Active,1) = 1
END
ELSE IF (@UserType = 2) --SellerBuyer
BEGIN
SELECT MU.*, MSB.SellerBuyerId, MSB.FirstName + ' ' +
MSB.LastName AS UserFullName
FROM MstUser MU
JOIN MstSellerBuyer MSB ON MU.UserId = MSB.UserId
WHERE MU.UserName LIKE @UserName
AND MU.Password LIKE @Password
AND MU.UserType = @UserType
AND ISNULL(MU.Active,1) = 1
AND ISNULL(MSB.Active,1) = 1
END
ELSE IF (@UserType = 3) --Agent
BEGIN
SELECT MU.*, MA.AgentId, MA.AgentName AS UserFullName
FROM MstUser MU
JOIN MstAgent MA ON MU.UserId = MA.UserId
WHERE MU.UserName LIKE @UserName
AND MU.Password LIKE @Password
AND MU.UserType = @UserType
AND ISNULL(MU.Active,1) = 1
AND ISNULL(MA.Active,1) = 1
END
ELSE
BEGIN
SELECT *, UserName AS UserFullName
FROM MstUser
WHERE UserName LIKE @UserName
AND Password LIKE @Password
AND UserType = @UserType
AND ISNULL(Active,1) = 1
END
END
GO

/****** Object: StoredProcedure [dbo].[usp_AdministratorDelete] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_AdministratorDelete]
@AdministratorId INT
AS
BEGIN
UPDATE MstUser
SET Active = 0
WHERE UserId IN
(SELECT UserID FROM MstAdministrator
WHERE AdministratorId = @AdministratorId)

UPDATE MstAdministrator
SET Active = 0
WHERE AdministratorId = @AdministratorId
END
GO

/****** Object: StoredProcedure [dbo].[usp_AdministratorsGet] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_AdministratorsGet]
AS
BEGIN
SELECT *, FirstName + ' ' + LastName AS Name
FROM MstAdministrator
WHERE Active = 1 AND (FirstName + ' ' + LastName) <> 'System
Administrator'
END
GO

/****** Object: StoredProcedure [dbo].[usp_ArticleCheckByName] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_ArticleCheckByName]
@ArticleID INT
,@ArticleTitle NVARCHAR(1000)
AS
BEGIN
SELECT *
FROM MstArticle
WHERE ArticleTitle LIKE @ArticleTitle AND Active = 1 AND ArticleID <>
@ArticleID
END
GO

/****** Object: StoredProcedure [dbo].[usp_ArticleInsert] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_ArticleInsert]
@ArticleTitle NVARCHAR(1000)
,@ArticleDescription TEXT
,@Active BIT
AS
BEGIN
INSERT INTO MstArticle
(ArticleTitle, ArticleDescription, Active)
VALUES
(@ArticleTitle, @ArticleDescription, @Active)
SELECT @@IDENTITY;
END
GO

/****** Object: StoredProcedure [dbo].[usp_ArticleUpdate] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_ArticleUpdate]
@ArticleID INT
,@ArticleTitle NVARCHAR(1000)
,@ArticleDescription TEXT
,@Active BIT
AS
BEGIN
UPDATE MstArticle
SET ArticleTitle = @ArticleTitle
,ArticleDescription = @ArticleDescription
,Active = @Active
WHERE ArticleID = @ArticleID
END
GO

/****** Object: StoredProcedure [dbo].[usp_OfferInsert] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_OfferInsert]
@OfferDescription TEXT
,@Active BIT
AS
BEGIN
INSERT INTO MstOffer
(OfferDescription, Active)
VALUES
(@OfferDescription, @Active)
END
GO

/****** Object: StoredProcedure [dbo].[usp_OfferUpdate] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_OfferUpdate]
@OfferId INT
,@OfferDescription TEXT
,@Active BIT
AS
BEGIN
UPDATE MstOffer
SET OfferDescription = @OfferDescription
,Active = @Active
WHERE OfferId = @OfferId
END
GO
/****** Object: StoredProcedure [dbo].[usp_OfferCheckByName] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_OfferCheckByName]
@OfferId INT
,@OfferDescription TEXT
AS
BEGIN
SELECT *
FROM MstOffer
WHERE CAST(OfferDescription AS VARCHAR) LIKE @OfferDescription
AND ISNULL(Active, 1) = 1 AND OfferId <> @OfferId
END
GO

/****** Object: StoredProcedure [dbo].[usp_OfferDelete] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_OfferDelete]
@OfferId INT
AS
BEGIN
UPDATE MstOffer
SET Active = 0
WHERE OfferId = @OfferId
END
GO

/****** Object: StoredProcedure [dbo].[usp_OfferGetByOfferId] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_OfferGetByOfferId]
@OfferId INT
AS
BEGIN
SELECT *
FROM MstOffer
WHERE OfferId = @OfferId
END
GO
/****** Object: StoredProcedure [dbo].[usp_OfferGet] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_OfferGet]
AS
BEGIN
SELECT *
FROM MstOffer
WHERE ISNULL(Active, 1) = 1
ORDER BY OfferId DESC
END
GO

/****** Object: StoredProcedure [dbo].[usp_AdvertisementCheckByName] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_AdvertisementCheckByName]
@AdvertisementId INT
,@AdvertisementTitle TEXT
AS
BEGIN
SELECT *
FROM MstAdvertisement
WHERE CAST(AdvertisementTitle AS VARCHAR) LIKE
@AdvertisementTitle AND Active = 1 AND AdvertisementId <> @AdvertisementId
END
GO

/****** Object: StoredProcedure [dbo].[usp_AdvertisementInsert] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create PROCEDURE [dbo].[usp_AdvertisementInsert]
@AdvertisementTitle text
,@AdvertisementImage nvarchar(100)
,@Active BIT
AS
BEGIN
INSERT INTO MstAdvertisement
(AdvertisementTitle, AdvertisementImage, Active)
VALUES
(@AdvertisementTitle, @AdvertisementImage, @Active)
END
GO

/****** Object: StoredProcedure [dbo].[usp_AdvertisementUpdate] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create PROCEDURE [dbo].[usp_AdvertisementUpdate]
@AdvertisementId int
,@AdvertisementTitle text
,@AdvertisementImage nvarchar(100)
,@Active BIT
AS
BEGIN
UPDATE MstAdvertisement
SET AdvertisementTitle = @AdvertisementTitle
,AdvertisementImage = @AdvertisementImage
,Active = @Active
WHERE AdvertisementId = @AdvertisementId
END
GO

/****** Object: StoredProcedure [dbo].[usp_AdvertisementDelete] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_AdvertisementDelete]
@AdvertisementId int
AS
BEGIN
UPDATE MstAdvertisement
SET Active = 0
WHERE AdvertisementId = @AdvertisementId
END
GO

/****** Object: StoredProcedure [dbo].[usp_AdvertisementGet] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create PROCEDURE [dbo].[usp_AdvertisementGet]
AS
BEGIN
SELECT *
FROM MstAdvertisement
WHERE Active = 1
ORDER BY AdvertisementId DESC
END
GO

/****** Object: StoredProcedure [dbo].[usp_AdvertisementGetByAdvertisementId]
00:18:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create PROCEDURE [dbo].[usp_AdvertisementGetByAdvertisementId]
@AdvertisementId INT
AS
BEGIN
SELECT *
FROM MstAdvertisement
WHERE AdvertisementId = @AdvertisementId
END
GO

/****** Object: StoredProcedure [dbo].[usp_AgentInsertUpdate] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_AgentInsertUpdate]
@AgentID INT
,@UserID INT
,@AgentName nvarchar(500)
,@AgentLogo nvarchar(100)
,@AgentProfile nvarchar(2000)
,@ContactPerson nvarchar(500)
,@AddressLine1 nvarchar(200)
,@AddressLine2 nvarchar(200)
,@Area nvarchar(50)
,@City nvarchar(50)
,@ZipCode nvarchar(50)
,@PhoneNo nvarchar(50)
,@MobileNo nvarchar(50)
,@Email nvarchar(50)
,@Active bit

AS
BEGIN
IF (ISNULL(@AgentID, 0) = 0) --INSERT
BEGIN
INSERT INTO MstAgent
(UserId, AgentName, AgentLogo, AgentProfile, ContactPerson
,AddressLine1, AddressLine2, Area, City, PostCode
,PhoneNo, MobileNo, Email, Active)
VALUES
(@UserId, @AgentName, @AgentLogo, @AgentProfile,
@ContactPerson
,@AddressLine1, @AddressLine2, @Area, @City, @ZipCode
,@PhoneNo, @MobileNo, @Email, @Active)
SELECT @@IDENTITY;
END
ELSE
BEGIN
UPDATE MstAgent
SET UserId = @UserId
,AgentName = @AgentName
,AgentLogo = @AgentLogo
,AgentProfile = @AgentProfile
,ContactPerson = @ContactPerson
,AddressLine1 = @AddressLine1
,AddressLine2 = @AddressLine2
,Area = @Area
,City = @City
,PostCode = @ZipCode
,PhoneNo = @PhoneNo
,MobileNo = @MobileNo
,Email = @Email
,Active = @Active
WHERE AgentID = @AgentID
SELECT @AgentID;
END


END
GO

/****** Object: StoredProcedure [dbo].[usp_PropertyFeatureGetByPropertyId]
00:18:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_PropertyFeatureGetByPropertyId]
@PropertyId INT
AS
BEGIN
SELECT *
FROM TrnPropertyFeature TPF
JOIN MstFeature MF ON TPF.FeatureId = MF.FeatureId
WHERE PropertyId = @PropertyId
END
GO

/****** Object: StoredProcedure [dbo].[usp_SellerBuyerInsertUpdate] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_SellerBuyerInsertUpdate]
@SellerBuyerID INT
,@UserID INT
,@FirstName nvarchar(50)
,@LastName nvarchar(50)
,@AddressLine1 nvarchar(200)
,@AddressLine2 nvarchar(200)
,@Area nvarchar(50)
,@City nvarchar(50)
,@ZipCode nvarchar(50)
,@PhoneNo nvarchar(50)
,@MobileNo nvarchar(50)
,@Email nvarchar(50)
,@Active bit

AS
BEGIN
IF (ISNULL(@SellerBuyerID, 0) = 0) --INSERT
BEGIN
INSERT INTO MstSellerBuyer
(UserId, FirstName, LastName
,AddressLine1, AddressLine2, Area, City, PostCode
,PhoneNo, MobileNo, Email, Active)
VALUES
(@UserId, @FirstName, @LastName
,@AddressLine1, @AddressLine2, @Area, @City, @ZipCode
,@PhoneNo, @MobileNo, @Email, @Active)
SELECT @@IDENTITY;
END
ELSE
BEGIN
UPDATE MstSellerBuyer
SET UserId = @UserId
,FirstName = @FirstName
,LastName = @LastName
,AddressLine1 = @AddressLine1
,AddressLine2 = @AddressLine2
,Area = @Area
,City = @City
,PostCode = @ZipCode
,PhoneNo = @PhoneNo
,MobileNo = @MobileNo
,Email = @Email
,Active = @Active
WHERE SellerBuyerID = @SellerBuyerID
SELECT @SellerBuyerID;
END


END
GO

/****** Object: StoredProcedure
[dbo].[usp_PropertyPhotoAlbumDeleteByPhotoAlbumId] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create PROCEDURE [dbo].[usp_PropertyPhotoAlbumDeleteByPhotoAlbumId]
@PropertyPhotoAlbumID INT
AS
BEGIN
DELETE FROM TrnPropertyPhotoAlbum
WHERE PropertyPhotoAlbumID = @PropertyPhotoAlbumID
END
GO

/****** Object: StoredProcedure [dbo].[usp_PropertyPhotoAlbumDelete] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_PropertyPhotoAlbumDelete]
@PropertyId INT
AS
BEGIN
DELETE FROM TrnPropertyPhotoAlbum
WHERE PropertyId = @PropertyId
END
GO

/****** Object: StoredProcedure [dbo].[usp_PropertyPhotoAlbumGetByPropertyId]
00:19:01 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_PropertyPhotoAlbumGetByPropertyId]
@PropertyId INT
AS
BEGIN
SELECT *
FROM TrnPropertyPhotoAlbum
WHERE PropertyId = @PropertyId
END
GO

/****** Object: StoredProcedure [dbo].[usp_PropertyPhotoAlbumInsert] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_PropertyPhotoAlbumInsert]
@PropertyId INT
,@AlbumThumbnailImage nvarchar(100)
,@AlbumImage nvarchar(200)
,@Active BIT
AS
BEGIN
INSERT INTO TrnPropertyPhotoAlbum
(PropertyId, AlbumThumbnailImage, AlbumImage, Active)
VALUES
(@PropertyId, @AlbumThumbnailImage, @AlbumImage, @Active)
END
GO

/****** Object: StoredProcedure [dbo].[usp_PropertyFeatureInsert] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_PropertyFeatureInsert]
@PropertyId INT
,@FeatureId INT
,@FeatureValue nvarchar(500)
AS
BEGIN
INSERT INTO TrnPropertyFeature
(PropertyId, FeatureId, FeatureValue)
VALUES
(@PropertyId, @FeatureId, @FeatureValue)
END
GO
/****** Object: StoredProcedure [dbo].[usp_PropertyFeatureDelete] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_PropertyFeatureDelete]
@PropertyId INT
AS
BEGIN
DELETE FROM TrnPropertyFeature
WHERE PropertyId = @PropertyId
END
GO
/****** Object: StoredProcedure
[dbo].[usp_PropertyFeatureDeleteByPropertyFeatureId] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create PROCEDURE [dbo].[usp_PropertyFeatureDeleteByPropertyFeatureId]
@PropertyFeatureId INT
AS
BEGIN
DELETE FROM TrnPropertyFeature
WHERE PropertyFeatureId = @PropertyFeatureId
END
GO
/****** Object: StoredProcedure [dbo].[usp_PropertyInsert] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_PropertyInsert]
@PropertyTypeId INT
,@PropertySubTypeId INT
,@Title NVARCHAR(100)
,@Detail TEXT
,@OfferId INT
,@PriceRent DECIMAL
,@BuildUpArea NVARCHAR(100)
,@AgeOfProperty INT
,@AddressLine1 NVARCHAR(200)
,@AddressLine2 NVARCHAR(200)
,@Area nvarchar(50)
,@City nvarchar(50)
,@PostCode nvarchar(50)
,@PhoneNo nvarchar(50)
,@MobileNo nvarchar(50)
,@Email nvarchar(50)
,@CreatedBy INT
,@CreatedOn DATETIME
,@Active BIT
AS
BEGIN
INSERT INTO MstProperty
(PropertyTypeId,PropertySubTypeId,Title,Detail,OfferId
,PriceRent,BuildUpArea,AgeOfProperty,AddressLine1,AddressLine2
,Area,City,PostCode,PhoneNo,MobileNo,Email
,CreatedOn,CreatedBy,Active)
VALUES
(@PropertyTypeId,@PropertySubTypeId,@Title,@Detail,@OfferId

,@PriceRent,@BuildUpArea,@AgeOfProperty,@AddressLine1,@AddressLine2
,@Area,@City,@PostCode,@PhoneNo,@MobileNo,@Email
,@CreatedOn,@CreatedBy,@Active)
SELECT @@IDENTITY;
END
GO
/****** Object: StoredProcedure [dbo].[usp_PropertyUpdate] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_PropertyUpdate]
@PropertyID INT
,@PropertyTypeId INT
,@PropertySubTypeId INT
,@Title NVARCHAR(100)
,@Detail TEXT
,@OfferId INT
,@PriceRent DECIMAL
,@BuildUpArea NVARCHAR(100)
,@AgeOfProperty INT
,@AddressLine1 NVARCHAR(200)
,@AddressLine2 NVARCHAR(200)
,@Area nvarchar(50)
,@City nvarchar(50)
,@PostCode nvarchar(50)
,@PhoneNo nvarchar(50)
,@MobileNo nvarchar(50)
,@Email nvarchar(50)
,@CreatedBy INT
,@CreatedOn DATETIME
,@Active BIT
AS
BEGIN
UPDATE MstProperty
SET PropertyTypeId = @PropertyTypeId
,PropertySubTypeId = @PropertySubTypeId
,Title = @Title
,Detail = @Detail
,OfferId = @OfferId
,PriceRent = @PriceRent
,BuildUpArea = @BuildUpArea
,AgeOfProperty = @AgeOfProperty
,AddressLine1 = @AddressLine1
,AddressLine2 = @AddressLine2
,Area = @Area
,City = @City
,PostCode = @PostCode
,PhoneNo = @PhoneNo
,MobileNo = @MobileNo
,Email = @Email
,CreatedBy = @CreatedBy
,CreatedOn = @CreatedOn
,Active = @Active
WHERE PropertyID = @PropertyID
END
GO
/****** Object: StoredProcedure [dbo].[usp_PropertyDelete] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_PropertyDelete]
@PropertyID INT
AS
BEGIN
UPDATE MstProperty
SET Active = 0
WHERE PropertyID = @PropertyID
END
GO
/****** Object: StoredProcedure [dbo].[usp_PropertyGetByPropertyId] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_PropertyGetByPropertyId]
@PropertyID INT
AS
BEGIN
SELECT *
FROM MstProperty
WHERE PropertyID = @PropertyID
END
GO
/****** Object: StoredProcedure [dbo].[usp_PropertyGet] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_PropertyGet]
AS
BEGIN
SELECT *
FROM MstProperty
WHERE ISNULL(Active, 1) = 1
ORDER BY PropertyID DESC
END
GO
/****** Object: StoredProcedure [dbo].[usp_PropertyCheckByName] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_PropertyCheckByName]
@PropertyId INT
,@PropertyTypeId INT
,@PropertySubTypeId INT
,@Title NVARCHAR(100)
AS
BEGIN
SELECT *
FROM MstProperty
WHERE PropertyTypeId = @PropertyTypeId
AND PropertySubTypeId = @PropertySubTypeId
AND Title LIKE @Title
AND Active = 1
AND PropertyId <> @PropertyId
END
GO
/****** Object: StoredProcedure [dbo].[usp_UserCheckByUsername] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_UserCheckByUsername]
@UserName VARCHAR(50)
AS
BEGIN
SELECT *
FROM MstUser
WHERE UserName LIKE @UserName
AND ISNULL(Active,1) = 1
END
GO
/****** Object: StoredProcedure [dbo].[usp_UserInsert] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_UserInsert]
@UserName VARCHAR(50)
,@Password VARCHAR(50)
,@UserType INT
,@Active BIT
AS
BEGIN
INSERT INTO MstUser
(UserName, Password, UserType, Active)
VALUES
(@UserName, @Password, @UserType, 1)

SELECT @@IDENTITY;
END
GO
/****** Object: StoredProcedure [dbo].[usp_UserGetByUserId] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_UserGetByUserId]
@UserId INT
AS
BEGIN
SELECT *
FROM MstUser
WHERE UserId = @UserId
END
GO
/****** Object: StoredProcedure [dbo].[usp_UserUpdate] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_UserUpdate]
@UserId INT
,@UserName VARCHAR(50)
,@Password VARCHAR(50)
,@UserType INT
,@Active BIT
AS
BEGIN
UPDATE MstUser
SET --UserName = @UserName,
Password = @Password
,UserType = @UserType
,Active = @Active
WHERE UserId = @UserId
END
GO
/****** Object: StoredProcedure [dbo].[usp_PropertyTypeCheckByName] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create PROCEDURE [dbo].[usp_PropertyTypeCheckByName]
@TypeId INT
,@TypeDescription nvarchar(100)
AS
BEGIN
SELECT * FROM MstPropertyType
WHERE TypeDescription = @TypeDescription AND ISNULL(Active,1) = 1 AND
TypeId <> @TypeId
END
GO
/****** Object: StoredProcedure [dbo].[usp_PropertyTypeDelete] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create PROCEDURE [dbo].[usp_PropertyTypeDelete]
@TypeId INT
AS
BEGIN
UPDATE MstPropertyType
SET Active = 0
WHERE TypeId = @TypeId
END
GO
/****** Object: StoredProcedure [dbo].[usp_PropertyTypeGet] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_PropertyTypeGet]
AS
BEGIN
SELECT * FROM MstPropertyType
WHERE Active = 1
END
GO
/****** Object: StoredProcedure [dbo].[usp_PropertyTypeGetByTypeId] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create PROCEDURE [dbo].[usp_PropertyTypeGetByTypeId]
@TypeId INT
AS
BEGIN
SELECT * FROM MstPropertyType
WHERE TypeId = @TypeId
END
GO
/****** Object: StoredProcedure [dbo].[usp_PropertyTypeInsert] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create PROCEDURE [dbo].[usp_PropertyTypeInsert]
@TypeDescription nvarchar(100)
,@Active bit
AS
BEGIN
INSERT INTO MstPropertyType
(TypeDescription, Active)
VALUES(@TypeDescription, @Active)
SELECT @@IDENTITY;
END
GO

/****** Object: StoredProcedure [dbo].[usp_PropertyTypeUpdate] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create PROCEDURE [dbo].[usp_PropertyTypeUpdate]
@TypeId INT
,@TypeDescription nvarchar(100)
,@Active bit
AS
BEGIN
UPDATE MstPropertyType
SET TypeDescription = @TypeDescription
,Active = @Active
WHERE TypeId = @TypeId
END
GO

Screen Design























































System Development

System testing
VII BELOW
The techniques and guidelines introduced in the preceding sessions if property followed will
produce low-failure system. However, even if techniques are followed the analyst must not
assume that the necessary quality standards have been met. Quality assurance is the review of
software products and related documentation for completeness correctness reliability, and
maintainability

Managing quality assurance

Quality assurance is the review of software products and related documentation for
completeness, correctness reliability and maintainability. It also includes assurance, that system
meets the specification and the requirements for its intended use and performance

Quality assurance can be done by
1. Testing
2. Verification and validation


Testing

Testing is generally done at two levels testing of individual modules and testing of the entire
system during systems testing the system is used experimentally to ensure that the software
does not fail, i.e. that it will run according to its specifications and in the way users expect.

Special test data are input for processing and the results examined. A limited number of users
may be allowed to use the system so analysts can see whether they use it in unforeseen ways.
It is preferable to discover any surprises before the organization implements the system an
depends on it

Testing is done throughout systems development at various states. It is always a good practice
to test the system at many different levels at various intervals, that is sub system program
modules as work progresses and finally the system as a whole. If this is not done then the
poorly tested system can fail after installation.

As you may already have gathered testing is a very tedious and time consuming job. For a test
to be successful the tester, should try and make the program fail, the tester may be an analyst,
programmer or specialist trained in software testing. Once should try and find area in which the
program can fail. Each test case is designed with the intent of finding errors in the way the
system will process it. Thorough testing of programs does not guarantee the reliability of
systems. It is done to assure that the system runs error free.

Testing Strategies

There are two general strategies for testing software. This section examines both the strategies
of code testing and specification testing

Code Testing

The code testing strategy examines the logic of the program. For this testing method the
analyst develops test cases that result in executing every instruction in the program or module
that is every path through the program is tested.

A path is a specific combination of conditions that is handled by the program. The testing of
every path in the program is not always possible as there could be several thousands and
financial and time limitation will not permit this. Generally all the frequently used paths
undergo testing.

Specification Testing

To perform specification testing that analyst examines that program specifications wherein
states what the program should do and how it should perform under various conditions. Then
test cases are developed for each condition or combination of conditions and submitted for
processing

By examining the result the analyst can determine whether the program performs according to
its specified requirements. This testing does not look into the program to study the code or
path, it looks at the program as a whole the assumption here is that if the program meets the
specifications it will not fail.

Types of test data

There are two very different sources of test data
Live
Artificial

Both have advantages and disadvantages

Using live test data

Live test data are those that are actually extracted from organization files. This shows you how
the system will perform on typical data. Although, the data may be the best it is difficult to
obtain sufficient amounts to conduct extensive testing. All combinations and conditions of the
system are not tested with this data. This may not contain values that may cause system failure

Using artificial data

Artificial test data are solely for test purposes. They are to be generated to test all combinations
of formats and values. They are generated using the utility programs of the information system.
Using this type of data all logic and control paths through the program can be tested.

For best results the artificial test data should be generated by persons other than those who
wrote the programs. Automated test data generators also available.

Level of testing

As already mentioned, testing is carried out at different levels and at various intervals.

Unit Testing

This involves the tests carried out on modules or programs which make up a system. This is also
called as program testing. The units in a system are the modules and routines that are
assembled and integrated to perform a specific function. In a large system, May modules at
different levels are needed unit testing focuses first on the modules, independently of one
another, to locate errors.

The programs should be tested for correctness of logic applied and should detect errors in
coding. For example in the payroll system all the calculations should be tested by feeding the
system with all combinations of data

Valid and invalid data should be created and the programs should be made to process this data
to catch error. For example in the payroll system, the employee no. consists of three digits so
during testing one should ensure that the programs do not accept anything other than a 3 digit
code for the employee no.

Another e.g. for valid and invalid data check is that in case a three digit no. is entered during the
entry of transaction and that number does not exist in the master file, or if the number entered
in an exist case then program should not be allowed to enter 31.

All conditions present in the program should be tested before proceeding one must make sure
that all the programs are working independently

System Testing

When unit tests are satisfactorily concluded the system as a complete entity must be tested. At
this stage end users and operators become actively involved in testing. While testing one
should also test to find discrepancies between the system and its original objective, current
specifications and systems documents.

For example one module may expect that data item for employee number to be numeric field
while other modules expect it to be a character data item. The system itself may not report this
error, but the output may show unexpected result. A record maybe created and stored in one
module using the employee number as a numeric field. If this is later sough on retrieval with
the expectation that it will be a character field, the field will not be recognized and the message
REQUESTED RECORD NOT FOUND will be displayed

Systems testing must also verify that file sizes are adequate and that indexes have been built
properly. Sorting and reindexing procedures assumed to be present in lower level modules
must be tested at the system level to see that they in fact exist and achieve the result modules.

My Testing approach

Since, Ive used Incremental Process Model for the development of the system. I have tested
each increment as unit testing and then one module build then test as module testing. And
when the whole system is ready with integration of all sub modules then test as system testing
Throughout the development of the whole system, we attempted to make each and every test
case as a test case which can have high probability of identify an as-yet undiscovered error.

All the screens and modules were thoroughly tested by Mr. senior officials themselves in order
to ensure the user level acceptance. All the modifications suggested were simultaneously
carried out and further tested.
We opted for unit testing approach to test this system. So, we go through theprocess as given
below for the testing system.
Unit Testing.
Module Testing.
System Testing.

Following explains the Test process mentioned above:
Unit Testing:
Individual component are tested to ensure that they are operate correctly. Each component is
tested independently, without system components.In this part of testing we observed all the
methods of all the forms one by one. The observation includes following:
Valid argument with the valid data-type is been entered.
Valid return value.
Check all the variable used in the function, and check the following:
1. Whether the variable is declared or not.
2. Whether the variable is initialized or not.
3. Check whether those variables that declared in the function is contradict with the other
declared variable.
4. Use only those operators on the variable that are appropriate with the variable type.
VII BELOW
System Security
X BELOW

Non profitable charitable organization the open Web application security project (OWASP) is
working for software security. Mission of this association is to make software security
noticeable, so that individuals and organizations worldwide can create knowledgeable choice
about true software security risks.

95% of Web Apps Have Vulnerabilities:
Cross-site scripting (80 percent)
SQL injection (62 percent)
Parameter tampering (60 percent)
Cookie poisoning (37 percent)
Database server (33 percent)
Web server (23 percent)
Buffer overflow (19 percent)

OWASP Top 10 Web Security Threats
Invalidated input
Broken access control
Broken authentication
Cross-site scripting (XSS)
Buffer overflows
Injection flaws
Improper error handling
Insecure storage
Application denial-of-service
Insecure configuration management. X BELOW

I have gone through with all above security threats and checked with my application. I have also
understood different expects of security reading web application and how it can be take care
while we design and develop any web application. I have also take care many major threats
during development, one of I have used stored procedure and avoid query string in
development. Apart from that we have also developed separate machination for error handing
so every error is logging in individual text file along with date and time stamp.
Systems Maintenance

A system should be created whose design is comprehensive ad farsighted enough to serve
current and projected users needs for several years to come. Part of the analysts expertise
should be in projecting what those needs might be, and then build flexibility and adaptability
into the system. The better the system design the easier it will be maintained and the
maintenance cost will be low. Reducing the maintenance costs is a major concern, since
software maintenance can prove to be very expensive. It is important to detect software design
errors early on; as it is less costly than if errors remain unnoticed until maintenance is
necessary.

Maintenance is performed most often to improve the existing software rather than to respond
to a crisis or system failure. As user requirements change, software and documentation should
be changed as part of the maintenance work. Maintenance is also done to update software in
response to the change made in an organization. This work is not as substantial as enhancing
the software, but is must be done the system could fail if the system is not properly
maintained.

For current system I can identify two types of maintenances. One is hosting maintenance and
other is data maintenance.

For Hosting maintenance general if I host my web application in shared hosting server then I
need only pay the year subscription amount to the hosting company. Generally all hosting
company has their maintenance windows and they are performed hardware or network related
maintenance. Mostly all company has their data and source back plan so there are no any
hardware or network maintenance activities for user or client.

For Application point of view also hosting company provide control panel for software
maintenance and deployment. A part from that I have also created administrator control panel
which is related to application maintenance. User type administrator will maintain all web
application related maintenance.

Following figure will help the understand application level maintenance control panel.



Using web application administrator will perform following task.

1. Add new property type and sub type if introduce in market. Administrator will also
update current property description if require.
2. If any new feature will introduce then administrator has to add in master so end user
can select that features so this can also maintain using panel.
3. If company or client what to give any offer or marketing campaign.
4. Administrator also needs to maintain articles so user can read different type of property
related articles and understand current trend.
5. Using advertisement maintenance, client can add new ad or update existing. This is very
important to publish advertisement because it is most revenue generated part of web
application. So maintenance of advertisement is more important.


User Manual

This is a very important document. If the user / operator do not use the system in a proper
manner, then the system could fail. This should details out the procedural steps to be followed
right from the start up to the finish. It should also tell the users the difficulties that could crop
up and how to overcome them.

The back-up procedures should also be included so as no valuable data is lost. All screens
should be included and should contain details what is to be entered at each state.

Following is the user manual description of my web application.

Index

As user type Individual Seller/Buyer
As user type Agent
As user type Administrator

Individual Seller/Buyer

If user want to system as individual seller/buyer then user need to create his/her user id in system using
following screen.



Once user fill required all details then user will get successful message and now user can access is
account in current system. When user login then user will get following screen as dashboard. This screen
is a central place from where user can manage all require activity




In case user wants to edit is profile details this he has click on my profile button and edit want he/she
want to update then click on save button.



When user want to list his/her property in system then click on my list button and he/she can add new
property will photo album



To upload photo album user need to select picture file from local source and then click on update. After
upload it will appear in photo album



Using search list button user can search different type of property and if he/she want to more
specific then user need to click on advance search option. In advance search option user can
search with different filters.


In advance search option user can search with different filters which are likes property type,
offers, age of property and city.




To change password user need to click on change password button. First user has added
current password and then new password with retype password.




Agent

If user want to access system as agent then user need to create his/her user id in system using following
screen.



Once user fill required all details then user will get successful message and now user can access is
account in current system. When user login then user will get following screen as dashboard. This screen
is a central place from where user can manage all require activity




In case user wants to edit is profile details this he has click on my profile button and edit want he/she
want to update then click on save button.



When user want to list his/her property in system then click on my list button and he/she can add new
property will photo album



To upload photo album user need to select picture file from local source and then click on update. After
upload it will appear in photo album



Using search list button user can search different type of property and if he/she want to more
specific then user need to click on advance search option. In advance search option user can
search with different filters.


In advance search option user can search with different filters which are likes property type,
offers, age of property and city.




To change password user need to click on change password button. First user has added
current password and then new password with retype password.





Administrator

Administrator user is default user and it will auto created while system deploy. Default user
name is admin and password also admin which can be change on first login. Administrator
also create other administrator user in system using dashboard option administrator master.



To maintain property type and sub type master, user need to click on property type master.
Following screen will appear when user clicks on this option. The next step is to select property
type using select button in grid. Basis on property type sub type grid will appear in below area.


To maintain sub property user need to using delete or edit option of data grid. In case if user
want to add new sub property then new sub property button on right top of gird need to click.



Any newly introduce feature will add using click on feature master. Screen will display current
available feature as well as edit and delete button with every line item to delete or edit it. New
feature button will use to add new feature. When user will click on this button system will
navigate in sub page.



Following is the sub page of feature master. It will allow adding new feature in system.


To maintain application advertisement which are general appear in home, user need to click on
advertisement master. User can add or delete advertisement.



To maintain application article which are general appear in home, user need to click on article
master. User can add or delete article.



Administrator master option is used to create new administrator user where default
administrator can add multiple administrator in system using this option.

Learning Experience

My aim was to learn Microsoft web technology along with software development life cycle. To
learn and put in real life it was most important that select the any live example. After some
search I found that real estate portal one of the good example for learning. Once I decided to
develop this portal, I started reviewing current portals. I found that many of portals are very
rigid for registration. Every user can only access the web site after registration and email
verification. I believe that if guest user wants to only contact details of current listing and if its
only work for him/her then why any people goes for any registration process. Apart from that I
also analysis that every property have different feature and relatively feature list can only help
to any user. Once more challenge was user interface, I want to develop application such way
that user can easily find any features of portal.

To put my idea in use, my first requirement was to learn development tools and design
technique. I started to understand software development life cycle and its seven phases. Also
started learn different technique to identify data flow, table design, and functionality
specification. I have also started learning Microsoft technology like Dot Net frame work 4.0 and
C# as code behind language. I also observed that there is new technology AJAX giving very good
user interaction way without post backing current page. First I went through with ASP.NET 4.0
and then also learn about AJAX and Microsoft AJAX toolkit. I have also decided to use JQuery in
my system because JQuery give very high flexibility to developer to develop high scalable
effects and controls.

Along with development, testing is also very important in software development life cycle. I
understood this thing during my project work. Some many bug and process flow block we can
easily short out while we pass our system from different testing phases and modes. First I have
done some unit test then go with functionality testing.

This project work is very helpful me on my professional front. Currently ASP.NET is most
industry acceptable tools to develop any web application. We can develop many different type
of application using this tool like HRMS (Human Resource Management System), CRM (Client
Relation Management) and even ERP (Enterprise Resource Planning).






























REFERENCE

I. PG Real Estate. (Year - in brackets) Capture your leads PG Real Estate Solution. [Online]
Available from - http://www.realtysoft.pro/realestate/. [Accessed: 2
nd
May 2014]

II. Creative Real . (Year - in brackets) Real Estate portal - features and characteristics.
[Online] Available from - http://real-estate.creativesites.eu/real-estate-portal-features-
characteristics/ .[Accessed: 2
nd
May 2014]

III. Beginning ASP.NET 4 in C# 2010 - Matthew MacDonald Apress
IV. Programming Microsoft ASP.NET 4 - Dino Esposito - Microsoft
V. Programming ASP.NET AJAX - Christian Wenz - O'Relly
VI. ASP.NET 4 web programming with C# 2010 - Mike Murach - MIKE MURACH &
ASSOCIATES, INC.
VII. Software Engineering - A practitioner's Approach - Roger s. Pressman - McGRAW-HILL
VIII. The official Microsoft ASP.NET Site - http://www.asp.net/
IX. Tutorial Point - http://www.tutorialspoint.com/uml/uml_use_case_diagram.htm
X. The Open Web Application Security Project -
https://www.owasp.org/index.php/Main_Page
XI. MSDN - http://msdn.microsoft.com/en-in/dn308572.aspx
XII. The world's largest community for sharing PowerPoint, OpenOffice presentations,
Keynote, PDF and infographics -www.slideshare.net
XIII. Tutorial Point - http://www.tutorialspoint.com/uml/uml_use_case_diagram.htm
XIV.

You might also like