s12003264 dissertation
TRANSCRIPT
-
8/12/2019 S12003264 Dissertation
1/89
Institute of Arts, Science and Technology Computing
LEVEL: 7
MODULE: COM70: DISSERTATION
ASSIGNMENT: Assignment
ISSUE DATE: Module schedule week 1
RETURN DEADLINE: FRIDAY 31stJANUARY 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 **
-
8/12/2019 S12003264 Dissertation
2/89
**Note:Please note that the above shown feedback is indicative and that scores maychange 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 RequirementsFor Development ................................................... 8
Hardware and Software RequirementsFor 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
-
8/12/2019 S12003264 Dissertation
3/89
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 .............................................................................................................................. 18Methodology VBELOW............................................................................................................ 18
Waterfall Life Cycle ................................................................................................................. 18
Use Case Diagram..................................................................................................................... 19
Sequence Diagram .................................................................................................................... 22
Data Flow Diagram ................................................................................................................... 24
ER Diagram .......................................................................................................................... 25
Data Dictionary ......................................................................................................................... 26
MstAdministrator .................................................................................................................. 26MstAdvertisement ................................................................................................................. 27
MstAgent............................................................................................................................... 27
MstArticle ............................................................................................................................. 27
MstFeature ............................................................................................................................ 28
MstOffer ................................................................................................................................ 28
MstProperty........................................................................................................................... 28
-
8/12/2019 S12003264 Dissertation
4/89
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 .......................................................................................................................... 75My Testing approach ................................................................................................................ 75
Unit Testing: ......................................................................................................................... 76
System Security ........................................................................................................................ 76
Systems Maintenance.................................................................................................................... 77
User Manual .................................................................................................................................. 79
Learning Experience ..................................................................................................................... 87
REFERENCE................................................................................................................................... 89
-
8/12/2019 S12003264 Dissertation
5/89
-
8/12/2019 S12003264 Dissertation
6/89
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 theapplication 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
-
8/12/2019 S12003264 Dissertation
7/89
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 toolthen 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 IE9and 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.
-
8/12/2019 S12003264 Dissertation
8/89
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 BrowserIE 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.
-
8/12/2019 S12003264 Dissertation
9/89
Client Side:
Internet BrowserIE 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 userdata 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 andother applications. It consists of three main parts:
Common Language Runtime
Framework classes
ASP.NET
-
8/12/2019 S12003264 Dissertation
10/89
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 ClaimMany agrarian systems progressed like as discussed below:They staked out fertile plains and get settled in a mighty-makes-right manner in whichthose 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 shifttoward more and more powerful tribal leaders culminated in a pooling of labor along withaCEOof 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 beable 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 RacketA 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 amorousfarmers, 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 societiesgained 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 claimedownership 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 ofother feudal dynasties.
All Hail the KingThis 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, signingawaytitles anddeedsto lands that allowed the holders to collect the rent being produced bythe 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, suchas military service, and they were met because these rulers owned the land not only bybirthright, 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 amerchant class as well as specialized laborers who were able to earn a living with their skillsand not by their crops. This, in turn, resulted in non-agrarian shops and houses that still
http://www.investopedia.com/terms/c/ceo.asphttp://www.investopedia.com/terms/c/ceo.asphttp://www.investopedia.com/terms/c/ceo.asphttp://www.investopedia.com/terms/t/title.asphttp://www.investopedia.com/terms/t/title.asphttp://www.investopedia.com/terms/d/deed.asphttp://www.investopedia.com/terms/d/deed.asphttp://www.investopedia.com/terms/d/deed.asphttp://www.investopedia.com/terms/t/title.asphttp://www.investopedia.com/terms/c/ceo.asp -
8/12/2019 S12003264 Dissertation
11/89
paid rent and taxes to the various lords and kings, but were bought, sold and rented amongthe common folk rather than by the royal class. Richer merchants became the first
common-bornlandlords 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 foreducation 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 ofmortgagesbelongs 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
http://www.investopedia.com/terms/l/landlord.asphttp://www.investopedia.com/terms/l/landlord.asphttp://www.investopedia.com/terms/b/bluecollar.asphttp://www.investopedia.com/terms/b/bluecollar.asphttp://www.investopedia.com/terms/w/whitecollar.asphttp://www.investopedia.com/terms/w/whitecollar.asphttp://www.investopedia.com/terms/m/mortgage.asphttp://www.investopedia.com/terms/m/mortgage.asphttp://www.investopedia.com/terms/m/mortgage.asphttp://www.investopedia.com/terms/m/mortgage.asphttp://www.investopedia.com/terms/w/whitecollar.asphttp://www.investopedia.com/terms/b/bluecollar.asphttp://www.investopedia.com/terms/l/landlord.asp -
8/12/2019 S12003264 Dissertation
12/89
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.
-
8/12/2019 S12003264 Dissertation
13/89
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 processor 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 theCommon 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.
-
8/12/2019 S12003264 Dissertation
14/89
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-drivencontent 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
-
8/12/2019 S12003264 Dissertation
15/89
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 runtimeenvironment 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.
-
8/12/2019 S12003264 Dissertation
16/89
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
-
8/12/2019 S12003264 Dissertation
17/89
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 implementhigh performance web application
AJAXVBELOW
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
-
8/12/2019 S12003264 Dissertation
18/89
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.VBELOW
System Design
MethodologyVII 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
-
8/12/2019 S12003264 Dissertation
19/89
Use Case DiagramVII 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 ActorsPeople who use the main functions of the system
Secondary ActorsPeople who perform administration or maintenance of the system
External HardwareThis 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
-
8/12/2019 S12003264 Dissertation
20/89
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 relationshipThis relationship indicates that the instance of source uses also includesbehavior of the target use case.
Extends relationshipIt 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
-
8/12/2019 S12003264 Dissertation
21/89
-
8/12/2019 S12003264 Dissertation
22/89
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.
XIIBELOW
-
8/12/2019 S12003264 Dissertation
23/89
-
8/12/2019 S12003264 Dissertation
24/89
Data Flow DiagramVII 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 theprocess model is a sub function of the overall system.
VII BELOW
-
8/12/2019 S12003264 Dissertation
25/89
E R DiagramVII 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 ondata 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
-
8/12/2019 S12003264 Dissertation
26/89
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
-
8/12/2019 S12003264 Dissertation
27/89
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 1005 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 5015 Active bit
MstArticle
Sr.
No Column Name
Data
Type Max Length
1 ArticleId int
-
8/12/2019 S12003264 Dissertation
28/89
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 int7 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
-
8/12/2019 S12003264 Dissertation
29/89
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
-
8/12/2019 S12003264 Dissertation
30/89
MstUser
Sr.
No Column Name
Data
Type
Max
Length
1 UserId int
2 UserName nvarchar 50
3 Password nvarchar 50
4 UserType int5 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
-
8/12/2019 S12003264 Dissertation
31/89
5 Active bit
Stored procedures
USE [PropertyPortal]GO
/****** Object: StoredProcedure [dbo].[usp_AgentGetByAgentId] ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOcreate PROCEDURE [dbo].[usp_AgentGetByAgentId]
@AgentID INTASBEGIN
SELECT *FROM MstAgentWHERE AgentID = @AgentID
ENDGO
/****** Object: StoredProcedure [dbo].[usp_ArticleDelete] ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOcreate PROCEDURE [dbo].[usp_ArticleDelete]
@ArticleID INTASBEGIN
UPDATE MstArticleSET Active = 0WHERE ArticleID = @ArticleID
ENDGO
/****** Object: StoredProcedure [dbo].[usp_ArticleGet] ******/SET ANSI_NULLS ON
GOSET QUOTED_IDENTIFIER ONGOcreate PROCEDURE [dbo].[usp_ArticleGet]
ASBEGIN
SELECT *FROM MstArticleWHERE ISNULL(Active, 1) = 1
-
8/12/2019 S12003264 Dissertation
32/89
ENDGO
/****** Object: StoredProcedure [dbo].[usp_ArticleGetByArticleId] ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGO
create PROCEDURE [dbo].[usp_ArticleGetByArticleId]@ArticleID INT
ASBEGIN
SELECT *FROM MstArticleWHERE ArticleID = @ArticleID
ENDGO
/****** Object: StoredProcedure [dbo].[usp_FeatureInsert] ******/
SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE PROCEDURE [dbo].[usp_FeatureInsert]
@PropertyTypeID INT,@PropertySubTypeID INT,@FeatureDescription nvarchar(1000),@FeatureIcon nvarchar(100),@InputType INT,@InputList nvarchar(500)
,@Active BITASBEGIN
INSERT INTO MstFeature(PropertyTypeID, PropertySubTypeID, FeatureDescription, FeatureIcon,InputType ,InputList ,Active)
VALUES(@PropertyTypeID, @PropertySubTypeID, @FeatureDescription,
@FeatureIcon,@InputType ,@InputList ,@Active)
SELECT @@IDENTITY;
ENDGO
/****** Object: StoredProcedure [dbo].[usp_FeatureUpdate] ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOcreate PROCEDURE [dbo].[usp_FeatureUpdate]
-
8/12/2019 S12003264 Dissertation
33/89
@FeatureId INT,@PropertyTypeID INT,@PropertySubTypeID INT,@FeatureDescription nvarchar(1000),@FeatureIcon nvarchar(100),@InputType INT,@InputList nvarchar(500),@Active BIT
ASBEGIN
UPDATE MstFeatureSET PropertyTypeID = @PropertyTypeID
,PropertySubTypeID = @PropertySubTypeID,FeatureDescription = @FeatureDescription,FeatureIcon = @FeatureIcon,InputType = @InputType,InputList = @InputList,Active = @Active
WHERE FeatureId = @FeatureId
ENDGO
/****** Object: StoredProcedure [dbo].[usp_FeatureCheckByName] ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOcreate PROCEDURE [dbo].[usp_FeatureCheckByName]
@FeatureId INT,@PropertyTypeID INT
,@PropertySubTypeID INT,@FeatureDescription nvarchar(1000)
ASBEGIN
SELECT *FROM MstFeatureWHERE PropertyTypeID = @PropertyTypeID
AND PropertySubTypeID = @PropertySubTypeIDAND FeatureDescription LIKE @FeatureDescriptionAND ISNULL(Active, 1) = 1AND FeatureId @FeatureId
ENDGO
/****** Object: StoredProcedure [dbo].[usp_FeatureDelete] ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOcreate PROCEDURE [dbo].[usp_FeatureDelete]
-
8/12/2019 S12003264 Dissertation
34/89
@FeatureId INTASBEGIN
UPDATE MstFeatureSET Active = 0WHERE FeatureId = @FeatureId
ENDGO
/****** Object: StoredProcedure [dbo].[usp_FeatureGetByFeatureId] ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOcreate PROCEDURE [dbo].[usp_FeatureGetByFeatureId]
@FeatureId INTASBEGIN
SELECT *
FROM MstFeatureWHERE FeatureId = @FeatureId
ENDGO
/****** Object: StoredProcedure [dbo].[usp_SellerBuyerGetBySellerBuyerId]******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOcreate PROCEDURE [dbo].[usp_SellerBuyerGetBySellerBuyerId]
@SellerBuyerID INTASBEGIN
SELECT *FROM MstSellerBuyerWHERE SellerBuyerID = @SellerBuyerID
ENDGO/****** Object: StoredProcedure [dbo].[usp_FeatureGet] ******/SET ANSI_NULLS ONGO
SET QUOTED_IDENTIFIER ONGOCREATE PROCEDURE [dbo].[usp_FeatureGet]
ASBEGIN
SELECT MF.*,CASE WHEN MF.InputType=1 THEN 'Free Text' ELSE 'Selection'
END AS InputTypeName,PT.TypeDescription AS PropertyType
-
8/12/2019 S12003264 Dissertation
35/89
,PST.SubTypeDescription AS PropertySubTypeFROM MstFeature MFINNER JOIN MstPropertyType PT ON MF.PropertyTypeId = PT.TypeIdINNER JOIN MstPropertySubType PST ON MF.PropertySubTypeId =
PST.SubTypeIdWHERE ISNULL(MF.Active, 1) = 1ORDER BY FeatureId DESC
END
GO
/****** Object: StoredProcedure [dbo].[usp_PropertySubTypeCheckByName]******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE PROCEDURE [dbo].[usp_PropertySubTypeCheckByName]
@SubTypeID INT,@SubTypeDescription nvarchar(100)
ASBEGIN
SELECT *FROM MstPropertySubTypeWHERE SubTypeDescription like @SubTypeDescription
AND (SubTypeID @SubTypeID)AND Active = 1
ENDGO
/****** Object: StoredProcedure [dbo].[usp_PropertySubTypeDelete] ******/
SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOcreate PROCEDURE [dbo].[usp_PropertySubTypeDelete]
@SubTypeId INTASBEGIN
DELETE FROM MstPropertySubTypeWHERE SubTypeId = @SubTypeId
END
GO
/****** Object: StoredProcedure [dbo].[usp_PropertySubTypeGetByTypeId]******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOcreate PROCEDURE [dbo].[usp_PropertySubTypeGetByTypeId]
-
8/12/2019 S12003264 Dissertation
36/89
@TypeId INTASBEGIN
SELECT *FROM MstPropertySubTypeWHERE TypeId = @TypeId AND Active = 1
ENDGO
/****** Object: StoredProcedure[dbo].[usp_PropertySubTypeGetBySubTypeId]******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOcreate PROCEDURE [dbo].[usp_PropertySubTypeGetBySubTypeId]
@SubTypeId INTASBEGIN
SELECT *FROM MstPropertySubTypeWHERE SubTypeId = @SubTypeId
ENDGO
/****** Object: StoredProcedure [dbo].[usp_PropertySubTypeInsert] ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGO
create PROCEDURE [dbo].[usp_PropertySubTypeInsert]@TypeId INT,@SubTypeDescription nvarchar(100),@Active bit
ASBEGIN
INSERT INTO MstPropertySubType(TypeId, SubTypeDescription, Active)VALUES(@TypeId, @SubTypeDescription, @Active)
SELECT @@IDENTITY;END
GO
/****** Object: StoredProcedure [dbo].[usp_PropertySubTypeUpdate] ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOcreate PROCEDURE [dbo].[usp_PropertySubTypeUpdate]
@SubTypeId INT
-
8/12/2019 S12003264 Dissertation
37/89
,@TypeId INT,@SubTypeDescription nvarchar(100),@Active bit
ASBEGIN
UPDATE MstPropertySubTypeSET TypeId = @TypeId
,SubTypeDescription = @SubTypeDescription
,Active = @ActiveWHERE SubTypeId = @SubTypeId
ENDGO
/****** Object: StoredProcedure [dbo].[usp_PropertySearch] ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGO
CREATE PROCEDURE [dbo].[usp_PropertySearch]@SearchText NVARCHAR(1000),@PropertyTypeID INT,@PropertySubTypeID INT,@OfferId INT,@AgeOfProperty INT,@PriceRent Decimal,@City NVARCHAR(50),@IsAdvanceSearch INT
ASBEGIN
IF (@IsAdvanceSearch = 1) --Advance SearchBEGIN
SELECT MP.*, MPT.TypeDescription PropertyType,MPST.SubTypeDescription PropertySubType,MO.OfferDescription Offer
FROM MstProperty MPJOIN MstPropertyType MPT ON MP.PropertyTypeID = MPT.TypeIDJOIN MstPropertySubType MPST ON MP.PropertySubTypeID =
MPST.SubTypeIdJOIN MstOffer MO ON MP.OfferID = MO.OfferIDWHERE (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
-
8/12/2019 S12003264 Dissertation
38/89
)ORDER BY MP.PropertyID DESC
ENDELSE --Normal SearchBEGIN
SELECT MP.*, MPT.TypeDescription PropertyType,MPST.SubTypeDescription PropertySubType,MO.OfferDescription Offer
FROM MstProperty MPJOIN MstPropertyType MPT ON MP.PropertyTypeID = MPT.TypeIDJOIN MstPropertySubType MPST ON MP.PropertySubTypeID =
MPST.SubTypeIdJOIN MstOffer MO ON MP.OfferID = MO.OfferIDWHERE (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) = 1ORDER BY MP.PropertyID DESC
END
ENDGO
/****** Object: StoredProcedure [dbo].[usp_FeatureGetByType] ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ON
GOCREATE PROCEDURE [dbo].[usp_FeatureGetByType]
@PropertyTypeId INT,@PropertySubTypeId INT
ASBEGIN
SELECT MF.*,CASE WHEN MF.InputType=1 THEN 'Free Text' ELSE 'Selection'
END AS InputTypeName
-
8/12/2019 S12003264 Dissertation
39/89
,PT.TypeDescription AS PropertyType,PST.SubTypeDescription AS PropertySubType
FROM MstFeature MFINNER JOIN MstPropertyType PT ON MF.PropertyTypeId = PT.TypeIdINNER JOIN MstPropertySubType PST ON MF.PropertySubTypeId =
PST.SubTypeIdWHERE PropertyTypeId = @PropertyTypeId
AND PropertySubTypeId = @PropertySubTypeId
AND ISNULL(MF.Active,1)=1ORDER BY FeatureId DESC
ENDGO
/****** Object: StoredProcedure [dbo].[usp_PropertyGetByUserId] ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE PROCEDURE [dbo].[usp_PropertyGetByUserId]
@CreatedBy INTASBEGIN
SELECT MP.*, MPT.TypeDescription PropertyType,MPST.SubTypeDescription PropertySubType,MO.OfferDescription Offer
FROM MstProperty MPJOIN MstPropertyType MPT ON MP.PropertyTypeID = MPT.TypeIDJOIN MstPropertySubType MPST ON MP.PropertySubTypeID =
MPST.SubTypeIdJOIN MstOffer MO ON MP.OfferID = MO.OfferID
WHERE CreatedBy = @CreatedByAND ISNULL(MP.Active,1) = 1
ORDER BY MP.PropertyID DESCENDGO
/****** Object: StoredProcedure [dbo].[usp_PropertyGetDetailByPropertyId]******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ON
GOCREATE PROCEDURE [dbo].[usp_PropertyGetDetailByPropertyId]
@PropertyId INTASBEGIN
SELECT MP.*, MPT.TypeDescription PropertyType,MPST.SubTypeDescription PropertySubType,MO.OfferDescription Offer
FROM MstProperty MP
-
8/12/2019 S12003264 Dissertation
40/89
JOIN MstPropertyType MPT ON MP.PropertyTypeID = MPT.TypeIDJOIN MstPropertySubType MPST ON MP.PropertySubTypeID =
MPST.SubTypeIdJOIN MstOffer MO ON MP.OfferID = MO.OfferIDWHERE MP.PropertyID = @PropertyId
ENDGO/****** Object: StoredProcedure [dbo].[usp_AdministratorInsert] ******/
SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE 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
ASBEGIN
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)ENDGO
/****** Object: StoredProcedure [dbo].[usp_UserCheckForLogin] ******/SET ANSI_NULLS ONGO
-
8/12/2019 S12003264 Dissertation
41/89
SET QUOTED_IDENTIFIER ONGOCREATE PROCEDURE [dbo].[usp_UserCheckForLogin]
@UserName VARCHAR(50),@Password VARCHAR(50),@UserType INT
ASBEGIN
IF (@UserType = 1) --AdministratorBEGIN
SELECT MU.*, MA.AdministratorId, MA.FirstName + ' ' +MA.LastName AS UserFullName
FROM MstUser MUJOIN MstAdministrator MA ON MU.UserId = MA.UserIdWHERE MU.UserName LIKE @UserName
AND MU.Password LIKE @PasswordAND MU.UserType = @UserTypeAND ISNULL(MU.Active,1) = 1AND ISNULL(MA.Active,1) = 1
ENDELSE IF (@UserType = 2) --SellerBuyerBEGIN
SELECT MU.*, MSB.SellerBuyerId, MSB.FirstName + ' ' +MSB.LastName AS UserFullName
FROM MstUser MUJOIN MstSellerBuyer MSB ON MU.UserId = MSB.UserIdWHERE MU.UserName LIKE @UserName
AND MU.Password LIKE @PasswordAND MU.UserType = @UserTypeAND ISNULL(MU.Active,1) = 1
AND ISNULL(MSB.Active,1) = 1ENDELSE IF (@UserType = 3) --AgentBEGIN
SELECT MU.*, MA.AgentId, MA.AgentName AS UserFullNameFROM MstUser MUJOIN MstAgent MA ON MU.UserId = MA.UserIdWHERE MU.UserName LIKE @UserName
AND MU.Password LIKE @PasswordAND MU.UserType = @UserTypeAND ISNULL(MU.Active,1) = 1
AND ISNULL(MA.Active,1) = 1ENDELSEBEGIN
SELECT *, UserName AS UserFullNameFROM MstUserWHERE UserName LIKE @UserName
AND Password LIKE @PasswordAND UserType = @UserType
-
8/12/2019 S12003264 Dissertation
42/89
AND ISNULL(Active,1) = 1END
ENDGO
/****** Object: StoredProcedure [dbo].[usp_AdministratorDelete] ******/SET ANSI_NULLS ONGO
SET QUOTED_IDENTIFIER ONGOCREATE PROCEDURE [dbo].[usp_AdministratorDelete]@AdministratorId INT
ASBEGIN
UPDATE MstUserSET Active = 0WHERE UserId IN
(SELECT UserID FROM MstAdministratorWHERE AdministratorId = @AdministratorId)
UPDATE MstAdministratorSET Active = 0WHERE AdministratorId = @AdministratorId
ENDGO
/****** Object: StoredProcedure [dbo].[usp_AdministratorsGet] ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ON
GOCREATE PROCEDURE [dbo].[usp_AdministratorsGet]
ASBEGIN
SELECT *, FirstName + ' ' + LastName AS NameFROM MstAdministratorWHERE Active = 1 AND (FirstName + ' ' + LastName) 'System
Administrator'ENDGO
/****** Object: StoredProcedure [dbo].[usp_ArticleCheckByName] ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE PROCEDURE [dbo].[usp_ArticleCheckByName]
@ArticleID INT,@ArticleTitle NVARCHAR(1000)
AS
-
8/12/2019 S12003264 Dissertation
43/89
BEGINSELECT *FROM MstArticleWHERE ArticleTitle LIKE @ArticleTitle AND Active = 1 AND ArticleID
@ArticleIDENDGO
/****** Object: StoredProcedure [dbo].[usp_ArticleInsert] ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE PROCEDURE [dbo].[usp_ArticleInsert]
@ArticleTitle NVARCHAR(1000),@ArticleDescription TEXT,@Active BIT
ASBEGIN
INSERT INTO MstArticle(ArticleTitle, ArticleDescription, Active)
VALUES(@ArticleTitle, @ArticleDescription, @Active)
SELECT @@IDENTITY;ENDGO
/****** Object: StoredProcedure [dbo].[usp_ArticleUpdate] ******/SET ANSI_NULLS ONGO
SET QUOTED_IDENTIFIER ONGOCREATE PROCEDURE [dbo].[usp_ArticleUpdate]
@ArticleID INT,@ArticleTitle NVARCHAR(1000),@ArticleDescription TEXT,@Active BIT
ASBEGIN
UPDATE MstArticleSET ArticleTitle = @ArticleTitle
,ArticleDescription = @ArticleDescription,Active = @Active
WHERE ArticleID = @ArticleIDENDGO
/****** Object: StoredProcedure [dbo].[usp_OfferInsert] ******/SET ANSI_NULLS ONGO
-
8/12/2019 S12003264 Dissertation
44/89
SET QUOTED_IDENTIFIER ONGOCREATE PROCEDURE [dbo].[usp_OfferInsert]
@OfferDescription TEXT,@Active BIT
ASBEGIN
INSERT INTO MstOffer
(OfferDescription, Active)VALUES
(@OfferDescription, @Active)ENDGO
/****** Object: StoredProcedure [dbo].[usp_OfferUpdate] ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGO
CREATE PROCEDURE [dbo].[usp_OfferUpdate]@OfferId INT,@OfferDescription TEXT,@Active BIT
ASBEGIN
UPDATE MstOfferSET OfferDescription = @OfferDescription
,Active = @ActiveWHERE OfferId = @OfferId
END
GO/****** Object: StoredProcedure [dbo].[usp_OfferCheckByName] ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE PROCEDURE [dbo].[usp_OfferCheckByName]
@OfferId INT,@OfferDescription TEXT
ASBEGIN
SELECT *FROM MstOfferWHERE CAST(OfferDescription AS VARCHAR) LIKE @OfferDescription
AND ISNULL(Active, 1) = 1 AND OfferId @OfferIdENDGO
/****** Object: StoredProcedure [dbo].[usp_OfferDelete] ******/SET ANSI_NULLS ON
-
8/12/2019 S12003264 Dissertation
45/89
GOSET QUOTED_IDENTIFIER ONGOCREATE PROCEDURE [dbo].[usp_OfferDelete]
@OfferId INTASBEGIN
UPDATE MstOffer
SET Active = 0WHERE OfferId = @OfferId
ENDGO
/****** Object: StoredProcedure [dbo].[usp_OfferGetByOfferId] ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE PROCEDURE [dbo].[usp_OfferGetByOfferId]
@OfferId INTASBEGIN
SELECT *FROM MstOfferWHERE OfferId = @OfferId
ENDGO/****** Object: StoredProcedure [dbo].[usp_OfferGet] ******/SET ANSI_NULLS ONGO
SET QUOTED_IDENTIFIER ONGOCREATE PROCEDURE [dbo].[usp_OfferGet]
ASBEGIN
SELECT *FROM MstOfferWHERE ISNULL(Active, 1) = 1ORDER BY OfferId DESC
ENDGO
/****** Object: StoredProcedure [dbo].[usp_AdvertisementCheckByName] ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE PROCEDURE [dbo].[usp_AdvertisementCheckByName]
@AdvertisementId INT,@AdvertisementTitle TEXT
-
8/12/2019 S12003264 Dissertation
46/89
ASBEGIN
SELECT *FROM MstAdvertisementWHERE CAST(AdvertisementTitle AS VARCHAR) LIKE
@AdvertisementTitle AND Active = 1 AND AdvertisementId @AdvertisementIdENDGO
/****** Object: StoredProcedure [dbo].[usp_AdvertisementInsert] ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOcreate PROCEDURE [dbo].[usp_AdvertisementInsert]
@AdvertisementTitle text,@AdvertisementImage nvarchar(100),@Active BIT
AS
BEGININSERT INTO MstAdvertisement
(AdvertisementTitle, AdvertisementImage, Active)VALUES
(@AdvertisementTitle, @AdvertisementImage, @Active)ENDGO
/****** Object: StoredProcedure [dbo].[usp_AdvertisementUpdate] ******/SET ANSI_NULLS ONGO
SET QUOTED_IDENTIFIER ONGOcreate PROCEDURE [dbo].[usp_AdvertisementUpdate]
@AdvertisementId int,@AdvertisementTitle text,@AdvertisementImage nvarchar(100),@Active BIT
ASBEGIN
UPDATE MstAdvertisementSET AdvertisementTitle = @AdvertisementTitle
,AdvertisementImage = @AdvertisementImage,Active = @Active
WHERE AdvertisementId = @AdvertisementIdENDGO
/****** Object: StoredProcedure [dbo].[usp_AdvertisementDelete] ******/SET ANSI_NULLS ONGO
-
8/12/2019 S12003264 Dissertation
47/89
SET QUOTED_IDENTIFIER ONGOCREATE PROCEDURE [dbo].[usp_AdvertisementDelete]
@AdvertisementId intASBEGIN
UPDATE MstAdvertisementSET Active = 0
WHERE AdvertisementId = @AdvertisementIdENDGO
/****** Object: StoredProcedure [dbo].[usp_AdvertisementGet] ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOcreate PROCEDURE [dbo].[usp_AdvertisementGet]
AS
BEGINSELECT *FROM MstAdvertisementWHERE Active = 1ORDER BY AdvertisementId DESC
ENDGO
/****** Object: StoredProcedure [dbo].[usp_AdvertisementGetByAdvertisementId]00:18:21 ******/SET ANSI_NULLS ON
GOSET QUOTED_IDENTIFIER ONGOcreate PROCEDURE [dbo].[usp_AdvertisementGetByAdvertisementId]
@AdvertisementId INTASBEGIN
SELECT *FROM MstAdvertisementWHERE AdvertisementId = @AdvertisementId
END
GO
/****** Object: StoredProcedure [dbo].[usp_AgentInsertUpdate] ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE PROCEDURE [dbo].[usp_AgentInsertUpdate]
@AgentID INT
-
8/12/2019 S12003264 Dissertation
48/89
,@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
ASBEGIN
IF (ISNULL(@AgentID, 0) = 0) --INSERTBEGIN
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
ELSEBEGIN
UPDATE MstAgentSET 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 = @AgentIDSELECT @AgentID;
END
-
8/12/2019 S12003264 Dissertation
49/89
ENDGO
/****** Object: StoredProcedure [dbo].[usp_PropertyFeatureGetByPropertyId]00:18:51 ******/SET ANSI_NULLS ON
GOSET QUOTED_IDENTIFIER ONGOCREATE PROCEDURE [dbo].[usp_PropertyFeatureGetByPropertyId]
@PropertyId INTASBEGIN
SELECT *FROM TrnPropertyFeature TPFJOIN MstFeature MF ON TPF.FeatureId = MF.FeatureIdWHERE PropertyId = @PropertyId
ENDGO
/****** Object: StoredProcedure [dbo].[usp_SellerBuyerInsertUpdate] ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE 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
ASBEGIN
IF (ISNULL(@SellerBuyerID, 0) = 0) --INSERTBEGIN
INSERT INTO MstSellerBuyer(UserId, FirstName, LastName,AddressLine1, AddressLine2, Area, City, PostCode,PhoneNo, MobileNo, Email, Active)
-
8/12/2019 S12003264 Dissertation
50/89
VALUES(@UserId, @FirstName, @LastName,@AddressLine1, @AddressLine2, @Area, @City, @ZipCode,@PhoneNo, @MobileNo, @Email, @Active)
SELECT @@IDENTITY;ENDELSEBEGIN
UPDATE MstSellerBuyerSET 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 = @SellerBuyerIDSELECT @SellerBuyerID;
END
ENDGO
/****** Object: StoredProcedure
[dbo].[usp_PropertyPhotoAlbumDeleteByPhotoAlbumId] ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOcreate PROCEDURE [dbo].[usp_PropertyPhotoAlbumDeleteByPhotoAlbumId]
@PropertyPhotoAlbumID INTASBEGIN
DELETE FROM TrnPropertyPhotoAlbumWHERE PropertyPhotoAlbumID = @PropertyPhotoAlbumID
ENDGO
/****** Object: StoredProcedure [dbo].[usp_PropertyPhotoAlbumDelete] ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE PROCEDURE [dbo].[usp_PropertyPhotoAlbumDelete]
-
8/12/2019 S12003264 Dissertation
51/89
@PropertyId INTASBEGIN
DELETE FROM TrnPropertyPhotoAlbumWHERE PropertyId = @PropertyId
ENDGO
/****** Object: StoredProcedure [dbo].[usp_PropertyPhotoAlbumGetByPropertyId]00:19:01 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE PROCEDURE [dbo].[usp_PropertyPhotoAlbumGetByPropertyId]
@PropertyId INTASBEGIN
SELECT *
FROM TrnPropertyPhotoAlbumWHERE PropertyId = @PropertyId
ENDGO
/****** Object: StoredProcedure [dbo].[usp_PropertyPhotoAlbumInsert] ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE PROCEDURE [dbo].[usp_PropertyPhotoAlbumInsert]
@PropertyId INT,@AlbumThumbnailImage nvarchar(100),@AlbumImage nvarchar(200),@Active BIT
ASBEGIN
INSERT INTO TrnPropertyPhotoAlbum(PropertyId, AlbumThumbnailImage, AlbumImage, Active)
VALUES(@PropertyId, @AlbumThumbnailImage, @AlbumImage, @Active)
END
GO
/****** Object: StoredProcedure [dbo].[usp_PropertyFeatureInsert] ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE PROCEDURE [dbo].[usp_PropertyFeatureInsert]
@PropertyId INT
-
8/12/2019 S12003264 Dissertation
52/89
,@FeatureId INT,@FeatureValue nvarchar(500)
ASBEGIN
INSERT INTO TrnPropertyFeature(PropertyId, FeatureId, FeatureValue)
VALUES(@PropertyId, @FeatureId, @FeatureValue)
ENDGO/****** Object: StoredProcedure [dbo].[usp_PropertyFeatureDelete] ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE PROCEDURE [dbo].[usp_PropertyFeatureDelete]
@PropertyId INTASBEGIN
DELETE FROM TrnPropertyFeatureWHERE PropertyId = @PropertyId
ENDGO/****** Object: StoredProcedure[dbo].[usp_PropertyFeatureDeleteByPropertyFeatureId] ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOcreate PROCEDURE [dbo].[usp_PropertyFeatureDeleteByPropertyFeatureId]
@PropertyFeatureId INTASBEGIN
DELETE FROM TrnPropertyFeatureWHERE PropertyFeatureId = @PropertyFeatureId
ENDGO/****** Object: StoredProcedure [dbo].[usp_PropertyInsert] ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ON
GOCREATE PROCEDURE [dbo].[usp_PropertyInsert]
@PropertyTypeId INT,@PropertySubTypeId INT,@Title NVARCHAR(100),@Detail TEXT,@OfferId INT,@PriceRent DECIMAL,@BuildUpArea NVARCHAR(100)
-
8/12/2019 S12003264 Dissertation
53/89
,@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
ASBEGIN
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;ENDGO/****** Object: StoredProcedure [dbo].[usp_PropertyUpdate] ******/SET ANSI_NULLS ON
GOSET QUOTED_IDENTIFIER ONGOCREATE 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)
-
8/12/2019 S12003264 Dissertation
54/89
,@Email nvarchar(50),@CreatedBy INT,@CreatedOn DATETIME,@Active BIT
ASBEGIN
UPDATE MstPropertySET 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 = @PropertyIDENDGO/****** Object: StoredProcedure [dbo].[usp_PropertyDelete] ******/
SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE PROCEDURE [dbo].[usp_PropertyDelete]
@PropertyID INTASBEGIN
UPDATE MstPropertySET Active = 0WHERE PropertyID = @PropertyID
ENDGO/****** Object: StoredProcedure [dbo].[usp_PropertyGetByPropertyId] ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE PROCEDURE [dbo].[usp_PropertyGetByPropertyId]
@PropertyID INT
-
8/12/2019 S12003264 Dissertation
55/89
ASBEGIN
SELECT *FROM MstPropertyWHERE PropertyID = @PropertyID
ENDGO/****** Object: StoredProcedure [dbo].[usp_PropertyGet] ******/
SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE PROCEDURE [dbo].[usp_PropertyGet]
ASBEGIN
SELECT *FROM MstPropertyWHERE ISNULL(Active, 1) = 1ORDER BY PropertyID DESC
ENDGO/****** Object: StoredProcedure [dbo].[usp_PropertyCheckByName] ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE PROCEDURE [dbo].[usp_PropertyCheckByName]
@PropertyId INT,@PropertyTypeId INT,@PropertySubTypeId INT
,@Title NVARCHAR(100)ASBEGIN
SELECT *FROM MstPropertyWHERE PropertyTypeId = @PropertyTypeId
AND PropertySubTypeId = @PropertySubTypeIdAND Title LIKE @TitleAND Active = 1AND PropertyId @PropertyId
END
GO/****** Object: StoredProcedure [dbo].[usp_UserCheckByUsername] ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE PROCEDURE [dbo].[usp_UserCheckByUsername]
@UserName VARCHAR(50)AS
-
8/12/2019 S12003264 Dissertation
56/89
-
8/12/2019 S12003264 Dissertation
57/89
,@UserType INT,@Active BIT
ASBEGIN
UPDATE MstUserSET --UserName = @UserName,
Password = @Password,UserType = @UserType
,Active = @