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

项目:AvoinApotti    文件:Logic.java   
private void expandParentNode(grdPneumaticRow selectedRow)
{
    if (selectedRow.getValue() instanceof ElectrotherapyPneumaticShortVo == false ) return;

    form.getLocalContext().setSelectedParentInstance(getParentFromDomain((ElectrotherapyPneumaticShortVo) selectedRow.getValue()));     
    if (form.getLocalContext().getSelectedParentInstance() == null ) return;                

    ElectrotherapyPneumaticVo voParentInstance = form.getLocalContext().getSelectedParentInstance();                
    if(form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull()
            && (voParentInstance.getClinicalContact().getID_ClinicalContact().equals
                                (form.getGlobalContext().Core.getCurrentClinicalContact().getID_ClinicalContact())))
    {
        // If this is the Golden Node then we'll colour it golden (ok then beige).
        form.getLocalContext().setGoldenInstanceFound(new Boolean(true));
        form.getLocalContext().setGoldenInstanceSelected(new Boolean(true));
        selectedRow.setBackColor(Color.Beige);          
    }

    if (voParentInstance.getPneumaticTreatment() != null)  
    {
        selectedRow.setValue(voParentInstance);
        selectedRow.setExpanded(true);
        populateChildNodes(selectedRow, voParentInstance.getPneumaticTreatment());
    }
    populateParentInstanceControls(voParentInstance);       
}
项目:AvoinApotti    文件:Logic.java   
private void populateChildCollectionFromGrid(ElectrotherapyPneumaticVo voElectrotherapyPneumatic)
{
    if (form.grdPneumatic().getValue() == null) 
        return;

    if (voElectrotherapyPneumatic.getPneumaticTreatment() == null)
        voElectrotherapyPneumatic.setPneumaticTreatment(new ElectrotherapyPneumaticTreatmentVoCollection());

    GenForm.grdPneumaticRow parentRow = form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticShortVo || form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticVo ? 
                                        form.grdPneumatic().getSelectedRow() : form.grdPneumatic().getSelectedRow().getParentRow();     

       if (parentRow.getRows().size() > 0 )
        voElectrotherapyPneumatic.getPneumaticTreatment().clear();

    for (int i=0; i < parentRow.getRows().size(); i++)
       {
        voElectrotherapyPneumatic.getPneumaticTreatment().add((ElectrotherapyPneumaticTreatmentVo) parentRow.getRows().get(i).getValue());
       }
}
项目:AvoinApotti    文件:Logic.java   
private boolean newParentNode(ElectrotherapyPneumaticVo voNewParent)
{
    if (voNewParent == null) 
        return true;

    if(form.ctnPneumatic().lyrPneumatic().tabPneumatic().qmbAuthoringCP().getValue()==null || form.ctnPneumatic().lyrPneumatic().tabPneumatic().dtimAuthoringDateTime().getValue() == null)
    {
        engine.showMessage("'Authoring HCP' and 'Authoring Date / Time' are a mandatory fields.");
        return false;
    }

    ElectrotherapyPneumaticShortVo voParentShort = new ElectrotherapyPneumaticShortVo();
    voParentShort.setAuthoringCP(form.ctnPneumatic().lyrPneumatic().tabPneumatic().qmbAuthoringCP().getValue());
    voParentShort.setAuthoringDateTime(form.ctnPneumatic().lyrPneumatic().tabPneumatic().dtimAuthoringDateTime().getValue());
    voParentShort.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());

    GenForm.grdPneumaticRow parentRow = form.grdPneumatic().getRows().newRow();         
    parentRow.setColMachineUsed(voParentShort.getAuthoringDateTime().toString()+ " - " + 
                           voParentShort.getAuthoringCP().toString());          
    parentRow.setValue(voParentShort);
    parentRow.setBackColor(Color.Beige);
    form.getLocalContext().setGoldenInstanceSelected(new Boolean(true));
    parentRow.setExpanded(true);
    form.grdPneumatic().setValue(voParentShort);    
    return true;
}
项目:AvoinApotti    文件:Logic.java   
private void showHeaderOrDetailsTab()
{
    if (form.getMode().equals(FormMode.VIEW))
    {
        if (form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticShortVo)       
            form.ctnPneumatic().lyrPneumatic().showtabPneumatic();
        else if(form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticVo)
            form.ctnPneumatic().lyrPneumatic().showtabPneumatic();
        else if (form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticTreatmentVo)
            form.ctnPneumatic().lyrPneumatic().showtabDetails();

    }
    else
    {
        if (form.getLocalContext().getUpdatingParent().equals(Boolean.TRUE))
            form.ctnPneumatic().lyrPneumatic().showtabPneumatic();
        else
            form.ctnPneumatic().lyrPneumatic().showtabDetails();

        if (form.getLocalContext().getSelectedParentInstanceIsNotNull() && 
                (form.getLocalContext().getSelectedParentInstance().getID_ElectrotherapyPneumaticIsNotNull()))
            enableParentControls(false);        
        else
            enableParentControls(true);         
    }
}
项目:openMAXIMS    文件:Logic.java   
private void expandParentNode(grdPneumaticRow selectedRow)
{
    if (selectedRow.getValue() instanceof ElectrotherapyPneumaticShortVo == false ) return;

    form.getLocalContext().setSelectedParentInstance(getParentFromDomain((ElectrotherapyPneumaticShortVo) selectedRow.getValue()));     
    if (form.getLocalContext().getSelectedParentInstance() == null ) return;                

    ElectrotherapyPneumaticVo voParentInstance = form.getLocalContext().getSelectedParentInstance();                
    if(form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull()
            && (voParentInstance.getClinicalContact().getID_ClinicalContact().equals
                                (form.getGlobalContext().Core.getCurrentClinicalContact().getID_ClinicalContact())))
    {
        // If this is the Golden Node then we'll colour it golden (ok then beige).
        form.getLocalContext().setGoldenInstanceFound(new Boolean(true));
        form.getLocalContext().setGoldenInstanceSelected(new Boolean(true));
        selectedRow.setBackColor(Color.Beige);          
    }

    if (voParentInstance.getPneumaticTreatment() != null)  
    {
        selectedRow.setValue(voParentInstance);
        selectedRow.setExpanded(true);
        populateChildNodes(selectedRow, voParentInstance.getPneumaticTreatment());
    }
    populateParentInstanceControls(voParentInstance);       
}
项目:openMAXIMS    文件:Logic.java   
private void populateChildCollectionFromGrid(ElectrotherapyPneumaticVo voElectrotherapyPneumatic)
{
    if (form.grdPneumatic().getValue() == null) 
        return;

    if (voElectrotherapyPneumatic.getPneumaticTreatment() == null)
        voElectrotherapyPneumatic.setPneumaticTreatment(new ElectrotherapyPneumaticTreatmentVoCollection());

    GenForm.grdPneumaticRow parentRow = form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticShortVo || form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticVo ? 
                                        form.grdPneumatic().getSelectedRow() : form.grdPneumatic().getSelectedRow().getParentRow();     

       if (parentRow.getRows().size() > 0 )
        voElectrotherapyPneumatic.getPneumaticTreatment().clear();

    for (int i=0; i < parentRow.getRows().size(); i++)
       {
        voElectrotherapyPneumatic.getPneumaticTreatment().add((ElectrotherapyPneumaticTreatmentVo) parentRow.getRows().get(i).getValue());
       }
}
项目:openMAXIMS    文件:Logic.java   
private boolean newParentNode(ElectrotherapyPneumaticVo voNewParent)
{
    if (voNewParent == null) 
        return true;

    if(form.ctnPneumatic().lyrPneumatic().tabPneumatic().qmbAuthoringCP().getValue()==null || form.ctnPneumatic().lyrPneumatic().tabPneumatic().dtimAuthoringDateTime().getValue() == null)
    {
        engine.showMessage("'Authoring HCP' and 'Authoring Date / Time' are a mandatory fields.");
        return false;
    }

    ElectrotherapyPneumaticShortVo voParentShort = new ElectrotherapyPneumaticShortVo();
    voParentShort.setAuthoringCP(form.ctnPneumatic().lyrPneumatic().tabPneumatic().qmbAuthoringCP().getValue());
    voParentShort.setAuthoringDateTime(form.ctnPneumatic().lyrPneumatic().tabPneumatic().dtimAuthoringDateTime().getValue());
    voParentShort.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());

    GenForm.grdPneumaticRow parentRow = form.grdPneumatic().getRows().newRow();         
    parentRow.setColMachineUsed(voParentShort.getAuthoringDateTime().toString()+ " - " + 
                           voParentShort.getAuthoringCP().toString());          
    parentRow.setValue(voParentShort);
    parentRow.setBackColor(Color.Beige);
    form.getLocalContext().setGoldenInstanceSelected(new Boolean(true));
    parentRow.setExpanded(true);
    form.grdPneumatic().setValue(voParentShort);    
    return true;
}
项目:openMAXIMS    文件:Logic.java   
private void showHeaderOrDetailsTab()
{
    if (form.getMode().equals(FormMode.VIEW))
    {
        if (form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticShortVo)       
            form.ctnPneumatic().lyrPneumatic().showtabPneumatic();
        else if(form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticVo)
            form.ctnPneumatic().lyrPneumatic().showtabPneumatic();
        else if (form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticTreatmentVo)
            form.ctnPneumatic().lyrPneumatic().showtabDetails();

    }
    else
    {
        if (form.getLocalContext().getUpdatingParent().equals(Boolean.TRUE))
            form.ctnPneumatic().lyrPneumatic().showtabPneumatic();
        else
            form.ctnPneumatic().lyrPneumatic().showtabDetails();

        if (form.getLocalContext().getSelectedParentInstanceIsNotNull() && 
                (form.getLocalContext().getSelectedParentInstance().getID_ElectrotherapyPneumaticIsNotNull()))
            enableParentControls(false);        
        else
            enableParentControls(true);         
    }
}
项目:openMAXIMS    文件:Logic.java   
private void expandParentNode(grdPneumaticRow selectedRow)
{
    if (selectedRow.getValue() instanceof ElectrotherapyPneumaticShortVo == false ) return;

    form.getLocalContext().setSelectedParentInstance(getParentFromDomain((ElectrotherapyPneumaticShortVo) selectedRow.getValue()));     
    if (form.getLocalContext().getSelectedParentInstance() == null ) return;                

    ElectrotherapyPneumaticVo voParentInstance = form.getLocalContext().getSelectedParentInstance();                
    if(form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull()
            && (voParentInstance.getClinicalContact().getID_ClinicalContact().equals
                                (form.getGlobalContext().Core.getCurrentClinicalContact().getID_ClinicalContact())))
    {
        // If this is the Golden Node then we'll colour it golden (ok then beige).
        form.getLocalContext().setGoldenInstanceFound(new Boolean(true));
        form.getLocalContext().setGoldenInstanceSelected(new Boolean(true));
        selectedRow.setBackColor(Color.Beige);          
    }

    if (voParentInstance.getPneumaticTreatment() != null)  
    {
        selectedRow.setValue(voParentInstance);
        selectedRow.setExpanded(true);
        populateChildNodes(selectedRow, voParentInstance.getPneumaticTreatment());
    }
    populateParentInstanceControls(voParentInstance);       
}
项目:openMAXIMS    文件:Logic.java   
private void populateChildCollectionFromGrid(ElectrotherapyPneumaticVo voElectrotherapyPneumatic)
{
    if (form.grdPneumatic().getValue() == null) 
        return;

    if (voElectrotherapyPneumatic.getPneumaticTreatment() == null)
        voElectrotherapyPneumatic.setPneumaticTreatment(new ElectrotherapyPneumaticTreatmentVoCollection());

    GenForm.grdPneumaticRow parentRow = form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticShortVo || form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticVo ? 
                                        form.grdPneumatic().getSelectedRow() : form.grdPneumatic().getSelectedRow().getParentRow();     

       if (parentRow.getRows().size() > 0 )
        voElectrotherapyPneumatic.getPneumaticTreatment().clear();

    for (int i=0; i < parentRow.getRows().size(); i++)
       {
        voElectrotherapyPneumatic.getPneumaticTreatment().add((ElectrotherapyPneumaticTreatmentVo) parentRow.getRows().get(i).getValue());
       }
}
项目:openMAXIMS    文件:Logic.java   
private boolean newParentNode(ElectrotherapyPneumaticVo voNewParent)
{
    if (voNewParent == null) 
        return true;

    if(form.ctnPneumatic().lyrPneumatic().tabPneumatic().qmbAuthoringCP().getValue()==null || form.ctnPneumatic().lyrPneumatic().tabPneumatic().dtimAuthoringDateTime().getValue() == null)
    {
        engine.showMessage("'Authoring HCP' and 'Authoring Date / Time' are a mandatory fields.");
        return false;
    }

    ElectrotherapyPneumaticShortVo voParentShort = new ElectrotherapyPneumaticShortVo();
    voParentShort.setAuthoringCP(form.ctnPneumatic().lyrPneumatic().tabPneumatic().qmbAuthoringCP().getValue());
    voParentShort.setAuthoringDateTime(form.ctnPneumatic().lyrPneumatic().tabPneumatic().dtimAuthoringDateTime().getValue());
    voParentShort.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());

    GenForm.grdPneumaticRow parentRow = form.grdPneumatic().getRows().newRow();         
    parentRow.setColMachineUsed(voParentShort.getAuthoringDateTime().toString()+ " - " + 
                           voParentShort.getAuthoringCP().toString());          
    parentRow.setValue(voParentShort);
    parentRow.setBackColor(Color.Beige);
    form.getLocalContext().setGoldenInstanceSelected(new Boolean(true));
    parentRow.setExpanded(true);
    form.grdPneumatic().setValue(voParentShort);    
    return true;
}
项目:openMAXIMS    文件:Logic.java   
private void showHeaderOrDetailsTab()
{
    if (form.getMode().equals(FormMode.VIEW))
    {
        if (form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticShortVo)       
            form.ctnPneumatic().lyrPneumatic().showtabPneumatic();
        else if(form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticVo)
            form.ctnPneumatic().lyrPneumatic().showtabPneumatic();
        else if (form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticTreatmentVo)
            form.ctnPneumatic().lyrPneumatic().showtabDetails();

    }
    else
    {
        if (form.getLocalContext().getUpdatingParent().equals(Boolean.TRUE))
            form.ctnPneumatic().lyrPneumatic().showtabPneumatic();
        else
            form.ctnPneumatic().lyrPneumatic().showtabDetails();

        if (form.getLocalContext().getSelectedParentInstanceIsNotNull() && 
                (form.getLocalContext().getSelectedParentInstance().getID_ElectrotherapyPneumaticIsNotNull()))
            enableParentControls(false);        
        else
            enableParentControls(true);         
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void expandParentNode(grdPneumaticRow selectedRow)
{
    if (selectedRow.getValue() instanceof ElectrotherapyPneumaticShortVo == false ) return;

    form.getLocalContext().setSelectedParentInstance(getParentFromDomain((ElectrotherapyPneumaticShortVo) selectedRow.getValue()));     
    if (form.getLocalContext().getSelectedParentInstance() == null ) return;                

    ElectrotherapyPneumaticVo voParentInstance = form.getLocalContext().getSelectedParentInstance();                
    if(form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull()
            && (voParentInstance.getClinicalContact().getID_ClinicalContact().equals
                                (form.getGlobalContext().Core.getCurrentClinicalContact().getID_ClinicalContact())))
    {
        // If this is the Golden Node then we'll colour it golden (ok then beige).
        form.getLocalContext().setGoldenInstanceFound(new Boolean(true));
        form.getLocalContext().setGoldenInstanceSelected(new Boolean(true));
        selectedRow.setBackColor(Color.Beige);          
    }

    if (voParentInstance.getPneumaticTreatment() != null)  
    {
        selectedRow.setValue(voParentInstance);
        selectedRow.setExpanded(true);
        populateChildNodes(selectedRow, voParentInstance.getPneumaticTreatment());
    }
    populateParentInstanceControls(voParentInstance);       
}
项目:openmaxims-linux    文件:Logic.java   
private void populateChildCollectionFromGrid(ElectrotherapyPneumaticVo voElectrotherapyPneumatic)
{
    if (form.grdPneumatic().getValue() == null) 
        return;

    if (voElectrotherapyPneumatic.getPneumaticTreatment() == null)
        voElectrotherapyPneumatic.setPneumaticTreatment(new ElectrotherapyPneumaticTreatmentVoCollection());

    GenForm.grdPneumaticRow parentRow = form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticShortVo || form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticVo ? 
                                        form.grdPneumatic().getSelectedRow() : form.grdPneumatic().getSelectedRow().getParentRow();     

       if (parentRow.getRows().size() > 0 )
        voElectrotherapyPneumatic.getPneumaticTreatment().clear();

    for (int i=0; i < parentRow.getRows().size(); i++)
       {
        voElectrotherapyPneumatic.getPneumaticTreatment().add((ElectrotherapyPneumaticTreatmentVo) parentRow.getRows().get(i).getValue());
       }
}
项目:openmaxims-linux    文件:Logic.java   
private boolean newParentNode(ElectrotherapyPneumaticVo voNewParent)
{
    if (voNewParent == null) 
        return true;

    if(form.ctnPneumatic().lyrPneumatic().tabPneumatic().qmbAuthoringCP().getValue()==null || form.ctnPneumatic().lyrPneumatic().tabPneumatic().dtimAuthoringDateTime().getValue() == null)
    {
        engine.showMessage("'Authoring HCP' and 'Authoring Date / Time' are a mandatory fields.");
        return false;
    }

    ElectrotherapyPneumaticShortVo voParentShort = new ElectrotherapyPneumaticShortVo();
    voParentShort.setAuthoringCP(form.ctnPneumatic().lyrPneumatic().tabPneumatic().qmbAuthoringCP().getValue());
    voParentShort.setAuthoringDateTime(form.ctnPneumatic().lyrPneumatic().tabPneumatic().dtimAuthoringDateTime().getValue());
    voParentShort.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());

    GenForm.grdPneumaticRow parentRow = form.grdPneumatic().getRows().newRow();         
    parentRow.setColMachineUsed(voParentShort.getAuthoringDateTime().toString()+ " - " + 
                           voParentShort.getAuthoringCP().toString());          
    parentRow.setValue(voParentShort);
    parentRow.setBackColor(Color.Beige);
    form.getLocalContext().setGoldenInstanceSelected(new Boolean(true));
    parentRow.setExpanded(true);
    form.grdPneumatic().setValue(voParentShort);    
    return true;
}
项目:openmaxims-linux    文件:Logic.java   
private void showHeaderOrDetailsTab()
{
    if (form.getMode().equals(FormMode.VIEW))
    {
        if (form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticShortVo)       
            form.ctnPneumatic().lyrPneumatic().showtabPneumatic();
        else if(form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticVo)
            form.ctnPneumatic().lyrPneumatic().showtabPneumatic();
        else if (form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticTreatmentVo)
            form.ctnPneumatic().lyrPneumatic().showtabDetails();

    }
    else
    {
        if (form.getLocalContext().getUpdatingParent().equals(Boolean.TRUE))
            form.ctnPneumatic().lyrPneumatic().showtabPneumatic();
        else
            form.ctnPneumatic().lyrPneumatic().showtabDetails();

        if (form.getLocalContext().getSelectedParentInstanceIsNotNull() && 
                (form.getLocalContext().getSelectedParentInstance().getID_ElectrotherapyPneumaticIsNotNull()))
            enableParentControls(false);        
        else
            enableParentControls(true);         
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateParentNode(ElectrotherapyPneumaticShortVo voElectroPneumaticShort)
    {
        GenForm.grdPneumaticRow parRow = form.grdPneumatic().getRows().newRow();
        parRow.setColMachineUsed(voElectroPneumaticShort.getAuthoringDateTime().toString());      //+ " - " + 
                // voElectroPneumaticShort.getAuthoringCP().toString());
        parRow.setValue(voElectroPneumaticShort);           
//      if(form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull() && voElectroPneumaticShort.getClinicalContact().getID_ClinicalContact().equals
//              (form.getGlobalContext().Core.getCurrentClinicalContact().getID_ClinicalContact()))
//      {
            form.grdPneumatic().setValue(voElectroPneumaticShort);          
            expandParentNode(parRow);
//      }

    }
项目:AvoinApotti    文件:Logic.java   
private void updateInstance()
{
    form.getLocalContext().setUpdatingParent(new Boolean(form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticShortVo));
    form.setMode(FormMode.EDIT);
    if (form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticTreatmentVo)           
    {
        ElectrotherapyPneumaticTreatmentVo voCachedChild =  (ElectrotherapyPneumaticTreatmentVo) form.grdPneumatic().getValue(); 
        if ( voCachedChild.getID_ElectrotherapyPneumaticTreatment() == null)
        {
            populateChildInstanceControls(voCachedChild);
        }           
    }
}
项目:AvoinApotti    文件:Logic.java   
private void getSelectedInstance()
{
    if (form.getMode().equals(FormMode.EDIT)) 
    {
        updateContextMenusState();
        return;
    }       

    if(form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticVo)
    {
        populateParentInstanceControls((ElectrotherapyPneumaticVo) form.grdPneumatic().getValue());
    }
    else if(form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticShortVo)
    {                                    
        form.getLocalContext().setSelectedParentInstance(getParentFromDomain((ElectrotherapyPneumaticShortVo) form.grdPneumatic().getValue()));
        if (form.getLocalContext().getSelectedParentInstanceIsNotNull())
        {
            populateParentInstanceControls(form.getLocalContext().getSelectedParentInstance());
            populateChildNodes(form.grdPneumatic().getSelectedRow(),form.getLocalContext().getSelectedParentInstance().getPneumaticTreatment());
        }
        form.getLocalContext().setSelectedChildInstance(null);
        clearChildInstanceControls();
    }       
    else if(form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticTreatmentVo)
    {
        GenForm.grdPneumaticRow parentRow = form.grdPneumatic().getSelectedRow().getParentRow();
        populateParentInstanceControls((ElectrotherapyPneumaticVo) parentRow.getValue());
        form.getLocalContext().setSelectedParentInstance((ElectrotherapyPneumaticVo) parentRow.getValue());

        form.getLocalContext().setSelectedChildInstance((ElectrotherapyPneumaticTreatmentVo) form.grdPneumatic().getValue());
        populateChildInstanceControls(form.getLocalContext().getSelectedChildInstance());           
    }

    if(form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull())
        form.getLocalContext().setGoldenInstanceSelected(form.getLocalContext().getSelectedParentInstanceIsNotNull() ? new Boolean(form.getLocalContext().getSelectedParentInstance().getClinicalContact().getID_ClinicalContact().equals(form.getGlobalContext().Core.getCurrentClinicalContact().getID_ClinicalContact())): false);

    updateControlsState();      
}
项目:openMAXIMS    文件:Logic.java   
private void populateParentNode(ElectrotherapyPneumaticShortVo voElectroPneumaticShort)
    {
        GenForm.grdPneumaticRow parRow = form.grdPneumatic().getRows().newRow();
        parRow.setColMachineUsed(voElectroPneumaticShort.getAuthoringDateTime().toString());      //+ " - " + 
                // voElectroPneumaticShort.getAuthoringCP().toString());
        parRow.setValue(voElectroPneumaticShort);           
//      if(form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull() && voElectroPneumaticShort.getClinicalContact().getID_ClinicalContact().equals
//              (form.getGlobalContext().Core.getCurrentClinicalContact().getID_ClinicalContact()))
//      {
            form.grdPneumatic().setValue(voElectroPneumaticShort);          
            expandParentNode(parRow);
//      }

    }
项目:openMAXIMS    文件:Logic.java   
private void updateInstance()
{
    form.getLocalContext().setUpdatingParent(new Boolean(form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticShortVo));
    form.setMode(FormMode.EDIT);
    if (form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticTreatmentVo)           
    {
        ElectrotherapyPneumaticTreatmentVo voCachedChild =  (ElectrotherapyPneumaticTreatmentVo) form.grdPneumatic().getValue(); 
        if ( voCachedChild.getID_ElectrotherapyPneumaticTreatment() == null)
        {
            populateChildInstanceControls(voCachedChild);
        }           
    }
}
项目:openMAXIMS    文件:Logic.java   
private void getSelectedInstance()
{
    if (form.getMode().equals(FormMode.EDIT)) 
    {
        updateContextMenusState();
        return;
    }       

    if(form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticVo)
    {
        populateParentInstanceControls((ElectrotherapyPneumaticVo) form.grdPneumatic().getValue());
    }
    else if(form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticShortVo)
    {                                    
        form.getLocalContext().setSelectedParentInstance(getParentFromDomain((ElectrotherapyPneumaticShortVo) form.grdPneumatic().getValue()));
        if (form.getLocalContext().getSelectedParentInstanceIsNotNull())
        {
            populateParentInstanceControls(form.getLocalContext().getSelectedParentInstance());
            populateChildNodes(form.grdPneumatic().getSelectedRow(),form.getLocalContext().getSelectedParentInstance().getPneumaticTreatment());
        }
        form.getLocalContext().setSelectedChildInstance(null);
        clearChildInstanceControls();
    }       
    else if(form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticTreatmentVo)
    {
        GenForm.grdPneumaticRow parentRow = form.grdPneumatic().getSelectedRow().getParentRow();
        populateParentInstanceControls((ElectrotherapyPneumaticVo) parentRow.getValue());
        form.getLocalContext().setSelectedParentInstance((ElectrotherapyPneumaticVo) parentRow.getValue());

        form.getLocalContext().setSelectedChildInstance((ElectrotherapyPneumaticTreatmentVo) form.grdPneumatic().getValue());
        populateChildInstanceControls(form.getLocalContext().getSelectedChildInstance());           
    }

    if(form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull())
        form.getLocalContext().setGoldenInstanceSelected(form.getLocalContext().getSelectedParentInstanceIsNotNull() ? new Boolean(form.getLocalContext().getSelectedParentInstance().getClinicalContact().getID_ClinicalContact().equals(form.getGlobalContext().Core.getCurrentClinicalContact().getID_ClinicalContact())): false);

    updateControlsState();      
}
项目:openMAXIMS    文件:Logic.java   
private void populateParentNode(ElectrotherapyPneumaticShortVo voElectroPneumaticShort)
    {
        GenForm.grdPneumaticRow parRow = form.grdPneumatic().getRows().newRow();
        parRow.setColMachineUsed(voElectroPneumaticShort.getAuthoringDateTime().toString());      //+ " - " + 
                // voElectroPneumaticShort.getAuthoringCP().toString());
        parRow.setValue(voElectroPneumaticShort);           
//      if(form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull() && voElectroPneumaticShort.getClinicalContact().getID_ClinicalContact().equals
//              (form.getGlobalContext().Core.getCurrentClinicalContact().getID_ClinicalContact()))
//      {
            form.grdPneumatic().setValue(voElectroPneumaticShort);          
            expandParentNode(parRow);
//      }

    }
项目:openMAXIMS    文件:Logic.java   
private void updateInstance()
{
    form.getLocalContext().setUpdatingParent(new Boolean(form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticShortVo));
    form.setMode(FormMode.EDIT);
    if (form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticTreatmentVo)           
    {
        ElectrotherapyPneumaticTreatmentVo voCachedChild =  (ElectrotherapyPneumaticTreatmentVo) form.grdPneumatic().getValue(); 
        if ( voCachedChild.getID_ElectrotherapyPneumaticTreatment() == null)
        {
            populateChildInstanceControls(voCachedChild);
        }           
    }
}
项目:openMAXIMS    文件:Logic.java   
private void getSelectedInstance()
{
    if (form.getMode().equals(FormMode.EDIT)) 
    {
        updateContextMenusState();
        return;
    }       

    if(form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticVo)
    {
        populateParentInstanceControls((ElectrotherapyPneumaticVo) form.grdPneumatic().getValue());
    }
    else if(form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticShortVo)
    {                                    
        form.getLocalContext().setSelectedParentInstance(getParentFromDomain((ElectrotherapyPneumaticShortVo) form.grdPneumatic().getValue()));
        if (form.getLocalContext().getSelectedParentInstanceIsNotNull())
        {
            populateParentInstanceControls(form.getLocalContext().getSelectedParentInstance());
            populateChildNodes(form.grdPneumatic().getSelectedRow(),form.getLocalContext().getSelectedParentInstance().getPneumaticTreatment());
        }
        form.getLocalContext().setSelectedChildInstance(null);
        clearChildInstanceControls();
    }       
    else if(form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticTreatmentVo)
    {
        GenForm.grdPneumaticRow parentRow = form.grdPneumatic().getSelectedRow().getParentRow();
        populateParentInstanceControls((ElectrotherapyPneumaticVo) parentRow.getValue());
        form.getLocalContext().setSelectedParentInstance((ElectrotherapyPneumaticVo) parentRow.getValue());

        form.getLocalContext().setSelectedChildInstance((ElectrotherapyPneumaticTreatmentVo) form.grdPneumatic().getValue());
        populateChildInstanceControls(form.getLocalContext().getSelectedChildInstance());           
    }

    if(form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull())
        form.getLocalContext().setGoldenInstanceSelected(form.getLocalContext().getSelectedParentInstanceIsNotNull() ? new Boolean(form.getLocalContext().getSelectedParentInstance().getClinicalContact().getID_ClinicalContact().equals(form.getGlobalContext().Core.getCurrentClinicalContact().getID_ClinicalContact())): false);

    updateControlsState();      
}
项目:openmaxims-linux    文件:Logic.java   
private void populateParentNode(ElectrotherapyPneumaticShortVo voElectroPneumaticShort)
    {
        GenForm.grdPneumaticRow parRow = form.grdPneumatic().getRows().newRow();
        parRow.setColMachineUsed(voElectroPneumaticShort.getAuthoringDateTime().toString());      //+ " - " + 
                // voElectroPneumaticShort.getAuthoringCP().toString());
        parRow.setValue(voElectroPneumaticShort);           
//      if(form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull() && voElectroPneumaticShort.getClinicalContact().getID_ClinicalContact().equals
//              (form.getGlobalContext().Core.getCurrentClinicalContact().getID_ClinicalContact()))
//      {
            form.grdPneumatic().setValue(voElectroPneumaticShort);          
            expandParentNode(parRow);
//      }

    }
项目:openmaxims-linux    文件:Logic.java   
private void updateInstance()
{
    form.getLocalContext().setUpdatingParent(new Boolean(form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticShortVo));
    form.setMode(FormMode.EDIT);
    if (form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticTreatmentVo)           
    {
        ElectrotherapyPneumaticTreatmentVo voCachedChild =  (ElectrotherapyPneumaticTreatmentVo) form.grdPneumatic().getValue(); 
        if ( voCachedChild.getID_ElectrotherapyPneumaticTreatment() == null)
        {
            populateChildInstanceControls(voCachedChild);
        }           
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void getSelectedInstance()
{
    if (form.getMode().equals(FormMode.EDIT)) 
    {
        updateContextMenusState();
        return;
    }       

    if(form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticVo)
    {
        populateParentInstanceControls((ElectrotherapyPneumaticVo) form.grdPneumatic().getValue());
    }
    else if(form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticShortVo)
    {                                    
        form.getLocalContext().setSelectedParentInstance(getParentFromDomain((ElectrotherapyPneumaticShortVo) form.grdPneumatic().getValue()));
        if (form.getLocalContext().getSelectedParentInstanceIsNotNull())
        {
            populateParentInstanceControls(form.getLocalContext().getSelectedParentInstance());
            populateChildNodes(form.grdPneumatic().getSelectedRow(),form.getLocalContext().getSelectedParentInstance().getPneumaticTreatment());
        }
        form.getLocalContext().setSelectedChildInstance(null);
        clearChildInstanceControls();
    }       
    else if(form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticTreatmentVo)
    {
        GenForm.grdPneumaticRow parentRow = form.grdPneumatic().getSelectedRow().getParentRow();
        populateParentInstanceControls((ElectrotherapyPneumaticVo) parentRow.getValue());
        form.getLocalContext().setSelectedParentInstance((ElectrotherapyPneumaticVo) parentRow.getValue());

        form.getLocalContext().setSelectedChildInstance((ElectrotherapyPneumaticTreatmentVo) form.grdPneumatic().getValue());
        populateChildInstanceControls(form.getLocalContext().getSelectedChildInstance());           
    }

    if(form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull())
        form.getLocalContext().setGoldenInstanceSelected(form.getLocalContext().getSelectedParentInstanceIsNotNull() ? new Boolean(form.getLocalContext().getSelectedParentInstance().getClinicalContact().getID_ClinicalContact().equals(form.getGlobalContext().Core.getCurrentClinicalContact().getID_ClinicalContact())): false);

    updateControlsState();      
}
项目:AvoinApotti    文件:Logic.java   
private ElectrotherapyPneumaticVo getParentFromDomain(ElectrotherapyPneumaticShortVo voElectrotherapyPneumaticShort)
{
    //return domain.getElectrotheraphyPneumaticVoByClinicalContact(voElectrotherapyPneumaticShort.getClinicalContact());
    return domain.getElectrotheraphyPneumatic(voElectrotherapyPneumaticShort);//    WDEV-13588
}
项目:AvoinApotti    文件:Logic.java   
private void updateContextMenusState()
{
    if(form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull())
    {
        if(form.getLocalContext().getGoldenInstanceSelectedIsNotNull()
            && form.getLocalContext().getGoldenInstanceSelected().booleanValue())
        {
            if (form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticShortVo)
                form.getContextMenus().getGenericGridUpdateItem().setVisible(false);                        
            else if (form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticTreatmentVo)
                form.getContextMenus().getGenericGridUpdateItem().setText("Edit Pneumatic Detail");

            form.getContextMenus().getGenericGridAddItem().setText("Add Pneumatic Detail");         

            form.getContextMenus().getGenericGridUpdateItem().setVisible((form.getMode().equals(FormMode.VIEW)&& 
                                                                         form.grdPneumatic().getSelectedRowIndex()>=0 && 
                                                                         form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticTreatmentVo) ||
                                                                         (form.getMode().equals(FormMode.EDIT) &&
                                                                         form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticTreatmentVo &&
                                                                         ((ElectrotherapyPneumaticTreatmentVo)form.grdPneumatic().getValue()).getID_ElectrotherapyPneumaticTreatment() == null));                                                                                               
        }
        else
        { 
            if (Boolean.TRUE.equals(form.getLocalContext().getGoldenInstanceFound())) //WDEV-14292
            {
                form.getContextMenus().hideAllGenericGridMenuItems();
                return;
            }
            else
            {
                form.getContextMenus().getGenericGridAddItem().setText("New Pneumatic Therapy");
                form.getContextMenus().getGenericGridUpdateItem().setVisible(false);                
            }
        }

        form.getContextMenus().getGenericGridAddItem().setVisible(form.getMode().equals(FormMode.VIEW));
        form.getContextMenus().getGenericGridRemoveItem().setVisible(form.getMode().equals(FormMode.EDIT) &&
                 form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticTreatmentVo &&
                 ((ElectrotherapyPneumaticTreatmentVo)form.grdPneumatic().getValue()).getID_ElectrotherapyPneumaticTreatment() == null);
    }
    else
    {
        form.getContextMenus().hideAllGenericGridMenuItems();
    }

}
项目:openMAXIMS    文件:Logic.java   
private ElectrotherapyPneumaticVo getParentFromDomain(ElectrotherapyPneumaticShortVo voElectrotherapyPneumaticShort)
{
    //return domain.getElectrotheraphyPneumaticVoByClinicalContact(voElectrotherapyPneumaticShort.getClinicalContact());
    return domain.getElectrotheraphyPneumatic(voElectrotherapyPneumaticShort);//    WDEV-13588
}
项目:openMAXIMS    文件:Logic.java   
private void updateContextMenusState()
{
    if(form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull())
    {
        if(form.getLocalContext().getGoldenInstanceSelectedIsNotNull()
            && form.getLocalContext().getGoldenInstanceSelected().booleanValue())
        {
            if (form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticShortVo)
                form.getContextMenus().getGenericGridUpdateItem().setVisible(false);                        
            else if (form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticTreatmentVo)
                form.getContextMenus().getGenericGridUpdateItem().setText("Edit Pneumatic Detail");

            form.getContextMenus().getGenericGridAddItem().setText("Add Pneumatic Detail");         

            form.getContextMenus().getGenericGridUpdateItem().setVisible((form.getMode().equals(FormMode.VIEW)&& 
                                                                         form.grdPneumatic().getSelectedRowIndex()>=0 && 
                                                                         form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticTreatmentVo) ||
                                                                         (form.getMode().equals(FormMode.EDIT) &&
                                                                         form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticTreatmentVo &&
                                                                         ((ElectrotherapyPneumaticTreatmentVo)form.grdPneumatic().getValue()).getID_ElectrotherapyPneumaticTreatment() == null));                                                                                               
        }
        else
        { 
            if (Boolean.TRUE.equals(form.getLocalContext().getGoldenInstanceFound())) //WDEV-14292
            {
                form.getContextMenus().hideAllGenericGridMenuItems();
                return;
            }
            else
            {
                form.getContextMenus().getGenericGridAddItem().setText("New Pneumatic Therapy");
                form.getContextMenus().getGenericGridUpdateItem().setVisible(false);                
            }
        }

        form.getContextMenus().getGenericGridAddItem().setVisible(form.getMode().equals(FormMode.VIEW));
        form.getContextMenus().getGenericGridRemoveItem().setVisible(form.getMode().equals(FormMode.EDIT) &&
                 form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticTreatmentVo &&
                 ((ElectrotherapyPneumaticTreatmentVo)form.grdPneumatic().getValue()).getID_ElectrotherapyPneumaticTreatment() == null);
    }
    else
    {
        form.getContextMenus().hideAllGenericGridMenuItems();
    }

}
项目:openMAXIMS    文件:Logic.java   
private ElectrotherapyPneumaticVo getParentFromDomain(ElectrotherapyPneumaticShortVo voElectrotherapyPneumaticShort)
{
    //return domain.getElectrotheraphyPneumaticVoByClinicalContact(voElectrotherapyPneumaticShort.getClinicalContact());
    return domain.getElectrotheraphyPneumatic(voElectrotherapyPneumaticShort);//    WDEV-13588
}
项目:openMAXIMS    文件:Logic.java   
private void updateContextMenusState()
{
    if(form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull())
    {
        if(form.getLocalContext().getGoldenInstanceSelectedIsNotNull()
            && form.getLocalContext().getGoldenInstanceSelected().booleanValue())
        {
            if (form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticShortVo)
                form.getContextMenus().getGenericGridUpdateItem().setVisible(false);                        
            else if (form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticTreatmentVo)
                form.getContextMenus().getGenericGridUpdateItem().setText("Edit Pneumatic Detail");

            form.getContextMenus().getGenericGridAddItem().setText("Add Pneumatic Detail");         

            form.getContextMenus().getGenericGridUpdateItem().setVisible((form.getMode().equals(FormMode.VIEW)&& 
                                                                         form.grdPneumatic().getSelectedRowIndex()>=0 && 
                                                                         form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticTreatmentVo) ||
                                                                         (form.getMode().equals(FormMode.EDIT) &&
                                                                         form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticTreatmentVo &&
                                                                         ((ElectrotherapyPneumaticTreatmentVo)form.grdPneumatic().getValue()).getID_ElectrotherapyPneumaticTreatment() == null));                                                                                               
        }
        else
        { 
            if (Boolean.TRUE.equals(form.getLocalContext().getGoldenInstanceFound())) //WDEV-14292
            {
                form.getContextMenus().hideAllGenericGridMenuItems();
                return;
            }
            else
            {
                form.getContextMenus().getGenericGridAddItem().setText("New Pneumatic Therapy");
                form.getContextMenus().getGenericGridUpdateItem().setVisible(false);                
            }
        }

        form.getContextMenus().getGenericGridAddItem().setVisible(form.getMode().equals(FormMode.VIEW));
        form.getContextMenus().getGenericGridRemoveItem().setVisible(form.getMode().equals(FormMode.EDIT) &&
                 form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticTreatmentVo &&
                 ((ElectrotherapyPneumaticTreatmentVo)form.grdPneumatic().getValue()).getID_ElectrotherapyPneumaticTreatment() == null);
    }
    else
    {
        form.getContextMenus().hideAllGenericGridMenuItems();
    }

}
项目:openmaxims-linux    文件:Logic.java   
private ElectrotherapyPneumaticVo getParentFromDomain(ElectrotherapyPneumaticShortVo voElectrotherapyPneumaticShort)
{
    //return domain.getElectrotheraphyPneumaticVoByClinicalContact(voElectrotherapyPneumaticShort.getClinicalContact());
    return domain.getElectrotheraphyPneumatic(voElectrotherapyPneumaticShort);//    WDEV-13588
}
项目:openmaxims-linux    文件:Logic.java   
private void updateContextMenusState()
{
    if(form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull())
    {
        if(form.getLocalContext().getGoldenInstanceSelectedIsNotNull()
            && form.getLocalContext().getGoldenInstanceSelected().booleanValue())
        {
            if (form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticShortVo)
                form.getContextMenus().getGenericGridUpdateItem().setVisible(false);                        
            else if (form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticTreatmentVo)
                form.getContextMenus().getGenericGridUpdateItem().setText("Edit Pneumatic Detail");

            form.getContextMenus().getGenericGridAddItem().setText("Add Pneumatic Detail");         

            form.getContextMenus().getGenericGridUpdateItem().setVisible((form.getMode().equals(FormMode.VIEW)&& 
                                                                         form.grdPneumatic().getSelectedRowIndex()>=0 && 
                                                                         form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticTreatmentVo) ||
                                                                         (form.getMode().equals(FormMode.EDIT) &&
                                                                         form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticTreatmentVo &&
                                                                         ((ElectrotherapyPneumaticTreatmentVo)form.grdPneumatic().getValue()).getID_ElectrotherapyPneumaticTreatment() == null));                                                                                               
        }
        else
        { 
            if (Boolean.TRUE.equals(form.getLocalContext().getGoldenInstanceFound())) //WDEV-14292
            {
                form.getContextMenus().hideAllGenericGridMenuItems();
                return;
            }
            else
            {
                form.getContextMenus().getGenericGridAddItem().setText("New Pneumatic Therapy");
                form.getContextMenus().getGenericGridUpdateItem().setVisible(false);                
            }
        }

        form.getContextMenus().getGenericGridAddItem().setVisible(form.getMode().equals(FormMode.VIEW));
        form.getContextMenus().getGenericGridRemoveItem().setVisible(form.getMode().equals(FormMode.EDIT) &&
                 form.grdPneumatic().getValue() instanceof ElectrotherapyPneumaticTreatmentVo &&
                 ((ElectrotherapyPneumaticTreatmentVo)form.grdPneumatic().getValue()).getID_ElectrotherapyPneumaticTreatment() == null);
    }
    else
    {
        form.getContextMenus().hideAllGenericGridMenuItems();
    }

}