📄 mainframe.java
字号:
}
public void jScrollPane1_mouseClicked(MouseEvent mouseEvent) {
}
public void table_mouseClicked(MouseEvent mouseEvent) {
txtZcId.setText("");
txtJyR.setText("");
txtJyDate.setText("");
txtGhDate.setText("");
txtZcId.setText((String)tm.getValueAt(table.getSelectedRow(), 0));
txtName.setText((String) tm.getValueAt(table.getSelectedRow(), 1));
txtDlId.setText((String) tm.getValueAt(table.getSelectedRow(), 2));
txtZlId.setText((String) tm.getValueAt(table.getSelectedRow(), 3));
txtStyle.setText((String) tm.getValueAt(table.getSelectedRow(), 4));
txtPrice.setText((String) tm.getValueAt(table.getSelectedRow(), 5));
String d = (String) tm.getValueAt(table.getSelectedRow(), 6);
txtGrDate.setText(d);
txtStatus.setText((String) tm.getValueAt(table.getSelectedRow(), 7));
txtGrR.setText((String) tm.getValueAt(table.getSelectedRow(), 8));
txtContent.setText((String) tm.getValueAt(table.getSelectedRow(), 9));
if(table.getSelectedRow()!=-1)
{
try
{
con = new DBConn().getConnection();
smt=con.createStatement();
rs = smt.executeQuery("select * from LEND where assetid='" +
txtZcId.getText() + "'");
if (rs.next()) {
txtJyR.setText(rs.getString("empno"));
d = rs.getString("usedate");
d = d.substring(0, d.indexOf(" "));
txtJyDate.setText(d);
d = rs.getString("retdate");
d = d.substring(0, d.indexOf(" "));
txtGhDate.setText(d);
if (rs.getString("isreturn").equals("1")) {
txtReturn.setText("否");
} else{
txtReturn.setText("是");
}
}
}
catch(Exception e)
{
}
}
}
public void jMenuItem1_actionPerformed(ActionEvent e) {
ZcAdd zc = new ZcAdd();
zc.setTitle("添加资产信息");
zc.setSize(400, 400);
zc.btnDel.setEnabled(false);
zc.btnEdit.setEnabled(false);
zc.setLocation(300, 100);
zc.setVisible(true);
}
public void jMenuItem2_actionPerformed(ActionEvent e) {
ZcAdd zc = new ZcAdd();
zc.setTitle("修改资产信息");
zc.setSize(400, 400);
zc.btnAdd.setEnabled(false);
zc.btnDel.setEnabled(false);
zc.btnEdit.setEnabled(true);
zc.setLocation(300, 100);
zc.setVisible(true);
}
public void jMenuItem3_actionPerformed(ActionEvent e) {
ZcAdd zc = new ZcAdd();
zc.setTitle("删除资产信息");
zc.setSize(400, 400);
zc.btnAdd.setEnabled(false);
zc.btnDel.setEnabled(true);
zc.btnEdit.setEnabled(false);
zc.setLocation(300, 100);
zc.setVisible(true);
}
public void jMenuItem4_actionPerformed(ActionEvent e) {
ZgView zc = new ZgView();
zc.setTitle("添加职工信息");
zc.setSize(400, 400);
zc.btnAdd.setEnabled(true);
zc.btnDel.setEnabled(false);
zc.btnModify.setEnabled(false);
zc.setLocation(300, 100);
zc.setVisible(true);
}
public void jMenuItem5_actionPerformed(ActionEvent e) {
ZgView zc = new ZgView();
zc.setTitle("修改职工信息");
zc.setSize(400, 400);
zc.btnAdd.setEnabled(false);
zc.btnDel.setEnabled(false);
zc.btnModify.setEnabled(true);
zc.setLocation(300, 100);
zc.setVisible(true);
}
public void jMenuItem6_actionPerformed(ActionEvent e) {
ZgView zc = new ZgView();
zc.setTitle("删除职工信息");
zc.setSize(400, 400);
zc.btnAdd.setEnabled(false);
zc.btnDel.setEnabled(true);
zc.btnModify.setEnabled(false);
zc.setLocation(300, 100);
zc.setVisible(true);
}
public void jMenuItem7_actionPerformed(ActionEvent e) {
ZcLbView zl = new ZcLbView();
zl.setTitle("添加类别信息");
zl.setSize(400, 400);
zl.btnDel.setEnabled(false);
zl.btnModify.setEnabled(false);
zl.setLocation(300, 100);
zl.setVisible(true);
}
public void jMenuItem8_actionPerformed(ActionEvent e) {
ZcLbView zl = new ZcLbView();
zl.setTitle("修改类别信息");
zl.setSize(400, 400);
zl.btnDel.setEnabled(false);
zl.btnAdd.setEnabled(false);
zl.setLocation(300, 100);
zl.setVisible(true);
}
public void jMenuItem9_actionPerformed(ActionEvent e) {
ZcLbView zl = new ZcLbView();
zl.setTitle("删除类别信息");
zl.setSize(400, 400);
zl.btnAdd.setEnabled(false);
zl.btnModify.setEnabled(false);
zl.setLocation(300, 100);
zl.setVisible(true);
}
public void jMenuItem12_actionPerformed(ActionEvent e) {
UserPwd user = new UserPwd();
user.setTitle("修改密码");
user.setSize(400, 400);
user.setLocation(300, 100);
user.setVisible(true);
}
public void jMenuItem10_actionPerformed(ActionEvent e) {
LendView lend = new LendView();
lend.setTitle("借用资产");
lend.setSize(400, 400);
lend.btnReturn.setEnabled(false);
lend.setLocation(300, 100);
lend.setVisible(true);
}
public void jMenuItem11_actionPerformed(ActionEvent e) {
LendView lend = new LendView();
lend.setTitle("归还资产");
lend.setSize(400, 400);
lend.btnBorrow.setEnabled(false);
lend.setLocation(300, 100);
lend.setVisible(true);
}
}
class MainFrame_jMenuItem11_actionAdapter implements ActionListener {
private MainFrame adaptee;
MainFrame_jMenuItem11_actionAdapter(MainFrame adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jMenuItem11_actionPerformed(e);
}
}
class MainFrame_jMenuItem10_actionAdapter implements ActionListener {
private MainFrame adaptee;
MainFrame_jMenuItem10_actionAdapter(MainFrame adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jMenuItem10_actionPerformed(e);
}
}
class MainFrame_jMenuItem9_actionAdapter implements ActionListener {
private MainFrame adaptee;
MainFrame_jMenuItem9_actionAdapter(MainFrame adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jMenuItem9_actionPerformed(e);
}
}
class MainFrame_jMenuItem7_actionAdapter implements ActionListener {
private MainFrame adaptee;
MainFrame_jMenuItem7_actionAdapter(MainFrame adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jMenuItem7_actionPerformed(e);
}
}
class MainFrame_jMenuItem8_actionAdapter implements ActionListener {
private MainFrame adaptee;
MainFrame_jMenuItem8_actionAdapter(MainFrame adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jMenuItem8_actionPerformed(e);
}
}
class MainFrame_jMenuItem12_actionAdapter implements ActionListener {
private MainFrame adaptee;
MainFrame_jMenuItem12_actionAdapter(MainFrame adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jMenuItem12_actionPerformed(e);
}
}
class MainFrame_jMenuItem5_actionAdapter implements ActionListener {
private MainFrame adaptee;
MainFrame_jMenuItem5_actionAdapter(MainFrame adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jMenuItem5_actionPerformed(e);
}
}
class MainFrame_jMenuItem6_actionAdapter implements ActionListener {
private MainFrame adaptee;
MainFrame_jMenuItem6_actionAdapter(MainFrame adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jMenuItem6_actionPerformed(e);
}
}
class MainFrame_jMenuItem4_actionAdapter implements ActionListener {
private MainFrame adaptee;
MainFrame_jMenuItem4_actionAdapter(MainFrame adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jMenuItem4_actionPerformed(e);
}
}
class MainFrame_jMenuItem2_actionAdapter implements ActionListener {
private MainFrame adaptee;
MainFrame_jMenuItem2_actionAdapter(MainFrame adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jMenuItem2_actionPerformed(e);
}
}
class MainFrame_jMenuItem3_actionAdapter implements ActionListener {
private MainFrame adaptee;
MainFrame_jMenuItem3_actionAdapter(MainFrame adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jMenuItem3_actionPerformed(e);
}
}
class MainFrame_jMenuItem1_actionAdapter implements ActionListener {
private MainFrame adaptee;
MainFrame_jMenuItem1_actionAdapter(MainFrame adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jMenuItem1_actionPerformed(e);
}
}
class MainFrame_table_mouseAdapter extends MouseAdapter {
private MainFrame adaptee;
MainFrame_table_mouseAdapter(MainFrame adaptee) {
this.adaptee = adaptee;
}
public void mouseClicked(MouseEvent mouseEvent) {
adaptee.table_mouseClicked(mouseEvent);
}
}
class MainFrame_jButton2_actionAdapter implements ActionListener {
private MainFrame adaptee;
MainFrame_jButton2_actionAdapter(MainFrame adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent actionEvent) {
adaptee.jButton2_actionPerformed(actionEvent);
}
}
class MainFrame_jScrollPane1_mouseAdapter extends MouseAdapter {
private MainFrame adaptee;
MainFrame_jScrollPane1_mouseAdapter(MainFrame adaptee) {
this.adaptee = adaptee;
}
public void mouseClicked(MouseEvent mouseEvent) {
adaptee.jScrollPane1_mouseClicked(mouseEvent);
}
}
class MainFrame_jButton1_actionAdapter implements ActionListener {
private MainFrame adaptee;
MainFrame_jButton1_actionAdapter(MainFrame adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent actionEvent) {
adaptee.jButton1_actionPerformed(actionEvent);
}
}
class MainFrame_jButton3_actionAdapter implements ActionListener {
private MainFrame adaptee;
MainFrame_jButton3_actionAdapter(MainFrame adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent actionEvent) {
adaptee.jButton3_actionPerformed(actionEvent);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -