Ejemplo n.º 1
0
 public StorageListPO getCheckedStorageList(long listID) throws RemoteException {
   for (DataPO s : checkedstorageList) {
     if (s.getSerialNum() == listID) {
       chosenStorageList = (StorageListPO) s;
       return (StorageListPO) s;
     }
   }
   return null;
 }
Ejemplo n.º 2
0
 public String[][] getBriefStorageList() throws RemoteException {
   checkedstorageList = storageData.getNewlyApprovedPO(storageListType, centerID);
   if (checkedstorageList == null) return null;
   System.out.println("Èë¿âµ¥ÊýÁ¿£º" + checkedstorageList.size());
   String[][] storageListInfo = new String[checkedstorageList.size()][2];
   for (int i = 0; i < checkedstorageList.size(); i++) {
     DataPO s = checkedstorageList.get(i);
     String[] info = new String[2];
     info[0] = s.getSerialNum() + "";
     info[1] = Timestamper.getTimeByDate(s.getGenDate());
     storageListInfo[i] = info;
   }
   return storageListInfo;
 }
Ejemplo n.º 3
0
  @Override
  public ResultMessage deleteUser(long id) {
    ArrayList<DataPO> users = null;
    try {
      users = userDataService.getPOList(POType.USER);
    } catch (RemoteException e) {
      System.err.println("网络连接失败,无法获取用户数据 - " + Calendar.getInstance().getTime());
      return ResultMessage.NOTCONNECTED;
    }
    UserPO userToDelete = null;
    for (DataPO data : users) {
      if (data.getSerialNum() == id) {
        userToDelete = (UserPO) data;
        userToDelete.setDeleted(true);
        try {
          userDataService.modify(userToDelete);
        } catch (RemoteException e) {
          e.printStackTrace();
        }
      }
    }

    return ResultMessage.SUCCESS;
  }