• 大小: 658KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-05-11
  • 语言: Java
  • 标签: 小区物业  

资源简介

小区物业管理系统 JAVA+sqlserver

资源截图

代码片段和文件信息

package com.sanqing.basic;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.sql.*;
import java.util.*;
import java.applet.*;
import javax.swing.event.*;

import com.sanqing.util.DBConnection;

public class InfoMaintain extends Jframe implements ActionListener{

private Connection c;
private JTable out;
private JPanel out1out2;
private String Mouaction;
private JButton button1button2button3;
private JPanel pr;
private String district_nobuilding_no;

public InfoMaintain(JPanel p)
{
this.pr = p;
}

public void actionPerformed(ActionEvent e){
Mouaction = e.getActionCommand();
try
{
c=DBConnection.getConnection();
}
catch(Exception err)
{
err.printStackTrace();
}//建立数据库连接;
district_no = new String();
getTable();
}

public void getTable()
{
if(Mouaction.equals(“小区信息维护“))//当点选“小区信息维护“时的行为;
{
try
{
Statement sql1 = c.createStatement();
Vector columnName = new Vector();
Vector rows = new Vector();
Vector temp = new Vector();//定义向量,进行数据库数据操作
ResultSet rsl1 = sql1.executeQuery(“SELECT * FROM district_info“);
ResultSetmetaData rsmd1 = rsl1.getmetaData();//获取表的字段名称
for(int i = 1;i columnName.addElement(rsmd1.getColumnName(i));
while(rsl1.next())//逐行读取数据
{
for(int j=1;j<=rsmd1.getColumnCount();j++)
{
temp.addElement(rsl1.getString(j));
}
rows.addElement(temp);
}

out = new JTable(rowscolumnName);
out1 = new JPanel();
out1.setLayout(new FlowLayout());
out2 = new JPanel();
out2.setLayout(new BorderLayout());
button1 = new JButton(“修改“);
button2 = new JButton(“重置“);
button3 = new JButton(“返回“);
out1.add(button1);
out1.add(button2);
out1.add(button3);
out2.add(outBorderLayout.CENTER);
out2.add(out1BorderLayout.SOUTH);
     pr.removeAll();
//pr.repaint();
pr.add(out2);
pr.repaint();

sql1.close();
rsl1.close();     

}
catch(SQLException sqlex)
{
sqlex.printStackTrace();
}
}

else if(Mouaction.equals(“楼宇信息维护“))
{
//try
//{
SelectDistrict ss = new SelectDistrict(district_no);
System.out.println(district_no);
//}
/*catch(SQLException sqlex1)
{
sqlex1.printStackTrace();
}*/
}

/*else if(Mouaction.equals(“业主/房屋信息维护“))
{
try
{
}
catch(SQLException sqlex2)
{
sqlex2.printStackTrace();
}
}*/
}

public class SelectDistrict extends Jframe
{
private Connection con1;
private Container c1;
private JList dist;
private String rslt1[]rslt[]rslt2[];
private String temp;

public SelectDistrict(String dist_no)
{
super(“选择小区“);
this.temp = dist_no;

c1 = getContentPane();
c1.setLayout(new FlowLayout());

rslt = new String[20];   
rslt1 = n

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2013-05-26 15:08  06 SQLServer\
     目录           0  2013-05-26 15:08  06 SQLServer\database\
     文件     5242880  2010-06-03 13:52  06 SQLServer\database\estate.mdf
     文件     1048576  2010-06-03 13:52  06 SQLServer\database\estate_log.ldf
     目录           0  2013-05-26 15:09  06 SQLServer\JavaPrj_6 SQLServer\
     文件         232  2010-06-03 13:52  06 SQLServer\JavaPrj_6 SQLServer\.classpath
     文件         395  2010-06-03 13:52  06 SQLServer\JavaPrj_6 SQLServer\.project
     目录           0  2013-05-26 15:09  06 SQLServer\JavaPrj_6 SQLServer\bin\
     目录           0  2013-05-26 15:08  06 SQLServer\JavaPrj_6 SQLServer\bin\com\
     目录           0  2013-05-26 15:09  06 SQLServer\JavaPrj_6 SQLServer\bin\com\sanqing\
     目录           0  2013-05-26 15:08  06 SQLServer\JavaPrj_6 SQLServer\bin\com\sanqing\basic\
     文件        1329  2010-06-03 13:52  06 SQLServer\JavaPrj_6 SQLServer\bin\com\sanqing\basic\InfoMaintain$SelectDistrict$1.class
     文件        3252  2010-06-03 13:52  06 SQLServer\JavaPrj_6 SQLServer\bin\com\sanqing\basic\InfoMaintain$SelectDistrict.class
     文件        3723  2010-06-03 13:52  06 SQLServer\JavaPrj_6 SQLServer\bin\com\sanqing\basic\InfoMaintain.class
     文件         745  2010-06-03 13:52  06 SQLServer\JavaPrj_6 SQLServer\bin\com\sanqing\basic\LouYuinfo$1.class
     文件         742  2010-06-03 13:52  06 SQLServer\JavaPrj_6 SQLServer\bin\com\sanqing\basic\LouYuinfo$2.class
     文件         745  2010-06-03 13:52  06 SQLServer\JavaPrj_6 SQLServer\bin\com\sanqing\basic\LouYuinfo$3.class
     文件         745  2010-06-03 13:52  06 SQLServer\JavaPrj_6 SQLServer\bin\com\sanqing\basic\LouYuinfo$4.class
     文件         744  2010-06-03 13:52  06 SQLServer\JavaPrj_6 SQLServer\bin\com\sanqing\basic\LouYuinfo$5.class
     文件         745  2010-06-03 13:52  06 SQLServer\JavaPrj_6 SQLServer\bin\com\sanqing\basic\LouYuinfo$6.class
     文件        1636  2010-06-03 13:52  06 SQLServer\JavaPrj_6 SQLServer\bin\com\sanqing\basic\LouYuinfo$7.class
     文件       13607  2010-06-03 13:52  06 SQLServer\JavaPrj_6 SQLServer\bin\com\sanqing\basic\LouYuinfo.class
     文件         722  2010-06-03 13:52  06 SQLServer\JavaPrj_6 SQLServer\bin\com\sanqing\basic\PriceChange$1.class
     文件         722  2010-06-03 13:52  06 SQLServer\JavaPrj_6 SQLServer\bin\com\sanqing\basic\PriceChange$2.class
     文件         722  2010-06-03 13:52  06 SQLServer\JavaPrj_6 SQLServer\bin\com\sanqing\basic\PriceChange$3.class
     文件        5959  2010-06-03 13:52  06 SQLServer\JavaPrj_6 SQLServer\bin\com\sanqing\basic\PriceChange.class
     文件        2692  2010-06-03 13:52  06 SQLServer\JavaPrj_6 SQLServer\bin\com\sanqing\basic\Shoufei.class
     文件         739  2010-06-03 13:52  06 SQLServer\JavaPrj_6 SQLServer\bin\com\sanqing\basic\UserInfo$1.class
     文件         736  2010-06-03 13:52  06 SQLServer\JavaPrj_6 SQLServer\bin\com\sanqing\basic\UserInfo$2.class
     文件         739  2010-06-03 13:52  06 SQLServer\JavaPrj_6 SQLServer\bin\com\sanqing\basic\UserInfo$3.class
     文件         739  2010-06-03 13:52  06 SQLServer\JavaPrj_6 SQLServer\bin\com\sanqing\basic\UserInfo$4.class
............此处省略176个文件信息

评论

共有 条评论