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());
   }
 }
 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());
   }
 }
 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());
   }
 }
  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());
    }
  }