private void view() { int id = getSelectId(getJTable()); Payment payment = paymentblservice.getById(id); MainFrame.getLoglabel().setText("查看付款单"); this.textField_paymentId.setText(id + ""); this.comboBox_paymentType.setSelectedItem(payment.getPayment_type()); this.textField_paymentdatetime.setText( DateUtil.getStringByDateTime(payment.getPayment_datetime())); this.textField_paymentamount.setText(payment.getPayment_amount() + ""); this.comboBox_user.setSelectedItem(makeUser(payment.getFinance_user())); }
private Vector<Vector> changeDatas(Vector<Payment> payments) { Vector<Vector> view = new Vector<Vector>(); for (Payment payment : payments) { Vector v = new Vector(); v.add(payment.getId()); v.add(payment.getPayment_type()); v.add(payment.getPayment_amount()); v.add(DateUtil.getStringByDateTime(payment.getPayment_datetime())); v.add(payment.getFinance_user().getUser_name()); view.add(v); } return view; }