コード例 #1
0
 public void search() {
   try {
     if (controllerb.connect().equals("ok")) {
       controllerb.searchEventsWithServicesAndPayments(category, txtSearch.getText().toString());
       homeDataList = controllerb.getHomeData();
       setData(homeDataList);
       refresh();
     } else {
       System.out.println(controllerb.connect());
     }
   } catch (Exception e1) {
     // e1.printStackTrace();
     System.out.println(e1.getMessage());
   }
 }
コード例 #2
0
 private void loadfirst() {
   try {
     if (controllerb.connect().equals("ok")) {
       controllerb.loadEventsWithServicesAndPayments();
       homeDataList = controllerb.getHomeData();
       setData(homeDataList);
       refresh();
     } else {
       System.out.println(controllerb.connect());
     }
   } catch (Exception e) {
     // e.printStackTrace();
     System.out.println(e.getMessage());
   }
 }
コード例 #3
0
 private void reloadfirst() {
   try {
     if (controllerb.connect().equals("ok")) {
       if (controllerb.getEventsWithServicesAndPaymentsCount() > homeDataList.size()) {
         loadfirst();
       }
       if (controllerb.getEventsThatisEditedCount() > 0) {
         controllerb.updateBookingisEdited();
         loadfirst();
       }
     } else {
       System.out.println(controllerb.connect());
     }
   } catch (Exception e) {
     // e.printStackTrace();
     System.out.println(e.getMessage());
   }
 }
コード例 #4
0
  public void showIfEventisNow() {
    try {
      if (controllerb.connect().equals("ok")) {
        Date currenDate = new Date(System.currentTimeMillis());
        String cDate = dateFormat.format(currenDate);

        ArrayList<Booking> bookingList = controllerb.loadBookingRecordsByEventDate(cDate);
        if (bookingList.size() != 0) {
          for (int i = 0; i < bookingList.size(); i++) {
            Booking book = bookingList.get(i);
            BookingEventsNow ben = new BookingEventsNow();
            ben.setBooking(book);
            ben.setVisible(true);
          }
        }
      } else {
        System.out.println(controllerb.connect());
      }
    } catch (Exception e) {
      System.out.println(e.getMessage());
    }
  }