Java 类ims.therapies.vo.EducationToCarersVo 实例源码

项目:AvoinApotti    文件:Logic.java   
/**
 * displays the Family History record specified by FamilyHistoryVo
 * @param voFamHist
 */
public void populateInstanceControl(EducationToCarersVo voEduCar)
{
    clearInstanceControls();

    if (voEduCar != null)
    {
        form.ctnEducateToCarers().dateAuthoringDateTime().setValue(voEduCar.getAuthoringDateTimeIsNotNull()?voEduCar.getAuthoringDateTime().getDate():null);
        form.ctnEducateToCarers().qmbAuthoringCP().clear();
        if (voEduCar.getAuthoringCPIsNotNull())
        {
            form.ctnEducateToCarers().qmbAuthoringCP().newRow(voEduCar.getAuthoringCP(), voEduCar.getAuthoringCP().toString());
            form.ctnEducateToCarers().qmbAuthoringCP().setValue(voEduCar.getAuthoringCP());
        }
        form.ctnEducateToCarers().cboBoxCarer().setValue(voEduCar.getCarer());
        form.ctnEducateToCarers().textBoxDetails().setValue(voEduCar.getDetails());
        form.ctnEducateToCarers().setCollapsed(false);
    }
}
项目:openMAXIMS    文件:Logic.java   
/**
 * displays the Family History record specified by FamilyHistoryVo
 * @param voFamHist
 */
public void populateInstanceControl(EducationToCarersVo voEduCar)
{
    clearInstanceControls();

    if (voEduCar != null)
    {
        form.ctnEducateToCarers().dateAuthoringDateTime().setValue(voEduCar.getAuthoringDateTimeIsNotNull()?voEduCar.getAuthoringDateTime().getDate():null);
        form.ctnEducateToCarers().qmbAuthoringCP().clear();
        if (voEduCar.getAuthoringCPIsNotNull())
        {
            form.ctnEducateToCarers().qmbAuthoringCP().newRow(voEduCar.getAuthoringCP(), voEduCar.getAuthoringCP().toString());
            form.ctnEducateToCarers().qmbAuthoringCP().setValue(voEduCar.getAuthoringCP());
        }
        form.ctnEducateToCarers().cboBoxCarer().setValue(voEduCar.getCarer());
        form.ctnEducateToCarers().textBoxDetails().setValue(voEduCar.getDetails());
        form.ctnEducateToCarers().setCollapsed(false);
    }
}
项目:openMAXIMS    文件:Logic.java   
/**
 * displays the Family History record specified by FamilyHistoryVo
 * @param voFamHist
 */
public void populateInstanceControl(EducationToCarersVo voEduCar)
{
    clearInstanceControls();

    if (voEduCar != null)
    {
        form.ctnEducateToCarers().dateAuthoringDateTime().setValue(voEduCar.getAuthoringDateTimeIsNotNull()?voEduCar.getAuthoringDateTime().getDate():null);
        form.ctnEducateToCarers().qmbAuthoringCP().clear();
        if (voEduCar.getAuthoringCPIsNotNull())
        {
            form.ctnEducateToCarers().qmbAuthoringCP().newRow(voEduCar.getAuthoringCP(), voEduCar.getAuthoringCP().toString());
            form.ctnEducateToCarers().qmbAuthoringCP().setValue(voEduCar.getAuthoringCP());
        }
        form.ctnEducateToCarers().cboBoxCarer().setValue(voEduCar.getCarer());
        form.ctnEducateToCarers().textBoxDetails().setValue(voEduCar.getDetails());
        form.ctnEducateToCarers().setCollapsed(false);
    }
}
项目:openmaxims-linux    文件:Logic.java   
/**
 * displays the Family History record specified by FamilyHistoryVo
 * @param voFamHist
 */
public void populateInstanceControl(EducationToCarersVo voEduCar)
{
    clearInstanceControls();

    if (voEduCar != null)
    {
        form.ctnEducateToCarers().dateAuthoringDateTime().setValue(voEduCar.getAuthoringDateTimeIsNotNull()?voEduCar.getAuthoringDateTime().getDate():null);
        form.ctnEducateToCarers().qmbAuthoringCP().clear();
        if (voEduCar.getAuthoringCPIsNotNull())
        {
            form.ctnEducateToCarers().qmbAuthoringCP().newRow(voEduCar.getAuthoringCP(), voEduCar.getAuthoringCP().toString());
            form.ctnEducateToCarers().qmbAuthoringCP().setValue(voEduCar.getAuthoringCP());
        }
        form.ctnEducateToCarers().cboBoxCarer().setValue(voEduCar.getCarer());
        form.ctnEducateToCarers().textBoxDetails().setValue(voEduCar.getDetails());
        form.ctnEducateToCarers().setCollapsed(false);
    }
}
项目:AvoinApotti    文件:Logic.java   
public void newInstance() throws PresentationLogicException
{
    if (allowNew())
    {
        // initalise the screen for a new record
        form.getLocalContext().setSelectedRecord(new EducationToCarersVo());
        clearInstanceControls();
        setAuthoringDetails();
        //set the form mode
        form.setMode(FormMode.EDIT);
        //set any control status specific this form         
    }
}
项目:AvoinApotti    文件:Logic.java   
public boolean save() throws PresentationLogicException
{
    EducationToCarersVo voEdCar = populateInstanceData();

    //set clinical contact
    if (!voEdCar.getClinicalContactIsNotNull())
        voEdCar.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());

    if (!voEdCar.getCareContextIsNotNull())
        voEdCar.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());

    //validate Vo
    String[] arrErrors =  voEdCar.validate(validateUIRules());  

    if(arrErrors != null)
    {
        engine.showErrors(arrErrors);
        return false;
    }

    try
    {
        form.getLocalContext().setSelectedRecord(domain.saveEducationToCarer(voEdCar));
    }
    catch(StaleObjectException e)
    {
        engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        open();
        return false;
    }

    return true;
}
项目:openMAXIMS    文件:Logic.java   
public void newInstance() throws PresentationLogicException
{
    if (allowNew())
    {
        // initalise the screen for a new record
        form.getLocalContext().setSelectedRecord(new EducationToCarersVo());
        clearInstanceControls();
        setAuthoringDetails();
        //set the form mode
        form.setMode(FormMode.EDIT);
        //set any control status specific this form         
    }
}
项目:openMAXIMS    文件:Logic.java   
public boolean save() throws PresentationLogicException
{
    EducationToCarersVo voEdCar = populateInstanceData();

    //set clinical contact
    if (!voEdCar.getClinicalContactIsNotNull())
        voEdCar.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());

    if (!voEdCar.getCareContextIsNotNull())
        voEdCar.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());

    //validate Vo
    String[] arrErrors =  voEdCar.validate(validateUIRules());  

    if(arrErrors != null)
    {
        engine.showErrors(arrErrors);
        return false;
    }

    try
    {
        form.getLocalContext().setSelectedRecord(domain.saveEducationToCarer(voEdCar));
    }
    catch(StaleObjectException e)
    {
        engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        open();
        return false;
    }

    return true;
}
项目:openMAXIMS    文件:Logic.java   
public void newInstance() throws PresentationLogicException
{
    if (allowNew())
    {
        // initalise the screen for a new record
        form.getLocalContext().setSelectedRecord(new EducationToCarersVo());
        clearInstanceControls();
        setAuthoringDetails();
        //set the form mode
        form.setMode(FormMode.EDIT);
        //set any control status specific this form         
    }
}
项目:openMAXIMS    文件:Logic.java   
public boolean save() throws PresentationLogicException
{
    EducationToCarersVo voEdCar = populateInstanceData();

    //set clinical contact
    if (!voEdCar.getClinicalContactIsNotNull())
        voEdCar.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());

    if (!voEdCar.getCareContextIsNotNull())
        voEdCar.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());

    //validate Vo
    String[] arrErrors =  voEdCar.validate(validateUIRules());  

    if(arrErrors != null)
    {
        engine.showErrors(arrErrors);
        return false;
    }

    try
    {
        form.getLocalContext().setSelectedRecord(domain.saveEducationToCarer(voEdCar));
    }
    catch(StaleObjectException e)
    {
        engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        open();
        return false;
    }

    return true;
}
项目:openmaxims-linux    文件:Logic.java   
public void newInstance() throws PresentationLogicException
{
    if (allowNew())
    {
        // initalise the screen for a new record
        form.getLocalContext().setSelectedRecord(new EducationToCarersVo());
        clearInstanceControls();
        setAuthoringDetails();
        //set the form mode
        form.setMode(FormMode.EDIT);
        //set any control status specific this form         
    }
}
项目:openmaxims-linux    文件:Logic.java   
public boolean save() throws PresentationLogicException
{
    EducationToCarersVo voEdCar = populateInstanceData();

    //set clinical contact
    if (!voEdCar.getClinicalContactIsNotNull())
        voEdCar.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());

    if (!voEdCar.getCareContextIsNotNull())
        voEdCar.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());

    //validate Vo
    String[] arrErrors =  voEdCar.validate(validateUIRules());  

    if(arrErrors != null)
    {
        engine.showErrors(arrErrors);
        return false;
    }

    try
    {
        form.getLocalContext().setSelectedRecord(domain.saveEducationToCarer(voEdCar));
    }
    catch(StaleObjectException e)
    {
        engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        open();
        return false;
    }

    return true;
}