コード例 #1
0
 private List<Integer> getCurrWithdrawnIds() {
   List<Integer> result = new ArrayList<Integer>();
   for (Participant member : currWithdrawnMembers) {
     result.add(member.getUserId());
   }
   return result;
 }
コード例 #2
0
 public CharSequence getResultText(Activity context) {
   StringBuilder sb = new StringBuilder();
   sb.append(context.getResources().getString(R.string.input_withdraw_res_members));
   sb.append("\n");
   if (currWithdrawnMembers.size() == 0) {
     sb.append(context.getResources().getString(R.string.input_withdraw_res_no_members));
   } else {
     for (int i = 0; i < currWithdrawnMembers.size(); i++) {
       if (i > 0) sb.append("; ");
       Participant member = currWithdrawnMembers.get(i);
       sb.append(member.getUserName());
     }
   }
   return sb.toString();
 }
コード例 #3
0
  public void putCurrWithdrawnToDataStorage(Date recordDateTime) {
    for (Participant withdrawn : currWithdrawnMembers) {
      TeamDismiss teamDismiss =
          new TeamDismiss(
              getCurrentScanPoint().getScanPointId(),
              getCurrentTeam().getTeamId(),
              withdrawn.getUserId(),
              recordDateTime);
      // init reference fields
      teamDismiss.setScanPoint(getCurrentScanPoint());
      teamDismiss.setTeam(getCurrentTeam());
      teamDismiss.setTeamUser(UsersRegistry.getInstance().getUserById(withdrawn.getUserId()));

      DataStorage.putTeamDismiss(teamDismiss);
    }
  }