private WardSpecimenCollectionSearchCriteriaVo fillSearchCriteria() { WardSpecimenCollectionSearchCriteriaVo criteria = new WardSpecimenCollectionSearchCriteriaVo(); criteria.setHospital(form.cmbHospital().getValue()); criteria.setWard(form.qmbWard().getValue()); criteria.setDateFrom(form.dteFrom().getValue()); criteria.setDateTo(form.dteTo().getValue()); GroupCollectedEnumeration collEnum = form.GroupCollected().getValue(); if (collEnum != null) { if (collEnum.equals(GroupCollectedEnumeration.rdoAll)) criteria.setIsAll(true); else if(collEnum.equals(GroupCollectedEnumeration.rdoForCollection)) criteria.setIsForCollection(true); else if(collEnum.equals(GroupCollectedEnumeration.rdoOutstanding)) criteria.setIsOutstanding(true); else if(collEnum.equals(GroupCollectedEnumeration.rdoCollected)) criteria.setIsCollected(true); else if(collEnum.equals(GroupCollectedEnumeration.rdoCancelled)) criteria.setIsForCollection(true); } return criteria; }
private void populateSearchCriteriaScreenFromData(WardSpecimenCollectionSearchCriteriaVo criteria) { clearSearchControls(); if(criteria == null) return; form.cmbHospital().setValue(criteria.getHospital()); if(criteria.getWardIsNotNull()) { LocationLiteVo ward = domain.getWard(criteria.getWard()); if(ward != null) { form.qmbWard().newRow(ward.getID_Location(), ward.getName()); form.qmbWard().setValue(ward.getID_Location()); } } form.dteFrom().setValue(criteria.getDateFrom()); form.dteTo().setValue(criteria.getDateTo()); if(Boolean.TRUE.equals(criteria.getIsAll())) form.GroupCollected().setValue(GroupCollectedEnumeration.rdoAll); else if(Boolean.TRUE.equals(criteria.getIsForCollection())) form.GroupCollected().setValue(GroupCollectedEnumeration.rdoForCollection); else if(Boolean.TRUE.equals(criteria.getIsOutstanding())) form.GroupCollected().setValue(GroupCollectedEnumeration.rdoOutstanding); else if(Boolean.TRUE.equals(criteria.getIsCollected())) form.GroupCollected().setValue(GroupCollectedEnumeration.rdoCollected); else if(Boolean.TRUE.equals(criteria.getIsCollectionCancelled())) form.GroupCollected().setValue(GroupCollectedEnumeration.rdoCancelled); enableWardControl(); //WDEV-16663 }