return lstEvents;
}
public List<Events> listEvent(String status){
List<Events> lstEvents = new ArrayList<Events>();
int count = new business().getEventsFacade().count();
if(status.equalsIgnoreCase("all")){
for(int i = 0 ; i < count ; i++)
{
int[] EventID = new int[50];
EventID[i] = new business().getEventsFacade().findAll().get(i).getEventID();
lstEvents.add(new Events(EventID[i],new business().getEventsFacade().find(EventID[i]).getTitle(),new business().getEventsFacade().find(EventID[i]).getSpeakers(),new business().getEventsFacade().find(EventID[i]).getPrize(), new business().getEventsFacade().find(EventID[i]).getDescription(), new business().getEventsFacade().find(EventID[i]).getConductDate(),new business().getEventsFacade().find(EventID[i]).getAddress(), new business().getEventsFacade().find(EventID[i]).getPeopleQuantity(), new business().getEventsFacade().find(EventID[i]).getFee(), new business().getEventsFacade().find(EventID[i]).getStatus()));
}
}else{
if(count <3)
{
count = new business().getEventsFacade().count();
}else{
count = 3;
}
for(int i = 0 ; i < count ; i++)
{
int[] EventID = new int[50];
if(new business().getEventsFacade().findAll().get(i).getStatus().equals(status))
{
EventID[i] = new business().getEventsFacade().findAll().get(i).getEventID();
lstEvents.add(new Events(EventID[i],new business().getEventsFacade().find(EventID[i]).getTitle(),new business().getEventsFacade().find(EventID[i]).getSpeakers(),new business().getEventsFacade().find(EventID[i]).getPrize(), new business().getEventsFacade().find(EventID[i]).getDescription(), new business().getEventsFacade().find(EventID[i]).getConductDate(),new business().getEventsFacade().find(EventID[i]).getAddress(), new business().getEventsFacade().find(EventID[i]).getPeopleQuantity(), new business().getEventsFacade().find(EventID[i]).getFee(), new business().getEventsFacade().find(EventID[i]).getStatus()));
}
}
}
return lstEvents;
// return eventsFacade.findAll();