final graduation project
TRANSCRIPT
-
7/31/2019 Final Graduation Project
1/69
ANALYSIS
1.1 INTRODUCTION
This is a Project work undertaken in context of partial fulfillment of MIS.I have tried my best to make
the complicated process of royal Estate Agent and Property Management System (e-property) assimple as possible using Structured & Modular technique & Menu oriented interface. I have tried to
design the software in such a way that user may not have any difficulty in using this package &further expansion is possible without much effort. This report illustrates some of the knowledge and
skills gained in the course of study. This entailed studying the necessary components and technologies
that make up e-property system for an Estate Agent and to set up users satisfaction and experienceduring their interaction with the system.
The e-property Management system is a royal estates solution to the final automation of real estateadministration. It offers a homegrown solution which works with the manual current systems and
leverages existing technology. It also centralizes the mountains of data and automates routing of
administrative functions. This package has managements most flexible and interactive functions, thusmeeting the information needs of the entire business. And, it is utterly simple for everyone to use. The
Real Estate Management software is more than just another technological solution; it is systems that
will revolutionaries some aspects of the way real estate firm is managed
E-Property is an Estate Agent and Property Management System is a user friendly contact and
property manager for real estate professionals. Save time and sell more by empowering to easily keep
track of leads, manage listings, and market to new prospect. Estate Agent / Property ManagementSystem (e-Property) is complete end to end solution to cover all aspects of Estate Agent day to day
activity and Property buying selling procedure for small organization.
3
-
7/31/2019 Final Graduation Project
2/69
1.2 THE E-PROPERTY ADVANTAGE
Most software's are less flexible when it comes to adoption; the Real Estate management software
adopts the firms operating style. With software engineers at call the software can be reworked to fit
your Real Estates firm context. This project will features easy search searching, filter all views foreasy record location and also allow easy entry of Property and Vendor details with easy to use and
impressive GUI.
1.3 PROJECT OBJECTIVES
The basic objective of developing this project is:
Maintain client details line contact details, required property details, client type like residential
and commercial client. Price limit. Preference.
Maintain property details, registration of property for sale includes property address, property
description, price, facilities available.
Store property floor plan, property documents. Creation of thumbnail of property images for
brochure.
System has powerful logical access management in place, each user must be identified by
login id and strict password policy is applied to secure the system. Search property for sold, rented and vice vasa.
1.4 THE INVESTIGATION
I arranged and made an interview with the manager of the royal estate Mr. Ibrahim, which I collectedsome, datas and I made some structured questions prior before the interview and the discussion
drawn up where:
The problems of the current manual system
How the current manual system operate.
The amount of landlords and tenant they have.
How they contact their landlords.
Do they have any software that they propose to use?
The information that they require from their landlords and tenants
4
-
7/31/2019 Final Graduation Project
3/69
1.5 SUMMARY OF THE INTERVIEW
According to my interview with Mr. Ibrahim, some number of issues comes out which draws to my
final objective of the project listed above.
1.6 PROBLEM WITH THE CURRENT SYSTEM
Although there are so many Estate Agent and Property Management systems depending on the
business of the organization but this development report focuses on the e-property system. The
purpose of this development report was to implement some knowledge of human-computer
interaction, that is, the way human interact with machines.
The current system which is most widely used in the present situation of Estate Agent and Property
Management system is done manually, which the estate agent will have to view different picture orvisual illustrations of the entire building structure and plan on paper.
The current systems poses problem in which are the records of customer landlords and tenants are fileand store in the office which generate limited office space. And also the files do not have back up as
in case of fire outbreak. There is time consuming getting through file to fine record of a property and
record of tenants and also sold property details.
1.7 ENTITIES, ATTRIBUTES, ENTITY RELATIONSHIP DIAGRAMS
Customer CustomerIDTitle
FirstName
MiddleName
LastNameNationality
Occupation
AddressTelephone
Email
Customer Document CustomerDocumentIDTitle Url
CustomerID
Customers RentingI CustomersRentingID
CustomerIDRentIDint
5
-
7/31/2019 Final Graduation Project
4/69
Documents DocumentsID int
Title
DocUrlPropertyID
Image ImageID
ImageUrl
PropertyID
Item ItemID
Name nvarchar
QuantityPropertyID
Landlord LandlordIDTitle
FirstNameMiddleNameLastName
Address
Telephone
Email Nationality
Login LoginIDUsername
Password
Name
Property PropertyIDAddress
Type
NumberOfRoomsLocation
LetType
FloorPlan
LandlordIDRentedSold
Amount
6
-
7/31/2019 Final Graduation Project
5/69
Rent RentID
StartDateDuration
EndDate
DueDateDepositAmount
PropertyID
Amount
Rent Document RentDocumentID
TitleUrl
RentID
Rent Payment RentPaymentID
AmountDateForTheMonthOf
RentIDint
Sold SoldID
Date
PropertyIDCustomerID
PriceSold
Sold Document SoldDocumentID
Title
Url
SoldID
7
-
7/31/2019 Final Graduation Project
6/69
Customer
CustomerID
Title
FirstName
MiddleName
LastName
Nationality
Occupation
Address
Telephone
Email
CustomerDocument
CustomerDocumentID
Title
Url
CustomerID
CustomersRenting
CustomersRentingID
CustomerID
RentID
Documents
DocumentsID
Title
DocUrl
PropertyID
ImagesImageID
Title
ImageUrl
PropertyID
Items
ItemID
Name
Quantity
PropertyID
Landlord
LandlordID
Title
FirstName
MiddleName
LastName
Address
Telephone
Email
Nationality
Property
PropertyID
Address
Type
NumberOfRooms
Location
LetType
FloorPlan
LandlordID
RentedSold
Amount
Rent
RentID
StartDate
Duration
EndDate
DueDate
DepositAmount
PropertyID
Amount
RentDocument
RentDocumentID
Title
Url
RentID
RentPayment
RentPaymentID
Amount
Date
ForTheMonthOf
RentID
Sold
SoldID
Date
PropertyID
CustomerID
PriceSold
SoldDocument
SoldDocumentID
Title
Url
SoldID
FK_Property_Landlor
FK_Documents_Propert
FK_Rent_Propert
FK_Images_Propert
FK_Items_Propert
FK_Sold_Propert
FK_Sold_Custome
FK_SoldDocument_Sol
FK_RentPayment_Ren
FK_RentDocument_Ren
FK_CustomersRenting_Re
FK_CustomersRenting_Custom
FK_CustomerDocument_Custom
Login
LoginID
Username
Password
Name
ENTITY-RELATIONSHIP DIAGRAM
8
-
7/31/2019 Final Graduation Project
7/69
1.9DATA FLOW DIAGRAMS
Level 0
Level 1
9
-
7/31/2019 Final Graduation Project
8/69
1.10 DATA DICTIONARY
CUSTOMER TABLE
CUSROMER DOCUMENT TABLE
CUSTOMER RENTING TABLE
10
-
7/31/2019 Final Graduation Project
9/69
DOCUMENTS TABLE
IMAGE TABLE
ITEMS TABLE
11
-
7/31/2019 Final Graduation Project
10/69
LANDLORD TABLE
LOGIN TABLE
PROPERTY TABLE
12
-
7/31/2019 Final Graduation Project
11/69
RENT TABLE
RENT DOCUMENT TABLE
RENT PAYMENT TABLE
13
-
7/31/2019 Final Graduation Project
12/69
SOLD TABLE
SOLD DOCUMENTS TABLE
14
-
7/31/2019 Final Graduation Project
13/69
1.11 TOP DOWN DESIGN
15
-
7/31/2019 Final Graduation Project
14/69
1.12 OPERATING ENVIRONMENT
The following computer system requirements are needed to use the program
Hardware Requirement
Processor : All Pentium series
RAM : 64 Ram (Min.)
Software Requirement
Operating System : Window XP & All Windows
200x seriesSupport : VB 2010 Runtime
Crystal Report
Development Tools
Front End : Visual Basic 2010Back End : SQL Server 2008
Server Computer
Pentium 3 1GHz or equivalent
256Mb System Memory
2GB Free Hard Disc Space
User Computers
Minimum:
Pentium 2 400 or equivalent
128Mb System Memory100Mb Free Hard Disc Space
Windows XP/2000
CD-ROM Drive (for installation)
Keyboard and Mouse
16
-
7/31/2019 Final Graduation Project
15/69
1.13 PROJECT CONSTRAINTS AND LIMITATION
I encounter few constraints and limitation while developing this software. I would like to categorize it
into three areas name time, cost and project cope. Time was the biggest limitation because due to the
project scope I would have loved to get additional time in order to add more features and solution
tools to the software, nevertheless, I achieved the project objective. Another issue is cost, I did haveaccess to funds during the cause of developing the software but with my limited resources the project
objective was still achieved. The third constraint was meeting the scope/objective of the project and
ready software with good quality.
1.14 USERS SKILL LEVEL
The user must be experienced with Windows XP or Win7 and has knowledge in all the major office
applications and familiar with basic storage management techniques. The data stored in every
database resides on disk somewhere (unless it is stored on one of the new main memory DBMSproducts).the user must understand the storage system on hardware and software, including how it
interacts with the DBMS. Thus, when designing the user interface to be as similar as possible to thesewidely-used applications, ease of use and an intuitive front-end will be one of the key aims, so that theuser will have no problem entering data and getting the correct results as early as possible.
17
-
7/31/2019 Final Graduation Project
16/69
DESIGN
2.1 SYSTEM DEVELOPMENT METHODS
Visual Basic
Visual basic 2008 is built on the Windows Server System to take major advantage of the OSand which comes with a host of different servers which allows for building, deploying, managing and
maintaining Windows Based solutions. The Windows Server System is designed with performance as
priority and it provides scalability, reliability. Visual Studio 2008 provides developers with new waysto build smart clients. These new features, which both enhance application functionality and improve
developer productivity, include easier design integration, expanded deployment options, more
versatile logon and personalization services, and better data access and synchronization. Effectivesmart client development begins with good application design. Visual Studio makes integrating UI
designers into the development process easier by supporting common formats such as Extensible
Application Markup Language (XAML) and giving designers more direct control over the layout,controls, and data binding of an applications UI
With Visual Studio 2008, developers can easily leverage new platform technologies to deliver
more compelling applications to their customers. Visual Studio enables them to effortlesslyincorporate new Windows Presentation Foundation features into both existing Windows Forms
applications and new applications. They can also move their applications to the new Windows Vista
look and feeleasily with enhancements to the Microsoft Foundation Class Library (MFC) and VisualC++. Visual Studio 2008 also enables improved interoperability between native and managed code
The advantage of Visual Basic Studio includes
Rapid Application Development (RAD) Support. Powerful Windows-based Applications
Simplified Deployment
Powerful, Flexible, Simplified Data Access
Improved Coding
Direct Access to the OS Platform
Object-Oriented Constructs
Deliver Rich User Experiences
Collaborate with UI Designers
COM Interoperability
Sql server
A database server is a computer that stores the data and serves information to a user'scomputer when they request it. There are several types of database server systems, including
Microsoft's SQL 2008 servers. Many companies use Structured Query Language (SQL), Oracle,
Sybase, and MySQL servers to manage their company's collection of information. When it came tochoose backend for an enterprise level application I have so many options, like Oracle, Sybase,
18
-
7/31/2019 Final Graduation Project
17/69
MySQL, however I decided to choose Microsoft SQL Server 2008 as my database, and it has so manyfeatures which is ideal for visual basic based application.
Advantages of using sql server
The benefit of SQL servers is the ease of use and maintenance. Since many people are familiarwith Microsoft products, using the visual interface of SQL server is not as intimidating as other
programs.
Many SQL servers are intended for use with large data sets and to handle many users. When you are
dealing with multiple users and huge amounts of data, you need a system that is reliable (meaning itdoesn't crash much) and safe (meaning it is difficult for unauthorized access).
In the 2008 release of SQL, a new feature is Performance Studio. This collection of tools, writesSchlichting, can be used together to troubleshoot, monitor and tune your system to prevent problems
that lead to system crashes. Also, in SQL Server, you have tools such as Policy-Based Management
that allows database administrators to define policies for the data and to receive alerts when thepolicies are violated. You can also encrypt the entire database, including your data and log files,
making your server safer from attacks. There are External Key Management features that allow you to
support third-party certificates and encryption information in a separate section, so you can handle
credit-card processing and remain compliant with current laws for the credit card industry. Otherfuture includes:
Backup Encryption. Executed at backup time to prevent tampering.
External Key Management. Storing Keys separate from the data.
Auditing. Monitoring of data access.
Data Compression. Fact Table size reduction and improved performance.
Resource Governor. Restrict users or groups from consuming high levels or resources
SQL Server Integration Service. Improved multiprocessor support and faster lookups.
MERGE. TSQL command combining Insert, Update, and Delete.
SQL Server Analysis Server. Stack improvements, faster block computations.
SQL Server Reporting Server. Improved memory management and better rendering.
Microsoft Office 2007. Use OFFICE as an SSRS template. SSRS to WORD.
SQL 200 Support Ends. Mainstream Support for SQL 2000 is coming to an end.
19
-
7/31/2019 Final Graduation Project
18/69
2.2 SYSTEM SECURITY
System security is one of the main objectives of this system because data is the most important asset
of this system. I intend to achieve by allocating who access what conception e.g. employee will begiven login details which only give them access to what they are required to access. Also the
management will be given login detail which they can change anytime and these details grant them
access to the whole system.Any user without login details to this system will not be able to access the system. I believe
this method of password protection is the best because SQL database passwords are terribly difficult
to hack, storing the password elsewhere in a separate file, the Windows registry or even in a database
table compromises security.
2.3 SYSTEM TEST STRATEGY
The test strategy of the system has the following objectives:
Software security problems are becoming even more severe. I intend to perform security test in order
to address the security issue.
Performance test is also important; this testing will be carried out in order to observe if the software
can retrieve records from the database in less than a minute. Software performance is a major concern.
Usability test: Usability testing is the process by which the human-computer interactioncharacteristics of a system are measured, and weaknesses are identified for correction.
Ease of learning
Navigation
User satisfaction
General appearance
I will test the effectiveness of the security on the user interface:
Valid password gains access to the system
Invalid password rejected and system access denied
Database: Testing will be done on the database integrity to see if it working properly.
Form Test: few records will be adding to the system to see if the form is working properly and if it
connecting with the database
2.4 SYSTEM FLOW CHART
20
-
7/31/2019 Final Graduation Project
19/69
2.5 DESIGN OF USER INTERFACE
Many technological innovations rely upon User Interface Design to elevate their technical complexity
to a usable product. Technology alone may not win user acceptance and subsequent marketability. The
User Experience, or how the user experiences the end product, is the key to acceptance. And that is
where User Interface Design enters the design process. While product engineers focus on thetechnology, usability specialists focus on the user interface. For greatest efficiency and cost
effectiveness, this working relationship should be maintained from the start of a project to its rollout.
When applied to computer software, User Interface Design is also known as Human-ComputerInteraction or HCI. While people often think of Interface Design in terms of computers, it also refers
to many products where the user interacts with controls or displays.
Deign of input forms
Login form
Admin Form
21
Textbox for
user login
Button for user
login
Creating admin
password.
Displays admin
user names andpassword
Removing addeduser password
-
7/31/2019 Final Graduation Project
20/69
Main Menu Form
Property form
22
Property
details
Menu tool
bar
Search detail
icons
Display property
details with
pictures
Floor planpicture
Displays
room items
Displayproperty images
-
7/31/2019 Final Graduation Project
21/69
-
7/31/2019 Final Graduation Project
22/69
Property OP
Payment Form
24
Link to history
form which
display payment
info.
Clearing all the itemsfor new operation
button
Removing doc.button
Selecting date
Radio button for
selecting sale or rent
-
7/31/2019 Final Graduation Project
23/69
History form
More Info Table
25
Display rent
history
Display pictures
Of floor plan of
the property
Display items that
are in the property
Display the picture
views of the
property
Next and previous button to
display the pictures of the
property
-
7/31/2019 Final Graduation Project
24/69
IMPLEMENTATION AND TESTING
3.1 DETAILS OF SQL STATEMENTS
Customer Table
SELECT CustomerID, Title, FirstName, MiddleName, LastName, Nationality, Occupation,
Address, Telephone, EmailFROM Customer
WHERE (CustomerID IN
(SELECT CustomerIDFROM CustomersRenting
WHERE (RentID = @RentID)))
ORDER BY FirstName
Property Table
SELECT PropertyID, Address, Type, NumberOfRooms, Location, LetType, FloorPlan,LandlordID, RentedSold, Amount
FROM Property
SELECT Address, Amount, FloorPlan, LandlordID, LetType, Location, NumberOfRooms,
PropertyID, RentedSold, Type
FROM PropertyWHERE (Address = @Address)
SELECT PropertyID, Address, Type, NumberOfRooms, Location, LetType, FloorPlan,LandlordID, RentedSold, AmountFROM Property
WHERE (PropertyID = @PropertyID)
UPDATE Property
SET RentedSold = @RentedSold
WHERE (PropertyID = @PropertyID)
Sold Table
SELECT SoldID, Date, PropertyID, CustomerID, PriceSoldFROM Sold
26
-
7/31/2019 Final Graduation Project
25/69
Rent Table
SELECT RentID, StartDate, Duration, EndDate, DueDate, DepositAmount, PropertyID, Amount
FROM Rent
SELECT RentID, StartDate, Duration, EndDate, DueDate, DepositAmount, PropertyID, Amount
FROM Rent
WHERE (PropertyID = @PropertyID)ORDER BY RentID DESC
SELECT RentID, StartDate, Duration, EndDate, DueDate, DepositAmount, PropertyID, Amount
FROM RentWHERE (RentID = @RentID)
Rent Payment Table
SELECT RentPaymentID, Amount, Date, ForTheMonthOf, RentIDFROM RentPayment
SELECT RentPaymentID, Amount, Date, ForTheMonthOf, RentID
FROM RentPayment
WHERE (RentID = @RentID)ORDER BY RentPaymentID DESC
Rent Document Table
SELECT RentDocumentID, Title, Url, RentID
FROM RentDocument
Customer Renting Table
SELECT CustomersRentingID, CustomerID, RentIDFROM CustomersRenting
Landlord Table
SELECT LandlordID, Title, FirstName, MiddleName, LastName, Address, Telephone, Email,
Nationality
FROM LandlordWHERE (LandlordID = @LandlordID)
ORDER BY FirstName
Items Table
SELECT ItemID, Name, Quantity, PropertyID
FROM ItemsWHERE (PropertyID = @PropertyID)
27
-
7/31/2019 Final Graduation Project
26/69
3.3 DETAILS OF VARIABLES
Real estate management module
This module caters for the management of E-Property. Following is a brief description of thefunctionalities of this module.
Registering landlords
This feature allows the user to register the landlords for those managing other peoples properties.
This is done only once at the beginning of system adoption or when a new landlord comes. These
details are then used to facilitate other transactions
Registering tenants
At the center of E-Property management is the tenant. Thats this system captures as much details
about the tenants occupying agency houses as possible. These details are: name, ID number, postaladdress number, telephone number, mobile numbers (two different numbers), and email address.
28
-
7/31/2019 Final Graduation Project
27/69
3.4 SYSTEM TESTING
Test No Test Test result
1 Testing to see if the program start correctly and thesecurity box appear ready for input
Work correctly. See figure 1
2 Testing for invalid name and password Appears correctly. See figure 2
3 Testing the main menu appearance after login See figure 3
4 Test for main menu button functionality (if the
buttons are opening the right forms.
Right form was open. See figure 4
5 Test for adding details unto the database using
customer table.
Responds was good. See figure 5
6 Testing for constraint to check if column allowed
null
Record was successfully added See
figure 6
7 Testing for operation to see if the datas are
entered correctly and saved.
See figure 7
8 Test on more info to see more information on a
particular property on the main menu
See figure 8
9 Test on Rent Payment table to check if it save and
displays payment history
See figure 9
10 Test on search option on all the forms to see if the
result is accurate
Accurate result. See figure 10, 11
11 Test for Admin adding, deleting and changing of
password.
See figure 12
29
-
7/31/2019 Final Graduation Project
28/69
Evidence of testing
Test Figure 1: The program starts up successfully and the logon screen is displayedAs you can see, the logon screen is displayed and waiting for input
Test Figure 2: Password invalid, when a wrong name or password is incorrect a message willappears warning that wrong password.
30
-
7/31/2019 Final Graduation Project
29/69
Test Figure 3: If a login detail is correct then program will display the main menu.
Test Figure 4: Checking functionality of the program, this test show that the customer button isworking properly.
31
-
7/31/2019 Final Graduation Project
30/69
Test Figure 5: This test show performing adding customer detail into the database.
Test Figure 6: Screen shot showing test on constrain. If the necessary column are not filled withdetails the program constraint indicates that column does not allows null.
32
-
7/31/2019 Final Graduation Project
31/69
Test Figure 7: Test on property operation which show rent or sale operation. When the rent isentered it shows down on the task bar that the rented property has been saved.
Test Figure 8: Test on more info to see more information on a particular property on the mainmenu when searching for property, it display all the necessary information of the property the groundplan and view of the property.
33
-
7/31/2019 Final Graduation Project
32/69
Test Figure 9: Test on Rent Payment table to check if it save and displays payment history of thetenant.
Test Figure 10: Test on search, which displays all the property available in the database .
34
-
7/31/2019 Final Graduation Project
33/69
Test Figure 11: Test on searching base on the option chosen from the search menu.
Test Figure 12: Test on admin table which show adding and deleting of admin user name andpassword.
35
-
7/31/2019 Final Graduation Project
34/69
Data Set
36
-
7/31/2019 Final Graduation Project
35/69
3.5SOURCE CODE LISTING
Admin Source code
Public Class AdminPrivate Sub LoginBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles LoginBindingNavigatorSaveItem.Click
Me.Validate()
Me.LoginBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.RoyalEstateDatabaseDataSet)End Sub
Private Sub Admin_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Load 'TODO: This line of code loads data into the 'RoyalEstateDatabaseDataSet.Login' table. You can
move, or remove it, as needed.
Me.LoginTableAdapter.Fill(Me.RoyalEstateDatabaseDataSet.Login)End Sub
Private Sub SaveButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles SaveButton.Click ' this allows you to save the new user and password details.
Try
LoginBindingNavigatorSaveItem.PerformClick()
Catch ex As ExceptionToolStripStatusLabel1.Text = ex.Message
End Try
End Sub
Private Sub NewButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles NewButton.Click
'this allow you to add new user.Try
BindingNavigatorAddNewItem.PerformClick()
Catch ex As Exception
ToolStripStatusLabel1.Text = ex.MessageEnd Try
End Sub
Private Sub RemoveButton_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles RemoveButton.Click
'the removeButton allow you to remove the new user details added above.
TryBindingNavigatorDeleteItem.PerformClick()
Catch ex As Exception
ToolStripStatusLabel1.Text = ex.MessageEnd Try
End Sub
End Class
37
-
7/31/2019 Final Graduation Project
36/69
Customer Source Table
Public Class CustomerPrivate Sub CustomerBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles CustomerBindingNavigatorSaveItem.Click
Me.Validate()
Me.CustomerBindingSource.EndEdit()Me.TableAdapterManager.UpdateAll(Me.RoyalEstateDatabaseDataSet)
End Sub
Private Sub Customer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Load 'TODO: This line of code loads data into the 'RoyalEstateDatabaseDataSet.Customer' table. You
can move, or remove it, as needed.
Me.CustomerTableAdapter.Fill(Me.RoyalEstateDatabaseDataSet.Customer)
TryBindingNavigatorAddNewItem.PerformClick()
NationalityComboBox.SelectedIndex = -1TitleComboBox.SelectedIndex = -1
Catch ex As Exception
End Try
End Sub
Private Sub SaveButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles SaveButton.Click
Dim docAdapter AsRoyalEstateDatabaseDataSetTableAdapters.CustomerDocumentTableAdapter= New
RoyalEstateDatabaseDataSetTableAdapters.CustomerDocumentTableAdapter
TryCustomerBindingNavigatorSaveItem.PerformClick()
For Each xRow As DataGridViewRow In DocDataGridView.Rows
TrydocAdapter.Insert(xRow.Cells(0).Value, xRow.Cells(1).Value,
CustomerIDTextBox.Text)
Catch ex As Exception MessageBox.Show("could not save document " & xRow.Cells(0).Value & " " &
ex.ToString, "Royal Estate", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
Next
CustomerToolStripStatusLabel.Text = "Customer saved..."Catch ex As Exception
End Try
End Sub
Private Sub NewCustomerButton_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles NewCustomerButton.Click
38
-
7/31/2019 Final Graduation Project
37/69
'this code allow yout o select and also clear the nationality box.Try
BindingNavigatorAddNewItem.PerformClick()
NationalityComboBox.SelectedIndex = -1TitleComboBox.SelectedIndex = -1
CustomerToolStripStatusLabel.Text = ""
DocDataGridView.Rows.Clear()Catch ex As Exception
End Try
End Sub
Private Sub DocBrowseButton_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles DocBrowseButton.Click
If DocTitleTextBox.Text "" And LastNameTextBox.Text "" AndCustomerIDTextBox.Text "" Then
DocOpenFileDialog.ShowDialog()
TryCustomerBindingNavigatorSaveItem.PerformClick()
Dim desPath As String = Application.StartupPath & "\pics\CustomerDoc\" &LastNameTextBox.Text & " " & CustomerIDTextBox.Text & " " & DocTitleTextBox.Text & ".png"
Dim sourcePath As String = DocOpenFileDialog.FileName
My.Computer.FileSystem.CopyFile(sourcePath, desPath, True)
DocScanTextBox.Text = desPath
Catch ex As Exception MessageBox.Show("enter document title and customer details completely first...", "Royal
Estate", MessageBoxButtons.OK, MessageBoxIcon.Error)
End TryElse
MessageBox.Show("enter document title and customer details completely first...", "Royal
Estate", MessageBoxButtons.OK, MessageBoxIcon.Error)End If
End Sub
Private Sub DocAddButton_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles DocAddButton.Click
DocDataGridView.Rows.Add(DocTitleTextBox.Text, DocScanTextBox.Text)DocTitleTextBox.Text = ""
DocScanTextBox.Text = ""
End Sub
Private Sub DocRemoveButton_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles DocRemoveButton.Click
TryMy.Computer.FileSystem.DeleteFile(DocDataGridView.CurrentRow.Cells(1).Value)
DocDataGridView.Rows.Remove(DocDataGridView.CurrentRow)
Catch ex As Exception
MessageBox.Show("Could not delete the row for some reason...", "Royal Estate",MessageBoxButtons.OK, MessageBoxIcon.Error)
39
-
7/31/2019 Final Graduation Project
38/69
End TryEnd Sub
End Class
Login Table Source codes
Public Class Login
Private Sub LoginButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles LoginButton.Click
Dim loginTable As RoyalEstateDatabaseDataSet.LoginDataTable = NewRoyalEstateDatabaseDataSet.LoginDataTable
Dim loginAdapter As RoyalEstateDatabaseDataSetTableAdapters.LoginTableAdapter= New
RoyalEstateDatabaseDataSetTableAdapters.LoginTableAdapterloginAdapter.Fill(loginTable)
Dim pass As Boolean = False
For Each x As DataRow In loginTable.Rows
'this code allow you to enter password which is set at the admin table. when u enter wrongpassword the hidden lebel show you enter wrong password.
If UsernameTextBox.Text = x.Item(1) ThenIf PasswordTextBox.Text = x.Item(2) Then
Main.Enabled = True
pass = TrueExit For
End If
End If
NextIf pass = True Then
Me.Close()
ElseStatusLabel.Text = "Wrong username or password"
End If
End SubPrivate Sub UsernameTextBox_TextChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles UsernameTextBox.TextChanged
StatusLabel.Text = ""End Sub
Private Sub PasswordTextBox_TextChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles PasswordTextBox.TextChanged
StatusLabel.Text = ""End Sub
Private Sub Login_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load
End Sub
End Class
40
-
7/31/2019 Final Graduation Project
39/69
Main table Sources Codes
Public Class Main
'allow you the enter new landlord.Private Sub LandlordToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles LandlordToolStripMenuItem.Click
NewLandlord.ShowDialog()End Sub
'allow you to enter property detals.
Private Sub PropertyToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles PropertyToolStripMenuItem.Click
Properties.ShowDialog()
End Sub
'allows you to enter customer details.
Private Sub CustomerToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles CustomerToolStripMenuItem.Click
Customer.ShowDialog()End Sub
'deplays and allow you to choose either rent or sale and enter details.
Private Sub SalesRentToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles SalesRentToolStripMenuItem.Click
PropertyOps.ShowDialog()
End Sub 'allows yout o enter rentpayment detail
Private Sub RentPaymentToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles RentPaymentToolStripMenuItem.Click RentPayment.ShowDialog()
End Sub
Private Sub PropertyBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles PropertyBindingNavigatorSaveItem.ClickMe.Validate()
Me.PropertyBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.RoyalEstateDatabaseDataSet)
End Sub
Private Sub Main_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load
'TODO: This line of code loads data into the 'RoyalEstateDatabaseDataSet._Property' table. You
can move, or remove it, as needed.Me.PropertyTableAdapter.Fill(Me.RoyalEstateDatabaseDataSet._Property)
LocationComboBox.SelectedIndex = 0
TypeComboBox.SelectedIndex = 0NumberComboBox.SelectedIndex = 0
End Sub
41
-
7/31/2019 Final Graduation Project
40/69
'The DataRepeater "repeats" a group of related controls by creating multiple instances in a scrollingview. This enables users to view several records at the same time
Private Sub DataRepeater1_DrawItem(ByVal sender As System.Object, ByVal e As
Microsoft.VisualBasic.PowerPacks.DataRepeaterItemEventArgs) Handles DataRepeater1.DrawItemDim picTable As RoyalEstateDatabaseDataSet.ImagesDataTable = New
RoyalEstateDatabaseDataSet.ImagesDataTable
Dim picAdapter As RoyalEstateDatabaseDataSetTableAdapters.ImagesTableAdapter= NewRoyalEstateDatabaseDataSetTableAdapters.ImagesTableAdapter
Dim lbl As Label
lbl = CType(e.DataRepeaterItem.Controls(PropertyIDLabel1.Name), Label)CType(e.DataRepeaterItem.Controls(LinkLabel1.Name), LinkLabel).Tag = lbl.Text
Try
picAdapter.FillByPropertyID(picTable, lbl.Text)
Catch ex As ExceptionEnd Try
If picTable.Rows.Count > 0 Then
CType(e.DataRepeaterItem.Controls(FloorPlanPictureBox.Name), PictureBox).ImageLocation= picTable.Rows(0).Item(2)
End IfEnd Sub
' the filter help filter only the data needed.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles SearchButton.Click
Dim filter As String = ""If RentRadioButton.Checked Then
filter = "LetType = 'For Rent'"
Elsefilter = "LetType = 'For Sale'"
End If
If LocationComboBox.Text "All" Thenfilter += " AND Location = '" & LocationComboBox.Text & "'"
End If
If TypeComboBox.Text "All" Thenfilter += " AND Type = '" & TypeComboBox.Text & "'"
End If
If NumberComboBox.Text "All" Then
filter += " AND NumberOfRooms = '" & NumberComboBox.Text & "'"
End If
If CheckBox1.Checked Thenfilter += " AND RentedSold = 'Yes'"
Elsefilter += " AND RentedSold = 'No'"
End If
PropertyBindingSource.Filter = filter
End Sub
42
-
7/31/2019 Final Graduation Project
41/69
Private Sub ShowAllLinkLabel_LinkClicked(ByVal sender As System.Object, ByVal e AsSystem.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles ShowAllLinkLabel.LinkClicked
PropertyBindingSource.Filter = ""
End SubPrivate Sub Main_Shown(ByVal sender As Object, ByVal e As System.EventArgs) Handles
Me.Shown
Login.ShowDialog()End Sub
Private Sub AdministratorsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles AdministratorsToolStripMenuItem.Click Admin.ShowDialog()
End Sub
Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As
System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked Passage.propertyid = CType(DataRepeater1.CurrentItem.Controls(LinkLabel1.Name),
LinkLabel).Tag
MoreInfo.ShowDialog()End Sub
Private Sub AmountLabel1_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles AmountLabel1.Click
End Sub
End Class
More Info Source code Table
Public Class MoreInfoDim imagecount As Integer = 0
Dim imageTable As RoyalEstateDatabaseDataSet.ImagesDataTable = New
RoyalEstateDatabaseDataSet.ImagesDataTableDim imageAdapter As RoyalEstateDatabaseDataSetTableAdapters.ImagesTableAdapter= New
RoyalEstateDatabaseDataSetTableAdapters.ImagesTableAdapter
Private Sub MoreInfo_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles MyBase.Load
'TODO: This line of code loads data into the 'RoyalEstateDatabaseDataSet._Property' table. You
can move, or remove it, as needed.imagecount = 0
Label2.Text = Passage.propertyid
Me.PropertyTableAdapter.FillByPropertyID(Me.RoyalEstateDatabaseDataSet._Property,
Label2.Text)
Dim itemTable As RoyalEstateDatabaseDataSet.ItemsDataTable = New
RoyalEstateDatabaseDataSet.ItemsDataTableDim itemAdapter As RoyalEstateDatabaseDataSetTableAdapters.ItemsTableAdapter= New
RoyalEstateDatabaseDataSetTableAdapters.ItemsTableAdapter
imageAdapter.FillByPropertyID(imageTable, Passage.propertyid)PreviousButton.Enabled = False
If imageTable.Rows.Count
-
7/31/2019 Final Graduation Project
42/69
ImageCountLabel.Text = "No Images"Else
PictureBox1.ImageLocation = imageTable.Rows(imagecount).Item(2)
ImageCountLabel.Text = "1 of " & imageTable.Rows.CountImageTitleLabel.Text = imageTable.Rows(imagecount).Item(1)
End If
If imagecount >= imageTable.Rows.Count - 1 ThenNextButton.Enabled = False
Else
NextButton.Enabled = TrueEnd If
'Getting the items of the property
itemAdapter.FillByPropertyID(itemTable, Passage.propertyid)
FlowLayoutPanel1.Controls.Clear()For Each x As DataRow In itemTable.Rows
Dim Lablex As New Label
Lablex.ForeColor = Color.BlackLablex.Text = x.Item(1) & " (" & x.Item(2) & ")"
FlowLayoutPanel1.Controls.Add(Lablex)Next
End Sub
Private Sub NextButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles NextButton.Click
imagecount = imagecount + 1PictureBox1.ImageLocation = imageTable.Rows(imagecount).Item(2)
ImageCountLabel.Text = imagecount + 1 & " of " & imageTable.Rows.Count
ImageTitleLabel.Text = imageTable.Rows(imagecount).Item(1)
If imagecount >= imageTable.Rows.Count - 1 Then
NextButton.Enabled = FalseEnd If
If imagecount > 0 Then
PreviousButton.Enabled = True
End IfEnd Sub
Private Sub PreviousButton_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles PreviousButton.Clickimagecount = imagecount - 1
PictureBox1.ImageLocation = imageTable.Rows(imagecount).Item(2)
ImageCountLabel.Text = imagecount + 1 & " of " & imageTable.Rows.Count
ImageTitleLabel.Text = imageTable.Rows(imagecount).Item(1)
If imagecount < imageTable.Rows.Count - 1 ThenNextButton.Enabled = True
End If
If imagecount = 0 Then
PreviousButton.Enabled = FalseEnd If
44
-
7/31/2019 Final Graduation Project
43/69
End SubPrivate Sub MoreInfo_Shown(ByVal sender As Object, ByVal e As System.EventArgs) Handles
Me.Shown
Dim landlordTable As RoyalEstateDatabaseDataSet.LandlordDataTable = NewRoyalEstateDatabaseDataSet.LandlordDataTable
Dim landlordAdapter As RoyalEstateDatabaseDataSetTableAdapters.LandlordTableAdapter=
New RoyalEstateDatabaseDataSetTableAdapters.LandlordTableAdapterTry
landlordAdapter.FillByLandlordID(landlordTable, LandlordIDLabel1.Text)
LandLLabel.Text = landlordTable.Rows(0).Item(1) & " " & landlordTable.Rows(0).Item(2) &" " & landlordTable.Rows(0).Item(3) & " " & landlordTable.Rows(0).Item(4)
Catch ex As Exception
End Try
End SubEnd Class
New Landlord Source Codes
Public ClassNewLandlord
Private Sub LandlordBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal eAs System.EventArgs) Handles LandlordBindingNavigatorSaveItem.Click
Me.Validate()
Me.LandlordBindingSource.EndEdit()Me.TableAdapterManager.UpdateAll(Me.RoyalEstateDatabaseDataSet)
End Sub
Private Sub NewLandlord_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles MyBase.Load
'TODO: This line of code loads data into the 'RoyalEstateDatabaseDataSet.Landlord' table. You
can move, or remove it, as needed.Me.LandlordTableAdapter.Fill(Me.RoyalEstateDatabaseDataSet.Landlord)NewButton.PerformClick()
End Sub
' adding new itemsPrivate Sub NewButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles NewButton.Click
TitleComboBox.SelectedIndex = -1NationalityComboBox.SelectedIndex = -1
BindingNavigatorAddNewItem.PerformClick()
End Sub
'saving the items addedPrivate Sub SaveButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles SaveButton.Click
LandlordBindingNavigatorSaveItem.PerformClick()End Sub
'delating the items added
Private Sub DeleteButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles DeleteButton.Click
BindingNavigatorDeleteItem.PerformClick()
45
-
7/31/2019 Final Graduation Project
44/69
End SubEnd Class
Property Source Codes
Public Class Properties
Protected listxp As ListControlPrivate Sub PropertyBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles PropertyBindingNavigatorSaveItem.Click
Me.Validate()Me.PropertyBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.RoyalEstateDatabaseDataSet)
End Sub
'refreshed the table adaptor for the new property saved on the main form.
PrivateSub Properties_FormClosing(ByVal senderAsObject, ByVal e As
System.Windows.Forms.FormClosingEventArgs) HandlesMe.FormClosing
Main.PropertyTableAdapter.Fill(Main.RoyalEstateDatabaseDataSet._Property) EndSub
Private Sub Properties_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Load
'TODO: This line of code loads data into the 'RoyalEstateDatabaseDataSet.Documents' table.You can move, or remove it, as needed.
Me.DocumentsTableAdapter.Fill(Me.RoyalEstateDatabaseDataSet.Documents)
'TODO: This line of code loads data into the 'RoyalEstateDatabaseDataSet._Property' table. You
can move, or remove it, as needed.Me.PropertyTableAdapter.Fill(Me.RoyalEstateDatabaseDataSet._Property)
Dim landlordTable As RoyalEstateDatabaseDataSet.LandlordDataTable = New
RoyalEstateDatabaseDataSet.LandlordDataTableDim landlordAdapter As RoyalEstateDatabaseDataSetTableAdapters.LandlordTableAdapter=
New RoyalEstateDatabaseDataSetTableAdapters.LandlordTableAdapter
landlordAdapter.Fill(landlordTable)Try
LandlordComboBox.Items.Clear()
Catch ex As Exception
End Try ' inserting the new datas in tables
Dim ArrayListx As New ArrayList
For Each x As DataRow In landlordTable.RowsDim landlordx As New Landlord(x.Item(2) & " " & x.Item(4), x.Item(0))
ArrayListx.Add(landlordx)
NextLandlordComboBox.DataSource = ArrayListx
LandlordComboBox.DisplayMember = "Name"
LandlordComboBox.ValueMember = "Id"
LandlordComboBox.SelectedValue = "Id"Try
46
-
7/31/2019 Final Graduation Project
45/69
BindingNavigatorAddNewItem.PerformClick()Catch ex As Exception
MessageBox.Show("Please click the new property button", "Royal Estate",
MessageBoxButtons.OK, MessageBoxIcon.Information)End Try
End Sub
' selecting landlords this does not allow null.Private Sub LandlordComboBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles LandlordComboBox.SelectedIndexChanged
If LandlordComboBox.SelectedIndex = -1 ThenLandlordIDTextBox.Text = ""
Else
Try
LandlordIDTextBox.Text = LandlordComboBox.SelectedValueCatch ex As Exception
End Try
End IfEnd Sub
'getting pictures from the filesPrivate Sub FloorPlanBrowseButton_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles FloorPlanBrowseButton.Click
If AddressTextBox.Text = "" Then
MessageBox.Show("Enter property address first", "Royal Estate", MessageBoxButtons.OK,
MessageBoxIcon.Error)Else
DocOpenFileDialog.ShowDialog()
Dim desPath As String = Application.StartupPath & "\pics\FloorPlan\" &AddressTextBox.Text & ".png"
Dim sourcePath As String = DocOpenFileDialog.FileName
My.Computer.FileSystem.CopyFile(sourcePath, desPath, True)FloorPlanPictureBox.ImageLocation = desPath
FloorPlanTextBox.Text = desPath
End If
End Sub 'getting pictures from files
Private Sub DocBrowseButton_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles DocBrowseButton.ClickIf DocTitleTextBox.Text = "" Then
MessageBox.Show("Enter document title", "Royal Estate", MessageBoxButtons.OK,
MessageBoxIcon.Error)
ElseDocOpenFileDialog.ShowDialog()
Dim desPath As String = Application.StartupPath & "\pics\PropertyDoc\" &AddressTextBox.Text & " " & DocTitleTextBox.Text & ".png"
Dim sourcePath As String = DocOpenFileDialog.FileName
My.Computer.FileSystem.CopyFile(sourcePath, desPath, True)
DocScanTextBox.Text = desPathEnd If
47
-
7/31/2019 Final Graduation Project
46/69
End Sub 'lebeling and adding picture
Private Sub DocAddButton_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles DocAddButton.ClickIf DocTitleTextBox.Text "" And DocScanTextBox.Text "" Then
Try
DocDataGridView.Rows.Add(DocTitleTextBox.Text, DocScanTextBox.Text)DocTitleTextBox.Text = ""
DocScanTextBox.Text = ""
Catch ex As Exception MessageBox.Show("error adding document...", "Royal Estate", MessageBoxButtons.OK,
MessageBoxIcon.Error)
End Try
Else MessageBox.Show("Enter the document title and the scan path", "Royal Estate",
MessageBoxButtons.OK, MessageBoxIcon.Error)
End IfEnd Sub
'removing picture filePrivate Sub DocRemoveButton_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles DocRemoveButton.Click
Try
My.Computer.FileSystem.DeleteFile(DocDataGridView.CurrentRow.Cells(1).Value)
DocDataGridView.Rows.Remove(DocDataGridView.CurrentRow)Catch ex As Exception
MessageBox.Show("Could not delete the row for some reason...", "Royal Estate",
MessageBoxButtons.OK, MessageBoxIcon.Error)End Try
End Sub
'adding itemsPrivate Sub ItemAddButton_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles ItemAddButton.Click
If ItemTextBox.Text "" And QtyComboBox.Text "" Then
TryItemDataGridView.Rows.Add(ItemTextBox.Text, QtyComboBox.Text)
ItemTextBox.Text = ""
QtyComboBox.SelectedIndex = -1Catch ex As Exception
MessageBox.Show("error adding item...", "Royal Estate", MessageBoxButtons.OK,
MessageBoxIcon.Error)
End TryElse
MessageBox.Show("Enter the item and its quantity...", "Royal Estate",MessageBoxButtons.OK, MessageBoxIcon.Error)
End If
End Sub
'removing items added
48
-
7/31/2019 Final Graduation Project
47/69
Private Sub ItemRemoveButton_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles ItemRemoveButton.Click
Try
ItemDataGridView.Rows.Remove(ItemDataGridView.CurrentRow)Catch ex As Exception
MessageBox.Show("Could not delete the row for some reason...", "Royal Estate",
MessageBoxButtons.OK, MessageBoxIcon.Error)End Try
End Sub
Private Sub SaveAllButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles SaveAllButton.Click
Try
PropertyBindingNavigatorSaveItem.PerformClick()
Dim propertyTable As RoyalEstateDatabaseDataSet.PropertyDataTable = NewRoyalEstateDatabaseDataSet.PropertyDataTable
Dim propertyAdapter As RoyalEstateDatabaseDataSetTableAdapters.PropertyTableAdapter=
New RoyalEstateDatabaseDataSetTableAdapters.PropertyTableAdapterpropertyAdapter.FillByAddress(propertyTable, AddressTextBox.Text)
Dim propertyIndex As Integer = propertyTable.Rows(0).Item(0) 'Dim DocTable As RoyalEstateDatabaseDataSet.DocumentsDataTable = NewRoyalEstateDatabaseDataSet.DocumentsDataTable
Dim DocAdapter As RoyalEstateDatabaseDataSetTableAdapters.DocumentsTableAdapter=
New RoyalEstateDatabaseDataSetTableAdapters.DocumentsTableAdapter
Dim ItemAdapter As RoyalEstateDatabaseDataSetTableAdapters.ItemsTableAdapter= NewRoyalEstateDatabaseDataSetTableAdapters.ItemsTableAdapter
Dim ImageAdapter As RoyalEstateDatabaseDataSetTableAdapters.ImagesTableAdapter=
New RoyalEstateDatabaseDataSetTableAdapters.ImagesTableAdapterFor Each x As DataGridViewRow In DocDataGridView.Rows
Try
DocAdapter.Insert(x.Cells(0).Value, x.Cells(1).Value, propertyIndex)Catch ex As Exception
MessageBox.Show("could not save property document " & x.Cells(0).Value & " .... " &
ex.ToString, "Royal Estate", MessageBoxButtons.OK, MessageBoxIcon.Error)
Exit ForEnd Try
Next
For Each s As DataGridViewRow In ItemDataGridView.RowsTry
ItemAdapter.Insert(s.Cells(0).Value, s.Cells(1).Value, propertyIndex)
Catch ex As Exception
MessageBox.Show("could not save property item " & s.Cells(0).Value & " .... " &ex.ToString, "Royal Estate", MessageBoxButtons.OK, MessageBoxIcon.Error)
Exit ForEnd Try
Next
For Each imagex As ListViewItem In ImageListView.Items
Dim urlpath As String = Application.StartupPath & "\pics\PropertyImage\" &AddressTextBox.Text & " " & imagex.ImageKey & ".png"
49
-
7/31/2019 Final Graduation Project
48/69
Dim title As String = imagex.Tag.ToStringTry
ImageAdapter.Insert(title, urlpath, propertyIndex)
Catch ex As Exception MessageBox.Show("could not save property image " & imagex.ImageKey & " .... " & ex.ToString,
"Royal Estate", MessageBoxButtons.OK, MessageBoxIcon.Error)
End TryNext
PropertyToolStripStatusLabel.Text = "Property details saved..."
Catch ex As ExceptionPropertyToolStripStatusLabel.Text = "SAVE ABORTED " & ex.Message
End Try
End Sub
'clearing the whole table.Private Sub NewPropertyButton_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles NewPropertyButton.Click
TryBindingNavigatorAddNewItem.PerformClick()
ImageListView.Items.Clear()DocDataGridView.Rows.Clear()ItemDataGridView.Rows.Clear()
ImageUrlTextBox.Text = ""
ImageTextBox.Text = ""
ItemTextBox.Text = ""RentedSoldComboBox.SelectedIndex = -1
QtyComboBox.SelectedIndex = -1
DocTitleTextBox.Text = ""DocScanTextBox.Text = ""
LandlordComboBox.SelectedIndex = -1
LetTypeComboBox.SelectedIndex = -1NumberOfRoomsComboBox.SelectedIndex = -1
LocationComboBox.SelectedIndex = -1
TypeComboBox.SelectedIndex = -1
FloorPlanTextBox.Text = ""FloorPlanPictureBox.ImageLocation = Nothing
PropertyToolStripStatusLabel.Text = ""
Catch ex As Exception MessageBox.Show("Save current records first", "Royal Estate", MessageBoxButtons.OK,
MessageBoxIcon.Error)
End Try
End SubPrivate Sub ImageBrowseButton_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles ImageBrowseButton.ClickIf AddressTextBox.Text "" And ImageTextBox.Text "" Then
DocOpenFileDialog.ShowDialog()
Dim desPath As String = Application.StartupPath & "\pics\PropertyImage\" &
AddressTextBox.Text & " " & ImageTextBox.Text & ".png"Dim sourcePath As String = DocOpenFileDialog.FileName
50
-
7/31/2019 Final Graduation Project
49/69
TryMy.Computer.FileSystem.CopyFile(sourcePath, desPath, True)
ImageUrlTextBox.Text = desPath
Catch ex As Exception
End Try
ImageListView.BeginUpdate()PropertyImageList.Images.Add(ImageTextBox.Text, Image.FromFile(desPath))
Dim li As New ListViewItem(AddressTextBox.Text & " " & ImageTextBox.Text,
ImageTextBox.Text)li.Tag = ImageTextBox.Text
ImageListView.Items.Add(li)
ImageListView.EndUpdate()
Else MessageBox.Show("enter the property address and image title", "Royal Estate",
MessageBoxButtons.OK, MessageBoxIcon.Error)
End IfEnd Sub
Private Sub ImageRemoveButton_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles ImageRemoveButton.Click
ImageListView.BeginUpdate()
For Each i As ListViewItem In ImageListView.SelectedItems
Dim desPath As String = Application.StartupPath & "\pics\PropertyImage\" &
AddressTextBox.Text & " " & i.ImageKey & ".png"PropertyImageList.Images.RemoveByKey(i.ImageKey)
i.Remove()
'My.Computer.FileSystem.DeleteFile(desPath,)Next
ImageListView.EndUpdate()
End SubPrivate Sub AmountTextBox_TextChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles AmountTextBox.TextChanged
End Sub
Private Sub AmountLabel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)End Sub
End Class
Public Class LandlordPrivate mName As String
Private mId As Integer
Public Sub New(ByVal LandlordName As String, ByVal LandlordId As Integer)
Me.mName = LandlordNameMe.mId = LandlordId
End SubPublic ReadOnly Property Name() As String
Get
Return mName
End GetEnd Property
51
-
7/31/2019 Final Graduation Project
50/69
Public ReadOnly Property Id() As StringGet
Return mId
End GetEnd Property
End Class
Property OP Source Codes
Public Class PropertyOpsDim ArrayListy As New ArrayList
Private Sub PropertyOps_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Load
'TODO: This line of code loads data into the 'RoyalEstateDatabaseDataSet.Rent' table. You canmove, or remove it, as needed.
Me.RentTableAdapter.Fill(Me.RoyalEstateDatabaseDataSet.Rent)
'TODO: This line of code loads data into the 'RoyalEstateDatabaseDataSet.Customer' table. Youcan move, or remove it, as needed.
Me.CustomerTableAdapter.Fill(Me.RoyalEstateDatabaseDataSet.Customer)
'TODO: This line of code loads data into the 'RoyalEstateDatabaseDataSet.Sold' table. You canmove, or remove it, as needed.
Me.SoldTableAdapter.Fill(Me.RoyalEstateDatabaseDataSet.Sold)
'TODO: This line of code loads data into the 'RoyalEstateDatabaseDataSet._Property' table. Youcan move, or remove it, as needed.
Me.PropertyTableAdapter.Fill(Me.RoyalEstateDatabaseDataSet._Property)
Try
BindingNavigatorAddNewItem.PerformClick()BindingNavigatorAddNewItem1.PerformClick()
Catch ex As Exception
End TryPropertyComboBox.SelectedIndex = -1
Dim customerTable As RoyalEstateDatabaseDataSet.CustomerDataTable = New
RoyalEstateDatabaseDataSet.CustomerDataTableDim customerAdapter As RoyalEstateDatabaseDataSetTableAdapters.CustomerTableAdapter=
New RoyalEstateDatabaseDataSetTableAdapters.CustomerTableAdapter
customerAdapter.Fill(customerTable)
TrySalesCustomerComboBox.Items.Clear()
RentCustomerComboBox.Items.Clear()
Catch ex As Exception
End Try 'putting items in table
Dim ArrayListx As New ArrayListFor Each x As DataRow In customerTable.Rows
Dim customerx As New Customers(x.Item(2) & " " & x.Item(4), x.Item(0))
ArrayListx.Add(customerx)
NextSalesCustomerComboBox.DataSource = ArrayListx
52
-
7/31/2019 Final Graduation Project
51/69
SalesCustomerComboBox.DisplayMember = "Name"SalesCustomerComboBox.ValueMember = "Id"
SalesCustomerComboBox.SelectedValue = "Id"
RentCustomerComboBox.DataSource = ArrayListxRentCustomerComboBox.DisplayMember = "Name"
RentCustomerComboBox.ValueMember = "Id"
RentCustomerComboBox.SelectedValue = "Id"End Sub
' selecting sale or rent
Private Sub SaleRadioButton_CheckedChanged(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles SaleRadioButton.CheckedChanged
If SaleRadioButton.Checked = True Then
SalesGroupBox.Enabled = True
RentGroupBox.Enabled = FalseElse
SalesGroupBox.Enabled = False
RentGroupBox.Enabled = TrueEnd If
End SubPrivate Sub PropertyComboBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles PropertyComboBox.SelectedIndexChanged
If PropertyComboBox.SelectedIndex = -1 Then
PropertyIDTextBox.Text = ""
PropertyIDTextBox1.Text = ""Else
PropertyIDTextBox.Text = PropertyComboBox.SelectedValue
PropertyIDTextBox1.Text = PropertyComboBox.SelectedValueEnd If
End Sub
Private Sub SalesCustomerComboBox_SelectedIndexChanged(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles SalesCustomerComboBox.SelectedIndexChanged
If SalesCustomerComboBox.SelectedIndex = -1 Then
CustomerIDTextBox.Text = ""
ElseTry
CustomerIDTextBox.Text = SalesCustomerComboBox.SelectedValue
Catch ex As ExceptionEnd Try
End If
End Sub
' entering sale and doc tiltlePrivate Sub SalesBrowseButton_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles SalesBrowseButton.ClickIf SalesDocTitleTextBox.Text = "" Then
MessageBox.Show("Enter document title", "Royal Estate", MessageBoxButtons.OK,
MessageBoxIcon.Error)
ElseDocOpenFileDialog.ShowDialog()
53
-
7/31/2019 Final Graduation Project
52/69
TrySoldBindingNavigatorSaveItem.PerformClick()
Dim desPath As String = Application.StartupPath & "\pics\SaleDoc\" &
PropertyComboBox.Text & SalesDocTitleTextBox.Text & SoldIDTextBox.Text & ".png"Dim sourcePath As String = DocOpenFileDialog.FileName
My.Computer.FileSystem.CopyFile(sourcePath, desPath, True)
SalesDocScanTextBox.Text = desPathCatch ex As Exception
MessageBox.Show("enter document title and sale details completely first...", "Royal
Estate", MessageBoxButtons.OK, MessageBoxIcon.Error)End Try
End If
End Sub
'adding the entered sale and doc tiltlePrivate Sub SalesAddButton_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles SalesAddButton.Click
If SalesDocTitleTextBox.Text "" And SalesDocScanTextBox.Text "" ThenTry
SalesDocDataGridView.Rows.Add(SalesDocTitleTextBox.Text,SalesDocScanTextBox.Text)
SalesDocTitleTextBox.Text = ""
SalesDocScanTextBox.Text = ""
Catch ex As Exception
MessageBox.Show("error adding document...", "Royal Estate", MessageBoxButtons.OK,MessageBoxIcon.Error)
End Try
Else MessageBox.Show("Enter the document title and the scan path", "Royal Estate",
MessageBoxButtons.OK, MessageBoxIcon.Error)
End IfEnd Sub
'removing the added doc.
Private Sub SalesDocRemoveButton_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles SalesDocRemoveButton.ClickTry
My.Computer.FileSystem.DeleteFile(SalesDocDataGridView.CurrentRow.Cells(1).Value)
SalesDocDataGridView.Rows.Remove(SalesDocDataGridView.CurrentRow)Catch ex As Exception
MessageBox.Show("Could not delete the row for some reason...", "Royal Estate",
MessageBoxButtons.OK, MessageBoxIcon.Error)
End TryEnd Sub
Private Sub SoldBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles SoldBindingNavigatorSaveItem.Click
Me.Validate()
Me.SoldBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.RoyalEstateDatabaseDataSet)End Sub
54
-
7/31/2019 Final Graduation Project
53/69
Private Sub SalesSaveButton_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles SalesSaveButton.Click
Dim docAdapter As RoyalEstateDatabaseDataSetTableAdapters.SoldDocumentTableAdapter=New RoyalEstateDatabaseDataSetTableAdapters.SoldDocumentTableAdapter
Dim propertyAdapter As RoyalEstateDatabaseDataSetTableAdapters.PropertyTableAdapter=
New RoyalEstateDatabaseDataSetTableAdapters.PropertyTableAdapter
Try
SoldBindingNavigatorSaveItem.PerformClick()For Each xRow As DataGridViewRow In SalesDocDataGridView.Rows
Try
docAdapter.Insert(xRow.Cells(0).Value, xRow.Cells(1).Value, SoldIDTextBox.Text)
propertyAdapter.UpdateQueryRentedSold("Yes", PropertyIDTextBox.Text)Catch ex As Exception
MessageBox.Show("could not save document " & xRow.Cells(0).Value & " " &
ex.ToString, "Royal Estate", MessageBoxButtons.OK, MessageBoxIcon.Error)End Try
NextPropertyOpsToolStripStatusLabel.Text = "Sold property saved..."
Catch ex As Exception
End Try
End Sub
Private Sub RentCustomerAddButton_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles RentCustomerAddButton.Click
If RentCustomerComboBox.Text "" Then
Dim customerx As New Customers(RentCustomerComboBox.Text,RentCustomerComboBox.SelectedValue)
RentCustomersListBox.DataSource = Nothing
ArrayListy.Add(customerx)RentCustomersListBox.DataSource = ArrayListy
RentCustomersListBox.DisplayMember = "Name"
RentCustomersListBox.ValueMember = "Id"
RentCustomersListBox.SelectedValue = "Id"End If
End Sub
Private Sub RentCustomerRemoveButton_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles RentCustomerRemoveButton.Click
If RentCustomersListBox.SelectedIndex = -1 Then
MessageBox.Show("there is no selected customer to remove...", "Royal Estate",
MessageBoxButtons.OK, MessageBoxIcon.Error)Else
ArrayListy.RemoveAt(RentCustomersListBox.SelectedIndex)RentCustomersListBox.DataSource = Nothing
RentCustomersListBox.Items.Remove(RentCustomersListBox.SelectedItem)
RentCustomersListBox.DataSource = ArrayListy
RentCustomersListBox.DisplayMember = "Name"RentCustomersListBox.ValueMember = "Id"
55
-
7/31/2019 Final Graduation Project
54/69
RentCustomersListBox.SelectedValue = "Id"End If
End Sub
' setting the duration datePrivate Sub DurationComboBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles DurationComboBox.SelectedIndexChanged
If DurationComboBox.Text = "1 Month" ThenEndDateDateTimePicker.Value = DateAdd(DateInterval.Month, 1,
StartDateDateTimePicker.Value)
ElseIf DurationComboBox.Text = "2 Months" ThenEndDateDateTimePicker.Value = DateAdd(DateInterval.Month, 2,
StartDateDateTimePicker.Value)
ElseIf DurationComboBox.Text = "3 Months" Then
EndDateDateTimePicker.Value = DateAdd(DateInterval.Month, 3,StartDateDateTimePicker.Value)
ElseIf DurationComboBox.Text = "4 Months" Then
EndDateDateTimePicker.Value = DateAdd(DateInterval.Month, 4,StartDateDateTimePicker.Value)
ElseIf DurationComboBox.Text = "5 Months" ThenEndDateDateTimePicker.Value = DateAdd(DateInterval.Month, 5,
StartDateDateTimePicker.Value)
ElseIf DurationComboBox.Text = "6 Months" Then
EndDateDateTimePicker.Value = DateAdd(DateInterval.Month, 6,
StartDateDateTimePicker.Value)ElseIf DurationComboBox.Text = "7 Months" Then
EndDateDateTimePicker.Value = DateAdd(DateInterval.Month, 7,
StartDateDateTimePicker.Value)ElseIf DurationComboBox.Text = "8 Months" Then
EndDateDateTimePicker.Value = DateAdd(DateInterval.Month, 8,
StartDateDateTimePicker.Value)ElseIf DurationComboBox.Text = "9 Months" Then
EndDateDateTimePicker.Value = DateAdd(DateInterval.Month, 9,
StartDateDateTimePicker.Value)
ElseIf DurationComboBox.Text = "10 Months" ThenEndDateDateTimePicker.Value = DateAdd(DateInterval.Month, 10,
StartDateDateTimePicker.Value)
ElseIf DurationComboBox.Text = "11 Months" ThenEndDateDateTimePicker.Value = DateAdd(DateInterval.Month, 11,
StartDateDateTimePicker.Value)
ElseIf DurationComboBox.Text = "12 Months" Then
EndDateDateTimePicker.Value = DateAdd(DateInterval.Month, 12,StartDateDateTimePicker.Value)
End IfEnd Sub
Private Sub RentBrowseButton_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles RentBrowseButton.Click
If RentDocTitleTextBox.Text = "" Then
56
-
7/31/2019 Final Graduation Project
55/69
MessageBox.Show("Enter document title", "Royal Estate", MessageBoxButtons.OK,MessageBoxIcon.Error)
Else
DocOpenFileDialog.ShowDialog()Try
RentBindingNavigatorSaveButton.PerformClick()
Dim desPath As String = Application.StartupPath & "\pics\RentDoc\" &PropertyComboBox.Text & RentDocTitleTextBox.Text & RentIDTextBox.Text & ".png"
Dim sourcePath As String = DocOpenFileDialog.FileName
My.Computer.FileSystem.CopyFile(sourcePath, desPath, True)RentDocScanTextBox.Text = desPath
Catch ex As Exception
MessageBox.Show("enter document title and sale details completely first...", "Royal
Estate", MessageBoxButtons.OK, MessageBoxIcon.Error)End Try
End If
End SubPrivate Sub RentBindingNavigatorSaveButton_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles RentBindingNavigatorSaveButton.ClickMe.Validate()Me.RentBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.RoyalEstateDatabaseDataSet)
End Sub
Private Sub RentAddButton_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles RentAddButton.Click
If RentDocTitleTextBox.Text "" And RentDocScanTextBox.Text "" Then
TryRentDocDataGridView.Rows.Add(RentDocTitleTextBox.Text,
RentDocScanTextBox.Text)
RentDocTitleTextBox.Text = ""RentDocScanTextBox.Text = ""
Catch ex As Exception
MessageBox.Show("error adding document...", "Royal Estate", MessageBoxButtons.OK,
MessageBoxIcon.Error)End Try
Else
MessageBox.Show("Enter the document title and the scan path", "Royal Estate",MessageBoxButtons.OK, MessageBoxIcon.Error)
End If
End Sub
Private Sub RentDocRemoveButton_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles RentDocRemoveButton.Click
TryMy.Computer.FileSystem.DeleteFile(RentDocDataGridView.CurrentRow.Cells(1).Value)
RentDocDataGridView.Rows.Remove(RentDocDataGridView.CurrentRow)
Catch ex As Exception
MessageBox.Show("Could not delete the row for some reason...", "Royal Estate",MessageBoxButtons.OK, MessageBoxIcon.Error)
57
-
7/31/2019 Final Graduation Project
56/69
End TryEnd Sub
Private Sub RentSaveButton_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles RentSaveButton.ClickDim docAdapter As RoyalEstateDatabaseDataSetTableAdapters.RentDocumentTableAdapter=
New RoyalEstateDatabaseDataSetTableAdapters.RentDocumentTableAdapter
Dim customersRentingAdapter AsRoyalEstateDatabaseDataSetTableAdapters.CustomersRentingTableAdapter= New
RoyalEstateDatabaseDataSetTableAdapters.CustomersRentingTableAdapter
Dim propertyAdapter As RoyalEstateDatabaseDataSetTableAdapters.PropertyTableAdapter=New RoyalEstateDatabaseDataSetTableAdapters.PropertyTableAdapter
Try
RentBindingNavigatorSaveButton.PerformClick()For Each xRow As DataGridViewRow In RentDocDataGridView.Rows
Try
docAdapter.Insert(xRow.Cells(0).Value, xRow.Cells(1).Value, RentIDTextBox.Text)propertyAdapter.UpdateQueryRentedSold("Yes", PropertyIDTextBox.Text)
Catch ex As Exception MessageBox.Show("could not save document " & xRow.Cells(0).Value & " " &ex.ToString, "Royal Estate", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
Next
For t As Integer = 0 To RentCustomersListBox.Items.Count - 1RentCustomersListBox.SelectedIndex = t
customersRentingAdapter.Insert(RentCustomersListBox.SelectedValue,
RentIDTextBox.Text)Next
PropertyOpsToolStripStatusLabel.Text = "Rented property saved..."
Catch ex As ExceptionPropertyOpsToolStripStatusLabel.Text = ex.Message
End Try
End Sub
'clearing forms fro new user.Private Sub OpsButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles OpsButton.Click
TryArrayListy.Clear()
RentCustomersListBox.DataSource = Nothing
RentCustomersListBox.DataSource = ArrayListy
RentDocTitleTextBox.Text = ""RentDocScanTextBox.Text = ""
RentDocDataGridView.Rows.Clear()DurationComboBox.SelectedIndex = -1
BindingNavigatorAddNewItem1.PerformClick()
PropertyOpsToolStripStatusLabel.Text = ""
Catch ex As ExceptionEnd Try
58
-
7/31/2019 Final Graduation Project
57/69
TrySalesCustomerComboBox.SelectedIndex = -1
SalesDocTitleTextBox.Text = ""
SalesDocScanTextBox.Text = ""SalesDocDataGridView.Rows.Clear()
BindingNavigatorAddNewItem.PerformClick()
PropertyOpsToolStripStatusLabel.Text = ""Catch ex As Exception
End Try
PropertyComboBox.SelectedIndex = -1End Sub
End Class
Public Class CustomersPrivate mName As String
Private mId As Integer
Public Sub New(ByVal CustomerName As String, ByVal CustomerId As Integer)Me.mName = CustomerName
Me.mId = CustomerIdEnd SubPublic ReadOnly Property Name() As String
Get
Return mName
End GetEnd Property
Public ReadOnly Property Id() As StringGet
Return mId
End GetEnd Property
End Class
Rent Payment Source Codes
Public Class RentPayment
Private Sub RentPaymentBindingNavigatorSaveItem_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles RentPaymentBindingNavigatorSaveItem.ClickMe.Validate()
Me.RentPaymentBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.RoyalEstateDatabaseDataSet)End Sub
Private Sub RentPayment_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Load 'TODO: This line of code loads data into the 'RoyalEstateDatabaseDataSet._Property' table. You
can move, or remove it, as needed.
59
-
7/31/2019 Final Graduation Project
58/69
Me.PropertyTableAdapter.Fill(Me.RoyalEstateDatabaseDataSet._Property) 'TODO: This line of code loads data into the 'RoyalEstateDatabaseDataSet.RentPayment' table.
You can move, or remove it, as needed.
Me.RentPaymentTableAdapter.Fill(Me.RoyalEstateDatabaseDataSet.RentPayment)Try
BindingNavigatorAddNewItem.PerformClick()
Catch ex As ExceptionEnd Try
End Sub
Private Sub NewButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles NewButton.Click
Try
BindingNavigatorAddNewItem.PerformClick()
PropertyComboBox.SelectedIndex = -1ForTheMonthOfComboBox.SelectedIndex = -1
OverLabel.Text = "0 days"
TenantsListBox.Items.Clear()ToolStripStatusLabel1.Text = ""
Catch ex As ExceptionToolStripStatusLabel1.Text = ex.Message
End Try
End Sub
'saving added items
Private Sub SaveButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles SaveButton.Click
Try
RentPaymentBindingNavigatorSaveItem.PerformClick()ToolStripStatusLabel1.Text = "Rent payment saved..."
Catch ex As Exception
ToolStripStatusLabel1.Text = ex.MessageEnd Try
End Sub
' allows you to select rented property
Private Sub PropertyComboBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal eAs System.EventArgs) Handles PropertyComboBox.SelectedIndexChanged
Dim rentTable As RoyalEstateDatabaseDataSet.RentDataTable = New
RoyalEstateDatabaseDataSet.RentDataTableDim rentAdapter As RoyalEstateDatabaseDataSetTableAdapters.RentTableAdapter= New
RoyalEstateDatabaseDataSetTableAdapters.RentTableAdapter
rentAdapter.FillByPropertyID(rentTable, PropertyComboBox.SelectedValue)
If rentTable.Rows.Count
-
7/31/2019 Final Graduation Project
59/69
Dim overduedays As Integer = DateDiff(DateInterval.Day, rentTable.Rows(0).Item(4),Now.Date)
OverLabel.Text = overduedays & " days"
Dim customersrentingTable As RoyalEstateDatabaseDataSet.CustomerDataTable = New
RoyalEstateDatabaseDataSet.CustomerDataTable
Dim customersrentingAdapter AsRoyalEstateDatabaseDataSetTableAdapters.CustomerTableAdapter= New
RoyalEstateDatabaseDataSetTableAdapters.CustomerTableAdapter
customersrentingAdapter.FillByRentID(customersrentingTable, RentIDTextBox.Text)
For Each x As DataRow In customersrentingTable.Rows
TenantsListBox.Items.Add(x.Item(2) & " " & x.Item(4))
NextEnd If
End Sub
' display moreinfo of the payment and does not all nullPrivate Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As
System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClickedIf RentIDTextBox.Text = "" Then
MessageBox.Show("Please select a rented property...", "Royal Estate",
MessageBoxButtons.OK, MessageBoxIcon.Information)
Else
RentPaymentHistory.ShowDialog()End If
End Sub
End Class
Rent Payment History Source CodesPublicClass RentPaymentHistory
PrivateSub RentPaymentBindingNavigatorSaveItem_Click(ByVal senderAs System.Object,
ByVal e As System.EventArgs) Handles RentPaymentBindingNavigatorSaveItem.Click Me.Validate()
Me.RentPaymentBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.RoyalEstateDatabaseDataSet) EndSub
' display the rentpropert info.
PrivateSub RentPaymentHistory_Load(ByVal senderAs System.Object, ByVal e As
System.EventArgs) HandlesMyBase.Load
'TODO: This line of code loads data into the 'RoyalEstateDatabaseDataSet.RentPayment' table.You can move, or remove it, as needed.
Me.RentPaymentTableAdapter.FillByRentID(Me.RoyalEstateDatabaseDataSet.RentPayment,RentPayment.RentIDTextBox.Text)
Dim rentTable As RoyalEstateDatabaseDataSet.RentDataTable =New
RoyalEstateDatabaseDataSet.RentDataTable Dim rentAdapterAs RoyalEstateDatabaseDataSetTableAdapters.RentTableAdapter =New
RoyalEstateDatabaseDataSetTableAdapters.RentTableAdapter
61
-
7/31/2019 Final Graduation Project
60/69
rentAdapter.FillByRentID(rentTable, RentPayment.RentIDTextBox.Text)PropertyLabel.Text = RentPayment.PropertyComboBox.Text
StartDateLabel.Text = rentTable.Rows(0).Item(1)
DurationLabel.Text = rentTable.Rows(0).Item(2)DepositLabel.Text = rentTable.Rows(0).Item(5)
RentAmountLabel.Text = rentTable.Rows(0).Item(7)
EndSubEndClass
3.6 GANTT CHART
E-PROPERTY MANAGEMENT SYSTEM GANTT CHART
62
-
7/31/2019 Final Graduation Project
61/69
MAINTENANCE AND SUPPORT
4.1 SYSTEM MAINTENANCE
System maintenance is very important to this software in order to correct faults, to improve
performance, or to adapt the system to a new environment. Database maintenance includes will also
include checking for signs of corruption in the database, looking for problem areas, rebuildingindexes, removing duplicate records, and checking for any abnormalities in the database which mightsignal a problem. The goal is to keep the database operating smoothly for users, so that ideally they
never need to think about maintenance issues. A database which is not maintained can become
sluggish, and people may start to experience problems when trying to access records. So I intend toavoid this problem.
One important aspect of database maintenance will be simply backing up the database so that if
anything happens, there will be another copy available. I still a have to improve the systemfunctionality that will set the system to perform automatic back-up, maybe sending a backup to
another location every day, every week, or within any other set period of time.
4.2 DETAILED REFERENCE TO DOCUMENTATION
Comments litter the source code read them if anything seems unobvious.
Data dictionary is in Analysis, Data dictionary.
Table descriptions are in Analysis, Entities, Attributes, Entity relationship diagrams.
Variable descriptions appear in Implementation and Testing, Details of variables.
Details of forms can be found in Design, Design of user interface.
Details of algorithms can be found in Design, Algorithms and Implementation and Testing,
Detailed algorithms.
For details of SQL statements, look in Implementation and Testing, Details of SQLstatements.
63
-
7/31/2019 Final Graduation Project
62/69
EVALUATION
5.1 MY EVALUATION
The end product that I have produced is very useable and stable. All the objective of this
application has been achieved. The system provides the user with less complicated interface to workwith; the query aspect is embedded in the software so the users do not need to write any code. Theuser deals with the buttons and other GUI tools only. The program accepts entry of new client,
landlords detail, new property details, tenant details etc. Also information about customer, details and
property details can be stored, edit and delete with ease. Easy to use applications have been achieved.Another important achievement is the security issue, this system provide maximum security
for the companys data, login are been given to authorized employee and management staff. With this
login restrictions authorized access to the system is not possible. Also the system provides back-up fordatas in case of any accident.
Finally, am satisfied with the system performance, it has been able to retrieve data in less than
a minute. I strongly believe this application will help the company achieved it daily business task.
Though the system still require some expanded functionality of that is required of todays software,this will be achieved in due time.
5.2 PERFORMANCE CHECKING
The program takes seconds to load from disk to memory then then further display the logindialog box on the screen. When the password is entered it takes few more seconds for the
program to activate the main menu of the program.
Navigatingthe database is especially very quick affair. Lists are displayed within a second.Moving from one client or houses details to the next is very quick
Searching the database is also very quick due to indexing of the tables Deleting records is very easy and is done within seconds.
Entering a new client, house etc. typically takes under minutes, based on the typing speed of
the user.
5.2 RECOMMENDATIONS
Drawing from the functionalities of the system, I can see beyond reasonable doubt that the system is
successful and I can recommend it to small estate management on the Cyprus Island.
64
-
7/31/2019 Final Graduation Project
63/69
USER MANUAL
6.1 INSTALLATION INSTRUCTIONS
To install the software an installation file is needed.
Installation file can be copy using USB flash
Installation file can be copy using CD
To install program, insert USB or CD to the USB port or CD-Drive.
Run the installation file and follow the instruction careful.
Click on install button and follow the instruction careful. When installation is complete, go to
Programs and click on E-Property System.
Login property will appear, type the authorized password and user name to proceed
If login detail is correct main menu will appear else error provider will tell you that you entered
incorrect Username or password.
65
-
7/31/2019 Final Graduation Project
64/69
If correct login is entered the main menu will appear depending on users privilege, software is ready
for use.
HOW SYSTEM WORKS
E-Property management system is a MENU-Driven Application. It has database that will enable the
user store records e.g. Landlord information, Property information such as picture of the property and
floor plan of the property. The system also stored other details like customers and payment details.
Users can perform functions like add, delete, save, search of property .
66
-
7/31/2019 Final Graduation Project
65/69
FEATURES AND FUNCTIONS
On the main menu there are a couple of buttons to help user navigate the software.
On the menu bar, there is new, edit and operation option.
And there is a search option: this enable you to select the desire search that you want.
On the new; which drops down on click show you three options, Landlord, Property and
Customer.
Landlord menu help you fill in the details of the landlords.
The Property Menu help you fill the property details, including pictures.
The customer menu helps you fill the Customer details.
On the edit menu, by clicking it you will see the administrator menu, which help you create the
admin security password.
On the operation option, there the sale/rent option and rent payment.
Sale/rent option allows you to register the property which is rented or the house which is sold.
While the rent payment allow you to see the records history of the tenant which have paid their rent.
67
-
7/31/2019 Final Graduation Project
66/69
Overview
How to use the forms
Landlord Form
After successful login if user clicks on the new on the tool bar, a drop menu will appear the user willclick form, the form will appear. To add new landlord details, Click on the new button and fill in the
required details into the right text box. Under menu you can click delete to delete or save button save
to database.
PROPERTY FORM
68
-
7/31/2019 Final Graduation Project
67/69
User can add the required details of the property form when you click the form on the menu bar. Afterall the required details have been added user can click save all button to save the records on database.
CUSTOMER FORM
Also the user can locate the customer form on the menu bar, after which the required details will be
added. There is also option provided to add and remove scan document. After which user can click onsaved document and also click on new customer button to add new customer details.
ADMIN FORM
The admin form helps secure unauthorized users. Users can change the security password and also add
more. When you click the edit on the menu bar, then you see the admin form. Fill in the required
details and save. User can add new and also remove the previous once.
69
-
7/31/2019 Final Graduation Project
68/69
SAVE/RENT FORM
On the form, there are two options, when a user wants to use the sale form, on top of the form there is
radio button for sale and rent, when you click any of the button the other form becomes unusable. The
user can use the required form which he or she selected. When the required details have been filledthen the user can click the save sale button to save or save rent button. After which if the user wants to
add new operation then the user can click on the new operation button on the bottom of the form.
RENT PAYMENT FORM
The form is located on the menu bar under the operation option, when user clicks on it. The form willopen; user can add tenant details and the money which the tenant pays. Then click the save button to
save the records onto the database and user can click on the new rent button for a new tenant detail. At
the right side of the form under the month, there is a payment history link when user clicks on it takeyou to another form which shows you the payment history of the tenants.
70
-
7/31/2019 Final Graduation Project
69/69
REFERENCE
Visual Basic 2008, n.d retrieved from http://www.microsoft.com/vstudio on 3rd march 2011.
SQL Server 2008, n.d retrieved from http://www.ehow.com/list_5993393_advantages-sql-server-
2008.html#i