Java Code Examples for ims.core.vo.LocShortVo

The following are top voted examples for showing how to use ims.core.vo.LocShortVo. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void addRowRecord(PropertyChecklistShortVo record)
{	
	if(record == null)
		return;
	
	GenForm.grdListRow row = form.grdList().getRows().newRow(record.equals
			(form.getLocalContext().getEditedRecord()));
	
	row.setColType(record.getMovementType().getText()) ;
	LocShortVo recordWard = record.getWardIsNotNull() ? record.getWard() : null;
	row.setColWard(recordWard.getName());
	row.setColDate(record.getAuthoringDateTime().toString());
	HcpLiteVo recordHCP = record.getAuthoringHCPIsNotNull() ? record.getAuthoringHCP() : null;
	row.setColAuthoring(recordHCP.getMos().getName().toString());

	row.setValue(record);
}
 
Example 2
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void cmbLocationValueChanged()
{
	LocShortVo voLoc = form.ctnServiceDetail().cmbLocation().getValue();
	form.ctnServiceDetail().txtAddressService().setValue(null);
	if (voLoc != null)
	{
		if (voLoc.getAddressIsNotNull())
			form.ctnServiceDetail().txtAddressService().setValue(voLoc.getAddress().toDisplayStringForMultiLineTextBox());

		LocationServiceVo voLocService = domain.getLocationService(voLoc, form.ctnServiceDetail().cmbService().getValue());

		if (voLocService == null)
			return;

		form.getLocalContext().setlocationService(voLocService);
		if (voLocService.getContact() != null)
		{
			if(voLocService.getContact().getNameIsNotNull())
				form.ctnServiceDetail().txtContactPerson().setValue(voLocService.getContact().getName().toString());
			form.ctnServiceDetail().txtPhoneNoService().setValue(voLocService.getContact().getContactNumber());
		}
	}
}
 
Example 3
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void cmbServiceValueChanged()
{
	form.ctnServiceDetail().cmbLocation().clear();
	//clearServicesReadOnlyDetails();

	if (form.ctnServiceDetail().cmbService().getValue() == null)
		return;

	LocShortVoCollection voCollLoc = domain.listLocations(form.ctnServiceDetail().cmbService().getValue());
	LocShortVo voLoc = null;

	if (voCollLoc == null)
		return;

	for (int i = 0; i < voCollLoc.size(); i++)
	{
		voLoc = voCollLoc.get(i);

		form.ctnServiceDetail().cmbLocation().newRow(voLoc, voLoc.getName());
	}

}
 
Example 4
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void cmbServiceValueChanged()
{
	form.lyrProServices().tabServices().cmbLocation().clear();
	clearServicesReadOnlyDetails();

	if (form.lyrProServices().tabServices().cmbService().getValue() == null)
		return;

	LocShortVoCollection voCollLoc = domain.listLocations(form.lyrProServices().tabServices().cmbService().getValue());
	LocShortVo voLoc = null;

	if (voCollLoc == null)
		return;

	for (int i = 0; i < voCollLoc.size(); i++)
	{
		voLoc = voCollLoc.get(i);

		form.lyrProServices().tabServices().cmbLocation().newRow(voLoc, voLoc.getName());
	}

}
 
Example 5
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void cmbLocationValueChanged()
{
	LocShortVo voLoc = form.lyrProServices().tabServices().cmbLocation().getValue();
	if (voLoc != null)
	{
		if (voLoc.getAddressIsNotNull())
			form.lyrProServices().tabServices().txtAddressService().setValue(voLoc.getAddress().toDisplayStringForMultiLineTextBox());

		LocationServiceVo voLocService = domain.getLocationService(voLoc, form.lyrProServices().tabServices().cmbService().getValue());

		if (voLocService == null)
			return;

		form.getLocalContext().setlocationService(voLocService);
		if (voLocService.getContact() != null)
		{
			if (voLocService.getContact().getNameIsNotNull())
				form.lyrProServices().tabServices().txtContactPerson().setValue(voLocService.getContact().getName().toString());
			form.lyrProServices().tabServices().txtPhoneNoService().setValue(voLocService.getContact().getContactNumber());
		}
	}
	else
		form.lyrProServices().tabServices().txtAddressService().setValue(null);

}
 
Example 6
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void populateLocationServices(TreeNode node, LocShortVo voLocation)
{
	LocationServiceMidVoCollection voLocationServices;
	voLocationServices = domain.listLocationServiceLite(voLocation);
	TreeNode childServiceNode = null;
	clearServiceNodes(node);
	for (int i = 0; i < voLocationServices.size(); i++)
	{
		if (voLocationServices.get(i).getServiceIsNotNull())
		{
			childServiceNode = node.getNodes().add(voLocationServices.get(i), (voLocationServices.get(i).getService().getServiceNameIsNotNull() ? voLocationServices.get(i).getService().getServiceName() : ""));
			childServiceNode.setTooltip(formatLocationServicevoTooltip(voLocationServices.get(i)));
			childServiceNode.setExpandedImage(voLocationServices.get(i).getIsActiveIsNotNull() ? (voLocationServices.get(i).getIsActive().booleanValue() ? form.getImages().Admin.Service : form.getImages().Admin.ServiceInactive) : form.getImages().Admin.Service);
			childServiceNode.setCollapsedImage(voLocationServices.get(i).getIsActiveIsNotNull() ? (voLocationServices.get(i).getIsActive().booleanValue() ? form.getImages().Admin.Service : form.getImages().Admin.ServiceInactive) : form.getImages().Admin.Service);
			childServiceNode.setSelectedImage(voLocationServices.get(i).getIsActiveIsNotNull() ? (voLocationServices.get(i).getIsActive().booleanValue() ? form.getImages().Admin.Service : form.getImages().Admin.ServiceInactive) : form.getImages().Admin.Service);
			childServiceNode.sortChildrenByText();
			childServiceNode.setExpanded(false);
		}
	}

	node.setExpanded(true);

	form.lyr1().Details().chkHTMLActiveOnly().setValue(true);
	form.lyr1().Details().htmDetails().setHTML(getDetailsAsTextile(node));

}
 
Example 7
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private StringBuilder getFormattedNodeDetails(TreeNode node, StringBuilder out)
{
	if (node.getValue() instanceof LocShortVo)
	{
		LocShortVo vo = (LocShortVo) node.getValue();
		out = formatLocationDetails(out, vo);
		if (node.isExpanded())
		{
			TreeNodeCollection treeNodeColl = node.getNodes();
			for (int i = 0; i < treeNodeColl.size(); i++)
			{
				out = getFormattedNodeDetails(treeNodeColl.get(i), out);
			}
		}
	}
	else if (node.getValue() instanceof LocationServiceVo)
	{
		out = formatServiceDetails(out, (LocationServiceVo) node.getValue());
	}
	return out;
}
 
Example 8
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private StringBuilder formatLocationDetails(StringBuilder out, LocShortVo vo)
{
	// Location
	out.append(makeTextile("<CENTER>*Location/" + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(true) + " Detail*</CENTER>", "SlateBlue", "tahoma", "14"));
	out.append(makeNewLine(1));
	out.append(makeTextile("*Location: *", "DarkRed", "tahoma", "12"));
	out.append(makeTextile((vo.getNameIsNotNull() ? vo.getName() : ""), "black", "tahoma", "12"));
	out.append(makeNewLine(1));

	if (vo.getAddressIsNotNull())
	{
		out.append(makeNewLine(1));
		out.append(makeTextile("*Address: *", "DarkRed", "tahoma", "12"));
		out.append(makeTextile((vo.getAddressIsNotNull() ? vo.getAddress().toDisplayStringForMultiLineTextBox() : ""), "black", "tahoma", "12"));
		out.append(makeNewLine(1));
	}
	return out;
}
 
Example 9
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void setRowAsPrimaryLocation(DynamicGridRow selectedRow)
{
	if (selectedRow == null )
		return;		
	
	if (selectedRow.getValue() instanceof OrganisationVo)
		return;			
			
	clearPrimaryLocations(form.dyngrdOrganisationLocation().getRows());	
	
	if (selectedRow.getValue() instanceof HcpLocationVo || selectedRow.getValue() instanceof LocShortVo)
	{
		selectedRow.setTextColor(Color.Red);	
		selectedRow.setChecked(true);	
	}		
	form.getContextMenus().getMosLocationSetPrimaryLocationItem().setVisible(false);
}
 
Example 10
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void loadTheatreCombo(LocationRefVo appointmentLocation)
{
	form.lyr1().tabCareRecord().cmbTheatre().clear();
	LocShortVoCollection collLocShortVo = domain.listTheatres(appointmentLocation);
	if (collLocShortVo != null)
	{
		for (LocShortVo item : collLocShortVo)
		{
			form.lyr1().tabCareRecord().cmbTheatre().newRow(item, item.getName());

			if (engine.getCurrentLocation() != null)
			{
				if (engine.getCurrentLocation().getID() == item.getID_Location().intValue())
					form.lyr1().tabCareRecord().cmbTheatre().setValue(item);
			}
		}
	}
}
 
Example 11
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void loadTheatreCombo()
{
	form.lyrMain().tabCareRecord().cmbTheatre().clear();
	LocShortVoCollection collLocShortVo = domain.listTheatres();
	if (collLocShortVo != null)
	{
		for (LocShortVo item : collLocShortVo)
		{
			form.lyrMain().tabCareRecord().cmbTheatre().newRow(item, item.getName());

			if (engine.getCurrentLocation() != null)
			{
				if (engine.getCurrentLocation().getID() == item.getID_Location().intValue())
					form.lyrMain().tabCareRecord().cmbTheatre().setValue(item);
			}
		}
	}
}
 
Example 12
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
protected void onCmbLocationValueChanged() throws PresentationLogicException {
	LocShortVo voLoc = form.ctnDetails().cmbLocation().getValue();
	if (voLoc != null)
	{
		if(voLoc.getAddressIsNotNull()){
			form.ctnDetails().txtAddress().setValue(voLoc.getAddress().toDisplayStringForMultiLineTextBox());
			if(voLoc.getAddress().getPhoneIsNotNull())
				form.ctnDetails().txtWorkPhone().setValue(voLoc.getAddress().getPhone());
		}
	}
	else{
		form.ctnDetails().txtAddress().setValue(null);
		form.ctnDetails().txtWorkPhone().setValue(null);
	}
	
}
 
Example 13
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void addRowRecord(PropertyChecklistShortVo record)
{	
	if(record == null)
		return;
	
	GenForm.grdListRow row = form.grdList().getRows().newRow(record.equals
			(form.getLocalContext().getEditedRecord()));
	
	row.setColType(record.getMovementType().getText()) ;
	LocShortVo recordWard = record.getWardIsNotNull() ? record.getWard() : null;
	row.setColWard(recordWard.getName());
	row.setColDate(record.getAuthoringDateTime().toString());
	HcpLiteVo recordHCP = record.getAuthoringHCPIsNotNull() ? record.getAuthoringHCP() : null;
	row.setColAuthoring(recordHCP.getMos().getName().toString());

	row.setValue(record);
}
 
Example 14
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void cmbLocationValueChanged()
{
	LocShortVo voLoc = form.ctnServiceDetail().cmbLocation().getValue();
	form.ctnServiceDetail().txtAddressService().setValue(null);
	if (voLoc != null)
	{
		if (voLoc.getAddressIsNotNull())
			form.ctnServiceDetail().txtAddressService().setValue(voLoc.getAddress().toDisplayStringForMultiLineTextBox());

		LocationServiceVo voLocService = domain.getLocationService(voLoc, form.ctnServiceDetail().cmbService().getValue());

		if (voLocService == null)
			return;

		form.getLocalContext().setlocationService(voLocService);
		if (voLocService.getContact() != null)
		{
			if(voLocService.getContact().getNameIsNotNull())
				form.ctnServiceDetail().txtContactPerson().setValue(voLocService.getContact().getName().toString());
			form.ctnServiceDetail().txtPhoneNoService().setValue(voLocService.getContact().getContactNumber());
		}
	}
}
 
Example 15
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void cmbServiceValueChanged()
{
	form.ctnServiceDetail().cmbLocation().clear();
	//clearServicesReadOnlyDetails();

	if (form.ctnServiceDetail().cmbService().getValue() == null)
		return;

	LocShortVoCollection voCollLoc = domain.listLocations(form.ctnServiceDetail().cmbService().getValue());
	LocShortVo voLoc = null;

	if (voCollLoc == null)
		return;

	for (int i = 0; i < voCollLoc.size(); i++)
	{
		voLoc = voCollLoc.get(i);

		form.ctnServiceDetail().cmbLocation().newRow(voLoc, voLoc.getName());
	}

}
 
Example 16
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void cmbLocationValueChanged()
{
	LocShortVo voLoc = form.lyrProServices().tabServices().cmbLocation().getValue();
	if (voLoc != null)
	{
		if (voLoc.getAddressIsNotNull())
			form.lyrProServices().tabServices().txtAddressService().setValue(voLoc.getAddress().toDisplayStringForMultiLineTextBox());

		LocationServiceVo voLocService = domain.getLocationService(voLoc, form.lyrProServices().tabServices().cmbService().getValue());

		if (voLocService == null)
			return;

		form.getLocalContext().setlocationService(voLocService);
		if (voLocService.getContact() != null)
		{
			if (voLocService.getContact().getNameIsNotNull())
				form.lyrProServices().tabServices().txtContactPerson().setValue(voLocService.getContact().getName().toString());
			form.lyrProServices().tabServices().txtPhoneNoService().setValue(voLocService.getContact().getContactNumber());
		}
	}
	else
		form.lyrProServices().tabServices().txtAddressService().setValue(null);

}
 
Example 17
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateCaseNoteFolderLocationByHospital(String value, LocationLiteVo hospital)
{
	form.lyrDetails().tabGeneralDetails().qmbCaseNoteLocation().clear();
	LocShortVoCollection tempColl = null;
	
	tempColl = domain.getCaseNoteFolderLocationByParent(hospital, value, null);
	
	if( tempColl == null)
		return;
	
	for (LocShortVo loc : tempColl)
	{
		form.lyrDetails().tabGeneralDetails().qmbCaseNoteLocation().newRow(loc, loc.getName());
	}
	
	if (tempColl.size() == 1)
	{
		form.lyrDetails().tabGeneralDetails().qmbCaseNoteLocation().setValue(tempColl.get(0));
		setCaseNoteFolderLocation(form.lyrDetails().tabGeneralDetails().qmbCaseNoteLocation().getValue(), false); //WDEV-20798
		//updateWardSelection();
	}
	else
	{
		form.lyrDetails().tabGeneralDetails().qmbCaseNoteLocation().showOpened();
	}
}
 
Example 18
Project: openMAXIMS   File: MoveSessionToLocationDialogImpl.java   View source code 6 votes vote down vote up
public void moveSessionToLocation(SessionShortVo session, LocShortVo location) throws ims.domain.exceptions.StaleObjectException
{
	if (session == null)
		throw new CodingRuntimeException("session cannot be null in method moveSessionToDate");

	Sch_Session doSession = SessionShortVoAssembler.extractSch_Session(getDomainFactory(), session);
	Location doLocation = LocShortVoAssembler.extractLocation(getDomainFactory(), location);
	
	Boolean sessionRequiresCaseNoteLocation = doSession.isCaseNoteFolderNotRequired() == null || Boolean.FALSE.equals(doSession.isCaseNoteFolderNotRequired());
	
	if (doLocation != null)
	{
		doSession.setSchLocation(doLocation);
		doSession.setLocationMovedDateTime(new java.util.Date());
		
		if (sessionRequiresCaseNoteLocation)
			doSession.setCaseNoteFolderLocation(Boolean.TRUE.equals(doLocation.isCaseNoteFolderLocation()) ? doLocation : null); 			
	}	
	
	getDomainFactory().save(doSession);
}
 
Example 19
Project: openMAXIMS   File: TheatreGroupImpl.java   View source code 6 votes vote down vote up
public LocShortVoCollection listTheatreLocations(ims.core.resource.place.vo.LocationRefVo locRef, String searchText, TheatreGroupRefVo theatreGroupToBeExcludedRef)
{
	OrganisationAndLocation impl = (OrganisationAndLocation)getDomainImpl(OrganisationAndLocationImpl.class);
	LocShortVoCollection collTheatreLoc = impl.getLocationByParent(locRef,searchText,LocationType.THEATRE);
	LocShortVoCollection collTheatreAlreadyUsed = getAlreadyUsedTheatreLocations(locRef, theatreGroupToBeExcludedRef);
	
	for (int i=0;collTheatreAlreadyUsed!=null && i<collTheatreAlreadyUsed.size(); i++)
	{
		LocShortVo theatreLocUsed = collTheatreAlreadyUsed.get(i);
		
		for (int j=0; collTheatreLoc!=null && j<collTheatreLoc.size();j++)
		{
			LocShortVo theatreLoc = collTheatreLoc.get(j);
			if (theatreLoc.equals(theatreLocUsed))
			{
				collTheatreLoc.remove(theatreLoc);
				break;
			}
		}
	}
	
	return collTheatreLoc;
}
 
Example 20
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateLocationServices(TreeNode node, LocShortVo voLocation)
{
	LocationServiceMidVoCollection voLocationServices;
	voLocationServices = domain.listLocationServiceLite(voLocation);
	TreeNode childServiceNode = null;
	clearServiceNodes(node);
	for (int i = 0; i < voLocationServices.size(); i++)
	{
		if (voLocationServices.get(i).getServiceIsNotNull())
		{
			childServiceNode = node.getNodes().add(voLocationServices.get(i), (voLocationServices.get(i).getService().getServiceNameIsNotNull() ? voLocationServices.get(i).getService().getServiceName() : ""));
			childServiceNode.setTooltip(formatLocationServicevoTooltip(voLocationServices.get(i)));
			childServiceNode.setExpandedImage(voLocationServices.get(i).getIsActiveIsNotNull() ? (voLocationServices.get(i).getIsActive().booleanValue() ? form.getImages().Admin.Service : form.getImages().Admin.ServiceInactive) : form.getImages().Admin.Service);
			childServiceNode.setCollapsedImage(voLocationServices.get(i).getIsActiveIsNotNull() ? (voLocationServices.get(i).getIsActive().booleanValue() ? form.getImages().Admin.Service : form.getImages().Admin.ServiceInactive) : form.getImages().Admin.Service);
			childServiceNode.setSelectedImage(voLocationServices.get(i).getIsActiveIsNotNull() ? (voLocationServices.get(i).getIsActive().booleanValue() ? form.getImages().Admin.Service : form.getImages().Admin.ServiceInactive) : form.getImages().Admin.Service);
			childServiceNode.sortChildrenByText();
			childServiceNode.setExpanded(false);
		}
	}

	node.setExpanded(true);

	form.lyr1().Details().chkHTMLActiveOnly().setValue(true);
	form.lyr1().Details().htmDetails().setHTML(getDetailsAsTextile(node));

}
 
Example 21
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private StringBuilder getFormattedNodeDetails(TreeNode node, StringBuilder out)
{
	if (node.getValue() instanceof LocShortVo)
	{
		LocShortVo vo = (LocShortVo) node.getValue();
		out = formatLocationDetails(out, vo);
		if (node.isExpanded())
		{
			TreeNodeCollection treeNodeColl = node.getNodes();
			for (int i = 0; i < treeNodeColl.size(); i++)
			{
				out = getFormattedNodeDetails(treeNodeColl.get(i), out);
			}
		}
	}
	else if (node.getValue() instanceof LocationServiceVo)
	{
		out = formatServiceDetails(out, (LocationServiceVo) node.getValue());
	}
	return out;
}
 
Example 22
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private StringBuilder formatLocationDetails(StringBuilder out, LocShortVo vo)
{
	// Location
	out.append(makeTextile("<CENTER>*Location/" + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(true) + " Detail*</CENTER>", "SlateBlue", "tahoma", "14"));
	out.append(makeNewLine(1));
	out.append(makeTextile("*Location: *", "DarkRed", "tahoma", "12"));
	out.append(makeTextile((vo.getNameIsNotNull() ? vo.getName() : ""), "black", "tahoma", "12"));
	out.append(makeNewLine(1));

	if (vo.getAddressIsNotNull())
	{
		out.append(makeNewLine(1));
		out.append(makeTextile("*Address: *", "DarkRed", "tahoma", "12"));
		out.append(makeTextile((vo.getAddressIsNotNull() ? vo.getAddress().toDisplayStringForMultiLineTextBox() : ""), "black", "tahoma", "12"));
		out.append(makeNewLine(1));
	}
	return out;
}
 
Example 23
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
private StringBuilder getFormattedNodeDetails(TreeNode node, StringBuilder out)
{
	if (node.getValue() instanceof LocShortVo)
	{
		LocShortVo vo = (LocShortVo) node.getValue();
		out = formatLocationDetails(out, vo);
		if (node.isExpanded())
		{
			TreeNodeCollection treeNodeColl = node.getNodes();
			for (int i = 0; i < treeNodeColl.size(); i++)
			{
				out = getFormattedNodeDetails(treeNodeColl.get(i), out);
			}
		}
	}
	else if (node.getValue() instanceof LocationServiceVo)
	{
		out = formatServiceDetails(out, (LocationServiceVo) node.getValue());
	}
	return out;
}
 
Example 24
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
private void cmbServiceValueChanged()
{
	form.lyrProServices().tabServices().cmbLocation().clear();
	clearServicesReadOnlyDetails();

	if (form.lyrProServices().tabServices().cmbService().getValue() == null)
		return;

	LocShortVoCollection voCollLoc = domain.listLocations(form.lyrProServices().tabServices().cmbService().getValue());
	LocShortVo voLoc = null;

	if (voCollLoc == null)
		return;

	for (int i = 0; i < voCollLoc.size(); i++)
	{
		voLoc = voCollLoc.get(i);

		form.lyrProServices().tabServices().cmbLocation().newRow(voLoc, voLoc.getName());
	}

}
 
Example 25
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void loadTheatreCombo(LocationRefVo appointmentLocation)
{
	form.lyr1().tabCareRecord().cmbTheatre().clear();
	LocShortVoCollection collLocShortVo = domain.listTheatres(appointmentLocation);
	if (collLocShortVo != null)
	{
		for (LocShortVo item : collLocShortVo)
		{
			form.lyr1().tabCareRecord().cmbTheatre().newRow(item, item.getName());

			if (engine.getCurrentLocation() != null)
			{
				if (engine.getCurrentLocation().getID() == item.getID_Location().intValue())
					form.lyr1().tabCareRecord().cmbTheatre().setValue(item);
			}
		}
	}
}
 
Example 26
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
protected void onCmbLocationValueChanged() throws PresentationLogicException {
	LocShortVo voLoc = form.ctnDetails().cmbLocation().getValue();
	if (voLoc != null)
	{
		if(voLoc.getAddressIsNotNull()){
			form.ctnDetails().txtAddress().setValue(voLoc.getAddress().toDisplayStringForMultiLineTextBox());
			if(voLoc.getAddress().getPhoneIsNotNull())
				form.ctnDetails().txtWorkPhone().setValue(voLoc.getAddress().getPhone());
		}
	}
	else{
		form.ctnDetails().txtAddress().setValue(null);
		form.ctnDetails().txtWorkPhone().setValue(null);
	}
	
}
 
Example 27
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void addRowRecord(PropertyChecklistShortVo record)
{	
	if(record == null)
		return;
	
	GenForm.grdListRow row = form.grdList().getRows().newRow(record.equals
			(form.getLocalContext().getEditedRecord()));
	
	row.setColType(record.getMovementType().getText()) ;
	LocShortVo recordWard = record.getWardIsNotNull() ? record.getWard() : null;
	row.setColWard(recordWard.getName());
	row.setColDate(record.getAuthoringDateTime().toString());
	HcpLiteVo recordHCP = record.getAuthoringHCPIsNotNull() ? record.getAuthoringHCP() : null;
	row.setColAuthoring(recordHCP.getMos().getName().toString());

	row.setValue(record);
}
 
Example 28
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
private void setRowAsPrimaryLocation(DynamicGridRow selectedRow)
{
	if (selectedRow == null )
		return;		
	
	if (selectedRow.getValue() instanceof OrganisationVo)
		return;			
			
	clearPrimaryLocations(form.dyngrdOrganisationLocation().getRows());	
	
	if (selectedRow.getValue() instanceof HcpLocationVo || selectedRow.getValue() instanceof LocShortVo)
	{
		selectedRow.setTextColor(Color.Red);	
		selectedRow.setChecked(true);	
	}		
	form.getContextMenus().getMosLocationSetPrimaryLocationItem().setVisible(false);
}
 
Example 29
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void cmbLocationValueChanged()
{
	LocShortVo voLoc = form.ctnServiceDetail().cmbLocation().getValue();
	form.ctnServiceDetail().txtAddressService().setValue(null);
	if (voLoc != null)
	{
		if (voLoc.getAddressIsNotNull())
			form.ctnServiceDetail().txtAddressService().setValue(voLoc.getAddress().toDisplayStringForMultiLineTextBox());

		LocationServiceVo voLocService = domain.getLocationService(voLoc, form.ctnServiceDetail().cmbService().getValue());

		if (voLocService == null)
			return;

		form.getLocalContext().setlocationService(voLocService);
		if (voLocService.getContact() != null)
		{
			if(voLocService.getContact().getNameIsNotNull())
				form.ctnServiceDetail().txtContactPerson().setValue(voLocService.getContact().getName().toString());
			form.ctnServiceDetail().txtPhoneNoService().setValue(voLocService.getContact().getContactNumber());
		}
	}
}
 
Example 30
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void cmbServiceValueChanged()
{
	form.ctnServiceDetail().cmbLocation().clear();
	//clearServicesReadOnlyDetails();

	if (form.ctnServiceDetail().cmbService().getValue() == null)
		return;

	LocShortVoCollection voCollLoc = domain.listLocations(form.ctnServiceDetail().cmbService().getValue());
	LocShortVo voLoc = null;

	if (voCollLoc == null)
		return;

	for (int i = 0; i < voCollLoc.size(); i++)
	{
		voLoc = voCollLoc.get(i);

		form.ctnServiceDetail().cmbLocation().newRow(voLoc, voLoc.getName());
	}

}
 
Example 31
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void cmbServiceValueChanged()
{
	form.lyrProServices().tabServices().cmbLocation().clear();
	clearServicesReadOnlyDetails();

	if (form.lyrProServices().tabServices().cmbService().getValue() == null)
		return;

	LocShortVoCollection voCollLoc = domain.listLocations(form.lyrProServices().tabServices().cmbService().getValue());
	LocShortVo voLoc = null;

	if (voCollLoc == null)
		return;

	for (int i = 0; i < voCollLoc.size(); i++)
	{
		voLoc = voCollLoc.get(i);

		form.lyrProServices().tabServices().cmbLocation().newRow(voLoc, voLoc.getName());
	}

}
 
Example 32
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void cmbLocationValueChanged()
{
	LocShortVo voLoc = form.lyrProServices().tabServices().cmbLocation().getValue();
	if (voLoc != null)
	{
		if (voLoc.getAddressIsNotNull())
			form.lyrProServices().tabServices().txtAddressService().setValue(voLoc.getAddress().toDisplayStringForMultiLineTextBox());

		LocationServiceVo voLocService = domain.getLocationService(voLoc, form.lyrProServices().tabServices().cmbService().getValue());

		if (voLocService == null)
			return;

		form.getLocalContext().setlocationService(voLocService);
		if (voLocService.getContact() != null)
		{
			if (voLocService.getContact().getNameIsNotNull())
				form.lyrProServices().tabServices().txtContactPerson().setValue(voLocService.getContact().getName().toString());
			form.lyrProServices().tabServices().txtPhoneNoService().setValue(voLocService.getContact().getContactNumber());
		}
	}
	else
		form.lyrProServices().tabServices().txtAddressService().setValue(null);

}
 
Example 33
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
private void addRowRecord(PropertyChecklistShortVo record)
{	
	if(record == null)
		return;
	
	GenForm.grdListRow row = form.grdList().getRows().newRow(record.equals
			(form.getLocalContext().getEditedRecord()));
	
	row.setColType(record.getMovementType().getText()) ;
	LocShortVo recordWard = record.getWardIsNotNull() ? record.getWard() : null;
	row.setColWard(recordWard.getName());
	row.setColDate(record.getAuthoringDateTime().toString());
	HcpLiteVo recordHCP = record.getAuthoringHCPIsNotNull() ? record.getAuthoringHCP() : null;
	row.setColAuthoring(recordHCP.getMos().getName().toString());

	row.setValue(record);
}
 
Example 34
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
private void cmbServiceValueChanged()
{
	form.ctnServiceDetail().cmbLocation().clear();
	//clearServicesReadOnlyDetails();

	if (form.ctnServiceDetail().cmbService().getValue() == null)
		return;

	LocShortVoCollection voCollLoc = domain.listLocations(form.ctnServiceDetail().cmbService().getValue());
	LocShortVo voLoc = null;

	if (voCollLoc == null)
		return;

	for (int i = 0; i < voCollLoc.size(); i++)
	{
		voLoc = voCollLoc.get(i);

		form.ctnServiceDetail().cmbLocation().newRow(voLoc, voLoc.getName());
	}

}
 
Example 35
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateLocationServices(TreeNode node, LocShortVo voLocation)
{
	LocationServiceMidVoCollection voLocationServices;
	voLocationServices = domain.listLocationServiceLite(voLocation);
	TreeNode childServiceNode = null;
	clearServiceNodes(node);
	for (int i = 0; i < voLocationServices.size(); i++)
	{
		if (voLocationServices.get(i).getServiceIsNotNull())
		{
			childServiceNode = node.getNodes().add(voLocationServices.get(i), (voLocationServices.get(i).getService().getServiceNameIsNotNull() ? voLocationServices.get(i).getService().getServiceName() : ""));
			childServiceNode.setTooltip(formatLocationServicevoTooltip(voLocationServices.get(i)));
			childServiceNode.setExpandedImage(voLocationServices.get(i).getIsActiveIsNotNull() ? (voLocationServices.get(i).getIsActive().booleanValue() ? form.getImages().Admin.Service : form.getImages().Admin.ServiceInactive) : form.getImages().Admin.Service);
			childServiceNode.setCollapsedImage(voLocationServices.get(i).getIsActiveIsNotNull() ? (voLocationServices.get(i).getIsActive().booleanValue() ? form.getImages().Admin.Service : form.getImages().Admin.ServiceInactive) : form.getImages().Admin.Service);
			childServiceNode.setSelectedImage(voLocationServices.get(i).getIsActiveIsNotNull() ? (voLocationServices.get(i).getIsActive().booleanValue() ? form.getImages().Admin.Service : form.getImages().Admin.ServiceInactive) : form.getImages().Admin.Service);
			childServiceNode.sortChildrenByText();
			childServiceNode.setExpanded(false);
		}
	}

	node.setExpanded(true);

	form.lyr1().Details().chkHTMLActiveOnly().setValue(true);
	form.lyr1().Details().htmDetails().setHTML(getDetailsAsTextile(node));

}
 
Example 36
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
protected void onCmbLocationValueChanged() throws PresentationLogicException {
	LocShortVo voLoc = form.ctnDetails().cmbLocation().getValue();
	if (voLoc != null)
	{
		if(voLoc.getAddressIsNotNull()){
			form.ctnDetails().txtAddress().setValue(voLoc.getAddress().toDisplayStringForMultiLineTextBox());
			if(voLoc.getAddress().getPhoneIsNotNull())
				form.ctnDetails().txtWorkPhone().setValue(voLoc.getAddress().getPhone());
		}
	}
	else{
		form.ctnDetails().txtAddress().setValue(null);
		form.ctnDetails().txtWorkPhone().setValue(null);
	}
	
}
 
Example 37
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private StringBuilder formatLocationDetails(StringBuilder out, LocShortVo vo)
{
	// Location
	out.append(makeTextile("<CENTER>*Location/" + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(true) + " Detail*</CENTER>", "SlateBlue", "tahoma", "14"));
	out.append(makeNewLine(1));
	out.append(makeTextile("*Location: *", "DarkRed", "tahoma", "12"));
	out.append(makeTextile((vo.getNameIsNotNull() ? vo.getName() : ""), "black", "tahoma", "12"));
	out.append(makeNewLine(1));

	if (vo.getAddressIsNotNull())
	{
		out.append(makeNewLine(1));
		out.append(makeTextile("*Address: *", "DarkRed", "tahoma", "12"));
		out.append(makeTextile((vo.getAddressIsNotNull() ? vo.getAddress().toDisplayStringForMultiLineTextBox() : ""), "black", "tahoma", "12"));
		out.append(makeNewLine(1));
	}
	return out;
}
 
Example 38
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void setRowAsPrimaryLocation(DynamicGridRow selectedRow)
{
	if (selectedRow == null )
		return;		
	
	if (selectedRow.getValue() instanceof OrganisationVo)
		return;			
			
	clearPrimaryLocations(form.dyngrdOrganisationLocation().getRows());	
	
	if (selectedRow.getValue() instanceof HcpLocationVo || selectedRow.getValue() instanceof LocShortVo)
	{
		selectedRow.setTextColor(Color.Red);	
		selectedRow.setChecked(true);	
	}		
	form.getContextMenus().getMosLocationSetPrimaryLocationItem().setVisible(false);
}
 
Example 39
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void loadTheatreCombo(LocationRefVo appointmentLocation)
{
	form.lyr1().tabCareRecord().cmbTheatre().clear();
	LocShortVoCollection collLocShortVo = domain.listTheatres(appointmentLocation);
	if (collLocShortVo != null)
	{
		for (LocShortVo item : collLocShortVo)
		{
			form.lyr1().tabCareRecord().cmbTheatre().newRow(item, item.getName());

			if (engine.getCurrentLocation() != null)
			{
				if (engine.getCurrentLocation().getID() == item.getID_Location().intValue())
					form.lyr1().tabCareRecord().cmbTheatre().setValue(item);
			}
		}
	}
}
 
Example 40
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void loadTheatreCombo()
{
	form.lyrMain().tabCareRecord().cmbTheatre().clear();
	LocShortVoCollection collLocShortVo = domain.listTheatres();
	if (collLocShortVo != null)
	{
		for (LocShortVo item : collLocShortVo)
		{
			form.lyrMain().tabCareRecord().cmbTheatre().newRow(item, item.getName());

			if (engine.getCurrentLocation() != null)
			{
				if (engine.getCurrentLocation().getID() == item.getID_Location().intValue())
					form.lyrMain().tabCareRecord().cmbTheatre().setValue(item);
			}
		}
	}
}