private void populateAdviceToPatientGrid(AdviceToPatientCollection adviceGivenPatient) { form.grdAdviceToPatient().getRows().clear(); for (int k = 0; k < adviceGivenPatient.size(); k++) { grdAdviceToPatientRow row = form.grdAdviceToPatient().getRows().newRow(); row.setcolAdvice(adviceGivenPatient.get(k)); row.setcolGiven(true); } }
private AdviceToPatientCollection populateAdviceGivenPatientFromGrd() { AdviceToPatientCollection collAdviceToPatient = new AdviceToPatientCollection(); for (int i = 0; i < form.grdAdviceToPatient().getRows().size(); i++) { grdAdviceToPatientRow row = form.grdAdviceToPatient().getRows().get(i); if(row.getcolGiven()) collAdviceToPatient.add(row.getcolAdvice()); } if(collAdviceToPatient.size()==0) return null; return collAdviceToPatient; }