77范文网 - 专业文章范例文档资料分享平台

企业进销存管理系统 课程设计 软件工程(3)

来源:网络收集 时间:2019-03-03 下载这篇文档 手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:或QQ: 处理(尽可能给您提供完整文档),感谢您的支持与谅解。点击这里给我发消息

}

public String getPh() { returnthis.ph; }

publicvoid setPh(String ph) { this.ph = ph; }

public String getPzwh() { returnthis.pzwh; }

publicvoid setPzwh(String pzwh) { this.pzwh = pzwh; }

public String getMemo() { returnthis.memo; }

publicvoid setMemo(String memo) { this.memo = memo; }

public String getGysname() { returnthis.gysname; }

publicvoid setGysname(String gysname) { this.gysname = gysname; }

public String toString() { return getSpname(); }

@Override

publicint hashCode() { finalintPRIME = 31; intresult = 1;

result = PRIME * result + ((bz == null) ? 0 : bz.hashCode()); result = PRIME * result + ((cd == null) ? 0 : cd.hashCode());

result = PRIME * result + ((dw == null) ? 0 : dw.hashCode()); result = PRIME * result + ((gg == null) ? 0 : gg.hashCode()); result = PRIME * result + ((gysname == null) ? 0 : gysname.hashCode());

result = PRIME * result + ((id == null) ? 0 : id.hashCode()); result = PRIME * result + ((jc == null) ? 0 : jc.hashCode()); result = PRIME * result + ((memo == null) ? 0 : memo.hashCode());

result = PRIME * result + ((ph == null) ? 0 : ph.hashCode()); result = PRIME * result + ((pzwh == null) ? 0 : pzwh.hashCode());

result = PRIME * result + ((spname == null) ? 0 : spname.hashCode()); returnresult; }

@Override

publicboolean equals(Object obj) { if (this == obj) returntrue; if (obj == null) returnfalse;

if (getClass() != obj.getClass()) returnfalse;

final TbSpinfo other = (TbSpinfo) obj; if (bz == null) {

if (other.bz != null) returnfalse;

} elseif (!bz.equals(other.bz)) returnfalse; if (cd == null) {

if (other.cd != null) returnfalse;

} elseif (!cd.equals(other.cd)) returnfalse; if (dw == null) {

if (other.dw != null) returnfalse;

} elseif (!dw.equals(other.dw)) returnfalse; if (gg == null) {

if (other.gg != null) returnfalse;

} elseif (!gg.equals(other.gg))

}

}

returnfalse;

if (gysname == null) {

if (other.gysname != null) returnfalse;

} elseif (!gysname.equals(other.gysname)) returnfalse; if (id == null) {

if (other.id != null) returnfalse;

} elseif (!id.equals(other.id)) returnfalse; if (jc == null) {

if (other.jc != null) returnfalse;

} elseif (!jc.equals(other.jc)) returnfalse;

if (memo == null) {

if (other.memo != null) returnfalse;

} elseif (!memo.equals(other.memo)) returnfalse; if (ph == null) {

if (other.ph != null) returnfalse;

} elseif (!ph.equals(other.ph)) returnfalse;

if (pzwh == null) {

if (other.pzwh != null) returnfalse;

} elseif (!pzwh.equals(other.pzwh)) returnfalse;

if (spname == null) {

if (other.spname != null) returnfalse;

} elseif (!spname.equals(other.spname)) returnfalse; returntrue;

3.Dao公共类

Dao的全称是Data Access Object,即数据访问对象。本项目中应用该名称作为数据库访问类的名称,在该类中实现了数据库的驱动、连接、关闭和多个操作数据库的方法,这些方法包括不同数据表的操作方法。在介绍具体的数据库访问方

法之前,先来看一下Dao类的定义,也就是数据库驱动和连接的代码。 代码如下

publicclass Dao {

static Statement sql; static ResultSet res;

protectedstatic String dbClassName=\; protectedstatic String

dbUrl=\; protectedstatic String dbUser=\;

protectedstatic String dbPwd=\; protectedstatic String second = null;

publicstatic Connection conn=null;

static{ try{

if(conn==null){

Class.forName(dbClassName).newInstance(); conn = (Connection)

DriverManager.getConnection(dbUrl,dbUser,dbPwd); }

}catch(Exception ee){ ee.printStackTrace();

} }

3.4系统登录模块设计 1.设计登录窗体

登录模块的窗体设计由两部分组成,一部分是登录窗体,另一部分是窗体中带背景图片的内容面板。

1.创建内容面板

publicclassLoginPanelextends JPanel { publicintwidth, height; private Image img; public LoginPanel() { super();

URL url = getClass().getResource(\); img = new ImageIcon(url).getImage(); }

protectedvoid paintComponent(Graphics g) { super.paintComponent(g);

g.drawImage(img, 0, 0, this); } }

2.创建登录窗体

private LoginPanel getLoginPanel() { if (loginPanel == null) { jLabel1 = new JLabel();

jLabel1.setBounds(new Rectangle(86, 71, 55, 18)); jLabel1.setText(\密 码:\); jLabel = new JLabel();

jLabel.setText(\用户名:\);

jLabel.setBounds(new Rectangle(85, 41, 56, 18)); loginPanel = new LoginPanel(); loginPanel.setLayout(null);

loginPanel.setBackground(new Color(0xD8DDC7)); loginPanel.add(jLabel, null);

loginPanel.add(getUserField(), null); loginPanel.add(jLabel1, null);

百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库企业进销存管理系统 课程设计 软件工程(3)在线全文阅读。

企业进销存管理系统 课程设计 软件工程(3).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印 下载失败或者文档不完整,请联系客服人员解决!
本文链接:https://www.77cn.com.cn/wenku/zonghe/490164.html(转载请注明文章来源)
Copyright © 2008-2022 免费范文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ: 邮箱:tiandhx2@hotmail.com
苏ICP备16052595号-18
× 注册会员免费下载(下载后可以自由复制和排版)
注册会员下载
全站内容免费自由复制
注册会员下载
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: