示例#1
0
 public boolean unpass(int[] ids) {
   boolean re = true;
   if (this.list == null) {
     this.list = this.getAll();
   }
   try {
     for (int i = ids.length - 1; i >= 0; i--) {
       CostListVO vo = this.list.remove(ids[i]);
       vo.setState(State.UNPASS);
       re = re && this.data.update(vo.toPO());
     }
   } catch (RemoteException e) {
     e.printStackTrace();
   }
   return re;
 }
示例#2
0
 public boolean pass(int[] ids) {
   boolean re = true;
   if (this.list == null) {
     this.list = this.getAll();
   }
   try {
     for (int i = ids.length - 1; i >= 0; i--) {
       CostListVO vo = this.list.get(ids[i]);
       // 付款,更新卡余额
       if (this.account.pay(vo.getAccout(), vo.getMoney())) {
         vo.setState(State.PASS);
         this.data.update(vo.toPO());
       } else {
         return re = false;
       }
     }
   } catch (RemoteException e) {
     e.printStackTrace();
   }
   return re;
 }