Java 类ims.core.vo.VSBloodSugar 实例源码

项目:AvoinApotti    文件:Logic.java   
protected void onBtnSaveClick() throws PresentationLogicException 
{
    VitalSignsVo voVitalSign = form.getLocalContext().getvitalSign();

    VSBloodSugar voBS = new VSBloodSugar();

    if(form.BloodGlucoseGroup().getValue().equals(GenForm.BloodGlucoseGroupEnumeration.rdoRandom))
        voBS.setType(CBGType.RANDOM);
    else
        voBS.setType(CBGType.CBGM);
    voBS.setBloodSugarValue(form.decBloodSugar().getValue());
    voBS.setTimePeriod(form.cmbTimePeriod().getValue());
    voBS.setPostBloodSugarValue(form.decPostValue().getValue());
    voBS.setTimeInterval(form.intTimeInterval().getValue());

    voVitalSign.setBloodSugar(voBS);

    String[] arrErrors = voVitalSign.validate();
    if(arrErrors == null)
    {
        try {
            domain.modifyBloodSugar(voVitalSign);
        } catch (StaleObjectException e) {
            engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
            refresh();
            return;
        }
    }
    else
    {
        engine.showErrors("Validation Errors", arrErrors);
        return; 
    }

    form.setMode(FormMode.VIEW);

    listBloodSugar();

    form.getLocalContext().setvitalSign(voVitalSign);
    displayRecord(form.getLocalContext().getvitalSign());

    dateIntervalStatus();
    enableBloodSugarControls(false);
}
项目:openMAXIMS    文件:Logic.java   
protected void onBtnSaveClick() throws PresentationLogicException 
{
    VitalSignsVo voVitalSign = form.getLocalContext().getvitalSign();

    VSBloodSugar voBS = new VSBloodSugar();

    if(form.BloodGlucoseGroup().getValue().equals(GenForm.BloodGlucoseGroupEnumeration.rdoRandom))
        voBS.setType(CBGType.RANDOM);
    else
        voBS.setType(CBGType.CBGM);
    voBS.setBloodSugarValue(form.decBloodSugar().getValue());
    voBS.setTimePeriod(form.cmbTimePeriod().getValue());
    voBS.setPostBloodSugarValue(form.decPostValue().getValue());
    voBS.setTimeInterval(form.intTimeInterval().getValue());

    voVitalSign.setBloodSugar(voBS);

    String[] arrErrors = voVitalSign.validate();
    if(arrErrors == null)
    {
        try {
            domain.modifyBloodSugar(voVitalSign);
        } catch (StaleObjectException e) {
            engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
            refresh();
            return;
        }
    }
    else
    {
        engine.showErrors("Validation Errors", arrErrors);
        return; 
    }

    form.setMode(FormMode.VIEW);

    listBloodSugar();

    form.getLocalContext().setvitalSign(voVitalSign);
    displayRecord(form.getLocalContext().getvitalSign());

    dateIntervalStatus();
    enableBloodSugarControls(false);
}
项目:openMAXIMS    文件:Logic.java   
protected void onBtnSaveClick() throws PresentationLogicException 
{
    VitalSignsVo voVitalSign = form.getLocalContext().getvitalSign();

    VSBloodSugar voBS = new VSBloodSugar();

    if(form.BloodGlucoseGroup().getValue().equals(GenForm.BloodGlucoseGroupEnumeration.rdoRandom))
        voBS.setType(CBGType.RANDOM);
    else
        voBS.setType(CBGType.CBGM);
    voBS.setBloodSugarValue(form.decBloodSugar().getValue());
    voBS.setTimePeriod(form.cmbTimePeriod().getValue());
    voBS.setPostBloodSugarValue(form.decPostValue().getValue());
    voBS.setTimeInterval(form.intTimeInterval().getValue());

    voVitalSign.setBloodSugar(voBS);

    String[] arrErrors = voVitalSign.validate();
    if(arrErrors == null)
    {
        try {
            domain.modifyBloodSugar(voVitalSign);
        } catch (StaleObjectException e) {
            engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
            refresh();
            return;
        }
    }
    else
    {
        engine.showErrors("Validation Errors", arrErrors);
        return; 
    }

    form.setMode(FormMode.VIEW);

    listBloodSugar();

    form.getLocalContext().setvitalSign(voVitalSign);
    displayRecord(form.getLocalContext().getvitalSign());

    dateIntervalStatus();
    enableBloodSugarControls(false);
}
项目:openmaxims-linux    文件:Logic.java   
protected void onBtnSaveClick() throws PresentationLogicException 
{
    VitalSignsVo voVitalSign = form.getLocalContext().getvitalSign();

    VSBloodSugar voBS = new VSBloodSugar();

    if(form.BloodGlucoseGroup().getValue().equals(GenForm.BloodGlucoseGroupEnumeration.rdoRandom))
        voBS.setType(CBGType.RANDOM);
    else
        voBS.setType(CBGType.CBGM);
    voBS.setBloodSugarValue(form.decBloodSugar().getValue());
    voBS.setTimePeriod(form.cmbTimePeriod().getValue());
    voBS.setPostBloodSugarValue(form.decPostValue().getValue());
    voBS.setTimeInterval(form.intTimeInterval().getValue());

    voVitalSign.setBloodSugar(voBS);

    String[] arrErrors = voVitalSign.validate();
    if(arrErrors == null)
    {
        try {
            domain.modifyBloodSugar(voVitalSign);
        } catch (StaleObjectException e) {
            engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
            refresh();
            return;
        }
    }
    else
    {
        engine.showErrors("Validation Errors", arrErrors);
        return; 
    }

    form.setMode(FormMode.VIEW);

    listBloodSugar();

    form.getLocalContext().setvitalSign(voVitalSign);
    displayRecord(form.getLocalContext().getvitalSign());

    dateIntervalStatus();
    enableBloodSugarControls(false);
}