import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.sql.*;
public class SearchInf
extends JFrame
implements ActionListener {
String strurl;
Connection conn;
Statement stmt;
ResultSet rs;
Label label1 = new Label();
TextField textField1 = new TextField();
Label label2 = new Label();
TextField textField2 = new TextField();
Label label3 = new Label();
Choice choice1 = new Choice();
Label label4 = new Label();
TextField textField3 = new TextField();
Label label5 = new Label();
Choice choice2 = new Choice();
Label label6 = new Label();
TextField textField4 = new TextField();
Label label7 = new Label();
Choice choice3 = new Choice();
Label label8 = new Label();
TextField textField5 = new TextField();
Label label9 = new Label();
TextArea textArea1 = new TextArea();
Button button1 = new Button();
TextField textField6 = new TextField();
Button button2 = new Button();
Label label10 = new Label();
Label label12 = new Label();
Label label13 = new Label();
TextField textField7 = new TextField();
public SearchInf() {
try {
jbInit();
}
catch (Exception e) {
e.printStackTrace();
}
}
private void jbInit() throws Exception {
label1.setText("会员编号:");
label1.setVisible(false);
label1.setBounds(new Rectangle(30, 11, 51, 33));
this.getContentPane().setLayout(null);
textField1.setText("");
textField1.setVisible(false);
textField1.setBounds(new Rectangle(86, 16, 74, 22));
label2.setBounds(new Rectangle(162, 11, 28, 33));
label2.setText("姓名:");
label2.setVisible(false);
textField2.setText("");
textField2.setVisible(false);
textField2.setBounds(new Rectangle(192, 16, 44, 22));
label3.setText("性别:");
label3.setVisible(false);
label3.setBounds(new Rectangle(241, 11, 28, 33));
choice1.setEnabled(true);
choice1.setFont(new java.awt.Font("Dialog", 0, 12));
choice1.setForeground(Color.black);
choice1.setLocale(java.util.Locale.getDefault());
choice1.setVisible(false);
choice1.setBounds(new Rectangle(275, 15, 50, 25));
choice1.addItem("男");
choice1.addItem("女");
this.setDefaultCloseOperation(HIDE_ON_CLOSE);
this.setEnabled(true);
this.setResizable(false);
this.setTitle("查询会员信息");
label4.setBounds(new Rectangle(31, 53, 49, 33));
label4.setText("出生日期:");
label4.setVisible(false);
textField3.setBounds(new Rectangle(86, 58, 74, 22));
textField3.setLocale(java.util.Locale.getDefault());
textField3.setText("");
textField3.setVisible(false);
label5.setText("收入状况:");
label5.setVisible(false);
label5.setBounds(new Rectangle(241, 53, 47, 33));
choice2.setBounds(new Rectangle(296, 57, 72, 25));
choice2.setLocale(java.util.Locale.getDefault());
choice2.setVisible(false);
choice2.setForeground(Color.black);
choice2.setFont(new java.awt.Font("Dialog", 0, 12));
choice2.setEnabled(true);
label6.setText("电话:");
label6.setVisible(false);
label6.setBounds(new Rectangle(163, 53, 26, 33));
textField4.setBounds(new Rectangle(191, 58, 44, 22));
textField4.setText("");
textField4.setVisible(false);
label7.setBounds(new Rectangle(30, 94, 50, 33));
label7.setText("会员等级:");
label7.setVisible(false);
choice3.setEnabled(true);
choice3.setFont(new java.awt.Font("Dialog", 0, 12));
choice3.setForeground(Color.black);
choice3.setLocale(java.util.Locale.getDefault());
choice3.setVisible(false);
choice3.setBounds(new Rectangle(86, 98, 75, 25));
label8.setBounds(new Rectangle(163, 94, 26, 33));
label8.setText("住址:");
label8.setVisible(false);
textField5.setText("");
textField5.setVisible(false);
textField5.setBounds(new Rectangle(190, 99, 178, 22));
label9.setText("备 注:");
label9.setVisible(false);
label9.setBounds(new Rectangle(27, 132, 50, 33));
textArea1.setVisible(false);
textArea1.setBounds(new Rectangle(84, 139, 285, 95));
button1.setLabel("下一条");
button1.setVisible(false);
button1.setBounds(new Rectangle(153, 242, 94, 22));
button1.addActionListener(this);
textField6.setText("");
textField6.setBounds(new Rectangle(177, 83, 83, 22));
button2.setBounds(new Rectangle(164, 177, 73, 22));
button2.setLabel("确定");
button2.setVisible(true);
button2.addActionListener(this);
label10.setBounds(new Rectangle(124, 86, 28, 16));
label10.setText("编号:");
label12.setBounds(new Rectangle(144, 36, 114, 30));
label12.setText("请选择查询条件");
label12.setFont(new java.awt.Font("Dialog", 1, 15));
label13.setText("姓名:");
label13.setBounds(new Rectangle(124, 130, 28, 16));
textField7.setBounds(new Rectangle(178, 127, 83, 22));
textField7.setText("");
this.getContentPane().add(label3, null);
this.getContentPane().add(label1, null);
this.getContentPane().add(textField1, null);
this.getContentPane().add(label2, null);
this.getContentPane().add(textField2, null);
this.getContentPane().add(choice1, null);
this.getContentPane().add(label4, null);
this.getContentPane().add(textField3, null);
this.getContentPane().add(label6, null);
this.getContentPane().add(textField4, null);
this.getContentPane().add(label5, null);
this.getContentPane().add(choice2, null);
this.getContentPane().add(label7, null);
this.getContentPane().add(choice3, null);
this.getContentPane().add(label8, null);
this.getContentPane().add(textField5, null);
this.getContentPane().add(label9, null);
this.getContentPane().add(textArea1, null);
this.getContentPane().add(label13, null);
this.getContentPane().add(label10, null);
this.getContentPane().add(label12, null);
this.getContentPane().add(button1, null);
this.getContentPane().add(textField7, null);
this.getContentPane().add(textField6, null);
this.getContentPane().add(button2, null);
choice2.addItem("一般");
choice2.addItem("良好");
choice2.addItem("保密");
choice3.addItem("普通");
choice3.addItem("银卡");
choice3.addItem("金卡");
choice3.addItem("钻石卡");
strurl =
"jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ=DataBase/member.mdb";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
conn = DriverManager.getConnection(strurl);
stmt = conn.createStatement();
}
public void actionPerformed(ActionEvent e) {
try {
if (e.getSource() == button2) {
if (textField6.getText().trim().equals("")||
textField7.getText().trim().equals(""))
rs = stmt.executeQuery("SELECT * FROM BaseInf where 会员编号='" +
textField6.getText() + "' OR 姓名='"
+ textField7.getText() + "'");
else if (textField6.getText().trim().equals("")&&
textField7.getText().trim().equals(""))
JOptionPane.showMessageDialog(null, "请至少输入一个条件", "警告",
JOptionPane.WARNING_MESSAGE);
else
rs = stmt.executeQuery("SELECT * FROM BaseInf where 会员编号='" +
textField6.getText() + "' AND 姓名='"
+ textField7.getText() + "'");
if (rs.next()) {
textField6.setVisible(false);
textField7.setVisible(false);
button2.setVisible(false);
label10.setVisible(false);
label12.setVisible(false);
label13.setVisible(false);
label1.setVisible(true);
label2.setVisible(true);
label3.setVisible(true);
label4.setVisible(true);
labe
没有合适的资源?快使用搜索试试~ 我知道了~
Manaing-user.rar_会员管理系统
![preview](https://csdnimg.cn/release/downloadcmsfe/public/img/white-bg.ca8570fa.png)
共14个文件
class:7个
java:6个
mdb:1个
![preview-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/scale.ab9e0183.png)
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 146 浏览量
2022-09-22
22:59:14
上传
评论
收藏 40KB RAR 举报
温馨提示
建立一个简单的会员管理系统,方便管理员进行增加会员信息、修改会员信息、删除会员信息、查询会员信息的功能。要求能够方便使用,功能健全,友好的用户界面等。
资源推荐
资源详情
资源评论
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![altova_licenses](https://img-home.csdnimg.cn/images/20210720083646.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
收起资源包目录
![package](https://csdnimg.cn/release/downloadcmsfe/public/img/package.f3fc750b.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
共 14 条
- 1
资源评论
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
![avatar](https://profile-avatar.csdnimg.cn/5df8bff20ad645abb899a1a8333a748d_weixin_42651281.jpg!1)
小波思基
- 粉丝: 74
- 资源: 1万+
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)