Builder and Developer 2015 TILAK COLLEGE OF SCIENCE & COMMERCE VASHI, NAVI MUMBAI - 400703 PROJECT REPORT ON BUILDER AND DEVELOPER BY Mr. Nafis Ahmed Shaikh. T.Y. BSc (COMPUTER SCIENCE) UNIVERSITY OF MUMBAI (2014 – 2015) PROJECT GUIDE Ms. Indu Kumar. Ms. Sandhya Salve. 1
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Builder and Developer 2015
TILAK COLLEGE OF SCIENCE & COMMERCE
VASHI, NAVI MUMBAI - 400703
PROJECT REPORT
ON
BUILDER AND DEVELOPER
BY
Mr. Nafis Ahmed Shaikh.
T.Y. BSc (COMPUTER SCIENCE)
UNIVERSITY OF MUMBAI
(2014 – 2015)
PROJECT GUIDE
Ms. Indu Kumar.
Ms. Sandhya Salve.
1
Builder and Developer 2015
TABLE OF CONTENT
Sr. No. Title
1. Acknowledgement
2. Introduction
3. Present system :
A. Present system
B. Limitations of Present System
4 Proposed System:
A. Proposed System
B. Features
C. Advantage of propose system
D. Feasibility Study
E. Gantt Chart
5. System Documentation :
A. Event Table
B. Use Case Diagram
C. ER Diagram
D. Activity Diagram
E. Class Diagram
. F. Object Diagram
G. Sequence Diagram
H. State Chart Diagram
6. System Design:
A. Converting ERD into Tables
B. Component Diagram
C. Package Diagram
D. Deployment Diagram
7. System Coding:
2
Builder and Developer 2015
A. Hardware & Software requirements
B. Technology used
C. Menu Tree
D. Table Design
E. Naming Convention used
F. Program Description
G. Form Description
H. Validation
I. System Coding
8. SDLC Methodology used
9. Screen Layouts
10. Testing
11. Future Scope
12. Conclusion
13. Reference and Bibliography
3
Builder and Developer 2015
ACKNOWLEDGEMENT
It is a great indeed pleasure and privilege for me to represent the report. Any task however small cannot be completed without proper guidance.
In particular, I would like to thank our principal “-------------” and our Course Coordinator ”Prof. Sherly Roy”, for their blessings and for being a constant source of inspiration to us.
With immense gratitude, I would to give a very special honor and respect to our teachers, “Ms. Sandhya Salve” and “Ms. Indu Kumar” who took keen interest in checking the minute details of the project work and guided us throughout the same.
A sincere quote of thanks to the non-teaching staff for providing us Books and with all the information we needed for this project, without which the successful completion of this project would not have been possible. I appreciate the outstanding cooperation by the non-teaching staff, especially for the long Lab timings that we could receive.
Last but not least I wish to avail myself of this opportunity, express a sense of gratitude and love to my friends and my beloved parents for their manual support, strength and help for everything.
Mr. Nafis Ahmed Shaikh.
4
Builder and Developer 2015
PRELIMINARY
INVESTIGATION
5
Builder and Developer 2015
INTRODUCTION
Property dealing project is a user friendly software developed in Vb.net programming language as front end and SQL server database as back end. This project is designed to save the data of all those persons who will hire, lease or buy any kind of property like buildings, flats, plots etc. which will reduce manual work and helps the dealer to save the records efficiently. This project is aimed at developing a Property Dealer Software. It provides the simplest, cheapest and an less time and energy consuming way of Property Dealing.
In old days, the Property Dealer may have to keep records of the properties manually. This method of keeping the records is quiet time consuming and less efficient. Also there are more chances of mistakes by keeping the records manually as human beings are habitual of doing mistakes. So with the help of this, Property Dealing Software, the chances of mistakes becomes very few. Also it is very efficient method of keeping the records of properties sold as well as unsold properties. It consumes very less time as compared to manual method.
The application is divided into three modules. The admin i.e. the Property Dealer itself handles the whole software . He managed the database as well as all the records.
6
Builder and Developer 2015
Present System and Limitation
In old days, the Property Dealer may have to keep records of the properties manually on the papers. This method of keeping the records is quiet time consuming and less efficient. Also there are more chances of mistakes by keeping the records manually as human beings are habitual of doing mistakes.
There are several types of cost associated with manual records. One type , duplication of the record, requires paper and copying supplies, as well as the staff to create and distribute the copies. Staff hired to assemble, file, retrieve, or distribute the hard copy chart is a costly expenses. Storage of the paper record necessitates the use of valuable space that could be better utilized. The records also need to be protected from water, fire, or mishandling of the paper to preserve their physical integrity. Staff members time required to deliver paper records to a specific location. If the paper record is not readily available, clerical staff responsible for filling documentation may need to make several attempts before the task is completed. There is no ability to sort data fields in a paper record. Staff responsible for reporting mandated data elements to the appropriate organizations must perform a manual review. There is limitation to the physical quality of the paper record. Paper is fragile and does not last permanently. Normal use of the record may result in torn or stained documents also over the years, ink used to complete documentation can fade. Actual damage resulting from water or fire is another threat to the physical integrity of the paper records.
Major Disadvantage:
• Cost of manual records
• Lost productivity from manual records
• Accessibility of records
• Quality of manual records
7
Builder and Developer 2015
• Fragmentation caused by manual records
PROPOSED SYSTEM
Features:
All the records and data have been computerized and are now
persistent.
Manual calculations have been automated.
Access to all types of records made easy.
The proposed system is a computerized system.
The customer has to just give his details like contact number, address,
Number of person accommodating with him and also the mode of
payment along with his details.
It also maintain record of all people who have visited their hotel, has a stay before through a database.
Paper work is avoid.
Advantages of Proposed System:
This system is User-friendly, interactive and easy to use.
Save excess paper work.
Time saving.
No complexities.
Data security and backup facility.
8
Builder and Developer 2015
The system simplifies the work of searching and adding the details of
customer.
Formatted data.
Records/ information’s are easily approachable.
The calculation can be done automatically.
FEASIBILITY STUDY
Preliminary Investigation is the first phase in any system developing
life cycle. The Feasibility Study is a major part of this phase.
Feasibility Study means selecting the best system that meet the
performance requirement.
It is the measure of how beneficial or practical the development of an
Information System would be to the organization.
Our study of the feasible development of the software is going to be in
terms of the following aspects:
Operational Feasibility:
Proposed system is beneficial only if it can be turned into management system that will meet the need of the client’s operating requirements. Kalidasa Library’s work is increasing day by day.The proposed system is operationally feasible due to the following reasons:
• The system is easy to use and is very simple.
• The proposed system will cost no harm to the company; instead it
will enhance the result in a better respect.
• The new system will avoid confusion and resistance by catching the
user’s attention, as it is presentable.
9
Builder and Developer 2015
Economical Feasibility:
1. Development Cost
• Equipments required for developing the software are easily available.
• Equipment maintenance is also minimum.
• Saving of paper work and manpower reduced.
• Once the required hardware and software requirements get fulfilled
there is no need for the user of our system to spend for any additional
overhead.
• Training cost is reduced.
2. Benefits which cannot be measured:
• Increased customer Loyalty
• Increased customer satisfaction
Technical Feasibility:
At first it is necessary to check that the proposed system is technically feasible or not and to determine the technology and skill necessary to carry out the project. If they are not available then find out the solution to obtain them. Hardware is already available in the college.
Social feasibility:.
Although generally there is always resistance, initially to any change in the system is aimed at relieving the workload of the users to extent the system is going to facilitate user to perform operations like calculating salary amounts and deductions, generating the reports using data reports with less possible errors. Thus there is no reason to make system socially unfeasible
10
Builder and Developer 2015
GANTT CHART
TaskNov Dec Jan Feb
(1 to 30 Nov) (1 to 31 Dec) (1to 31Jan) ( 1to 28Feb)
1. Planning PhaseDefine the problemWork breakdown structureProduct Project Schedule
2. Analysis PhaseGather InformationDefine System RequirementObjectives and Feasibility
III Limitation of Present System 20-Nov-2014 20-Nov-2014
IV Proposed System and its Advantages 26-Nov-2014 26-Nov-2014
V Feasibility Study 26-Nov-2014 26-Nov-2014
VI Gantt Chart 29-Nov-2014 29-Nov-2014
2 Analysis Phase 23-Dec-2014 23-Dec-2014
I Fact Finding Technique 10-Dec-2014 10-Dec-2014
II Event Table 10-Dec-2014 10-Dec-2014
III Use Case Diagram 10-Dec-2014 10-Dec-2014
IV ERD 17-Dec-2014 17-Dec-2014
V Activity Diagram 17-Dec-2014 17-Dec-2014
VI Class Diagram 17-Dec-2014 17-Dec-2014
VII Object Diagram 23-Dec-2014 23-Dec-2014
VIII Sequence Diagram 23-Dec-2014 23-Dec-2014
3. System Design 14-Jan-2015 14-Jan-2015
I Converting ERD to tables 07-Jan-2015 07-Jan-2015
II Package Diagram 07-Jan-2015 07-Jan-2015
III Deployment Diagram 14-Jan-2015 14-Jan-2015
IV Structure chart 14-Jan-2015 14Jan-2015
4. System Coding and implementation 04-Mar-2015 04-Mar-2015
I Menu Tree 21-Jan-2015 21-Jan-2015
II List of Table with
Attributes, Constraints
28-Jan-2015 28-Jan-2015
III Validations 28-Jan-2015 28-Jan-2015
IV Test cases , Test Data, Test Result 04-Feb-2015 04-Feb-2015
V Screen Layout & Reports Layout 11-Feb-2015 11-Feb-2015
5 . System Implementation 28-Feb-2015 28-Feb-2015
Builder and Developer 2015
METHODOLOGY ADOPTED
Incremental Model (IM):-
This model derives its name from the way in which the software is built. More specifically, the model is designed, implemented and tested as a series of incremental builds until the product is finished. A build consists of pieces of code from various modules that interact together to provide a specific function.
At each stage of IM, a new build is coded and then integrated into the structure which is tested as a whole. Note that the product is defined as finished only when it satisfies all of its requirements.
This model combines the elements of Waterfall model with the iterative philosophy of prototyping. However, unlike prototyping the IM focuses on the delivery of an operational product at the end of each increment.
14
Builder and Developer 2015
The first increment is usually the core product which addresses the basic requirements of the system. This may be either be used by the client or subjected to detailed review to develop plan for the next increment.
Essentially the build with the highest value-to-cost ratio is the one that provides the client with the most functionality (value) for the least cost. Using this method, the client has a usable product at all of the development stages.
15
Builder and Developer 2015
SYSTEM ANALYSIS
16
Builder and Developer 2015
EVENTS
An event occurs at a specific time & place, that can be described & is worth remembered by the system. Events drive or trigger all processing that a system does, so listing them & then analyzing them make sense when you need to define system requirements.
EXTERNAL EVENT:An event that occurs outside the system usually initiated by an external
agent or actor.
TEMPORAL EVENT:An event that occurs as a result of reaching a point in time.
EVENT TABLE
A table that lists events in rows & key pieces of information about each event in columns.
TRIGGER:An occurrence that tells the system that an event has occurred, either
the arrival of data needing processing or of point in time.
SOURCE:An external agent or actor that supplies data to the system.
ACTIVITY:Behavior that the system performs when an event occurs.
RESPONSE:An output, produce by the system that goes to the system.
DESTINATION:An external agent or actor that receives data from the system.
Use Case Diagram is used to identify the “uses” or use cases of the new system-- in other words, to identify how the system will be used .The Use Case Diagram is essentially an extension of the Event Table.
USE CASE:
It describes an activity the system carries out in response to an
event.
ACTOR:
In UML, the person involved is called an Actor. An Actor is always outside of the Automation Boundary of the system.
CONNECTING LINE:
The arrow is used to show which Actors participate in which Use
cases.
19
Builder and Developer 2015
USE CASE DIAGRAM NOTATIONS:
DESCRIPTION:
The Object Oriented approach uses the term use case to describe an activity the system carries out in response to an event. One can think of a use case as a case or situation where the system is used for some purpose .A use case diagram is a convenient way to document the functions that the system must support. Sometimes a single,
20
Automation Boundary
Use Case
Use Case
Connecting Line
Actor
Builder and Developer 2015
comprehensive diagram is used to describe the entire system. At other times, a set of smaller use case diagrams make up the use case model.
USE - CASE DIAGRAM
bkjkkkncxkcc
Customer Builder
ENTITY RELATIONSHIP DIAGRAM
21
Makes enquiry
Gives details of flats
Books the flat
Payment of flat
Gives documents of flat
Builder and Developer 2015
The entity – relationship (ER) data model allows us to describe the data involved in a real world enterprise in terms of object and their relationships and is widely used to develop an initial database design.
The ER model is important primarily for its role in database design. It provides useful concepts that allow us to move from an informal description of what users want from their database to a more detailed and precise description that can be implemented in a DBMS. The ER model is used in a phase called “Conceptual Database Design”. It should be noted that many variations of ER diagrams are in use and no widely accepted standards prevail.
ER modeling is something regarded as a complete approach to design a logical database schema. This is incorrect because the ER diagram is just an approximate description of data, constructed through a very subjective evaluation of the information collected during requirements analysis.
Entity:
An entity is an object in the real world that is distinguishable from other objects. Examples include the following: The C++ language, the address of the manager of the institution. It is often useful to identify a collection of similar entities. Such a collection is called as “Entity set”. Note that entity set need not be disjoint.
Attributes:
An entity is described using a set of attributes. All entities in a given entity set have the same attributes; this essentially what we mean by similar. Our choice of attributed reflects the level of detail at which we wish to represent information in crisis.
Domain:
For each attribute associated with an entity set, we must identify a domain of possible values. For e.g. the domain associated with the attribute name of the student might be of the set of 20-character string. Another example would be the ranking of the students in the institute would be on the scale of 1-6, the associated domain consists of integers 1 through 6.
Key:
22
Builder and Developer 2015
Further, for each entity set we choose a key. A key is a minimal set of attributed whose values uniquely identify an entity in the set. There could be more than one candidate; if so we designate one of them as primary key. For now we will assume that each entity set contains at least one set of attributes that uniquely identify an entity in the entity set; that is the set of attributes contains a key.
SYMBOLS USED FOR ERD:
ENTITY SET
PROCESS
LINK ATTRIBUTE TO ENTITY SET AND
ENTITY SET TO RELATIONSHI
ER - DIAGRAM
23
Builder and Developer 2015
1
*
ACTIVITY DIAGRAM
24
Client
Builder
Flat enquiry
Booking
Customer
Flat purchase
Name
Address
Pay ID
Booking ID
Registration ID
Off_AddressName Name
Address
Contact No
Cancellation
Name
Address
Cancel_ID
Name
Contact
Flat
Rate
Flat NoFlat Type
Area
Transaction
balance
Building
Name
Address
Registration
Payment
Pay ID
Builder and Developer 2015
Activity diagrams are graphical representations of workflows of stepwise activities and actions with support for choice, iteration and concurrency. In the Unified Modeling Language, activity diagrams can be used to describe the business and operational step-by-step workflows of components in a system. An activity diagram shows the overall flow of control.
The most important shape types:
• Rounded rectangles represent activities;
• Diamonds represent decisions;
• Bars represent the start (split) or end (join) of concurrent activities;
• A black circle represents the start (initial state) of the workflow;
• An encircled black circle represents the end (final state).
• Arrows run from the start towards the end and represent the
orderwhich activities happen.
ACTIVITY DIAGRAM
Start
25
System checks username & password
Builder and Developer 2015
Try
again
Invalid
Valid
Start
26
Login screen
Enter username & password
Gives an
error
Login successfully
Client takes information
Builder and Developer 2015
No
Yes
27
Developer gives building info.
Request for flat
If intereste
d
Report generation
Booking
Cancellation
Builder and Developer 2015
CLASS DIAGRAM
CLASS DIAGRAM:
The Class diagrams are used to identify and classify the objects which constitute a system. It also includes the important attributes of the objects which must be captured.
CLASS:
It is a collection of objects of same type.
RELATIONSHIP:
A naturally occurring association among specific things.
CLASS DIAGRAM NOTATIONS:
In Class diagram, rectangles represent Class and the lines connecting the rectangle show the relationships among Classes.
DESCRIPTION:
It is a model which is used to show the classes constituting a system and their interrelationships .It is based on UML (Unified Modeling Language). Only the important attributes and methods are shown in Class Diagrams. In the initial period of analysis, the important attributes of the classes, which must be captured and the functionalities provided by the class may not be very clear . As the analysis progresses, the attributes and methods may be added.
CLASS DIAGRAM
28
Builder and Developer 2015
1
*
1..*
29
Builder Off AddressContact NoNameMake records of building
Flat
TypeRateAreaAdd(),update()Delete()
Building
Name Location Assign Share HolderDelete Share
Customer
IdNameContact –NoRegIdAdd(),update()Delete()
*
* *
*
*
Builder and Developer 2015
*
1…*
OBJECT DIAGRAM
Object diagrams are derived from class diagrams so object diagrams are dependent upon class diagrams.
Object diagrams represent an instance of a class diagram. The basic concepts are similar for class diagrams and object diagrams. Object diagrams also
30
Booking
NameBooking idReg id
Add(),update()Delete()
Payment
Payment IdBooking Id
Add(),update()Delete()
* *
*
Builder and Developer 2015
represent the static view of a system but this static view is a snapshot of the system at a particular moment.
So the purpose of the object diagram can be summarized as:
• Forward and reverse engineering.
• Object relationships of a system• Static view of an interaction.• Understand object behavior and their relationship from practical
perspective.
1 * 1
31
Builder : B
Name = ”ABC”
Building : Bl
Name=”Sai”
Flat : F
Flat ID=”101”
Customer : C
Cust ID = ”100”
Booking : BK
Booking ID= ”1”
Client : Cl
Client ID = ”101”
Cancellation : CA
Regi ID=”500"
Builder and Developer 2015
SEQUENCE DIAGRAM
A Sequence Diagram has the following features:
A Sequence diagram describes interactions among classes in terms of
an “exchange of messages over time”.
Some of the facts related to Sequence Diagrams are:
Sequence Diagrams are used to depict the time sequence of messages
exchanged between objects.
Messages can correspond to operation on class or a event trigger.
Notations of a Sequence diagram include:
Lifeline: It is a vertical dashed line that represents the “lifetime” of an
Object.
Arrows: They indicate flow of messages between objects.
Activation: It is a thin rectangle showing period of time, during which
an object is performing an action.
32
Builder and Developer 2015
SEQUENCE DIAGRAM
Developsbuilding
Enquiry of flats
if available response if affordable then
customer pays the payment
if not affordable
cancellation
33
Builder Building Customer Booking Payment
Builder and Developer 2015
STATE CHART DIAGRAM
A State Chart Diagram describes the dynamic behavior of a system in
response to external stimuli.
A State Chart Diagram helps:
To model dynamic behavior of objects based on states.
To model reactive objects, whose states are triggered by specific
events.
To describe passive objects, which go through several distinct phases
during
their life time.
Parts of a State are:
Name: Unique name identifying the state
Sub-states: Set of “disjoint sub-states” or “concurrent sub-states”.
State – Sub-state relationship: Useful to understand the modeling of
complex
behaviors.
Entry action: An action that happens as a result of transition into a
state
Exit action: An action that has to happen immediately before a state
change.
Internal activity: Activities that occur within an object while it is in a
particular
state.
34
Builder and Developer 2015
STATE CHART DIAGRAM
No
Yes
Cancellation
generating bills
35
Developing Buildings
Taking information
If intere
st
Booking Cancellation
Gives Payment
Start
Builder and Developer 2015
SYSTEM DESIGN
36
Builder and Developer 2015
CONVERTING ERD TO TABLE
An ERD is a pictorial representation of the interaction that can be captured by
database.
Converting ERD to table helps:
It allows database professionals to describe an overall design concisely
get accurately.
It can be easily transformed into the relational schema.
Parts are:
Entity Sets. Relationship Sets.
We will convert each entity set to table, which involves deciding the tables.
37
Builder and Developer 2015
CONVERTING ERD TO TABLE
38
Builder
Name Address Contact
Building
Building name location
Customer
Pay ID Name Address Contact No
Flat
Id Area Rate Flat type
Registration ID
Booking ID
Booking
Book ID Name Address
Payment
Pay ID Book ID
Cancellation
Cancel ID Client ID Refund
Builder and Developer 2015
COMPONENT DIAGRAM
Component Diagrams describe the organization of components, including
source code, run-time (binary) code, and executables.
Component Diagrams:
Give the physical view of the system in terms of implementation
aspect. This is important for reusability and performance purpose.
Constitute the Components, their interfaces and realizations, and
dependencies between Components
Component Diagrams are used:
To depict organizations and dependencies among Component type.
To show allocation of “classes” and “objects” to Components (also
referred to as modules) in the physical design of the system.
To indicate the “physical layering” and “partitioning” of the system
Architecture
A Component typically encompasses:
Structure and behavior of a “collaboration of classes” from the system
design.
Interfaces that describe a group of operations implemented by
Components
39
Builder and Developer 2015
Realization which is the relationship between an “interface” and the
“class” that
provides the interface’s services
COMPONENT DIAGRAM
40
Flat Master
Enquiry Registration Master
Booking Master
Building Master
MDI
Customer Master
Builder and Developer 2015
PACKAGE DIAGRAM
A package diagram in the Unified Modeling Language depicts the dependencies between the packages that make up a model.
In addition to the standard UML Dependency relationship, there are two special types of dependencies defined between packages:
package import
package merge
A package import is "a relationship between an importing namespace and a package, indicating that the importing namespace adds the names of the members of the package to its own namespace." [1] By default, an unlabeled dependency between two packages is interpreted as a package import relationship.
A package merge is "a directed relationship between two packages, that indicates that the contents of the two packages are to be combined. It is very similar to Generalization in the sense that the source element conceptually adds the characteristics of the target element to its own characteristics resulting in an element that combines the characteristics of both"[2]
Package diagrams can use packages containing use cases to illustrate the functionality of a software system.
Package diagrams can use packages that represent the different layers of a software system to illustrate the layered architecture of a software system. The dependencies between these packages can be adorned with labels stereotypes to indicate the communication mechanism between the layers.
41
Builder and Developer 2015
PACKAGE DIAGRAM
42
Number of days Tax Calculation
Builder_Developer
Builder
Customer
Booking
Building
Payment
Client
Builder and Developer 2015
DEPLOYMENT DIAGRAM
A deployment diagram in the Unified Modeling Language models the physical deployment of artifacts on nodes.[1] To describe a web site, for example, a deployment diagram would show what hardware components ("nodes") exist (e.g., a web server, an application server, and a database server), what software components ("artifacts") run on each node (e.g., web application, database), and how the different pieces are connected (e.g. JDBC, REST, RMI).
The nodes appear as boxes, and the artifacts allocated to each node appear as rectangles within the boxes. Nodes may have sub nodes, which appear as nested boxes. A single node in a deployment diagram may conceptually represent multiple physical nodes, such as a cluster of database servers.
43
Builder_Developer
Hardware
Database
Builder and Developer 2015
SYSTEM CODINGSYSTEM CODING
44
Builder and Developer 2015
Hardware and Software Requirement
HARDWARE REQUIREMENTS:
1. PROCESSOR: Pentium 3 or higher
2. RAM: 512 MB or higher
3. HARD DISK SPACE: 80GB or higher
SOFTWARE REQUIREMENTS:
1. FRAMEWORK: Net Framework 4.0
2. ENVIRONMENT: MICROSOFT VISUAL STUDIO.NET
3. DATABASE: SQL SERVER.
4. PLATFORM: Windows
45
Builder and Developer 2015
Technology Used
Overview of the .NET Framework
The .NET Framework is a new computing platform that simplifies application development in the highly distributed environment of the Internet.The .NET Framework is designed to fulfill the following objectives:
• To provide a consistent object-oriented programming environment
whether object code is stored and executed locally, executed locally but
Internet-distributed, or executed remotely.
• To provide a code-execution environment that minimizes software
deployment and versioning conflicts.
• To provide a code-execution environment that guarantees safe execution
of code, including code created by an unknown or semi-trusted third
party.
• To provide a code-execution environment that eliminates the performance
problems of scripted or interpreted environments.
• To make the developer experience consistent across widely varying types
of applications, such as Windows-based applications and Web-based
applications.
• To build all communication on industry standards to ensure that code
based on the .NET Framework can integrate with any other code.
46
Builder and Developer 2015
Front End:- Vb.Net
Visual Basic .NET (VB.NET) is an object-oriented computer programming language implemented on the .NET Framework. Although it is an evolution of classic Visual Basic language, it is not backwards-compatible with VB10, and any code written in the old version does not compile under VB.NET.
Like all other .NET languages, VB.NET has complete support for object-oriented concepts. Everything in VB.NET is an object, including all of the primitive types (Short, Integer, Long, String, Boolean, etc.) and user-defined types, events, and even assemblies. All objects inherits from the base class Object.
VB.NET is implemented by Microsoft's .NET framework. Therefore, it has full access to all the libraries in the .Net Framework. It's also possible to run VB.NET programs on Mono, the open-source alternative to .NET, not only under Windows, but even Linux or Mac OSX.
The following reasons make VB.Net a widely used professional language:
• Modern, general purpose.• Object oriented.
• Component oriented.
• Easy to learn.
• Structured language.
47
Builder and Developer 2015
• It produces efficient programs.
• It can be compiled on a variety of computer platforms.
• Part of .Net Framework.
Common Language Run Time(CLR)
CLR is an application virtual machine that provides important services such as security, memory management, and exception handling. Programs written for the .NET Framework execute in a software environment which is known as CLR. The application that run under the CLR are called managed code. CLR is the foundation of the .NET Framework. You can think of the runtime as an agent that manages code at execution time, providing core services such as memory management, thread management, and remoting, while also enforcing strict type safety and other forms of code accuracy that ensure security and robustness. In fact, the concept of code management is a fundamental principle of the runtime. Code that targets the runtime is known as managed code, while code that does not target the runtime is known as unmanaged code. The class library, the other main component of the .NET Framework, is a comprehensive, object-oriented collection of reusable types that you can use to develop applications ranging from traditional command-line or graphical user interface (GUI) applications to applications based on the latest innovations provided by ASP.NET, such as Web Forms and XML Web services.
Common Language Specification (CLS):
To fully interact with other objects regardless of the language they were implemented in, objects must expose to callers only those features that are common to all the languages they must interoperate with. For this reason, the Common Language Specification (CLS), which is a set of basic language features needed by many applications, has been defined.
Back End:- MS-SQL Server 2008
48
Builder and Developer 2015
Microsoft SQL Server is a relational database management system developed by Microsoft. As a database, it is a software product whose primary function is to store and retrieve data as requested by other software applications, be it those on the same computer or those running on another computer across a network (including the Internet). SQL Server 2010 was released in 2010. It included native support for managing XML data, in addition to relational data. Common Language Runtime (CLR) integration was introduced with this version, enabling one to write SQL code as Managed Code by the CLR. SQL Server 2010 has also been enhanced with new indexing algorithms, syntax and better error recovery systems. CLR was introduced with SQL Server 2005 to let it integrate with the .NET Framework.
Profession1 nvarchar (50) Holds profession of witness1
NAMING CONVENTIONS USED
Control Name Naming Convention Used
TextBox Txt
Combobox cmb
Button Btn
Label Lbl
DataGridView Dgv
CheckBoxes Ch
DateTimePicker Dtp
54
Builder and Developer 2015
PROGRAM DESCRIPTION
1. Building Management Subsystem
This subsystem consists of handling all the details of buildings.This includes:- Maintaining records of buildings.- Time to time updating their records.
2. Flat Management Subsystem
This subsystem consists of handling all the work associated with respect to flats of buildings.This includes:-Maintaining records of flats.-Time to time updating their records.
3. Customer Management Subsystem
55
Builder and Developer 2015
This subsystem consists of handling all the work associated with respect to customer.This includes:-Maintaining records of customer,-Time to time updating their records.
4. Booking Management Subsystem
This subsystem consists of handling all the work associated with respect to display booking information of customer.This includes:
-Marinating records of booking.
5. Payment Management Subsystem
This subsystem consists of handling all the work associated with respect to payment of the flats.This includes:-Marinating records of payment done by customer
6. Cancellation Management Subsystem
This subsystem consists of handling all the work associated with respect to cancellation of booking of the flats.This includes:-Marinating records of booking cancellation done by customer.
7. Report Management Subsystem
This subsystem consists of maintain and generating all the reports (monthly or annually).The report list includes:
56
Builder and Developer 2015
Saving ReportSaving Report
Account ReportAccount Report
Loan ReportLoan Report
Loan Payment SlipLoan Payment Slip
Regular Payment SlipRegular Payment Slip
FORM DESCRIPTIONFORM DESCRIPTION
Login:
txtuser This textbox is used to take input of username from the
user
txtpassword This textbox is used to take input of password from the
user
btnsign This button is used to login into the system
btnreset This button is used to reset the password field.
btnrcpawd This button is used to change the password.
Building:
57
Builder and Developer 2015
txtbuilid This textbox is display building Id
txtbuilname This textbox is used to take name of building
txtlocation This textbox is used to take location of building
btnsave This button is used to save details of building
btnsearch This button is used to search the details of building
btnupdate This button is used to update the details of building
btnexit This button is used to exit the building details window
Customer:
txtcustid This textbox is used to take customer id.
tctcustname This textbox is used to take customer name.
lblvalidation This label is used to display the validation message
txtprofession This textbox is used to take profession of customer..
txtaddress This textbox is used to take address of customer.
txtcontact This textbox is used to take contact.
txtannincome This textbox is used to take annual income of customer.
btnadd This button is used to add the customer details.
btnsave This button is used to save details of customer.
btnsearch This button is used to search the current building details.
btnupdate This button is used to update the existing building details.
Flat:
txtflatid This textbox is used to take flat id.
58
Builder and Developer 2015
txtbuil_name This textbox is used to take building name.
txtwing This textbox is used to take wing name.
txttypeofflat This textbox is used to take type of flat.
txtarea This textbox is used to take area of flat.
txtrate This textbox is used to take rate of flat.
txttamnt This textbox is used to take total amount of flat.
btnsearch This button is used to search flat details.
btnexit This button is used to exit the currently opened
window.
Booking:
Txtcustid This textbox is used to take customer id.
tctcustname This textbox is used to take customer name.
lblvalidation This label is used to display the validation message
txtprofession This textbox is used to take profession of customer..
txtaddress This textbox is used to take address of customer.
dtpbookdate This datetimepicker is used to display the booking date.
txtbookid This textbox is used to take booking id.
txtrgiid This textbox is used to display the registration Id.
dtpregidate This datetimepicker is used to display the registration date.
txttotal_Amnt This textbox is used to take total amount.
txtbookamnt This textbox is used to take booking amount.
txtgtotal This textbox is used to take grand total amount.
btnadd This button is used to add the booking details.
59
Builder and Developer 2015
btnsave This button is used to save details of customer.
btnsearch This button is used to search the details of customer.
btnupdate This button is used to update the existing details of
booking.
btnexit This button is used to exit the current form window.
Payment:
cmbtpayid This combobox is used to take payment id.
txtcustname This textbox is used to take customer name.
cmbcustid This combobox is used to take customer id.
dtpbookdate This datetimepicker is used to display the booking date.
dtppaydate This datetimepicker is used to display the payment date.
Txttotalamnt This textbox is used to take total amount of flat.
txtamnt_paid This textbox is used to take paid amount.
txtamntbal This textbox is used to take balance amount.
btnsave This button is used to save details of customer.
btnsearch This button is used to search the current payment details.
btnupdate This button is used to update the existing payment details.
btnexit This button is used to exit the window.
Booking Cancellation:
txtcustid This textbox is used to take customer id.
tctcustname This textbox is used to take customer name.
txtcancelid This textbox is used to take cancellation id.
60
Builder and Developer 2015
dtpbookdate This datetimepicker is used to display the booking date.
txtflatid This textbox is used to take flat id.
dtpcanceldate This datetimepicker is used to display the cancellation date.
txtrefund This textbox is used to take refund.
btnadd This button is used to add the booking cancellation details.
btnsave This button is used to save details of customer.
btnsearch This button is used to search the details of customer.
btnupdate This button is used to update the existing details of booking
cancellation.
btnexit This button is used to exit the current form window.
Registration:
txtcustid This textbox is used to take customer id.
tctcustname This textbox is used to take customer name.
txtprofession This textbox is used to take profession of customer..
txtaddress This textbox is used to take address of customer.
dtpbookdate This datetimepicker is used to display the booking date.
dtpregidate This datetimepicker is used to display the registration date.
txttotal_Amnt This textbox is used to take total amount.
txtamnt_paid This textbox is used to take paid amount.
txtbal This textbox is used to take balance amount.
btnadd This button is used to add the booking details.
btnsave This button is used to save details of customer.
btnsearch This button is used to search the details of customer.
btnupdate This button is used to update the existing details of
booking.
61
Builder and Developer 2015
btnexit This button is used to exit the current form window.
txtname1 This textbox is used to take witness name1.
txtaddress1 This textbox is used to take witness address1.
txtprofession1 This textbox is used to take witness profession1.
txtname2 This textbox is used to take witness name2.
txtaddress2 This textbox is used to take witness address2.
txtprofession2 This textbox is used to take witness profession2.
Validation
Login:
rdbtn Must select the appropriate user.
txtpassword This textbox should not be left empty
Customer Details:
txtcust_id It should be auto generated
txtname It should not be empty and only takes characters.
txtoff_address The textbox should take only characters,
txtxtcontactno It should be equal to 10 digits
txtage The age should be in between 21-50.
Enquiry Registration Details:
62
Builder and Developer 2015
txtcl_id It should be auto generated
txtname It should not be empty and only takes characters.
txtxtcontactno It should be equal to 10 digits
txtemail it should not be empty
Payment Details:
txtpay_id It should be auto generated
txtcust_id It should not be empty.
txtcustname It should not be empty and only takes characters.
dtpbookdate It should not be empty and select date from date time picker.
dtpregdate It should not be empty.
txttotal_amnt It should not be empty.
txtamnt_bal It should not be empty.
txtbank It should not be empty.
txtcheq_no It should not be empty.
Cancellation Details:
txtcance_id It should be auto generated
dtpbookdate It should not be empty.
dtpcancelkdate It should not be empty.
63
Builder and Developer 2015
txtamnt_paid It should not be empty.
txtrefund It should not be empty.
CODING
frmsplash.vb
Public Class frmsplashDim a As Integer = 0Private Sub frmsplash_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Timer1.Enabled = True End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick a = a + 1 ProgressBar1.Value = a If ProgressBar1.Value = 10 Then lblcount.Text = "10%" End If If ProgressBar1.Value = 20 Then lblcount.Text = "20%" End If If ProgressBar1.Value = 30 Then lblcount.Text = "30%" End If If ProgressBar1.Value = 40 Then lblcount.Text = "40%" End If If ProgressBar1.Value = 50 Then lblcount.Text = "50%" End If If ProgressBar1.Value = 60 Then lblcount.Text = "60%" End If If ProgressBar1.Value = 70 Then lblcount.Text = "70%" End If If ProgressBar1.Value = 80 Then lblcount.Text = "80%" End If If ProgressBar1.Value = 90 Then lblcount.Text = "90%"
64
Builder and Developer 2015
End If If ProgressBar1.Value = 100 Then lblcount.Text = "100%" Timer1.Stop() a = 0 Timer1.Enabled = False Dim m As New frmmdi m.Show() Me.Hide() End If End SubEnd Class
frmlogin.vb
Imports System.Data.SqlClientPublic Class login Dim n As Integer = 0 Dim con As New SqlConnection("Data Source=BSC-13\SQLEXPRESS; Initial Catalog=bookingdatabase;Integrated Security=True") Dim cmd As SqlCommand Dim dr As SqlDataReader Private Sub btnlogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnlogin.Click Try If con.State = ConnectionState.Closed Then con.Open() End If cmd = New SqlCommand("select * from tbllogin", con) dr = cmd.ExecuteReader() While dr.Read If dr(0).ToString() = txtusername.Text And dr(1).ToString() = txtpassword.Text Then MsgBox("You have Login Successfully...") frmsplash.Show() Me.Hide() Exit Sub Else MsgBox("Login denied...Please Try Again") n = n + 1 txtusername.Text = "" txtpassword.Text = "" txtusername.Focus() End If If n = 3 Then MsgBox("Better try next time...") End If End While con.Close() Catch ex As Exception
65
Builder and Developer 2015
MsgBox(ex.ToString) End Try Me.Show() End Sub Private Sub btncancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btncancel.Click Me.Close() End Sub Private Sub btnreset_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnreset.Click txtusername.Text = "" txtpassword.Text = "" txtusername.Focus() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Me.Hide() frmchangrpwd.Show() End SubEnd Class
frmmdi.v b
Imports System.Windows.FormsPublic Class frmmdi Private Sub BuildingToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BuildingToolStripMenuItem.Click frmbuilding_details.MdiParent = Me frmbuilding_details.Show() End Sub Private Sub CustomerToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CustomerToolStripMenuItem.Click frmcustomer.MdiParent = Me frmcustomer.Show() End Sub Private Sub FlatToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FlatToolStripMenuItem.Click frmflat_details.MdiParent = Me frmflat_details.Show() End Sub Private Sub EnquiryRegistrationToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EnquiryRegistrationToolStripMenuItem.Click frmenq_registration.MdiParent = Me frmenq_registration.Show() End Sub Private Sub BookingToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BookingToolStripMenuItem.Click frmbooking_info.MdiParent = Me
66
Builder and Developer 2015
frmbooking_info.Show() End Sub Private Sub PaymentToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PaymentToolStripMenuItem.Click frmpayment.MdiParent = Me frmpayment.Show() End Sub Private Sub BookingCancellationToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BookingCancellationToolStripMenuItem.Click frmbooking_cancellation.MdiParent = Me frmbooking_cancellation.Show() End SubPrivate Sub RegistrationToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RegistrationToolStripMenuItem.Click frmregistration.MdiParent = Me frmregistration.Show() End Sub Private Sub PaymentToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PaymentToolStripMenuItem1.Click ReportPayment.MdiParent = Me ReportPayment.Show() End Sub Private Sub BookingInformationToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BookingInformationToolStripMenuItem.Click rptBooking.MdiParent = Me rptBooking.Show() End Sub Private Sub BookingCancellationToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BookingCancellationToolStripMenuItem1.Click ReportBookCancellation.MdiParent = Me ReportBookCancellation.Show() End Sub Private Sub FlatInformationToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FlatInformationToolStripMenuItem.Click rptflat.MdiParent = Me rptflat.Show() End Sub Private Sub RegistrationInformationToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RegistrationInformationToolStripMenuItem.Click rptRegistration.MdiParent = Me rptRegistration.Show() End SubEnd Class
67
Builder and Developer 2015
Module1.vb
Imports System.Data.SqlClient Module Module1 Public con As SqlConnection Public Sub connection() Source=D:\UMFH12\14642\library\database\library.mdb") con = New SqlConnection("Data Source=BSC-13\SQLEXPRESS; Initial Catalog=bookingdatabase;Integrated Security=True") End Sub Public Function chkChar(ByVal a As Integer) As Integer If a >= 97 And a <= 123 Or a >= 65 And a <= 90 Or a = 8 Then Return a Else Return 0 End If End Function Public Function chkInt(ByVal a As Integer) As Integer If a >= 48 And a <= 57 Or a = 8 Then Return a Else Return 0 End If End Function Public Function chkSpChar(ByVal a As Integer) As Integer If a >= 97 And a <= 123 Or a >= 65 And a <= 90 Or a >= 48 And a <= 57 Or a = 8 Or a = 32 Or a = 45 Or a = 44 Or a = 40 Or a = 41 Then Return a Else Return 0 End If End Function Public Function chkCharInt(ByVal a As Integer) As Integer If a >= 97 And a <= 123 Or a >= 65 And a <= 90 Or a >= 48 And a <= 57 Or a = 8 Then Return a Else Return 0 End If End FunctionEnd Module
frmcustomer_details .vb
Imports System.Data.SqlClientPublic Class frmcustomer
68
Builder and Developer 2015
Dim con As SqlConnection Dim cmd As SqlCommand Dim da As SqlDataAdapter Dim ds As DataSet Dim dv As DataView Dim rowcount As Integer = 0 Dim i As Integer Dim cust_id As Integer Private Sub setCon(ByRef strsql As String) Try con = New SqlConnection("Data Source=BSC-13\SQLEXPRESS; Initial Catalog=bookingdatabase;Integrated Security=True") Module1.connection() da = New SqlDataAdapter(strsql, Module1.con) ds = New DataSet da.Fill(ds, "cust") dv = New DataView(ds.Tables("cust"))
Catch ex As Exception MsgBox(ex.ToString) End Try End Sub Private Sub setFields(ByVal value As Boolean) btnadd.Enabled = value btnUpdate.Enabled = value btnDelete.Enabled = value btnExit.Enabled = value btnclear.Enabled = value End Sub Private Sub setTextfields(ByVal value As Boolean) txtname.Enabled = value txtage.Enabled = value txtprofession.Enabled = value txtaincome.Enabled = value txtcon_no.Enabled = value txtoffadd.Enabled = value End Sub Private Sub clearFields() txtid.Text = "" txtname.Text = "" txtoffadd.Text = "" txtcon_no.Text = "" txtprofession.Text = "" txtage.Text = "" txtaincome.Text = "" End Sub Private Sub BindFields() txtid.DataBindings.Clear()
69
Builder and Developer 2015
txtname.DataBindings.Clear() txtoffadd.DataBindings.Clear() txtcon_no.DataBindings.Clear() txtage.DataBindings.Clear() txtprofession.DataBindings.Clear() txtaincome.DataBindings.Clear() txtid.DataBindings.Add("text", dv, "Cust_ID") txtname.DataBindings.Add("text", dv, "Cust_Name") txtoffadd.DataBindings.Add("text", dv, "Off_Address") txtcon_no.DataBindings.Add("text", dv, "ContactNo") txtprofession.DataBindings.Add("text", dv, "Profession") txtage.DataBindings.Add("text", dv, "Age") txtaincome.DataBindings.Add("text", dv, "Anu_Income") End Sub Private Sub setInfotoform() Call setCon("Select * from customer_details") BindFields() Me.BindingContext(dv).Position = 0 End Sub Private Function key_autogenerate() Me.BindingContext(dv).Position = Me.BindingContext(dv).Count - 1 Return CInt(Me.BindingContext(dv).Current("Cust_ID") + 1) End Function Public Sub data() Try If Module1.con.State = ConnectionState.Closed Then Module1.con.Open() End If Dim str As String = "select * from customer_details" Dim cmd As New SqlCommand(str, Module1.con) Dim p As New SqlDataAdapter(cmd) Dim ds1 As New DataSet p.Fill(ds1) dgv.DataSource = ds1.Tables(0) dgv.Update() dgv.Refresh() Module1.con.Close() Catch ex As Exception MsgBox(ex.ToString()) End Try End Sub Private Sub customer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Call setInfotoform() setTextfields(False) Call data() End Sub Private Sub btnadd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnadd.Click
70
Builder and Developer 2015
If btnadd.Text = "Add" Then Call setFields(False) btnadd.Enabled = True btnExit.Enabled = True btnadd.Text = "Save" btnExit.Text = "Cancel" cust_id = key_autogenerate() Call clearFields() setTextfields(True) txtid.Text = cust_id ElseIf btnadd.Text = "Save" Then Try If txtname.Text = "" And txtoffadd.Text = "" And txtcon_no.Text = "" And txtage.Text = "" And txtaincome.Text = "" And txtprofession.Text = "" Then MsgBox("Please fill all the fields") ElseIf txtname.Text = "" Then MsgBox("Please enter First Name upto 20 characters") txtname.Focus() ElseIf txtoffadd.Text = "" Then MsgBox("Please enter Address upto 100 characters") txtoffadd.Focus()
ElseIf txtcon_no.Text = "" Then MsgBox("Please enter Contact No upto 12 digits") txtcon_no.Focus() ElseIf txtage.Text = "" Then MsgBox("Please enter proper age.") txtage.Focus() ElseIf txtaincome.Text = "" Then MsgBox("Please enter Contact No upto 12 digits") txtaincome.Focus() ElseIf txtprofession.Text = "" Then MsgBox("Please enter your profession name") txtprofession.Focus() ElseIf Val(txtage.Text) < 25 Or Val(txtage.Text) > 50 Then MsgBox("Please enter the age between 25 to 50") ElseIf txtaincome.Text = "" Then MsgBox("The Income should be greater than 20000") Else btnadd.Text = "Add" btnExit.Text = "Exit" Module1.con.Open() cmd = New SqlCommand cmd.Connection = Module1.con cmd.CommandText = "insert into customer_details(Cust_ID,Cust_Name,Off_Address,ContactNo,Profession,Age,Anu_Income) values(" & txtid.Text & ",'" & txtname.Text & "','" & txtoffadd.Text & "'," &
71
Builder and Developer 2015
txtcon_no.Text & ",'" & txtprofession.Text & " '," & txtage.Text & "," & txtaincome.Text & ")" i = cmd.ExecuteNonQuery MsgBox(i & "record inserted") Module1.con.Close() Call data() setFields(True) setTextfields(False) End If Catch ex As Exception MsgBox(ex.ToString) End Try End If End Sub Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete.Click Try Module1.con.Open() cmd = New SqlCommand cmd.Connection = Module1.con cmd.CommandText = "Delete from customer_details where Cust_ID=" & txtid.Text & "" i = cmd.ExecuteNonQuery() MsgBox(i & "Record Deleted") Module1.con.Close() Call data() setFields(True) Catch ex As Exception MsgBox(ex.ToString()) End Try End Sub Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click If btnUpdate.Text = "Edit" Then Call setFields(False) btnUpdate.Enabled = True btnExit.Enabled = True btnUpdate.Text = "Update" btnExit.Text = "Cancel" setTextfields(True) ElseIf btnUpdate.Text = "Update" Then btnUpdate.Text = "Edit" btnExit.Text = "Exit" Try Module1.con.Open() cmd = New SqlCommand cmd.Connection = Module1.con cmd.CommandText = "update customer_details set Cust_Name='" & txtname.Text & "',Off_Address='" & txtoffadd.Text & "',ContactNo =" & txtcon_no.Text
72
Builder and Developer 2015
& ",Profession ='" & txtprofession.Text & "',Age =" & txtage.Text & ",Anu_Income =" & txtaincome.Text & " where Cust_ID=" & txtid.Text & "" i = cmd.ExecuteNonQuery MsgBox(i & "Record Updated") Module1.con.Close() Call data() setFields(True) setTextfields(False) Catch ex As Exception MsgBox(ex.ToString()) End Try End If End Sub Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click If btnExit.Text = "Exit" Then End ElseIf btnExit.Text = "Cancel" Then btnadd.Text = "Add" btnExit.Text = "Exit" clearFields() setFields(True) setTextfields(False) End If End Sub Private Sub btnclear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnclear.Click clearFields() End Sub Private Sub txtname_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtname.KeyPress, txtname.KeyPress e.KeyChar = Chr(chkChar(Asc(e.KeyChar))) End Sub Private Sub txtaddress_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtoffadd.KeyPress e.KeyChar = Chr(chkChar(Asc(e.KeyChar))) End Sub Private Sub txtcon_no_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtcon_no.KeyPress e.KeyChar = Chr(chkInt(Asc(e.KeyChar))) End Sub Private Sub txtage_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtage.KeyPress e.KeyChar = Chr(chkInt(Asc(e.KeyChar))) End Sub Private Sub btnFirst_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFirst.Click Me.BindingContext(dv).Position = 0
73
Builder and Developer 2015
rowcount = 0 End Sub Private Sub btnPrevious_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrevious.Click rowcount = rowcount - 1 Me.BindingContext(dv).Position = Me.BindingContext(dv).Position - 1 If rowcount < 0 Then MsgBox("First Record") rowcount = 0 End If End Sub Private Sub btnNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNext.Click rowcount = rowcount + 1 Me.BindingContext(dv).Position = Me.BindingContext(dv).Position + 1 If rowcount = ds.Tables(0).Rows.Count Then MsgBox("Last Record") rowcount = rowcount - 1 End If End Sub Private Sub btnLast_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLast.Click BindFields() Me.BindingContext(dv).Position = Me.BindingContext(dv).Count - 1 rowcount = ds.Tables(0).Rows.Count - 1 End Sub Private Sub txtprofession_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtprofession.KeyPress e.KeyChar = Chr(chkChar(Asc(e.KeyChar))) End SubEnd Class
frmflat_Details.vb
Imports System.Data.SqlClientPublic Class frmflat_details Dim con As SqlConnection Dim cmd As SqlCommand Dim da As SqlDataAdapter Dim ds As DataSet Dim dv As DataView Dim dr As SqlDataReader Dim rowcount As Integer = 0 Dim i As Integer Dim flat_id As Integer Private Sub setCon(ByRef strsql As String) Try con = New SqlConnection("Data Source=BSC-13\SQLEXPRESS;
74
Builder and Developer 2015
Initial Catalog=bookingdatabase;Integrated Security=True") Module1.connection() da = New SqlDataAdapter(strsql, Module1.con) ds = New DataSet da.Fill(ds, "flat") dv = New DataView(ds.Tables("flat")) Catch ex As Exception MsgBox(ex.ToString) End Try End Sub Private Sub setFields(ByVal value As Boolean) btnsearch.Enabled = value btnadd.Enabled = value btnUpdate.Enabled = value btnDelete.Enabled = value btnExit.Enabled = value btnclear.Enabled = value End Sub Private Sub setTextfields(ByVal value As Boolean) txtbook_name.Enabled = value cmbwing.Enabled = value cmbflat_no.Enabled = value cmbfloor.Enabled = value cmbtype_of_flat.Enabled = value txtarea.Enabled = value txtrate.Enabled = value txttotal_amnt.Enabled = value End Sub Private Sub clearFields() txtflat_id.Text = "" txtbook_name.Text = "" cmbwing.Text = "" cmbflat_no.Text = "" cmbfloor.Text = "" cmbtype_of_flat.Text = "" txtarea.Text = "" txtrate.Text = "" txttotal_amnt.Text = "" End Sub Private Sub BindFields() txtflat_id.DataBindings.Clear() txtbook_name.DataBindings.Clear() cmbwing.DataBindings.Clear() cmbflat_no.DataBindings.Clear() cmbfloor.DataBindings.Clear() cmbtype_of_flat.DataBindings.Clear() txtarea.DataBindings.Clear() txtrate.DataBindings.Clear() txttotal_amnt.DataBindings.Clear()
75
Builder and Developer 2015
txtflat_id.DataBindings.Add("text", dv, "Flat_ID") txtbook_name.DataBindings.Add("text", dv, "Booking_Name") cmbwing.DataBindings.Add("text", dv, "Wing") cmbflat_no.DataBindings.Add("text", dv, "Flat_No") cmbfloor.DataBindings.Add("text", dv, "Floor") cmbtype_of_flat.DataBindings.Add("text", dv, "Type_Of_Flat") txtarea.DataBindings.Add("text", dv, "Area") txtrate.DataBindings.Add("text", dv, "Rate") txttotal_amnt.DataBindings.Add("text", dv, "Total_Amount") End Sub Private Sub setInfotoform() Call setCon("Select * from tblflat_details") BindFields() Me.BindingContext(dv).Position = 0 End Sub Private Function key_autogenerate() Me.BindingContext(dv).Position = Me.BindingContext(dv).Count - 1 Return CInt(Me.BindingContext(dv).Current("Flat_ID") + 1) End Function Public Sub data() Try If Module1.con.State = ConnectionState.Closed Then Module1.con.Open() End If Dim str As String = "select * from tblflat_details" Dim cmd As New SqlCommand(str, Module1.con) Dim p As New SqlDataAdapter(cmd) Dim ds1 As New DataSet p.Fill(ds1) dgv.DataSource = ds1.Tables(0) dgv.Update() dgv.Refresh() Module1.con.Close() Catch ex As Exception MsgBox(ex.ToString()) End Try End Sub Private Sub flat_details_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Call setInfotoform() setTextfields(False) Call data() Try cmd = New SqlCommand("select Flat_ID from tblflat_details", Module1.con) Module1.con.Open() dr = cmd.ExecuteReader While dr.Read cmbsearch.Items.Add(dr(0).ToString()) End While
76
Builder and Developer 2015
dr.Close() Module1.con.Close() Catch ex As Exception End Try End Sub Private Sub btnadd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnadd.Click If btnadd.Text = "Add" Then Call setFields(False) btnadd.Enabled = True btnExit.Enabled = True btnadd.Text = "Save" btnExit.Text = "Cancel" flat_id = key_autogenerate() Call clearFields() setTextfields(True) txtflat_id.Text = flat_id ElseIf btnadd.Text = "Save" Then Try If txtbook_name.Text = "" And cmbwing.Text = "" And cmbflat_no.Text = "" And cmbfloor.Text = "" And cmbtype_of_flat.Text = "" And txtarea.Text = "" And txtrate.Text = "" And txttotal_amnt.Text = "" Then MsgBox("Please fill all the fields") ElseIf txtbook_name.Text = "" Then MsgBox("Please enter booking name") txtbook_name.Focus() ElseIf cmbwing.Text = "" Then MsgBox("Please enter the correct wing name") cmbwing.Focus() ElseIf cmbflat_no.Text = "" Then MsgBox("Please enter flat no according you") cmbflat_no.Focus() ElseIf cmbfloor.Text = "" Then MsgBox("Please enter the floor no.") cmbfloor.Focus() ElseIf cmbtype_of_flat.Text = "" Then MsgBox("Please enter the type of flat according to you") cmbtype_of_flat.Focus() ElseIf txtarea.Text = "" Then MsgBox("Please enter area") txtarea.Focus() ElseIf txtrate.Text = "" Then MsgBox("Please enter rate of flat") ElseIf txttotal_amnt.Text = "" Then MsgBox("Please enter total amount of flat") Else btnadd.Text = "Add" btnExit.Text = "Exit" Module1.con.Open()
77
Builder and Developer 2015
cmd = New SqlCommand cmd.Connection = Module1.con cmd.CommandText = "insert into tblflat_details(Flat_ID,Booking_Name,Wing,Flat_No,Floor,Type_Of_Flat,Area,Rate,Total_Amount) values(" & txtflat_id.Text & ",'" & txtbook_name.Text & "','" & cmbwing.Text & "'," & cmbflat_no.Text & ",'" & cmbfloor.Text & "','" & cmbtype_of_flat.Text & "'," & txtarea.Text & ", " & txtrate.Text & "," & txttotal_amnt.Text & ")" i = cmd.ExecuteNonQuery MsgBox(i & "record inserted") setFields(True) setTextfields(False) End If Catch ex As Exception MsgBox(ex.ToString) Module1.con.Close() Call data() End Try End If End Sub Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete.Click Try If Module1.con.State = ConnectionState.Closed Then Module1.con.Open() End If cmd = New SqlCommand cmd.Connection = Module1.con cmd.CommandText = "Delete from tblflat_details where Flat_ID=" & txtflat_id.Text & "" i = cmd.ExecuteNonQuery() MsgBox(i & "Record Deleted") setFields(True) Catch ex As Exception MsgBox(ex.ToString()) Module1.con.Close() Call data() End Try End Sub Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click If btnUpdate.Text = "Edit" Then Call setFields(False) btnUpdate.Enabled = True btnExit.Enabled = True btnUpdate.Text = "Update" btnExit.Text = "Cancel" setTextfields(True) ElseIf btnUpdate.Text = "Update" Then btnUpdate.Text = "Edit"
78
Builder and Developer 2015
btnExit.Text = "Exit" Try Module1.con.Open() cmd = New SqlCommand cmd.Connection = Module1.con cmd.CommandText = "update tblflat_details set Booking_Name= '" & txtbook_name.Text & "',Wing ='" & cmbwing.Text & "',Flat_No =" & cmbflat_no.Text & ",Floor ='" & cmbfloor.Text & "',Type_Of_Flat ='" & cmbtype_of_flat.Text & "',Area=" & txtarea.Text & ",Rate=" & txtrate.Text & ",Total_Amount=" & txttotal_amnt.Text & " where Flat_ID=" & txtflat_id.Text & "" i = cmd.ExecuteNonQuery MsgBox(i & "Record Updated") setFields(True) setTextfields(False) Catch ex As Exception MsgBox(ex.ToString()) Module1.con.Close() Call data() End Try End If End Sub Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click If btnExit.Text = "Exit" Then End ElseIf btnExit.Text = "Cancel" Then btnadd.Text = "Add" btnExit.Text = "Exit" clearFields() setFields(True) setTextfields(False) End If End Sub Private Sub btnFirst_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Me.BindingContext(dv).Position = 0 rowcount = 0 End Sub Private Sub btnPrevious_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) rowcount = rowcount - 1 Me.BindingContext(dv).Position = Me.BindingContext(dv).Position - 1 If rowcount < 0 Then MsgBox("First Record") rowcount = 0 End If End Sub Private Sub btnNext_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs)
79
Builder and Developer 2015
rowcount = rowcount + 1 Me.BindingContext(dv).Position = Me.BindingContext(dv).Position + 1 If rowcount = ds.Tables(0).Rows.Count Then MsgBox("Last Record") rowcount = rowcount - 1 End If End Sub Private Sub btnLast_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Me.BindingContext(dv).Position = Me.BindingContext(dv).Count - 1 rowcount = ds.Tables(0).Rows.Count - 1 End Sub Private Sub btnclear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnclear.Click clearFields() End Sub Private Sub btnsearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsearch.Click Try con.Open() cmd = New SqlCommand cmd.Connection = con cmd.CommandType = CommandType.Text If cmbsearch.Text <> "" Then cmd.CommandText = "select * from tblflat_details where Flat_ID=" & cmbsearch.Text & "" dr = cmd.ExecuteReader() dr.Read() txtflat_id.Text = dr("Flat_ID") txtbook_name.Text = dr("Booking_Name") cmbwing.Text = dr("Wing") cmbflat_no.Text = dr("Flat_No") cmbfloor.Text = dr("Floor") cmbtype_of_flat.Text = dr("Type_Of_Flat") txtarea.Text = dr("Area") txtrate.Text = dr("Rate") txttotal_amnt.Text = dr("Total_Amount") con.Close() Else MsgBox("Pls Enter the Id to be viewed") End If Catch ex As Exception MsgBox(ex.ToString()) End Try con.Close() End Sub Private Sub btnFirst_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFirst.Click Me.BindingContext(dv).Position = 0
80
Builder and Developer 2015
rowcount = 0 End Sub Private Sub btnPrevious_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrevious.Click rowcount = rowcount - 1 Me.BindingContext(dv).Position = Me.BindingContext(dv).Position - 1 If rowcount < 0 Then MsgBox("First Record") rowcount = 0 End If End Sub Private Sub btnNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNext.Click rowcount = rowcount + 1 Me.BindingContext(dv).Position = Me.BindingContext(dv).Position + 1 If rowcount = ds.Tables(0).Rows.Count Then MsgBox("Last Record") rowcount = rowcount - 1 End If End Sub Private Sub btnLast_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLast.Click BindFields() Me.BindingContext(dv).Position = Me.BindingContext(dv).Count - 1 rowcount = ds.Tables(0).Rows.Count - 1 End Sub Private Sub txtflat_id_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtflat_id.KeyPress e.KeyChar = Chr(chkInt(Asc(e.KeyChar))) End Sub Private Sub txtrate_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtrate.KeyPress e.KeyChar = Chr(chkInt(Asc(e.KeyChar))) End Sub Private Sub txtarea_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtarea.KeyPress e.KeyChar = Chr(chkInt(Asc(e.KeyChar))) End Sub Private Sub txttotal_amnt_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txttotal_amnt.GotFocus txttotal_amnt.Text = CInt(txtarea.Text) + CInt(txtrate.Text) txttotal_amnt.Focus() End Sub Private Sub txttotal_amnt_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txttotal_amnt.KeyPress e.KeyChar = Chr(chkInt(Asc(e.KeyChar))) End Sub Private Sub cmbwing_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles cmbwing.KeyPress
81
Builder and Developer 2015
e.KeyChar = Chr(chkChar(Asc(e.KeyChar))) End Sub Private Sub cmbflat_no_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles cmbflat_no.KeyPress e.KeyChar = Chr(chkInt(Asc(e.KeyChar))) End Sub Private Sub cmbfloor_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles cmbfloor.KeyPress e.KeyChar = Chr(chkChar(Asc(e.KeyChar))) End Sub Private Sub txtbook_name_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtbook_name.KeyPress e.KeyChar = Chr(chkChar(Asc(e.KeyChar))) End SubEnd Class
frmpayment_details.vb
Imports System.Data.SqlClientPublic Class frmpayment Dim con As SqlConnection Dim cmd As SqlCommand Dim da As SqlDataAdapter Dim ds As DataSet Dim dv As DataView Dim dr As SqlDataReader Dim dr1 As SqlDataReader Dim rowcount As Integer = 0 Dim i As Integer Dim pay_id As Integer Dim status As Boolean Dim chno As Integer Dim bname As String Dim c_no As Integer = 0 Dim b_name As String = "" Private Sub setCon(ByRef strsql As String) Try con = New SqlConnection("Data Source=BSC-13\SQLEXPRESS; Initial Catalog=bookingdatabase;Integrated Security=True") Module1.connection() da = New SqlDataAdapter(strsql, Module1.con) ds = New DataSet da.Fill(ds, "payment") dv = New DataView(ds.Tables("payment")) Catch ex As Exception MsgBox(ex.ToString) End Try End Sub
82
Builder and Developer 2015
Private Sub setFields(ByVal value As Boolean) btnadd.Enabled = value btnUpdate.Enabled = value btnDelete.Enabled = value btnExit.Enabled = value btnclear.Enabled = value End Sub Private Sub setTextfields(ByVal value As Boolean) cmbpay_id.Enabled = value cmbcustid.Enabled = value txtcust_name.Enabled = value cmbpaymode.Enabled = value dtpboo_date.Enabled = value dtppay_date.Enabled = value txttotal_amnt.Enabled = value txtamnt_paid.Enabled = value txtamnt_bal.Enabled = value txtbank_name.Enabled = value txtcheq_no.Enabled = value cmbtrans.Enabled = value End Sub Private Sub clearFields() cmbpay_id.Text = "" cmbcustid.Text = "" txtcust_name.Text = "" dtpboo_date.Text = "" dtppay_date.Text = "" txttotal_amnt.Text = "" txtamnt_paid.Text = "" txtamnt_bal.Text = "" txtbank_name.Text = "" txtcheq_no.Text = "" cmbpaymode.Text = "" cmbtrans.Text = "" End Sub Private Sub BindFields() cmbpay_id.DataBindings.Clear() cmbcustid.DataBindings.Clear() txtcust_name.DataBindings.Clear() cmbpaymode.DataBindings.Clear() dtpboo_date.DataBindings.Clear() dtppay_date.DataBindings.Clear() txttotal_amnt.DataBindings.Clear() txtamnt_paid.DataBindings.Clear() txtamnt_bal.DataBindings.Clear() txtbank_name.DataBindings.Clear() txtcheq_no.DataBindings.Clear() cmbtrans.DataBindings.Clear() cmbpay_id.DataBindings.Add("text", dv, "Pay_ID")
83
Builder and Developer 2015
cmbcustid.DataBindings.Add("text", dv, "Cust_ID") txtcust_name.DataBindings.Add("text", dv, "Cust_Name") dtpboo_date.DataBindings.Add("text", dv, "Booking_Date") dtppay_date.DataBindings.Add("text", dv, "Payment_Date") cmbpaymode.DataBindings.Add("text", dv, "Pay_Mode") txttotal_amnt.DataBindings.Add("text", dv, "Total_Amnt") txtamnt_paid.DataBindings.Add("text", dv, "Amnt_Paid") txtamnt_bal.DataBindings.Add("text", dv, "Amnt_Bal") txtbank_name.DataBindings.Add("text", dv, "Bank_Name") txtcheq_no.DataBindings.Add("text", dv, "Cheq_No") cmbtrans.DataBindings.Add("text", dv, "Paytrans") End Sub Private Sub setInfotoform() Call setCon("Select * from tblpay_details") BindFields() Me.BindingContext(dv).Position = 0 End Sub Private Function key_autogenerate() Me.BindingContext(dv).Position = Me.BindingContext(dv).Count - 1 Return CInt(Me.BindingContext(dv).Current("Pay_ID") + 1) End Function Public Sub data() Try If Module1.con.State = ConnectionState.Closed Then Module1.con.Open() End If Dim str As String = "select * from tblpay_details" Dim cmd As New SqlCommand(str, Module1.con) Dim p As New SqlDataAdapter(cmd) Dim ds1 As New DataSet p.Fill(ds1) dgv.DataSource = ds1.Tables(0) dgv.Update() dgv.Refresh() Module1.con.Close() Catch ex As Exception MsgBox(ex.ToString()) End Try End Sub Private Sub payment_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Call setInfotoform() setTextfields(False) Cheque.Visible = False Call data() Try cmd = New SqlCommand("select Cust_ID from tblreg_details", Module1.con) Module1.con.Open() dr1 = cmd.ExecuteReader
84
Builder and Developer 2015
While dr1.Read cmbcustid.Items.Add(dr1("Cust_ID").ToString()) End While dr1.Close() Module1.con.Close() Catch ex As Exception MsgBox(ex.ToString) End Try Try cmd = New SqlCommand("select Pay_ID from tblpay_details", Module1.con) Module1.con.Open() dr = cmd.ExecuteReader While dr.Read cmbsearch.Items.Add(dr("Pay_ID").ToString()) End While dr.Close() Module1.con.Close() Catch ex As Exception MsgBox(ex.ToString) End Try End Sub Private Sub btnadd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnadd.Click If btnadd.Text = "Add" Then Call setFields(False) btnadd.Enabled = True btnExit.Enabled = True btnadd.Text = "Save" btnExit.Text = "Cancel" pay_id = key_autogenerate() Call clearFields() setTextfields(True) cmbpay_id.Text = pay_id ElseIf btnadd.Text = "Save" Then Try If cmbpay_id.Text = "" And cmbcustid.Text = "" And txtcust_name.Text = "" And dtpboo_date.Text = "" And dtppay_date.Text = "" And txttotal_amnt.Text = "" And txtamnt_paid.Text = "" And txtamnt_bal.Text = "" Then MsgBox("Please fill all the fields") ElseIf cmbpay_id.Text = "" Then MsgBox("Please enter payment id properly") cmbpay_id.Focus() ElseIf cmbcustid.Text = "" Then MsgBox("Please enter your id") cmbcustid.Focus() ElseIf txtcust_name.Text = "" Then MsgBox("Please enter your name.") txtcust_name.Focus() ElseIf dtpboo_date.Text = "" Then
85
Builder and Developer 2015
MsgBox("Please enter booking date.") dtpboo_date.Focus() ElseIf dtppay_date.Text = "" Then MsgBox("Please enter payment date") dtppay_date.Focus() ElseIf txttotal_amnt.Text = "" Then MsgBox("Please enter total amnt.") txttotal_amnt.Focus() ElseIf txtamnt_paid.Text = "" Then MsgBox("Please enter paid amnt.") txtamnt_paid.Focus() ElseIf txtamnt_bal.Text = "" Then MsgBox("Please enter total amnt") txtamnt_bal.Focus() Else btnadd.Text = "Add" btnExit.Text = "Exit" Module1.con.Open() cmd = New SqlCommand cmd.Connection = Module1.con If status = True Then cmd.CommandText = "insert into tblpay_details(Pay_ID,Cust_ID,Cust_Name,Booking_Date,Payment_Date,Pay_Mode,Total_Amnt,Amnt_Paid,Amnt_Bal,Bank_Name,Cheq_No,Paytrans) values(" & cmbpay_id.Text & "," & cmbcustid.Text & ",'" & txtcust_name.Text & "','" & dtpboo_date.Text & "','" & dtppay_date.Text & "','" & cmbpaymode.Text & "'," & txttotal_amnt.Text & "," & txtamnt_paid.Text & "," & txtamnt_bal.Text & ",'" & txtbank_name.Text & "','" & txtcheq_no.Text & "','" & cmbtrans.Text & "')" Else cmd.CommandText = "insert into tblpay_details(Pay_ID,Cust_ID,Cust_Name,Booking_Date,Payment_Date,Pay_Mode,Total_Amnt,Amnt_Paid,Amnt_Bal,Paytrans) values(" & cmbpay_id.Text & "," & cmbcustid.Text & ",'" & txtcust_name.Text & "','" & dtpboo_date.Text & "','" & dtppay_date.Text & "','" & cmbpaymode.Text & "'," & txttotal_amnt.Text & "," & txtamnt_paid.Text & "," & txtamnt_bal.Text & ",'" & cmbtrans.Text & "')" End If i = cmd.ExecuteNonQuery MsgBox(i & "record inserted") Module1.con.Close() Call data() setFields(True) setTextfields(False) End If Catch ex As Exception MsgBox(ex.ToString) End Try End If End Sub Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e
86
Builder and Developer 2015
As System.EventArgs) Handles btnDelete.Click Try Module1.con.Open() cmd = New SqlCommand cmd.Connection = Module1.con cmd.CommandText = "Delete from tblpay_details where Pay_ID=" & cmbpay_id.Text & "" i = cmd.ExecuteNonQuery() MsgBox(i & "Record Deleted") Module1.con.Close() Call data() setFields(True) Catch ex As Exception MsgBox(ex.ToString()) End Try End Sub Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click If btnUpdate.Text = "Edit" Then Call setFields(False) btnUpdate.Enabled = True btnExit.Enabled = True btnUpdate.Text = "Update" btnExit.Text = "Cancel" setTextfields(True) ElseIf btnUpdate.Text = "Update" Then btnUpdate.Text = "Edit" btnExit.Text = "Exit" Try Module1.con.Open() cmd = New SqlCommand cmd.Connection = Module1.con cmd.CommandText = "update tblpay_details set Cust_ID=" & cmbcustid.Text & ",Cust_Name='" & txtcust_name.Text & "',Booking_Date='" & dtpboo_date.Text & "',Pay_Mode='" & cmbpaymode.Text & "',Payment_Date='" & dtppay_date.Text & "',Total_Amnt=" & txttotal_amnt.Text & ",Amnt_Paid=" & txtamnt_paid.Text & ",Amnt_Bal=" & txtamnt_bal.Text & ",Bank_Name='" & txtbank_name.Text & "',Cheq_No=" & txtcheq_no.Text & ",Paytrans='" & cmbtrans.Text & "' where Pay_ID=" & cmbpay_id.Text & "" i = cmd.ExecuteNonQuery MsgBox(i & "Record Updated") Module1.con.Close() Call data() setFields(True) setTextfields(False) Catch ex As Exception MsgBox(ex.ToString()) End Try End If
87
Builder and Developer 2015
End Sub Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click If btnExit.Text = "Exit" Then End ElseIf btnExit.Text = "Cancel" Then btnadd.Text = "Add" btnExit.Text = "Exit" clearFields() setFields(True) setTextfields(False) End If End Sub Private Sub btnclear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnclear.Click clearFields() End Sub Private Sub btnsearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsearch.Click Try con.Open() cmd = New SqlCommand cmd.Connection = con cmd.CommandType = CommandType.Text If cmbsearch.Text <> "" Then cmd.CommandText = "select * from tblpay_details where Pay_ID=" & cmbsearch.Text & "" dr = cmd.ExecuteReader() dr.Read() cmbpay_id.Text = dr("Pay_ID") cmbcustid.Text = dr("Cust_ID") txtcust_name.Text = dr("Cust_Name") dtpboo_date.Text = dr("Booking_Date") dtppay_date.Text = dr("Payment_Date") cmbpaymode.Text = dr("Pay_Mode") txttotal_amnt.Text = dr("Total_Amnt") txtamnt_paid.Text = dr("Amnt_Paid") txtamnt_bal.Text = dr("Amnt_Bal") txtbank_name.Text = dr("Bank_Name") txtcheq_no.Text = dr("Cheq_No") cmbtrans.Text = dr("Paytrans") dr.Close() con.Close() Else MsgBox("Pls Enter the Id to be viewed") End If Catch ex As Exception End Try con.Close()
88
Builder and Developer 2015
End Sub Private Sub btnFirst_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFirst.Click Me.BindingContext(dv).Position = 0 rowcount = 0 End Sub Private Sub btnPrevious_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrevious.Click rowcount = rowcount - 1 Me.BindingContext(dv).Position = Me.BindingContext(dv).Position - 1 If rowcount < 0 Then MsgBox("First Record") rowcount = 0 End If End Sub Private Sub btnNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNext.Click rowcount = rowcount + 1 Me.BindingContext(dv).Position = Me.BindingContext(dv).Position + 1 If rowcount = ds.Tables(0).Rows.Count Then MsgBox("Last Record") rowcount = rowcount - 1 End If End Sub Private Sub btnLast_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLast.Click BindFields() Me.BindingContext(dv).Position = Me.BindingContext(dv).Count - 1 rowcount = ds.Tables(0).Rows.Count - 1 End Sub Private Sub cmbcustid_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbcustid.SelectedIndexChanged Try Dim cmd1 As SqlCommand Module1.con.Close() Module1.con.Open() cmd1 = New SqlCommand("select * from tblreg_details where Cust_ID=" & cmbcustid.Text & "", Module1.con) dr = cmd1.ExecuteReader dr.Read() txtcust_name.Text = dr("Cust_Name").ToString() txtcust_name.Enabled = False dtpboo_date.Text = dr("Booking_Date").ToString() dtpboo_date.Enabled = False txttotal_amnt.Text = dr("Total_Amnt").ToString() txttotal_amnt.Enabled = False dr.Close() Module1.con.Close() Catch ex As Exception
89
Builder and Developer 2015
MsgBox(ex.ToString) End Try End Sub Private Sub cmbpaymode_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbpaymode.SelectedIndexChanged If cmbpaymode.Text = "Cheque" Then Cheque.Visible = True status = True Else Cheque.Visible = False chno = 0 bname = "NA" status = False End If End Sub Private Sub txtamnt_bal_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtamnt_bal.GotFocus txtamnt_bal.Text = CInt(txttotal_amnt.Text) - CInt(txtamnt_paid.Text) txttotal_amnt.Enabled = False End SubEnd Class
90
Builder and Developer 2015
SCREEN
LAYOUTS
AND
91
Builder and Developer 2015
REPORT
LAYOUTS
92
Builder and Developer 2015
LOGIN:
SPLASH SCREEN FORM:
93
Builder and Developer 2015
MAINFORM FORM:
BUILDING DETAILS FORM:
94
Builder and Developer 2015
CUSTOMER DETAILS FORM:
95
Builder and Developer 2015
FLAT DETAILS FORM:
96
Builder and Developer 2015
ENQUIRY REGISTRATION FORM:
BOOKING INFORMATION FORM:
97
Builder and Developer 2015
98
Builder and Developer 2015
PAYMENT TRANSACTION FORM:
99
Builder and Developer 2015
CANCELLATION TRANSACTION FORM:
100
Builder and Developer 2015
CANCELLATION TRANSACTION FORM:
PAYMENT REPORT FORM:
101
Builder and Developer 2015
102
Builder and Developer 2015
BOOKING REPORT FORM:
REGISTRATION REPORT FORM:
103
Builder and Developer 2015
CANCELLATION REPORT FORM:
FLAT REPORT FORM:
104
Builder and Developer 2015
TESTING
Testing Objectives
Testing is a process of executing a program with the intent of finding an error or debug.
A good test case is one that has a high probability of finding yet not discovered errors.
Unit Testing
Unit testing using white-box-testing to test each smallest unit or component of the module like Interface, Local Data Structure, Boundary Conditions, Independent and Error Handling Paths using appropriate test cases.
Integration Testing
105
Builder and Developer 2015
Integration Testing using Top-Down Integration to test data and its value before and after flowing from one to another module during and after integration of module.
Code TestingThe code testing examines the logic of the program. To
follow this testing we have developed test cases that result in every instruction in the module; every path is specific combination of conditions that is handled by the program
Validation TestingValidation testing to validate system functionalities, that they
are traceable to customer requirements.
System TestingSystem testing to test efficiency with all minimum hardware
and software requirements of system after installation
106
Builder and Developer 2015
Future Scope
In future, a system may be developed which can be used online by the users who want to sale or purchase properties. In such a system the users may deal directly with each other, they do not need a property dealer as an intermediate. Also they are not supposed to go to the property dealer for their deals; they can directly use the software online. Moreover the users do not need to pay extra amounts as in case of a property dealer who helped in the deals, whatever amount the seller needs, is paid by the purchaser. This saves money as well as time too. So, in future a lot of manipulations can be done keeping in view the requirements of the users.
1. If the system works as an online system, it becomes more efficient as compared to the one which is used offline only by a property dealer.
2. Such a system saves time as well as money of the users too.
107
Builder and Developer 2015
3. There is no need of a property dealer as an intermediate between the seller and purchaser.
4. The seller and purchaser can contact directly to each other.
5. Enhance its features and increasing the number of services provided.6. Implementing higher level of security.
Conclusion
The development of the proposed system is done keeping in view the problems of agent i.e. property dealer in the official dealings of properties. Typically a dealer buys the property from one party and sells to another. Thus the dealer’s profit is the difference between the price he pays to one party and the price he receives from another party for the same property. In short, the dealers have a particular commission in it. Also there are Real estate agents who undertake a diversity of activities related to the selling and leasing of residential and commercial property. Many agents specialize in areas of practice such as residential sales, residential property management, commercial and industrial leasing and sales, representing buyers, rural sales and more. For this we have to pay them with heavy amounts.
108
Builder and Developer 2015
With the use of this software, the property dealer does not need to store the records of dealings into registers or papers. So, it becomes easier for him to keep the records for future references. Also it becomes much easier to keep a record of properties which are being sold or which are not sold yet. Thus this system saves time and is easier to use. Moreover, it is efficient software for property dealers.