1. Trang chủ
  2. » Thể loại khác

Thực hành Java - Võ Tấn Dũng (votandung) ď BaiNhanVien_1

2 115 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

private void NapItemDuocChon() { if (tableNhanVien.getSelectedRow() < 0) { return; } int row = tableNhanVien.getSelectedRow(); tfMaNhanVien.setText(tableNhanVien.getValueAt(row, 0).toString()); tfHoTen.setText((String)tableNhanVien.getValueAt(row, 1)); dtpNgaySinh.setDate((Date)tableNhanVien.getValueAt(row, 2)); tfDienThoai.setText((String)tableNhanVien.getValueAt(row, 3)); tfDiaChi.setText((String)tableNhanVien.getValueAt(row, 4)); //cot 5??? //dtpNgaySinh.requestFocus(); } public void ThemXoaSua(String sqlCommand) { Statement st; try { st = con.createStatement(); int n = st.executeUpdate(sqlCommand); if(n>0) JOptionPane.showMessageDialog(null,"Thực thi thành công!"); else JOptionPane.showMessageDialog(null,"Thực thi không thành công!"); } catch (SQLException e) { JOptionPane.showMessageDialog(null,"Loi thuc thi cau SQL:\n" + sqlCommand); } } ...else JOptionPane.showMessageDialog(null, "Thực thi không thành công!"); } catch (SQLException e) { JOptionPane.showMessageDialog(null,"Loi thuc thi

Ngày đăng: 15/12/2017, 17:24

Xem thêm:

TỪ KHÓA LIÊN QUAN

w