Пример #1
0
  private void createArrivalMouseClicked(MouseEvent e) {
    if (transfer.isSelected()) arrival = entruckReceive.createArrival(transferList);
    else arrival = entruckReceive.createArrival(entruckList);

    doArrive.setVisible(false);
    doArrive.setEnabled(false);
    saveArrival.setVisible(true);
    saveArrival.setEnabled(true);
    setArrivalVO();
  }
Пример #2
0
 private void saveArrivalMouseClicked(MouseEvent e) {
   ResultMessage result = entruckReceive.saveArrival(arrival);
   if (result == ResultMessage.SUCCESS) {
     label6.setText("操作成功");
     resultDialog.repaint();
     resultDialog.setVisible(true);
   }
 }
Пример #3
0
  private void doArriveMouseClicked(MouseEvent e) {
    ResultMessage result = entruckReceive.doArrive();
    if (result == ResultMessage.FAILED) {
      label6.setText("操作失败");
    }

    resultDialog.validate();
    resultDialog.repaint();
    resultDialog.setVisible(true);
  }
Пример #4
0
  private void selectArrivalMouseClicked(MouseEvent e) {
    saveArrival.setVisible(false);
    saveArrival.setEnabled(false);
    doArrive.setVisible(true);
    doArrive.setEnabled(true);

    int row = arrivalTable.getSelectedRow();
    String id = (String) arrivalTable.getValueAt(row, 0);
    long ID = Long.parseLong(id);
    arrival = entruckReceive.chooseArrival(ID);
    setArrivalVO();
  }
Пример #5
0
  private void getDeliveryList(long id) {

    try {
      if (transfer.isSelected()) {
        transferList = entruckReceive.searchTransferList(id);
        setTransferList();
      } else {
        entruckList = entruckReceive.searchEntruckList(id);
        setEntruckList();
      }
    } catch (RemoteException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      errorDialog.setVisible(true);
    }

    remove(startPane);
    if (arrivalVO != null) remove(arrivalVO);
    add(entruckVO, BorderLayout.CENTER);

    entruckVO.validate();
    entruckVO.updateUI();
    entruckVO.setVisible(true);
  }
Пример #6
0
 private ResultMessage getArrivalList() {
   ArrivalListVO arrivalList = null;
   try {
     arrivalList = entruckReceive.getCheckedArrivals();
   } catch (RemoteException e) {
     e.printStackTrace();
     errorDialog.validate();
     errorDialog.repaint();
     errorDialog.setVisible(true);
     return ResultMessage.FAILED;
   }
   DefaultTableModel arrivalListModel =
       new DefaultTableModel(arrivalList.info, arrivalList.header);
   arrivalTable.setModel(arrivalListModel);
   arrivalTable.validate();
   arrivalTable.updateUI();
   arrivalTable.repaint();
   return ResultMessage.SUCCESS;
 }