java房屋租赁系统的设计与实现

合集下载

房屋租赁管理信息系统系统设计与开发-毕业论文

房屋租赁管理信息系统系统设计与开发-毕业论文
关键词
房屋租赁系统 B/S 架构 SQL Server 2010
第 1页 28 页
湖南商学院北津学院毕业设计
Abstract
The rapid development of modern information technology, as well as the rapid development of the integrated economy, changes in the way of life, as well as changes in the way of communication, which created the conditions for the housing rental system. Before the operation simple rental housing service mode has far cannot satisfy the needs of the market and the people, so the design and development of new housing rental system is complied with the development and trend of the time delay of a project. Now the market has many models of housing rental system, resulting in loose housing rental management system, the problem is cumbersome, complex information, chaotic, difficult to deal with and so on. This system design with B/S as the structure, with ASP as the main application technology, plus the database is Server SQL 2010, in general is a more reasonable and easy to use the combination of operation. The completion of the system design can solve the problem of complicated and messy information and provide a simple operation, flexible use and safe use of the platform for people to rent a house. This system platform not only beautiful interface, but also makes the management of rental housing more intelligent and efficient, but also to achieve the automation and information management of housing rental. Users can quickly find satisfactory housing through the system, thus improving the efficiency of the housing rental services.

房屋租赁管理系统详细设计

房屋租赁管理系统详细设计

房屋租赁管理系统详细设计一、系统概述房屋租赁管理系统是为了方便房东和租户进行房屋租赁业务的管理而设计的一款软件系统。

该系统旨在提供一个可靠、高效、安全的平台,使房东能够方便地发布房屋租赁信息、查看租金收益等相关信息,同时,租户也能够便捷地搜索符合需求的房源并与房东进行交互。

二、系统架构房屋租赁管理系统基于B/S结构(浏览器/服务器结构)进行设计和开发。

系统的前端部分采用HTML、CSS和JavaScript等技术实现,用于显示房屋租赁信息、用户操作界面等。

后端部分使用Java语言开发,采用Spring MVC框架进行Web开发,用于处理用户请求,与数据库进行交互,并生成相应的HTML页面返回给前端。

三、系统功能1. 房东功能:a) 登录与注册:房东可以通过注册功能创建新账户,并使用注册的账号和密码登录系统。

b) 发布房源信息:房东可以填写房屋的基本信息,包括房屋面积、位置、租金等,并上传相关图片以吸引租户。

c) 修改房源信息:房东可以根据需要修改已发布的房源信息,如调整租金、改变房屋状态等。

d) 查看租金收益:房东可以随时查看租金收益情况,系统会自动计算每个月的租金总和并进行显示。

e) 处理租户请求:当租户对某个房源感兴趣并提出预约请求时,房东可以进行审批并与租户沟通。

2. 租户功能:a) 登录与注册:租户可以通过注册功能创建新账户,并使用注册的账号和密码登录系统。

b) 搜索房源:租户可以根据自己的需求,在系统中搜索符合条件的房屋租赁信息,并进行筛选和排序。

c) 预约房源:租户可以选择心仪的房源并提交预约申请,等待房东的审批。

d) 查看个人租赁情况:租户可以查看自己的租赁记录、付款明细和剩余租金等信息。

e) 与房东沟通:租户可以与房东通过系统内部的消息系统进行交流与沟通。

四、系统设计1. 数据库设计:a) 用户表:用于存储用户的基本信息,包括用户名、密码、联系方式等。

b) 房源表:记录房屋的详细信息,包括房屋地址、面积、租金、房东信息等。

屋租赁管理系统设计与实现

屋租赁管理系统设计与实现

课程设计报告 题 目 屋租赁管理系统设计与实现课 程 名 称 工程项目实践院 部 名 称 龙蟠学院专 业 计算机科学与技术班 级 M11计算机科学与技术 II 学 生 姓 名学 号课程设计地点 校 内课程设计学时 8 周指 导 教 师 钟 睿金陵科技学院教务处制【注:根据课程设计大纲第四项具体要求撰写课程设计报告】【摘要】随着我国市场经济的快速发展和人们生活水平的不断提高,简单的租凭服务已经不能满足人们的需求.如何利用先进的管理手段,提高房屋租凭管理水平,是当今社会所面临的一个重要课题.本文通过用Visual Basic 6.0编写房屋租赁管理系统,利用软件工程原理,采用面向对象的编程方法,其开发主要包括后台数据库的建立和维护以及前端应用程序的开发两个方面,实现了房屋租赁管理的自动化和信息化。

整个系统从符合操作简便、界面友好、灵活实用、数据安全的要求出发,完成基本资料管理、客户资料管理、租凭合同管理、财务管理、统计报表管理等功能。

经过实际测试证明,本文所设计的房屋租赁管理系统,可以用于物业管理部门从事房屋租赁信息管理的工作,基本满足各方面的需要。

论文主要介绍了本课题的开发背景,所要完成的功能和开发的全过程。

着重说明了系统设计的重点、设计思想、技术难点和解决方案.【关键词】数据库 Visual Basic 6。

0 房屋租赁管理系统【Abstract】Along with the our country market economy fast development and the people living standard unceasing enhancement, simple rented depends on the service already not to be able to meet people’s need。

How uses the advanced management method,enhances the room to depend on the management level, is an important topic which now the society faces. This article through uses VB6.0 to compile the house to rent the management system management system, using the software engineering principle,uses the object-oriented programming method,its development mainly includes the backstage database the establishment and the maintenance as well as front end the application procedure development two aspects, realized the house to rent the management the automation and the information。

房屋租赁系统的设计与实现

房屋租赁系统的设计与实现

房屋租赁系统的设计与实现引言房屋租赁系统是一个在线平台,用于提供房屋租赁的服务。

随着人们对住房需求的不断增加,房屋租赁系统的重要性也逐渐凸显。

通过使用房屋租赁系统,租户可以方便地搜索、浏览和租赁房屋,而房东可以有效地管理自己的房屋租赁信息。

本文将介绍房屋租赁系统的设计与实现,包括系统功能、系统架构和实现技术等方面。

功能设计房屋租赁系统需要实现以下主要功能:1.用户注册与登录:用户可以通过注册账号并登录系统,以便进行房屋租赁相关操作。

2.房屋信息管理:房东可以发布房屋租赁信息,包括房屋的基本信息、价格、位置等。

3.房屋搜索与浏览:租户可以根据自己的需求,在系统中搜索并浏览可租赁的房屋。

4.房屋租赁:租户可以向房东发送租赁请求,并在达成租赁协议后支付相应的租金。

5.订单管理:系统可以记录和管理租户的租赁订单信息,方便租户和房东查询和管理。

6.用户评价与反馈:用户可以对房屋、房东和租户进行评价,并提供反馈意见。

系统架构房屋租赁系统的架构可以分为前端和后端两部分。

前端部分主要负责用户界面的呈现和用户交互。

可使用以下技术实现:•HTML/CSS:用于构建用户界面的基本结构和样式。

•JavaScript:实现前端的数据处理和用户交互功能。

•Vue.js:用于构建响应式的用户界面和数据流管理。

后端部分主要负责业务逻辑的处理和数据存储。

可使用以下技术实现:•Spring Boot:提供后端服务的框架,简化开发和管理。

•MySQL:用于存储房屋、用户和订单等相关信息。

•RESTful API:提供与前端的数据交互接口,实现数据的增删改查操作。

•Spring Security:实现用户认证和授权功能。

实现技术前端实现技术前端的实现主要使用HTML、CSS、JavaScript 和Vue.js实现。

HTML用于构建页面的结构,CSS 用于样式设计,JavaScript用于实现数据处理和交互功能。

Vue.js作为一种流行的JavaScript框架,可以帮助开发者构建响应式的用户界面,同时也提供了数据流管理等强大功能。

房屋租赁系统毕业设计

房屋租赁系统毕业设计

房屋租赁系统毕业设计一、引言房屋租赁是现代社会中常见的一种居住方式,随着城市化进程的推进,人们对于租房需求的增长使得房屋租赁市场逐渐兴起。

为了提高租房流程的便捷性和效率,本文将设计一个房屋租赁系统。

二、系统需求分析1. 用户管理房屋租赁系统需要支持注册和登录功能,用户可以通过注册账号成为系统用户,并使用账号登录系统。

同时,用户账号还需要实现密码找回、修改密码等功能。

2. 房源管理系统应该提供房源信息的发布和管理功能,用户可以通过填写租房信息、上传房屋照片等方式发布自己的房源信息。

系统管理员可以对房屋信息进行审核、编辑和删除操作。

3. 租赁管理系统应该支持用户进行租房操作,用户可以通过搜索、筛选等方式找到满足自己要求的房屋,并进行租赁操作。

租房过程中,系统需要支持用户与房主进行消息沟通,提供房屋租约的签署和租金的支付等功能。

4. 评价与反馈为了提供更好的租房服务质量,系统应该支持用户对租房体验进行评价和反馈,用户可以对房源、房东以及整个租房过程进行评分和留言,供其他用户参考。

5. 数据统计与分析系统应该支持对房屋租赁相关数据的统计和分析,例如租赁成功率、平均租金水平等,这些数据可以为系统管理员和用户提供决策依据。

三、系统设计与实现1. 技术选型本系统将采用前后端分离的开发模式,前端使用HTML、CSS和JavaScript等技术进行开发,后端采用Java语言开发,使用Spring框架和MySQL数据库。

2. 系统架构本系统的整体架构分为前端展示层和后端服务层。

前端展示层负责用户界面的展示和交互,后端服务层负责处理用户请求并返回相应的数据。

3. 数据库设计系统的数据库表设计包括用户信息表、房源信息表、租赁记录表等。

用户信息表包括用户账号、密码、手机号等字段;房源信息表包括房屋面积、租金、地址等字段;租赁记录表包括租赁开始时间、结束时间、金额等字段。

4. 功能模块设计根据系统需求,设计以下几个功能模块:- 用户管理模块:实现用户注册、登录、密码找回等功能;- 房源管理模块:实现房源发布、编辑和删除等功能;- 租赁管理模块:包括房源搜索、租赁操作、消息沟通、租约签署和支付等功能;- 评价与反馈模块:实现用户对房源和租房体验的评价和反馈功能;- 数据统计与分析模块:通过对租赁数据进行统计和分析,提供系统管理员和用户的决策支持。

房屋租赁管理系统的设计与实现

房屋租赁管理系统的设计与实现

房屋租赁管理系统的设计与实现一、本文概述随着社会的快速发展和城市化进程的推进,房屋租赁市场日益繁荣,管理需求也日趋复杂。

在这样的背景下,传统的房屋租赁管理方式已经无法满足现代社会的需求,因此,开发一套高效、便捷、智能的房屋租赁管理系统成为了业界迫切的需求。

本文旨在深入探讨房屋租赁管理系统的设计与实现,从系统的需求分析、设计思路、实现技术、功能模块以及性能测试等方面进行全面阐述。

通过本文的阅读,读者可以对房屋租赁管理系统的开发流程和技术实现有更加清晰的认识,为实际开发工作提供有益的参考和指导。

本文还将分析现有房屋租赁管理系统的不足,提出改进措施,以期推动房屋租赁管理行业的数字化转型,提高管理效率和服务质量。

二、系统需求分析随着城市化进程的加快和人口流动性的增强,房屋租赁市场日益繁荣,但也面临着管理复杂、信息不对称等问题。

因此,设计和实现一个高效、便捷的房屋租赁管理系统显得尤为重要。

房屋租赁管理系统的需求分析主要包括以下几个方面:功能需求:系统应具备基本的房源信息管理功能,包括房源录入、修改、查询和删除等。

同时,为了满足租赁双方的需求,系统还应提供租赁合同管理、租金计算和支付、租赁期限管理等功能。

为了方便用户操作,系统还应提供友好的用户界面和操作流程。

性能需求:系统应具备良好的响应速度和稳定性,能够处理大量用户的并发访问和数据操作。

同时,系统还应具备可扩展性,以适应未来用户增长和业务扩展的需求。

安全需求:系统应确保用户数据的安全性,防止数据泄露和非法访问。

为此,系统应采取必要的安全措施,如数据加密、访问控制和身份认证等。

合规性需求:房屋租赁管理系统应符合相关法律法规和政策要求,如租赁合同格式规范、租金计算标准等。

同时,系统还应遵循行业标准和最佳实践,确保系统的合规性和可靠性。

房屋租赁管理系统的需求分析涵盖了功能、性能、安全和合规性等多个方面。

在设计和实现过程中,应充分考虑这些需求,确保系统能够满足用户的实际需求和期望。

新房屋租赁系统软件工程课程设计

新房屋租赁系统软件工程课程设计

新房屋租赁系统软件工程课程设计随着城市化的不断发展,人们对住房的需求日益增加。

在现代社会,房屋租赁已成为一种常见的居住方式。

为了方便租赁过程,提高租房效率,设计一套新的房屋租赁系统软件成为了迫切的需求。

一、引言随着信息技术的高速发展,软件工程的应用范围越来越广泛。

新房屋租赁系统软件的设计不仅可以提高租房效率,还可以提供更好的用户体验,确保租赁过程的顺利进行。

二、需求分析1. 系统用户a) 房屋出租方:房东或房产中介机构b) 房屋租赁方:租客2. 功能需求a) 房屋信息管理:包括房屋基本信息、房屋照片、房屋地址等。

b) 租约管理:包括租赁合同的生成、签订和终止。

c) 租金管理:包括租金支付、逾期管理等。

d) 用户身份验证:确保系统安全性。

e) 信息查询与统计:方便用户查询和统计租赁情况。

3. 非功能需求a) 界面美观:简洁、直观的界面设计,提供良好的用户体验。

b) 数据安全性:保护用户的个人信息和交易数据,防止泄露和非法使用。

c) 系统稳定性:提供高可靠性和稳定性的系统,避免系统崩溃和数据丢失。

三、系统设计1. 架构设计新房屋租赁系统软件采用分层架构设计,包括展示层、业务逻辑层和数据访问层。

a) 展示层:提供用户界面,包括用户注册、登录、信息查询等功能。

b) 业务逻辑层:处理用户请求,完成各项功能的具体操作,并与数据访问层进行交互。

c) 数据访问层:负责与数据库进行交互,包括读取和存储数据。

2. 数据库设计设计一个关系型数据库用于存储房屋信息、租约信息和用户信息等。

a) 房屋信息表:包括房屋ID、房屋类型、面积、价格等字段。

b) 租约信息表:包括租约ID、租赁方ID、房屋ID、租金、租期等字段。

c) 用户信息表:包括用户ID、用户名、密码等字段。

3. 界面设计设计简洁、直观的用户界面,方便用户进行操作和信息查询。

a) 注册界面:提供用户注册功能,包括输入用户名、密码等。

b) 登录界面:用于用户身份验证,确保系统安全性。

网上房屋租赁平台的设计与实现-毕业论文

网上房屋租赁平台的设计与实现-毕业论文

---文档均为word文档,下载后可直接编辑使用亦可打印---摘 要随着中国市场经济的发展,城市现代化建设步伐不断加快,城市规模不断扩大,人口流动不断增加,房屋租赁也渐渐成为社会生活的重要组成部分。

近年来,随着互联网技术的迅猛发展,房屋租赁管理也逐渐发展为互联网信息平台。

本文将以房屋租赁平台为对象,针对我国现在的房屋租赁行业的发展趋势,建立一个界面友好,操作简便,实时快捷的房屋租赁平台,让房东可以在平台上发布自己想出租的房屋信息,提供给需求者选择,同时又能随时管理房屋的信息,及时更新;租客既可以不用特地经过房屋中介这个中间人,也可以随时浏览各个地方各个价格区间的闲置空房,挑选自己中意的房屋。

本平台使用h5为开发语言,使用vue框架,并且使用了依赖于Vue的Element-UI,同时使用mysql作为数据库。

关键词:房屋租赁,房屋租赁信息管理,信息平台Design and implementation of online housing rental platformAbstractAlong with the China market economy development, the city modernization step speeds up unceasingly, the city scale expands unceasingly, the population flowing increases unceasingly, the house rents also gradually becomes the social life the important constituent.In recent years, along with the Internet technology swift and violent development, the house rented the management also gradually to develop for the Internet information platform.This article will rent the platform take the house as an object, rents the profession in view of our country present house the trend of development, will establish a contact surface to be friendly, the operation will be simple, the real-time quick house will rent the platform, will enable the landlord to be possible in the platform to issue oneself will find out the house information which will rent, will provide for the demand choice, simultaneously will be able to manage the house as necessary the information, prompt renewal; The lessee already may not need to pass through especially the house intermediary this intermediate, also may glance over each place each price sector as necessary the idle vacant room, chooses the oneself pleasing house.This platform uses h5 is the development language, uses the vue frame, and used has relied on Vue Element-UI, simultaneously used mysql to take the database.Key word: The house rents, the house rents the information management, the information platform目录第1章绪论 (1)1.1 系统开发的背景和目标 (1)1.1.1 系统开发的背景 (1)1.1.2 系统开发的目标 (1)1.2 系统的主要功能和特点 (1)1.3 设计开发的方法和工具的选择 (2)1.3.1 前端html5 (2)1.3.2 Vue框架 (3)1.3.3服务端Node (4)1.3.4 mysql数据库 (4)1.3.5 Vscode (4)1.3.6 Navicate (5)1.4 论文的内容和结构安排 (6)第2章系统规划 (7)2.1 初步需求分析 (7)2.2 总体结构 (7)2.3 可行性研究 (8)第3章系统分析 (9)3.1 业务流程分析 (9)3.2 数据流程分析 (14)3.3 数据字典 (15)3.3.1数据项 (15)3.3.2数据流 (16)3.3.3数据存储 (17)3.3.4外部实体 (17)第4章系统设计 (18)4.1 总体设计 (18)4.2 数据库设计 (19)4.2.1 概念模型 (19)4.2.2 逻辑模型 (21)4.2.3 物理模型 (22)4.3 页面设计 (23)第5章系统实现 (27)5.1 系统基础模块实现 (27)5.1.1用户注册登录注销实现 (27)5.1.2用户修改个人信息实现 (31)5.2 系统业务模块实现 (32)5.2.1房东功能模块 (32)5.2.2租客功能模块 (35)总结 (39)参考文献 (40)谢辞 (41)附录 (42)第1第 第第1.1 系统开发的背景和目标1.1.1 第第第第第第第近年来,中国的住房价格高涨,而且还在保持着继续上涨的势头,这成为政府需要解决的主要问题,人们对此非常关注。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

java房屋租赁系统的设计与实现java+sql房屋租赁系统例:import java.awt.BorderLayout;import javax.swing.JPanel;import javax.swing.JFrame;import java.awt.Dimension;import java.awt.SystemColor;import javax.swing.JLabel;import java.awt.Rectangle;import javax.swing.SwingConstants;import java.awt.Font;import java.awt.Point;import java.sql.Connection;import java.sql.DriverManager;import java.sql.Statement;import javax.swing.JTextField;import javax.swing.JButton;import database.DatabaseUtil;public class DeleteHouseImformation extends JFrame {private static final long serialVersionUID = 1L; private JPanel jContentPane = null;private JLabel jLabel = null;private JLabel jLabel1 = null;private JLabel jLabel2 = null;private JLabel jLabel3 = null;private JLabel jLabel4 = null;private JLabel jLabel5 = null;private JLabel jLabel6 = null;private JTextField jTextField = null;private JTextField jTextField1 = null;private JTextField jTextField2 = null;private JTextField jTextField3 = null;private JTextField jTextField4 = null;private JTextField jTextField5 = null;private JButton jButton = null;private JButton jButton1 = null;private JButton jButton2 = null;/*** This is the default constructor*/public DeleteHouseImformation() { super();initialize();}/*** This method initializes this** @return void*/private void initialize() {this.setSize(453, 286);this.setContentPane(getJContentPane()); this.setTitle("删除房屋信息");}/*** This method initializes jContentPane ** @return javax.swing.JPanel*/private JPanel getJContentPane() {if (jContentPane == null) {jLabel6 = new JLabel();jLabel6.setText("HouseStatus:");jLabel6.setSize(new Dimension(97, 18));jLabel6.setHorizontalAlignment(SwingConstants.RIGHT); jLabel6.setLocation(new Point(18, 210));jLabel5 = new JLabel();jLabel5.setText("HouseAddress:");jLabel5.setSize(new Dimension(97, 18));jLabel5.setHorizontalAlignment(SwingConstants.RIGHT); jLabel5.setLocation(new Point(18, 180));jLabel4 = new JLabel();jLabel4.setText("HousseStyle:");jLabel4.setSize(new Dimension(97, 18));jLabel4.setHorizontalAlignment(SwingConstants.RIGHT); jLabel4.setLocation(new Point(18, 150));jLabel3 = new JLabel();jLabel3.setText("MaxNumder:");jLabel3.setSize(new Dimension(97, 18));jLabel3.setHorizontalAlignment(SwingConstants.RIGHT);jLabel3.setLocation(new Point(18, 120));jLabel2 = new JLabel();jLabel2.setText("HouseRent:");jLabel2.setSize(new Dimension(97, 18));jLabel2.setHorizontalAlignment(SwingConstants.RIGHT);jLabel2.setLocation(new Point(18, 90));jLabel1 = new JLabel();jLabel1.setText("HouseID:");jLabel1.setSize(new Dimension(97, 18));jLabel1.setHorizontalAlignment(SwingConstants.RIGHT);jLabel1.setLocation(new Point(18, 60));jLabel = new JLabel();jLabel.setBounds(new Rectangle(75, 11, 295, 41));jLabel.setHorizontalAlignment(SwingConstants.CENTER);jLabel.setHorizontalTextPosition(SwingConstants.CENTER);jLabel.setFont(new Font("\u534e\u6587\u65b0\u9b4f", Font.BOLD, 24));jLabel.setText("请输入要删除的房屋信息");jContentPane = new JPanel();jContentPane.setLayout(null);jContentPane.setBackground(SystemColor.inactiveCaption);jContentPane.setFont(new Font("Dialog", Font.PLAIN, 12)); jContentPane.add(jLabel, null);jContentPane.add(jLabel1, null);jContentPane.add(jLabel2, null);jContentPane.add(jLabel3, null);jContentPane.add(jLabel4, null);jContentPane.add(jLabel5, null);jContentPane.add(jLabel6, null);jContentPane.add(getJTextField(), null); jContentPane.add(getJTextField1(), null); jContentPane.add(getJTextField2(), null); jContentPane.add(getJTextField3(), null); jContentPane.add(getJTextField4(), null); jContentPane.add(getJTextField5(), null); jContentPane.add(getJButton(), null);jContentPane.add(getJButton1(), null); jContentPane.add(getJButton2(), null);}return jContentPane;}/*** This method initializes jTextField** @return javax.swing.JTextField*/private JTextField getJTextField() {if (jTextField == null) {jTextField = new JTextField(); jTextField.setLocation(new Point(118, 58)); jTextField.setSize(new Dimension(130, 22)); }return jTextField;}/*** This method initializes jTextField1** @return javax.swing.JTextField*/private JTextField getJTextField1() {if (jTextField1 == null) {jTextField1 = new JTextField();jTextField1.setLocation(new Point(118, 90));jTextField1.setSize(new Dimension(130, 22)); }return jTextField1;}/*** This method initializes jTextField2** @return javax.swing.JTextField*/private JTextField getJTextField2() {if (jTextField2 == null) {jTextField2 = new JTextField();jTextField2.setLocation(new Point(118, 118)); jTextField2.setSize(new Dimension(130, 22)); }return jTextField2;}/*** This method initializes jTextField3** @return javax.swing.JTextField*/private JTextField getJTextField3() {if (jTextField3 == null) {jTextField3 = new JTextField();jTextField3.setLocation(new Point(118, 152)); jTextField3.setSize(new Dimension(130, 22)); }return jTextField3;}/*** This method initializes jTextField4** @return javax.swing.JTextField*/private JTextField getJTextField4() {if (jTextField4 == null) {jTextField4 = new JTextField();jTextField4.setLocation(new Point(118, 182)); jTextField4.setSize(new Dimension(130, 22)); }return jTextField4;}/*** This method initializes jTextField5** @return javax.swing.JTextField*/private JTextField getJTextField5() {if (jTextField5 == null) {jTextField5 = new JTextField();jTextField5.setLocation(new Point(118, 208)); jTextField5.setSize(new Dimension(130, 22)); }return jTextField5;}/*** This method initializes jButton** @return javax.swing.JButton*/private JButton getJButton() {if (jButton == null) {jButton = new JButton();jButton.setLocation(new Point(344, 122));jButton.setText("删除");jButton.setSize(new Dimension(64, 29));jButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) {//String url ="jdbc:jtds:sqlserver://localhost:1433;DatabaseName=housesystem";Connection con = DatabaseUtil.getConnection();try {//Class.forName("net.sourceforge.jtds.jdbc.Driver");//Connection con =DriverManager.getConnection(url,"sa","123456");Statement stmt = con.createStatement();String HouseID = jTextField.getText();String HouseRent = jTextField1.getText();String MaxNumder =jTextField2.getText();String HousseStyle = jTextField3.getText();String HouseAddress = jTextField4.getText();String HouseStatus = jTextField5.getText();String SQL="DELETE FROM HouseImformation WHERE HouseID=('"+HouseID+"') OR HouseRent=('"+HouseRent+"') OR MaxNumder=('"+MaxNumder+"') OR HousseStyle=('"+HousseStyle+"') OR HouseAddress=('"+HouseAddress+"') ORHouseStatus=('"+HouseStatus+"')";stmt.executeUpdate(SQL);stmt.close();con.close();} catch (Exception ex) {}System.out.println("删除成功!");// TODO Auto-generated Event stub actionPerformed()}});}return jButton;}/*** This method initializes jButton1** @return javax.swing.JButton*/private JButton getJButton1() {if (jButton1 == null) {jButton1 = new JButton();jButton1.setBounds(new Rectangle(348, 159, 64, 29));jButton1.setText("退出");jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) {dispose(); // TODO Auto-generated Event stub actionPerformed() }});}return jButton1;}/*** This method initializes jButton2** @return javax.swing.JButton*/private JButton getJButton2() {if (jButton2 == null) {jButton2 = new JButton();jButton2.setText("清空");jButton2.setSize(new Dimension(64, 29));jButton2.setLocation(new Point(350, 199));jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) {jTextField.setText("");jTextField1.setText("");jTextField2.setText("");jTextField3.setText("");jTextField4.setText("");jTextField5.setText(""); // TODO Auto-generated Event stub actionPerformed()}});}return jButton2;}} // @jve:decl-index=0:visual-constraint="205,9"。

相关文档
最新文档