基本信息
源码名称:DVD管理系统,简单的java实例(含数据库文件opt/frm文件)
源码大小:1.04M
文件格式:.rar
开发语言:Java
更新时间:2019-05-29
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300

本次赞助数额为: 7 元 
   源码介绍
一个DVD管理 可登陆等

private void loginActionPerformed(ActionEvent evt) {
String userName=this.userNameTxt.getText();
String password=new String(this.passwordTxt.getPassword());
User user=new User(userName);

new UserFrm(user);
if(StringUtil.isEmpty(userName)) {
JOptionPane.showMessageDialog(null,"用户名不能为空!");
return;
}
if(StringUtil.isEmpty(password)) {
JOptionPane.showMessageDialog(null,"密码不能为空!");
return;
}
User user1=new User(userName,password);
Connection con=null;
try {
con=dbUtil.getCon();
User currentUser=userDao.longin(con, user1);
if(currentUser!=null) {
dispose();
new MainFrm().setVisible(true);
JOptionPane.showMessageDialog(null,"登录成功!");
}else {
JOptionPane.showMessageDialog(null,"用户名或者密码错误!");
}
} catch (Exception e) {
// TODO 自动生成的 catch 块
e.printStackTrace();
}
}
private void loginActionPerformed1(ActionEvent evt) {
String userName=this.userNameTxt.getText();
String password=new String(this.passwordTxt.getPassword());
if(StringUtil.isEmpty(userName)) {
JOptionPane.showMessageDialog(null,"用户名不能为空!");
return;
}
if(StringUtil.isEmpty(password)) {
JOptionPane.showMessageDialog(null,"密码不能为空!");
return;
}
User user=new User(userName,password);
Connection con=null;
try {
con=dbUtil.getCon();
User currentUser=userDao.longin(con, user);
if(currentUser!=null) {
dispose();
new UserFrm(user).setVisible(true);
JOptionPane.showMessageDialog(null,"登录成功!");
}else {
JOptionPane.showMessageDialog(null,"用户名或者密码错误!");
}
} catch (Exception e) {
// TODO 自动生成的 catch 块
e.printStackTrace();
}finally{

try {
dbUtil.closeCon(con);
} catch (Exception e) {
// TODO 自动生成的 catch 块
e.printStackTrace();
}}

}