}
private JTextField getTxtBookTypeId() { }
private JTextField getTxtBookTypeName() { }
private JButton getBtnModify() {
if (btnModify == null) {
btnModify = new JButton();
btnModify.setBounds(new Rectangle(300, 415, 71, 25)); btnModify.setText(\修改\
btnModify.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent arg0) {
String strId=txtBookTypeId.getText().trim(); String name=txtBookTypeName.getText().trim(); String sex=sexInput.getText().trim(); String brith=brithInput.getText().trim(); String address=inputAdress.getText().trim(); String tel=inputTel.getText().trim();
String organization=organizationInput.getText().trim();
42
if (txtBookTypeId == null) { }
return txtBookTypeId;
txtBookTypeId = new JTextField();
txtBookTypeId.setBounds(new Rectangle(80, 280, 130, 26)); txtBookTypeId.setEditable(false);
if (txtBookTypeName == null) { }
return txtBookTypeName;
txtBookTypeName = new JTextField();
txtBookTypeName.setBounds(new Rectangle(335, 280, 130, 26));
\
String position=positionInput.getText().trim();
if(StringUtil.isEmpty(strId)) {
JOptionPane.showMessageDialog(null, \请您选择要修改的记录!
}
return ;
if(StringUtil.isEmpty(name)) { }
int id=Integer.parseInt(strId);
peopleInformation peopleinformation=new peopleInformation( id,
JOptionPane.showMessageDialog(null, \姓名不能为空!\return ;
name, sex, brith, address, tel, organization, position);
int flag=new BookTypeDao().modifyBookType(peopleinformation); if(flag>0)
{JOptionPane.showMessageDialog(null, \修改成功!\
model.setDataVector(new bookTypeQMDIFrame().getDatas(new
peopleInformation()), new bookTypeQMDIFrame().getTitles());
}
});
}
}else { }
JOptionPane.showMessageDialog(null, \修改失败!\
return btnModify;
43
}
private JButton getBtnDelete() {
if (btnDelete == null) {
btnDelete = new JButton();
btnDelete.setBounds(new Rectangle(430, 415, 65, 25)); btnDelete.setText(\删除\
btnDelete.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent arg0) {
String strId=txtBookTypeId.getText().trim(); if(StringUtil.isEmpty(strId)) { }
int id=Integer.parseInt(strId);
peopleInformation peopleinformation=new peopleInformation(id); int flag=new BookTypeDao().deleteBookType(peopleinformation); if(flag>0) {
JOptionPane.showMessageDialog(null, \删除成功!\model.setDataVector(new bookTypeQMDIFrame().getDatas(new JOptionPane.showMessageDialog(null, \请选择删除的记录!\return ;
peopleInformation()), new bookTypeQMDIFrame().getTitles()); }
44
}
}
} } });
}else{
JOptionPane.showMessageDialog(null, \删除失败!\
return btnDelete;
参考文献
[1]<<数据库系统/21世纪全国高职高专计算机应用专业规划教材>>,作者:申莉莉编,-出版社:清华大学
[2]<<管理信息系统/面向21世纪课程教材>>,作者:薛华成编,-出版社:清华大学,2004.3
[3]<< SQL SERVER 典型网站建设案例>>,宇峰编著,-北京:清华大学出版社,2006.1
[4]<<需求分析与系统设计/软件工程技术丛书>>,作者:麦沙塞克著//金芝译,-出版社:机械工业
[5]<<系统分析与设计(需求分析系列)/软件工程技术丛书>>,作者:(美)萨茨辛格等著//朱群雄等译,-出版社:机械工业
[6] <
45