Apartment Management System
1. INTRODUCTION
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
1
Apartment Management System
1.1 INTRODUCTION
Apartment management system is a newly development software that helps to
gather the information of people who leaves in an apartment. The system that is newly
developed which helps the users to get rid of all paper works and could able to handle the
things easier and quicker.
In apartment management system it uses to collect all the data of the people who
leaves at that particular area. This system helps to keep all necessary information about
flats. The project is being planned to provide all the features which will support the needs
of the concern party.
1.2 OBJECTIVES OF THE PROJECT
The objective is to make high performance software, the software which is easy to
work with. The software is also able to extract details from database and make report
easily. This powerful software program is specifically designed for builders so that they
could control the activities of the apartment. Apartment management controls all back-end
functionalities like, owner details, contact number, address and other details related to that
particular apartment saved in a database, etc. Admin manages the report details like
maintenance, payments, user creation etc
Enhancement:
The main objective of apartment management system is to enhance and upgrade
the existing system by increasing its efficiency and effectiveness. The software
improves the working methods by replacing the existing manual system with the
computer-based system.
Automation:
The Apartment management system automates each and every activity of the
manual system and increases its throughput. Thus the response time of the system
is very less and it works very fast.
Accuracy:
The Apartment management system provides a quick response with very accurate
information regarding the activities done in a flats. Any details or system in an
accurate manner, as and when required.
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
2
Apartment Management System
User-Friendly:
The system apartment management system has a very user-friendly interface. Thus
the users will feel very easy to work on it. The software provides accuracy along
with a pleasant interface. Make the present manual system more interactive,
speedy and user friendly.
Availability:
The transaction reports of the system can be retried as and when required. Thus,
there is no delay in the availability of any information, whatever needed, can be
captured very quickly and easily.
Maintenance Cost:
Reduce the cost of maintenance
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
3
Apartment Management System
2. SYSTEM ANALYSIS
2.1 IDENTIFICATION OF NEEDS
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
4
Apartment Management System
System analysis refers to an orderly structured process for identifying and solving
problem using computer. It is the most essential part of the project development. It is the
process of gathering and interpreting facts, diagnosing problems and using the
information to recommend improvement to the system.
Training, experience and common sense are required for the collection of
information needed to do the analysis. To analyse a system one has to study the system
work in detail, before designing the appropriate computer based system that will meet the
requirements of the system. In other words, system analysis specifies what the system
analyst specifies what the system should
2.2 EXISTING SYSTEM
The existing system is not so flexible as all the procedures are done manually. This
increases the paperwork of the office which includes the bill payments also there arises
confusion among doing various maintenances.
2.2.1 LIMITATIONS OF EXISTING SYSTEM
The existing system has various disadvantages compared to the proposed system.
Some disadvantages are listed below:
Readability of records is constrained.
Paper records are easily damage with time
Expenditure id high
Security
Need lot of manpower
Readability of records is constrained.
All the records may not be handled or written by the same person. So the format
will be different resulting in loss.
Paper records are easily damage with time
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
5
Apartment Management System
The lifetime of paper records is very less that is easily gets damaged. Hence it
faces the risk of loss of data.
Expenditure is high
Manual system need more power for its functioning than computer system.
Expenditure is high in terms of salary and time.
Security
The manual system loses the security. This is handled by many number of persons
to enter the transaction. No proper handling of manipulation of data.
Need lot of manpower
The manual system in the existing system needs lot of manpower to maintain
various details in each section
2.3 PROPOSED SYSTEM
Proposed system is fully computerized one. It does absolutely nothing on paper.
As all the entire working is done with the aid of computers, this will result in faster
processing and improved performance. This information can be quickly by the click of a
button when compared to earlier retrieval from files and registers. As all the details are
stored in the computers hard drive the physical storage space requirement can be reduced
to a great extent.
Processing of information manipulation was difficult with manual system, but as
we are doing all the processing with the aid of computers it can be done very easily and
accurately. Creating reports timely needs a quick search in the huge file cabinets, but with
the proposed system reports can be generated in the winks of an eye lid.
The proposed system overcomes all the limitations of the existing system. It gives
a clear view of the wok to be done. It maintains the data safe and secure. The user gets an
easy way to book ticket at the counter. He can select appropriate seat before booking a
ticket. The
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
6
Apartment Management System
System can generate report regarding daily, and monthly earnings of shows. Here there
will be no chance of missing any documents as there is no paper works.
2.3.1 ADVANTAGES OF PROPOSED SYSTEM.
Involves fast processing of data
Flexible
Very less paperwork
Easy availability of data
Cost effective
Minimize number of staff
Group booking
2.4 FEASIBILITY STUDY
All projects are feasible when given unlimited resources and infinite time. It is
both necessary and prudent to evaluate the feasibility of a project at the earliest possible
time. A feasibility study is not warranted for systems in which economic justification is
obvious, technical risk is low, few legal problems are expected and no reasonable
alternative exists. An estimate is made of whether the identified user needs may be
satisfied using current software and hardware technologies. The study will decide if the
proposed system will be cost effective from the business point of view and if it can be
developed in the given existing budgetary constraints. The feasibility study should be
relatively cheap and quick. The result should inform the decision of whether to go ahead
with a more detailed analysis.
Feasibility study may be documented as a separated report to higher officials of
the top-level management and can be included as an appendix to the system specification.
Feasibility and risk analysis is related in many ways. If there is more project risk then the
feasibility of producing the quality software is reduced. The study is done in these phases
Technical feasibility
Economic feasibility
Operational feasibility
Behavioural feasibility
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
7
Apartment Management System
Technical feasibility
This is related to the technicality of the project feasibility if check the cost to
conduct a full system investigation, cost of hardware and software.
The apartment Management system supports the economic feasibility to a great
extends. Development of the system and the cost of hardware and software are not high.
This reduces effort and time of us. This makes software economically feasible.
Economic feasibility
A system that can be developed technically and that will be used, if installed,
must be sill good. Always the financial benefits must be equal or exceed the cost.
Economic analysis is the most frequently used method for evaluating the effectiveness of
a candidate system or more commonly known as cost or benefits analysis.
Operational feasibility
Proposed systems are beneficial only if they can be turned into information
systems. That is it will meet the organizations operating requirements and also checks that
whether the system will work when it is developed and installed. Therefore it is
understandable that the introduction of a candidate system requires special efforts to
educate, sell and train others.
The Apartment Management system supports the operational feasibility to a great
extends. The performance of this software is more accurate, more user friendly, effective,
error free.
Behavioural Feasibility
Computers have been known to facilitate changes where as people are intently
resistant to change . Therefore it is necessary that an evaluation should be made about
the users attitude towards the new system. This is called behavioural feasibility.
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
8
Apartment Management System
3. SOFTWARE REQUIREMENT SPECIFICATION
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
9
Apartment Management System
3.1 FRONT END
VISUAL BASIC 6 is a high level programming language that evolved from the
earlier DOS version called BASIC. BASIC means Beginners All-purpose Symbolic
Instruction Code. Now, there are many versions of Visual Basic are available in the
market, the latest being Visual Basic 2015 that is bundled with other programming
languages such as C#.
Visual basic is an ideal programming language for developing sophisticated
professional applications for Microsoft windows. The code looks a lot like English
Language. It makes use of graphical user interface for creating robust and powerful
applications. Coding in GUI environment is easy and quicker as compare to traditional,
linear programming languages.
Features of visual basic
GUI Interface
Modularization
Object Oriented
Debugging
Data Access Feature
Macros IDE
Studio IDE
GUI Interface:
VB is a Graphical User Interface language. This means that a VB program will
always show something on the screen that the user can interact with to get a job done.
Modularization:
It is considered good programming practice to modularize your programs. Small
modules where it is clearly indicated what comes into the module and what goes out
makes a program easy to understand.
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
10
Apartment Management System
Object Oriented:
Object Oriented Programming is a concept where the programmer thinks of the
program in "objects" that interact with each other. Visual Basic forces this good
programming practice.
Debugging:
Visual Basic offers two different options for code debugging , Debugging
Managed Code Runtime Debugger. The Debugging Managed Code individually debugs C
and C++ applications and Visual Basic Windows applications. The Runtime Debugger
helps to find and fix bugs in programs at runtime.
Data Access Feature:
By using data access features, we can create databases, scalable server-side
components for most databases, including Microsoft SQL Server and other enterprise-
level database.
Macros IDE:
The Macros integrated development environment is similar in design and function
to the Visual Studio IDE. The Macros IDE includes a code editor, tool windows, the
properties windows and editors..
3.2 BACK END
SQL server 2008 is the native data store of c#.NET every business enterprise
maintains large volumes of data for its operations. With more and more people accessing
data for their work, the need to maintain its integrity and relevance increases. Normally
with the traditional method of storing data and information in the files, the chances that
the data losses, its integrity and validity are very high. There are however limits to how
far performance can scale on a single server ('scaling up'), so on larger scales, multi-server
My SQL ('scaling out') deployments are required to provide improved performance and
reliability. A typical high-end configuration can include a powerful master database which
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
11
Apartment Management System
handles data write operations and is replicated to multiple slaves that handle all read
operations. The master server synchronizes continually with its slaves so in the event of
Failure a slave can be promoted to become the new master, minimizing downtime.
Further improvements in performance can be achieved by caching the results from
database queries in memory using me cached, or breaking down a database into smaller
chunks called shards which can be spread across a number of distributed server clusters
3.3 HARDWARE REQUIREMENTS
The selection of hardware configuration is a very important task related to the
software development, particularly inefficient RAM may affect adversely on the speed
and corresponding on the efficiency of the entire system. The processor should be
powerful to handle all the operations. The hard disk should have the sufficient capacity to
solve the database and the application. The network should be efficient to handle the
communication fast.
Processor :- Intel Pentium IV / AMD, Running at 1GHz
RAM :- 2GB
Hard Disk :- 160 GB
Keyboard :- Standard keyboard
Monitor :- 15 Inch.
Mouse :- Two or Three Button Mouse
3.4 SOFTWARE REQUIREMENTS
Front-End Development Tool :vb6
Database Server :- SQL server 2008
Operating system :- windows 7 and above
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
12
Apartment Management System
4. DATA FLOW DIAGRAM
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
13
Apartment Management System
4.1 INTRODUCTION TO DATA FLOW DIAGRAM
A Data Flow Diagram is a network that describes the flow of data and processes
that change, or transform, data throughout the system. This network is constructed by
using a set of symbols that do not imply a physical implementation. It is a graphical tool
for structured analysis of the system requirements. DFD models a system by using
external entities from which data flows to a process, which transforms the data and
creates, output-data-flows which go to other processes or external entities or files. Data in
files may also flow to processes as inputs.
There are various symbols used in a DFD. Bubbles represent the processes.
Named arrows indicate the data flow. External entities are represented by rectangles and
are outside the system such as venders or customers with whom the system interacts.
They either supply or consume data. Entities supplying data are known as sources and
those that consume data are called sinks. Data are stored in a data store by a process in the
system. Each component in a DFD is labelled with a descriptive name. Process names are
further identified with a number.
DFDs can be hierarchically organized, which help in partitioning and analyzing
large systems. As a first step, one Data Flow Diagram can depict an entire system, which
gives the system overview. It is called Context Diagram of level 0 DFD. The Context
Diagram can be further expanded. Thus successive expansion of a DFD from the Context
Diagram to those giving more details is known as levelling of DFD. Thus a top down
approach is used, starting with an overview and then working out the details.
The Data Flow Diagram shows the logical flow of a system and defines the
boundaries of the system. For a candidate system, it describes the inputs (source), outputs
(destination), database (files) and procedures (data flow), all in a format that meet the
users requirements. The main merit of DFD is that it can provide an over view of system
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
14
Apartment Management System
requirements, what data a system would process, what transformations of data are done,
what files are used, and where the results flow.
Basic Data Flow Diagram Symbols
A data flow is a route, which enables packets of
data to travel from one point to another. Data may flow from
a source to a process and from data store or process. An arrow
line depicts the flow, with arrowhead pointing in the direction
of the flow.
Circles stand for process that converts data into
information. A process represents transformation where
incoming data flows are changed into outgoing data flows.
A data store is a repository of data that is to be
stored for use by a one or more process may be as simple as
buffer or queue or sophisticated as relational database. They
should have clear names. If a process merely uses the content
of store and does not alter it, the arrowhead goes only from
the store to the process. If a process alters the details in the
store then a double-headed arrow is used.
A source or sink is a person or part of
organizations, which enter or receives information from the
system, but is considered to be outside the contest of data
flow model.
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
15
Apartment Management System
4.2 CONTEXT LEVEL DIAGRAM
LEVEL 0
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
16
Apartment Management System
LEVEL 1 FOR ADMIN
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
17
Apartment Management System
LEVEL 1 FOR USER
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
18
Apartment Management System
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
19
Apartment Management System
5. SYSTEM DESIGN
5.1 INTRODUCTION TO SOFTWARE DESIGN
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
20
Apartment Management System
System design is the creative act of invention developing new inputs, a database
offline files, method, procedures and output for processing business data to meet
organization objectives. The design phase focuses on the detailed implementation of the
system recommended in the feasibility study. The design phase is a transition from user-
oriented document to a document oriented to the programmers or database personnel.
Characteristics of a well-designed system are:
Accessibility
Decision making ability
Economy
Flexibility
Reliability
Simplicity
The design will determine the success of the system. System design is based on
the information gathered during system analysis. System design goes through two phases
of development.
Logical Design DFD shows the logical flow of a system and defines the
boundaries of the system. For the candidate system it describes the inputs, outputs,
databases and procedures-all in a format that meets the users requirements.
Physical Design - This produces the working system by defining the design
specification that tells programmers exactly what the candidate system must do.
5.2 INPUT DESIGN
Input design is the link that ties the information system into the world of its users.
The input design involves determining what the inputs are, how the data should be
performed, how to validate data, how minimize data entry and how to provide a multi-
user facility. Inaccurate input data are the most common cause of errors in data
processing. Errors entered by data entry operators can be controlled by input design. Input
design is the process of converting user-originated inputs to a computer-based format.
Input data are collected and
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
21
Apartment Management System
Organized into groups of similar data. Once identified, appropriate input media are
selected for processing.
All the input data validated in the order and if any data violates any condition, the
user is warned by a message. If the data satisfies all the conditions then it is transferred to
the appropriate tables in the database.
Log In Form
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
22
Apartment Management System
Main form
Admin
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
23
Apartment Management System
Block details
Flat details
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
24
Apartment Management System
Maintenance
Payment
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
25
Apartment Management System
Owner details
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
26
Apartment Management System
Create user
5.4 DATABASE DESIGN
A database is a collection of data. Database design refers to the design of the
tables used to store data. The database involves name of records, data item with its name,
type and size.
In the design of the database program first we have to thoroughly look into the
requirements of the program for the design of database. Then we have to design how
much tables are required in the database. Thereafter as per requirement of the end users
we can decide which fields that must be in this table. As per a general rule a provision
must be taken in the design for the future enhancement of the program. Some of the
important tables are:-
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
27
Apartment Management System
1. Login Table
FIELD NAME DATA TYPE SIZE CONSTRAINTS
Uname Int 50 Primary key
Pword Varchar 50 Not Null
Usertype Varchar 50 Not Null
2. Apartment Table
FIELD NAME DATA TYPE SIZE CONSTRAINTS
App_ID Varchar 50 Primary key
App_name Varchar 50 Not Null
Adrs Varchar 250 Not Null
Phone Varchar 50 Not Null
Owner Varchar 50 Not Null
Own adrs Varchar 250 Not Null
Own ph Varchar 50 Not Null
Own status Varchar 50 Not Null
Builder Varchar 50 Not Null
Builder_det Varchar 250 Not Null
Builder_phon Varchar 50 Not Null
Cost Varchar 18 Not Null
3. Block Table
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
28
Apartment Management System
FIELD NAME DATA TYPE SIZE CONSTRAINTS
Block_Id Varchar 50 Primary key
App_id Varchar 50 Name of the film
No_flat numaeric 50 Name of distributer
Total area Numeric 50 Mode 2d/3d
4.Flat table
FIELDS DATA TYPE SIZE DESCRIPTION
Flat_no Varchar 250 Not Null
Own_ph Varchar 50 Not Null
Own_status Varchar 50 Not Null
Builder Varchar 50 Not Null
Builder_dat Varchar 250 Not Null
B_ph Varchar 50 Not Null
Cost Numeric 18 Not Null
5. Maintenance Table
FIELD NAME DATA TYPE SIZE CONSTARINTS
Work_id varchar 50 Primary key
App_id varchar 50 Foreign key
App_name varchar 50 Not Null
Work_det varchar 50 Not Null
Expense varchar 50 Not Null
Payment varchar 50 Not Null
6. Payment Table
FIELDS NAME DATA TYPE SIZE CONSTAINTS
Pay id varchar 50 Primary key
App id varchar 50 Not null
App name varchar 50 Not null
Block id varchar 50 Not null
Flat no varchar 250 Not null
Amount varchar 18,2 Not null
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
29
Apartment Management System
Balance Numeric 18 Not null
P date Date 250 Not null
7. Bill Table
FIELD NAME DATA TYPE SIZE CONSTARINTS
Rept no Varchar 250 Primary key
Pay date Varchar 50 Not null
Amount Varchar 18,2 Not null
Cashier Varchar 50 Not null
Date date 250 Not null
5.5 PROCESS DESIGN
The different modules of the project identified are as follows:
The functions involved by admin are:
Login : Administrator should login to the system for the various processes
Apartment : On this module we could able to see the entire details of the person
who leaves on that apartment by a single id.
Block details: In this form we use to get the details of the block and total area
,number of flats etc....
Flat : The details of the block and the details of the owner could be accessed by
this.
Maintenance : In this one the works that are done on flats during particular
intervals
.
Payment : the payment details about the flat in which the maintenances are done
Owner: the new owners of the flat could use this one so that the details and asset
prices can be displayed.
Create user: The admin could able to create the user.
The functions involved by user
To keep the details of the payments and maintenances.
To keep the maintenances in proper intervals
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
30
Apartment Management System
To take the printed copies of all the data.
The functions involved by admin are:
User Registration: User can sign up to the system.
Login
View status: He could able to view all the details of persons.
Price details: the price of flats and all other things about the asset.
The functions involved by user are:
View status: He could see all the payments and other maintenance works.
Price: He could able to go through the monthly payments and all.
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
31
Apartment Management System
6. SYSTEM TESTING AND IMPLEMENTATION
6.1 SYSTEM TESTING
System testing is the stage of implementation, which is aimed at ensuring that the
system works accurately and efficiently before live operation commences. Testing is vital
to the success of the system. An elaborate testing of the data is prepared and the system is
testing using this test data. While testing errors are detected and corrected. The users are
trained to operate the developed system. Both hardware and software securities are made
to run the developed system successfully in future. The testing steps are,
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
32
Apartment Management System
Unit testing
Integration testing
Validation testing
Alpha Testing
Beta Testing
Integration testing
Integration testing is an systematic technique for constructing tests to uncover
errors associated with the interface. In this project, all the modules are combined and then
entire program is tested as a while, thus in the integration testing step, all the errors
uncovered for the next testing steps.
Validation testing
Validation testing is where requirements stabled as a part of software requirement
analysis is validated against the software that has been constructed. This test provides the
final assurance that the software meet all functional, behavioral and performance
requirements.
Alpha testing
If the tested and real customers combining test the software in development site
then it is called alpha testing. Alpha testing is done at the developers site by the testers.
Alpha testing is the testing conducted by customers is developers site. If the software is
product then beta testing will be done.
Beta testing
Beta testing is the testing done by the customers environment. Beta testing is the
process of giving the product to customers and let them do the testing of their
environment.
6.2 SYSTEM IMPLEMENTATION
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
33
Apartment Management System
The term implementation has different meanings, ranging from the conversion of
basic application to a complete replacement of a computer system. The procedure,
however, is virtually the same. Implementation is used here to mean the process of
converting a new or a revised system, System design into an operational one. There are
three types of implementations:
Implementation of a computer system to replace a manual system
Implementation of a new computer system to replace an existing one
Implementation of a modified application to replace an existing one
Here a manual department system is replaced by a computer system. Effective
testing early in the process translated directly in to long-term cost is saving from a
reduced number of errors. Back-up files are needed when the system is failure or down.
The usability test verified the user-friendly nature of the system. Accurate and complete
documentation is necessary for the user-friendly nature of the system.
System testing is designed to uncover weakness that is not found in the earlier
tests. This includes forced system failure and validation of the total system, as its user in
the operational environment will implement it. Generally it begins with low volume of
transactions base on live data. The volume is increased until the maximum level for each
transaction type is reached. The total system is tested for recovery fallback after major
failures to ensure that no data are lost during the emergency. All this is done with the old
system still in operation after the candidate system passes the test, the old system is
discontinued.
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
34
Apartment Management System
7. SECURITY TECHNOLOGIES AND POLICIES
7.1 SECURITY TECHNIQUES AND POLICIES
Maintenance involves the software industry captive, typing up system resources. It
means restoring something to its original condition. Maintenance follows conversion to
the extend. That change is necessary to maintain satisfactory operations relative to
changes in the users environment. Maintenance often includes minor enhancements or
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
35
Apartment Management System
corrections to problems that surface in the systems operation. Maintenance is also done
based on fixing the problems reported, changing the interface with other software or
hardware enhancing the software.
Any system developed should be secured and protected against possible hazards.
Security measures are provided to prevent unauthorized access of the database at various
levels. An uninterrupted power supply should be so that the power failure or voltage
fluctuations will not erase the data in the files. Password protection and simple procedures
to prevent the unauthorized access are provided to the users. The system allows the user to
enter the system only through proper user name and password.
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
36
Apartment Management System
8. MAINTENANCE
8.1 MAINTENANCE
Structured design partitions a program into small, independent modules. They are
arranged in a hierarchy that approximates a model of the business area and is organized in
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
37
Apartment Management System
a top-down manner. Structured design is an attempt to minimize complexity and make a
problem manageable by subdividing it into smaller segments, which is called
modularization or decomposition. The primary advantage of this design is as follows:
Critical interfaces are tested first.
Early versions of the design, though incomplete, are useful enough to resemble the
real system.
Structuring the design provides control and improves morale.
The procedural characteristics define the order that determines processing.
Modules that perform only one task are said to be less error-prone than modules
that perform multiple tasks.
This part has the details regarding the project. It explains how this system works
and what all procedures are taken to maintain the proper functioning of the new system.
As the application is a web application, this start-stop-start nature of interaction of the
web applications makes things a lot difficult. As our application is simpler any future
enhancements can be fitted in this software. So it can run on any system.
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
38
Apartment Management System
9. CONCLUSION
9.1 CONCLUSION
The system objectives specified in the requirement documents are believed to
have been satisfactory met. The system gives good result in the testing. The processing
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
39
Apartment Management System
of the proposed system is simple and is in regular order. The various plans employed in
the project are user friendly and easy to understand. The system has been designed in
manner so as to provide valuable, timely and accurate information. The system was
effective and efficient in the estimate generation process. Visual Basic 6.0 and MS SQL
Server were the best selection for the system to be developed. Any native user can
understand the problem, solve it and generate reports through the system.
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
40
Apartment Management System
10. BIBLIOGRAPHY
10.1BIBLIOGRAPHY
BOOKS AUTHORS
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
41
Apartment Management System
1. System Analysis and Design Elias Mawad
2. An integrated Approach of Software
Engineering Pankaj Jalote
3. Guide to Visual Basic 6.0 Peter Norton
4. Introduction to Database Management Naveen Prakash
5. Analysis and Design of Information
System V. Rajkumar
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
42
Apartment Management System
11. APPENDIX
11.1 CODE
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
43
Apartment Management System
Login
Dim cmd As New ADODB.Command
Dim rs As New ADODB.Recordset
Dim s As String
Dim flag As Boolean
Private Sub cmdlogin_Click()
flag = False
Call fnconnect
con.Open
s = "select * from tbl_login"
rs.Open (s), con, adOpenKeyset, adLockOptimistic
While rs.EOF = False
If rs!uname = txtuname.Text And rs!pword = txtpword.Text Then
flag = True
usertype = rs!Type
End If
rs.MoveNext
Wend
If flag = True Then
frmMain.Show
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
44
Apartment Management System
con.Close
Unload Me
Else
MsgBox "Invalid user or password", vbExclamation
End If
End Sub
Form Apartment
Dim rs As New ADODB.Recordset
Dim rrs As New ADODB.Recordset
Dim id As Integer
'Dim s As Integer
Private Sub cboapid_Click()
Call fnconnect
con.Open
s = "select * from tbl_appartment where app_id='" & cboapid.Text & "'"
rrs.Open (s), con, adOpenKeyset, adLockOptimistic
If rrs.EOF = False And rrs.BOF = False Then
rrs.MoveFirst
txtapname.Text = rrs!app_name
txtapadrs.Text = rrs!adrs
txtapphno.Text = rrs!phone
txtbuilder.Text = rrs!builder
txtbadrs.Text = rrs!build_det
txtbphno.Text = rrs!b_ph
txtastval.Text = rrs!cost
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
45
Apartment Management System
End If
cmdedit.Enabled = True
cmddelete.Enabled = True
cmdadd.Enabled = False
End Sub
Private Sub cmdadd_Click()
Call fnconnect
con.Open
If cmdadd.Caption = "Save" Then
Set rs = con.Execute("insert into tbl_appartment values('" & cboapid.Text & "','" &
txtapname.Text & "','" & txtapadrs.Text & "','" & txtapphno.Text & "','" & txtbuilder.Text
& "','" & txtbadrs.Text & "','" & txtbphno.Text & "'," & Val(txtastval.Text) & ")")
MsgBox "Successfully registered..."
cmdadd.Caption = "Add"
Call Form_Load
Else
If cmdadd.Caption = "Add" Then
s = "select * from tbl_appartment"
rrs.Open (s), con, adOpenKeyset, adLockOptimistic
If rrs.EOF = True And rrs.BOF = True Then
id = 10001
Else
rrs.MoveLast
id = rrs!app_id + 1
End If
cboapid = id
cmdadd.Caption = "Save"
txtapname.Enabled = True
txtapphno.Enabled = True
txtapadrs.Enabled = True
txtbuilder.Enabled = True
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
46
Apartment Management System
txtbadrs.Enabled = True
txtbphno.Enabled = True
txtastval.Enabled = True
cboapid.Enabled = False
End If
End If
con.Close
End Sub
Private Sub cmdblock_Click()
frmblock.Show
End Sub
Private Sub cmdclear_Click()
Call Form_Load
End Sub
Private Sub cmdclose_Click(index As Integer)
Unload Me
End Sub
Private Sub cmddelete_Click()
Dim X As Integer
X = MsgBox("Do you want to delete the record?", vbYesNo)
If (X = 6) Then
Call fnconnect
con.Open
s = "delete tbl_appartment where app_id='" & cboapid.Text & "'"
Set rs = con.Execute(s)
MsgBox "Successfully Deleted..."
Call Form_Load
End If
End Sub
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
47
Apartment Management System
Private Sub cmdedit_Click()
If cmdedit.Caption = "Edit" Then
cmdedit.Caption = "Update"
txtapname.Enabled = True
txtapphno.Enabled = True
txtapadrs.Enabled = True
txtbuilder.Enabled = True
txtbadrs.Enabled = True
txtbphno.Enabled = True
txtastval.Enabled = True
cmdedit.Enabled = True
cmddelete.Enabled = False
cboapid.Enabled = False
cmdadd.Enabled = False
cmddelete.Enabled = False
Else
Call fnconnect
con.Open
s = "update tbl_appartment set app_name='" & txtapname.Text & "',adrs='" &
txtapadrs.Text & "',phone='" & txtapphno.Text & "',builder='" & txtbuilder.Text &
"',build_det='" & txtbadrs.Text & "',b_ph='" & txtbphno.Text & "',cost=" &
Val(txtastval.Text) & " where app_id='" & cboapid.Text & "'"
Set rs = con.Execute(s)
MsgBox "Successfully updated..."
cmdedit.Caption = "Edit"
cmdadd.Enabled = True
cmddelete.Enabled = True
End If
End Sub
Private Sub Form_Load()
cboapid.Clear
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
48
Apartment Management System
Call fnconnect
con.Open
s = "select * from tbl_appartment"
rrs.Open (s), con, adOpenKeyset, adLockOptimistic
If rrs.EOF = False Then rrs.MoveFirst
While rrs.EOF = False
cboapid.AddItem (rrs!app_id)
rrs.MoveNext
Wend
txtapname.Enabled = False
txtapphno.Enabled = False
txtapadrs.Enabled = False
txtbuilder.Enabled = False
txtbadrs.Enabled = False
txtbphno.Enabled = False
txtastval.Enabled = False
cmdedit.Enabled = False
cmddelete.Enabled = False
cmdadd.Enabled = True
cboapid.Enabled = True
txtapname.Text = ""
txtapphno.Text = ""
txtapadrs.Text = ""
txtbuilder.Text = ""
txtbadrs.Text = ""
txtbphno.Text = ""
txtastval.Text = ""
cmdedit.Caption = "Edit"
cmdadd.Caption = "Add"
End Sub
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
49
Apartment Management System
Private Sub Label5_Click()
End Sub
Private Sub Label7_Click()
End Sub
Private Sub txtapphno_KeyPress(KeyAscii As Integer)
Call num_val(KeyAscii)
KeyAscii = akeys
End Sub
Private Sub txtastval_KeyPress(KeyAscii As Integer)
Call num_val(KeyAscii)
KeyAscii = akeys
End Sub
Private Sub txtbphno_KeyPress(KeyAscii As Integer)
Call num_val(KeyAscii)
KeyAscii = akeys
End Sub
Form main
Private Sub Command1_Click()
frmappartment.Show
End Sub
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
50
Apartment Management System
Private Sub Command10_Click()
frmmaintain.Show
End Sub
Private Sub Command11_Click()
frmowner.Show
End Sub
Private Sub Command12_Click()
frmflat.Show
End Sub
Private Sub Command13_Click()
frmpayment.Show
End Sub
Private Sub Command14_Click()
DataReport1.Show
End Sub
Private Sub Command2_Click()
frmblock.Show
End Sub
Private Sub Command3_Click()
frmflat.Show
End Sub
Private Sub Command4_Click()
frmpayment.Show
End Sub
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
51
Apartment Management System
Private Sub Command5_Click()
frmuserreg.Show
End Sub
Private Sub Command6_Click()
frmowner.Show
End Sub
Private Sub Command7_Click()
frmmaintain.Show
End Sub
Private Sub Command8_Click()
frmappartment.Show
End Sub
Private Sub Command9_Click()
frmblock.Show
End Sub
Private Sub Form_Load()
If usertype = "Admin" Then
frameadmin.Visible = True
userframe.Visible = False
Else
frameadmin.Visible = False
userframe.Visible = True
End If
End Sub
Form maintain
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
52
Apartment Management System
Dim rs As New ADODB.Recordset
Dim rrs As New ADODB.Recordset
Dim id As Integer
Private Sub cboappid_Click()
Call fnconnect
con.Open
s = "select * from tbl_appartment where app_id='" & cboappid.Text & "'"
rrs.Open (s), con, adOpenKeyset, adLockOptimistic
If rrs.EOF = False And rrs.BOF = False Then
rrs.MoveFirst
txtappname.Text = rrs!app_name
End If
Call fnconnect
con.Open
s = "select * from tbl_block where app_id='" & cboappid.Text & "'"
rrs.Open (s), con, adOpenKeyset, adLockOptimistic
If rrs.EOF = False Then rrs.MoveFirst
While rrs.EOF = False
cbobid.AddItem (rrs!block_id)
rrs.MoveNext
Wend
End Sub
Private Sub cbowid_Click()
Call fnconnect
con.Open
s = "select * from tbl_maintain where work_id='" & cbowid.Text & "'"
rrs.Open (s), con, adOpenKeyset, adLockOptimistic
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
53
Apartment Management System
If rrs.EOF = False And rrs.BOF = False Then
rrs.MoveFirst
cboappid.Text = rrs!app_id
txtappname.Text = rrs!app_name
cbobid.Text = rrs!block_id
txtdet.Text = rrs!work_det
txtcost.Text = rrs!expence
txtpay.Text = rrs!payment
End If
cmdadd.Enabled = False
cmdedit.Enabled = True
cmddelete.Enabled = True
End Sub
Private Sub cmdadd_Click()
Call fnconnect
con.Open
If cmdadd.Caption = "Save" Then
Set rs = con.Execute("insert into tbl_maintain values('" & cbowid.Text & "','" &
cboappid.Text & "','" & txtappname.Text & "','" & cbobid.Text & "','" & txtdet.Text & "',"
& Val(txtcost.Text) & "," & Val(txtpay.Text) & ")")
MsgBox "Successfully registered..."
cmdadd.Caption = "Add"
Call Form_Load
Else
If cmdadd.Caption = "Add" Then
s = "select * from tbl_maintain"
rrs.Open (s), con, adOpenKeyset, adLockOptimistic
If rrs.EOF = True And rrs.BOF = True Then
id = 101
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
54
Apartment Management System
Else
rrs.MoveLast
id = rrs!work_id + 1
End If
cbowid = id
cmdadd.Caption = "Save"
Call fnconnect
con.Open
s = "select * from tbl_appartment"
rrs.Open (s), con, adOpenKeyset, adLockOptimistic
If rrs.EOF = False Then rrs.MoveFirst
While rrs.EOF = False
cboappid.AddItem (rrs!app_id)
rrs.MoveNext
Wend
txtcost.Enabled = True
cboappid.Enabled = True
cbobid.Enabled = True
cbowid.Enabled = False
End If
End If
con.Close
End Sub
Private Sub cmdclose_Click()
Unload Me
End Sub
Private Sub cmddelete_Click()
Dim X As Integer
X = MsgBox("Do you want to delete the record?", vbYesNo)
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
55
Apartment Management System
If (X = 6) Then
Call fnconnect
con.Open
s = "delete tbl_maintain where work_id='" & cbowid.Text & "'"
Set rs = con.Execute(s)
MsgBox "Successfully Deleted..."
Call Form_Load
End If
End Sub
Private Sub cmdedit_Click()
If cmdedit.Caption = "Edit" Then
cmdedit.Caption = "Update"
cboappid.Enabled = True
Call fnconnect
con.Open
s = "select * from tbl_appartment"
rrs.Open (s), con, adOpenKeyset, adLockOptimistic
If rrs.EOF = False Then rrs.MoveFirst
While rrs.EOF = False
cboappid.AddItem (rrs!app_id)
rrs.MoveNext
Wend
cmdadd.Enabled = False
cmddelete.Enabled = False
Else
Call fnconnect
con.Open
s = "update tbl_maintain set app_id='" & cboappid.Text & "',app_name='" &
txtappname.Text & "',block_id='" & cbobid.Text & "',work_det='" & txtdet.Text &
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
56
Apartment Management System
"',expence=" & Val(txtcost.Text) & ",payment=" & Val(txtpay.Text) & " where
work_id='" & cbowid.Text & "'"
Set rs = con.Execute(s)
MsgBox "Successfully updated..."
cmdedit.Caption = "Edit"
cmdadd.Enabled = True
cmddelete.Enabled = True
Call Form_Load
End If
End Sub
Private Sub Form_Load()
cbowid.Clear
cbobid.Clear
cboappid.Clear
Call fnconnect
con.Open
s = "select * from tbl_maintain"
rrs.Open (s), con, adOpenKeyset, adLockOptimistic
If rrs.EOF = False Then rrs.MoveFirst
While rrs.EOF = False
cbowid.AddItem (rrs!work_id)
rrs.MoveNext
Wend
cbobid.Enabled = True
cboappid.Enabled = True
cbowid.Enabled = True
txtappname.Text = ""
txtcost.Text = ""
txtpay.Text = ""
txtdet.Text = ""
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
57
Apartment Management System
cmdadd.Enabled = True
cmdedit.Enabled = False
cmddelete.Enabled = False
cmdedit.Caption = "Edit"
cmdadd.Caption = "Add"
End Sub
Private Sub txtcost_KeyPress(KeyAscii As Integer)
Call num_val(KeyAscii)
KeyAscii = akeys
End Sub
Private Sub txtpay_KeyPress(KeyAscii As Integer)
Call num_val(KeyAscii)
KeyAscii = akeys
End Sub
Form owner
Dim rs, rrs As New ADODB.Recordset
Dim id As Integer
Private Sub cboid_Click()
Call fnconnect
con.Open
s = "select * from tbl_owner where own_id='" & cboid.Text & "'"
rrs.Open (s), con, adOpenKeyset, adLockOptimistic
If rrs.EOF = False And rrs.BOF = False Then
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
58
Apartment Management System
rrs.MoveFirst
txtname.Text = rrs!own_name
txtadrs.Text = rrs!adrs
txtphone.Text = rrs!phone
End If
cmdedit.Enabled = True
cmddelete.Enabled = True
cmdadd.Enabled = False
End Sub
Private Sub cmdadd_Click()
Call fnconnect
con.Open
If cmdadd.Caption = "Save" Then
Set rs = con.Execute("insert into tbl_owner values('" & cboid.Text & "','" & txtname.Text
& "','" & txtadrs.Text & "','" & txtphone.Text & "')")
MsgBox "Successfully registered..."
cmdadd.Caption = "Add"
Call Form_Load
Else
If cmdadd.Caption = "Add" Then
s = "select * from tbl_owner"
rrs.Open (s), con, adOpenKeyset, adLockOptimistic
If rrs.EOF = True And rrs.BOF = True Then
id = 1001
Else
rrs.MoveLast
id = rrs!own_id + 1
End If
Call Form_Load
cboid = id
cmdadd.Caption = "Save"
txtname.Enabled = True
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
59
Apartment Management System
txtphone.Enabled = True
txtadrs.Enabled = True
cboid.Enabled = False
End If
End If
con.Close
End Sub
Private Sub cmdcancel_Click()
Call Form_Load
End Sub
Private Sub cmdclose_Click()
Unload Me
End Sub
Private Sub cmddelete_Click()
Dim X As Integer
X = MsgBox("Do you want to delete the record?", vbYesNo)
If (X = 6) Then
Call fnconnect
con.Open
s = "delete tbl_owner where own_id='" & cboid.Text & "'"
Set rs = con.Execute(s)
MsgBox "Successfully Deleted..."
Call Form_Load
End If
End Sub
Private Sub cmdedit_Click()
If cmdedit.Caption = "Edit" Then
cmdedit.Caption = "Update"
txtname.Enabled = True
txtphone.Enabled = True
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
60
Apartment Management System
txtadrs.Enabled = True
cmdadd.Enabled = False
cmddelete.Enabled = False
Else
Call fnconnect
con.Open
s = "update tbl_owner set own_name='" & txtname.Text & "',phone='" & txtphone.Text &
"',adrs='" & txtadrs.Text & "' where own_id='" & cboid.Text & "'"
Set rs = con.Execute(s)
MsgBox "Successfully updated..."
cmdedit.Caption = "Edit"
Call Form_Load
ssssEnd If
End Sub
Private Sub Form_Load()
cboid.Clear
Call fnconnect
con.Open
s = "select * from tbl_owner"
rrs.Open (s), con, adOpenKeyset, adLockOptimistic
If rrs.EOF = False Then rrs.MoveFirst
While rrs.EOF = False
cboid.AddItem (rrs!own_id)
rrs.MoveNext
Wend
txtadrs.Enabled = False
txtname.Enabled = False
txtphone.Enabled = False
cmdadd.Enabled = True
cmdedit.Enabled = False
cmddelete.Enabled = False
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
61
Apartment Management System
cboid.Enabled = True
txtname.Text = ""
txtphone.Text = ""
txtadrs.Text = ""
End Sub
Private Sub txtphone_KeyPress(KeyAscii As Integer)
Call num_val(KeyAscii)
KeyAscii = akeys
End Sub
Form payment
Dim rs As New ADODB.Recordset
Dim rrs As New ADODB.Recordset
Dim id As String
Dim amt As Double
Private Sub cboappid_Click()
Call fnconnect
con.Open
s = "select * from tbl_appartment where app_id='" & cboappid.Text & "'"
rrs.Open (s), con, adOpenKeyset, adLockOptimistic
If rrs.EOF = False And rrs.BOF = False Then
rrs.MoveFirst
txtname.Text = rrs!app_name
End If
Call fnconnect
con.Open
s = "select * from tbl_block where app_id='" & cboappid.Text & "'"
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
62
Apartment Management System
rrs.Open (s), con, adOpenKeyset, adLockOptimistic
If rrs.EOF = False Then rrs.MoveFirst
While rrs.EOF = False
cbobid.AddItem (rrs!block_id)
rrs.MoveNext
Wend
End Sub
Private Sub cbobid_Click()
cbofno.Clear
Call fnconnect
con.Open
s = "select * from tbl_flat where app_id='" & cboappid.Text & "' and block_id='" &
cbobid.Text & "'"
rrs.Open (s), con, adOpenKeyset, adLockOptimistic
If rrs.EOF = False Then rrs.MoveFirst
While rrs.EOF = False
cbofno.AddItem (rrs!flat_no)
rrs.MoveNext
Wend
End Sub
Private Sub cbomid_Change()
Call fnconnect
con.Open
s = "select * from tbl_maintain where pid='" & cbomid.Text & "'"
rrs.Open (s), con, adOpenKeyset, adLockOptimistic
If rrs.EOF = False Then
rrs.MoveFirst
While rrs.EOF = False
txtmamt.Text = rrs!amount
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
63
Apartment Management System
amt = rrs!amount
'txtdate.Text = rrs!p_date
'txtcashier.Text = rrs!cashier
rrs.MoveNext
Wend
End If
End Sub
Private Sub cbompayid_Click()
Call fnconnect
con.Open
s = "select * from tbl_payment where pid='" & cbopayid.Text & "'"
rrs.Open (s), con, adOpenKeyset, adLockOptimistic
If rrs.EOF = False Then
rrs.MoveFirst
While rrs.EOF = False
'cboappid.Text = rrs!app_id
'txtname.Text = rrs!app_name
'cbobid.Text = rrs!block_id
'cbofno.Text = rrs!flat_id
'txtamount.Text = rrs!amount
'txtdate.Text = rrs!p_date
'txtcashier.Text = rrs!cashier
rrs.MoveNext
Wend
End If
End Sub
Private Sub cbopid_Click()
Call fnconnect
con.Open
s = "select * from tbl_payment where pid='" & cbopid.Text & "'"
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
64
Apartment Management System
rrs.Open (s), con, adOpenKeyset, adLockOptimistic
If rrs.EOF = False Then
rrs.MoveFirst
While rrs.EOF = False
cboappid.Text = rrs!app_id
txtname.Text = rrs!app_name
cbobid.Text = rrs!block_id
cbofno.Text = rrs!flat_id
txtamount.Text = rrs!amount
txtdate.Text = rrs!p_date
txtcashier.Text = rrs!cashier
rrs.MoveNext
Wend
End If
End Sub
Private Sub cmdclose_Click()
Unload Me
End Sub
Private Sub cmdpclose_Click()
Unload Me
End Sub
Private Sub cmdpsave_Click()
If cmdpsave.Caption = "Save" Then
Call fnconnect
con.Open
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
65
Apartment Management System
Set rs = con.Execute("insert into tbl_payment values('" & cbopid.Text & "','" &
cboappid.Text & "','" & txtname.Text & "','" & cboappid.Text & "','" & cbofno.Text & "',"
& txtamount.Text & ",'" & txtdate.Text & "','" & txtcashier.Text & "','B')")
MsgBox "Thank you.."
cmdpsave.Caption = "New"
ElseIf cmdpsave.Caption = "New" Then
Call fnconnect
con.Open
s = "select * from tbl_payment"
rrs.Open (s), con, adOpenKeyset, adLockOptimistic
If rrs.EOF = True And rrs.BOF = True Then
id = 1001
Else
rrs.MoveLast
id = rrs!pid + 1
End If
cbopid.Text = id
cmdpsave.Caption = "Save"
Call fnconnect
con.Open
s = "select * from tbl_appartment"
rrs.Open (s), con, adOpenKeyset, adLockOptimistic
If rrs.EOF = False Then rrs.MoveFirst
While rrs.EOF = False
cboappid.AddItem (rrs!app_id)
rrs.MoveNext
Wend
End If
End Sub
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
66
Apartment Management System
Private Sub cmdsave_Click()
If cmdsave.Caption = "Save" Then
'If amt > 0 Then
Call fnconnect
con.Open
Set rs = con.Execute("insert into tbl_mpay values('" & cbompayid.Text & "','" &
cbomid.Text & "','" & txtmamt.Text & "','" & txtmdate.Text & "','" & txtcashr.Text & "')")
MsgBox "Thank you.."
'Call fnconnect
'con.Open
's = "update tbl_maintain set amount=" & amt - Val(txtmamt.Text) & " where own_id='"
& cbomid.Text & "'"
'Set rs = con.Execute(s)
'Else
'MsgBox "Payment Already Completed Can't Process"
'Call Form_Load
'End If
cmdsave.Caption = "New"
ElseIf cmdsave.Caption = "New" Then
Call fnconnect
con.Open
s = "select * from tbl_mpay"
rrs.Open (s), con, adOpenKeyset, adLockOptimistic
If rrs.EOF = True And rrs.BOF = True Then
id = 1001
Else
rrs.MoveLast
id = rrs!pid + 1
End If
cbompayid.Text = id
cmdsave.Caption = "Save"
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
67
Apartment Management System
Call fnconnect
con.Open
s = "select * from tbl_maintain"
rrs.Open (s), con, adOpenKeyset, adLockOptimistic
If rrs.EOF = False Then rrs.MoveFirst
While rrs.EOF = False
cbomid.AddItem (rrs!work_id)
rrs.MoveNext
Wend
End If
End Sub
Private Sub Command5_Click()
CommonDialog1.ShowPrinter
PrintForm
End Sub
Private Sub Form_Load()
Frame1.Visible = False
Frame2.Visible = False
txtmdate.Text = Date
txtdate.Text = Date
txtcashier.Text = user
txtcashr.Text = user
End Sub
Private Sub Option1_Click()
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
68
Apartment Management System
Frame1.Visible = True
Frame2.Visible = False
Call fnconnect
con.Open
s = "select * from tbl_payment where stype='B'"
rrs.Open (s), con, adOpenKeyset, adLockOptimistic
If rrs.EOF = False Then
rrs.MoveFirst
While rrs.EOF = False
cbopid.AddItem (rrs!pid)
rrs.MoveNext
Wend
End If
End Sub
Private Sub Option2_Click()
Frame1.Visible = False
Frame2.Visible = True
txtmdate.Text = Date
Call fnconnect
con.Open
s = "select * from tbl_payment where stype='M'"
rrs.Open (s), con, adOpenKeyset, adLockOptimistic
If rrs.EOF = False Then
rrs.MoveFirst
While rrs.EOF = False
cbopid.AddItem (rrs!pid)
rrs.MoveNext
Wend
End If
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
69
Apartment Management System
End Sub
Form block
Dim rs As New ADODB.Recordset
Dim rrs As New ADODB.Recordset
Dim id As Integer
Private Sub cbobid_Click()
Call fnconnect
con.Open
s = "select * from tbl_block where block_id='" & cbobid.Text & "'"
rrs.Open (s), con, adOpenKeyset, adLockOptimistic
If rrs.EOF = False And rrs.BOF = False Then
rrs.MoveFirst
cboappid.Text = rrs!app_id
txtflatno.Text = rrs!no_flat
txtarea.Text = rrs!total_area
End If
cmdedit.Enabled = True
cmddelete.Enabled = True
cmdadd.Enabled = False
End Sub
Private Sub cmdadd_Click()
Call fnconnect
con.Open
If cmdadd.Caption = "Save" Then
Set rs = con.Execute("insert into tbl_block values('" & cbobid.Text & "','" &
cboappid.Text & "'," & txtflatno.Text & "," & txtarea.Text & ")")
MsgBox "Successfully registered..."
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
70
Apartment Management System
cmdadd.Caption = "Add"
Call Form_Load
Else
If cmdadd.Caption = "Add" Then
s = "select * from tbl_block"
rrs.Open (s), con, adOpenKeyset, adLockOptimistic
If rrs.EOF = True And rrs.BOF = True Then
id = 2001
Else
rrs.MoveLast
id = rrs!block_id + 1
End If
cbobid = id
cmdadd.Caption = "Save"
Call fnconnect
con.Open
s = "select * from tbl_appartment"
rrs.Open (s), con, adOpenKeyset, adLockOptimistic
If rrs.EOF = False Then rrs.MoveFirst
While rrs.EOF = False
cboappid.AddItem (rrs!app_id)
rrs.MoveNext
Wend
txtarea.Enabled = True
cboappid.Enabled = True
cbobid.Enabled = False
End If
End If
con.Close
End Sub
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
71
Apartment Management System
Private Sub cmdclear_Click()
Call Form_Load
End Sub
Private Sub cmdclose_Click()
Unload Me
End Sub
Private Sub cmddelete_Click()
Dim X As Integer
X = MsgBox("Do you want to delete the record?", vbYesNo)
If (X = 6) Then
Call fnconnect
con.Open
s = "delete tbl_block where block_id='" & cbobid.Text & "' and app_id='" &
cboappid.Text & "'"
Set rs = con.Execute(s)
MsgBox "Successfully Deleted..."
Call Form_Load
End If
End Sub
Private Sub cmdedit_Click()
If cmdedit.Caption = "Edit" Then
cmdedit.Caption = "Update"
txtflatno.Enabled = True
txtarea.Enabled = True
cboappid.Enabled = True
Call fnconnect
con.Open
s = "select * from tbl_appartment"
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
72
Apartment Management System
rrs.Open (s), con, adOpenKeyset, adLockOptimistic
If rrs.EOF = False Then rrs.MoveFirst
While rrs.EOF = False
cboappid.AddItem (rrs!app_id)
rrs.MoveNext
Wend
cmdadd.Enabled = False
cmddelete.Enabled = False
Else
Call fnconnect
con.Open
s = "update tbl_block set app_id='" & cboappid.Text & "',no_flat='" & txtflatno.Text &
"',total_area='" & txtarea.Text & "' where block_id='" & cbobid.Text & "'"
Set rs = con.Execute(s)
MsgBox "Successfully updated..."
cmdedit.Caption = "Edit"
cmdadd.Enabled = True
cmddelete.Enabled = True
End If
End Sub
Private Sub Form_Load()
cbobid.Clear
cboappid.Clear
Call fnconnect
con.Open
s = "select * from tbl_block"
rrs.Open (s), con, adOpenKeyset, adLockOptimistic
If rrs.EOF = False Then rrs.MoveFirst
While rrs.EOF = False
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
73
Apartment Management System
cbobid.AddItem (rrs!block_id)
rrs.MoveNext
Wend
cbobid.Enabled = True
cboappid.Enabled = True
txtarea.Text = ""
txtflatno.Text = ""
cmdadd.Enabled = True
cmdedit.Enabled = False
cmddelete.Enabled = False
cmdedit.Caption = "Edit"
cmdadd.Caption = "Add"
End Sub
Private Sub txtarea_KeyPress(KeyAscii As Integer)
Call num_val(KeyAscii)
KeyAscii = akeys
End Sub
Private Sub txtflatno_KeyPress(KeyAscii As Integer)
Call num_val(KeyAscii)
KeyAscii = akeys
End Sub
11.2 SCREENSHOTS
Form apartment
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
74
Apartment Management System
Form flat
Form maintanance
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
75
Apartment Management System
Form payment
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
76
Apartment Management System
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
77
Apartment Management System
CET COLLEGE OF MANAGEMENT, SCIENCE & TECHNOLOGY
78