Java 类ims.emergency.vo.SpecialInterestDetailsVo 实例源码

项目:AvoinApotti    文件:Logic.java   
private String createSpecialInterestTooltip(SpecialInterestDetailsVoCollection collSpecialInterestDetails)
{
    if (collSpecialInterestDetails == null || (collSpecialInterestDetails != null && collSpecialInterestDetails.size() == 0))
        return null;

    StringBuffer tooltip = new StringBuffer();

    /*
     * tooltip.append("<table border=1>"); tooltip.append("<tr><td><b>Category  &nbsp &nbsp</b></td><td><b>Start Date &nbsp &nbsp </b></td><td><b>End Date &nbsp &nbsp </b></td></tr>"); for (int i=0;i<collSpecialInterestDetails.size();i++) { tooltip.append("<tr>"); SpecialInterestDetailsVo specInterest = collSpecialInterestDetails.get(i); tooltip.append("<td><b>"+specInterest.getSpecialInterestCategory().toString()+ "</b></td><td><b>"+specInterest.getStartDateTime().toString() +"</b></td><td><b>" + specInterest.getCompletedDateTime().toString()+"</b></td></tr>"); } tooltip.append("</table>");
     */
    // tooltip.append("<table style=\"border :1px solid black; border-collapse:collapse;\">");
    tooltip.append("<table style=\"border :1px solid black; border-collapse:collapse;\">");
    tooltip.append("<tr><td style=\" border:1px solid black;\"><b>Category  &nbsp &nbsp</b></td><td style=\" border:1px solid black;\"><b>Start Date &nbsp &nbsp </b></td><td style=\" border:1px solid black;\"><b>End Date &nbsp &nbsp </b></td></tr>");
    for (int i = 0; i < collSpecialInterestDetails.size(); i++)
    {
        tooltip.append("<tr>");
        SpecialInterestDetailsVo specInterest = collSpecialInterestDetails.get(i);
        tooltip.append("<td style=\" border:1px solid black;\"><b>" +( specInterest!=null && specInterest.getSpecialInterestCategory()!=null ? specInterest.getSpecialInterestCategory():"") 
                        + "</b></td><td style=\" border:1px solid black;\"><b>" +(specInterest!=null && specInterest.getStartDateTime()!=null ? specInterest.getStartDateTime():"" )
                        + "</b></td><td style=\" border:1px solid black;\"><b>" +(specInterest!=null && specInterest.getCompletedDateTime()!=null ? specInterest.getCompletedDateTime():"") + "</b></td></tr>");
    }
    tooltip.append("</table>");

    return tooltip.toString();
}
项目:AvoinApotti    文件:Logic.java   
private void populateScreenFormData(SpecialInterestDetailsVoCollection collSpecialInterestDetails)
{
    clearScreen();
    if (collSpecialInterestDetails==null || (collSpecialInterestDetails!=null && collSpecialInterestDetails.size()==0))
        return;

    for (int i = 0; i < collSpecialInterestDetails.size(); i++)
    {
         SpecialInterestDetailsVo specialInterest = collSpecialInterestDetails.get(i);
         addRowToSpecialInterestDyngrd(specialInterest);

    }

    populateInstanceControlsFromData(form.getLocalContext().getSelectedSpecialInterest());

}
项目:AvoinApotti    文件:Logic.java   
private void addRowToSpecialInterestDyngrd(SpecialInterestDetailsVo specialInterest)
{
    if( specialInterest == null)
        return;

    DynamicGridRow row = form.dyngrdSpecialInterest().getRows().newRow();
    row.setValue(specialInterest);

    //row.setReadOnly(true);

    DynamicGridCell SpecialIntCategory = row.getCells().newCell(getColumn(COLUMN_SPECIALINTERESTCATEGORY), DynamicCellType.STRING); 
    SpecialIntCategory.setValue(specialInterest.getSpecialInterestCategoryIsNotNull() ?specialInterest.getSpecialInterestCategory().getIItemText():null);
    SpecialIntCategory.setReadOnly(true);

    DynamicGridCell startdatecell = row.getCells().newCell(getColumn(COLUMN_STARTDATE), DynamicCellType.STRING);
    startdatecell.setValue(specialInterest.getStartDateTime() != null ? specialInterest.getStartDateTime().toString():"");
    startdatecell.setReadOnly(true);

    DynamicGridCell enddate = row.getCells().newCell(getColumn(COLUMN_ENDDATE), DynamicCellType.STRING);
    enddate.setValue(specialInterest.getCompletedDateTime() != null ? specialInterest.getCompletedDateTime().toString():"");
    enddate.setReadOnly(true);

}
项目:AvoinApotti    文件:Logic.java   
private void updateRowToSpecialInterestDyngrd(SpecialInterestDetailsVo specialInterest)
{
    DynamicGridRow row = form.dyngrdSpecialInterest().getSelectedRow();
    row.setValue(specialInterest);

    //row.setReadOnly(true);

    DynamicGridCell SpecialIntCategory = row.getCells().newCell(getColumn(COLUMN_SPECIALINTERESTCATEGORY), DynamicCellType.STRING); 
    SpecialIntCategory.setValue(specialInterest.getSpecialInterestCategoryIsNotNull() ?specialInterest.getSpecialInterestCategory().getIItemText():null);
    SpecialIntCategory.setReadOnly(true);

    DynamicGridCell startdatecell = row.getCells().newCell(getColumn(COLUMN_STARTDATE), DynamicCellType.STRING);
    startdatecell.setValue(specialInterest.getStartDateTime() != null ? specialInterest.getStartDateTime().toString():"");
    startdatecell.setReadOnly(true);

    DynamicGridCell enddate = row.getCells().newCell(getColumn(COLUMN_ENDDATE), DynamicCellType.STRING);
    enddate.setValue(specialInterest.getCompletedDateTime() != null ? specialInterest.getCompletedDateTime().toString():"");
    enddate.setReadOnly(true);
}
项目:AvoinApotti    文件:Logic.java   
private boolean save()
{
    SpecialInterestDetailsVo specialInterestToSave = populateInstanceDataFromScreen(form.getLocalContext().getSelectedSpecialInterest());

    String[] errors = getUIErrors();

    if(errors != null && errors.length > 0)
    {
        engine.showErrors(errors);          
        return false;
    }

    form.getLocalContext().setSelectedSpecialInterest(specialInterestToSave);

    return true;
}
项目:AvoinApotti    文件:Logic.java   
protected void onBtnOkClick() throws ims.framework.exceptions.PresentationLogicException
{
    if( form.dtimStartDate().getValue() == null)
    {
        engine.showErrors(new String[]{"Start Date is mandatory."});    
        return;
    }
    if( form.dtimStartDate().getValue() != null && form.dtimEndDate().getValue() != null)
    {

        if( form.dtimStartDate().getValue().getDate().isGreaterThan(form.dtimEndDate().getValue().getDate()) || (form.dtimStartDate().getValue().getDate().isLessOrEqualThan(form.dtimEndDate().getValue().getDate()) && form.dtimStartDate().getValue().getTime().isGreaterThan(form.dtimEndDate().getValue().getTime())))
        {
            engine.showErrors(new String[]{"Start Date cannot be greater than End Date."});
            return;
        }
    }
    SpecialInterestDetailsVo tempVo = form.getGlobalContext().Emergency.getSpecialInterestDetails();
    tempVo.setCompletedDateTime(form.dtimEndDate().getValue());
    tempVo.setStartDateTime(form.dtimStartDate().getValue());
    tempVo.setSpecialInterestCategory(form.cmbSpecialInterestCategory().getValue());
    form.getGlobalContext().Emergency.setSpecialInterestDetails(tempVo);
    engine.close(DialogResult.OK);

}
项目:openMAXIMS    文件:Logic.java   
private String createSpecialInterestTooltip(SpecialInterestDetailsVoCollection collSpecialInterestDetails)
{
    if (collSpecialInterestDetails == null || (collSpecialInterestDetails != null && collSpecialInterestDetails.size() == 0))
        return null;

    StringBuffer tooltip = new StringBuffer();

    /*
     * tooltip.append("<table border=1>"); tooltip.append("<tr><td><b>Category  &nbsp &nbsp</b></td><td><b>Start Date &nbsp &nbsp </b></td><td><b>End Date &nbsp &nbsp </b></td></tr>"); for (int i=0;i<collSpecialInterestDetails.size();i++) { tooltip.append("<tr>"); SpecialInterestDetailsVo specInterest = collSpecialInterestDetails.get(i); tooltip.append("<td><b>"+specInterest.getSpecialInterestCategory().toString()+ "</b></td><td><b>"+specInterest.getStartDateTime().toString() +"</b></td><td><b>" + specInterest.getCompletedDateTime().toString()+"</b></td></tr>"); } tooltip.append("</table>");
     */
    // tooltip.append("<table style=\"border :1px solid black; border-collapse:collapse;\">");
    tooltip.append("<table style=\"border :1px solid black; border-collapse:collapse;\">");
    tooltip.append("<tr><td style=\" border:1px solid black;\"><b>Category  &nbsp &nbsp</b></td><td style=\" border:1px solid black;\"><b>Start Date &nbsp &nbsp </b></td><td style=\" border:1px solid black;\"><b>End Date &nbsp &nbsp </b></td></tr>");
    for (int i = 0; i < collSpecialInterestDetails.size(); i++)
    {
        tooltip.append("<tr>");
        SpecialInterestDetailsVo specInterest = collSpecialInterestDetails.get(i);
        tooltip.append("<td style=\" border:1px solid black;\"><b>" +( specInterest!=null && specInterest.getSpecialInterestCategory()!=null ? specInterest.getSpecialInterestCategory():"") 
                        + "</b></td><td style=\" border:1px solid black;\"><b>" +(specInterest!=null && specInterest.getStartDateTime()!=null ? specInterest.getStartDateTime():"" )
                        + "</b></td><td style=\" border:1px solid black;\"><b>" +(specInterest!=null && specInterest.getCompletedDateTime()!=null ? specInterest.getCompletedDateTime():"") + "</b></td></tr>");
    }
    tooltip.append("</table>");

    return tooltip.toString();
}
项目:openMAXIMS    文件:Logic.java   
private void populateScreenFormData(SpecialInterestDetailsVoCollection collSpecialInterestDetails)
{
    clearScreen();
    if (collSpecialInterestDetails==null || (collSpecialInterestDetails!=null && collSpecialInterestDetails.size()==0))
        return;

    for (int i = 0; i < collSpecialInterestDetails.size(); i++)
    {
         SpecialInterestDetailsVo specialInterest = collSpecialInterestDetails.get(i);
         addRowToSpecialInterestDyngrd(specialInterest);

    }

    populateInstanceControlsFromData(form.getLocalContext().getSelectedSpecialInterest());

}
项目:openMAXIMS    文件:Logic.java   
private void addRowToSpecialInterestDyngrd(SpecialInterestDetailsVo specialInterest)
{
    if( specialInterest == null)
        return;

    DynamicGridRow row = form.dyngrdSpecialInterest().getRows().newRow();
    row.setValue(specialInterest);

    //row.setReadOnly(true);

    DynamicGridCell SpecialIntCategory = row.getCells().newCell(getColumn(COLUMN_SPECIALINTERESTCATEGORY), DynamicCellType.STRING); 
    SpecialIntCategory.setValue(specialInterest.getSpecialInterestCategoryIsNotNull() ?specialInterest.getSpecialInterestCategory().getIItemText():null);
    SpecialIntCategory.setReadOnly(true);

    DynamicGridCell startdatecell = row.getCells().newCell(getColumn(COLUMN_STARTDATE), DynamicCellType.STRING);
    startdatecell.setValue(specialInterest.getStartDateTime() != null ? specialInterest.getStartDateTime().toString():"");
    startdatecell.setReadOnly(true);

    DynamicGridCell enddate = row.getCells().newCell(getColumn(COLUMN_ENDDATE), DynamicCellType.STRING);
    enddate.setValue(specialInterest.getCompletedDateTime() != null ? specialInterest.getCompletedDateTime().toString():"");
    enddate.setReadOnly(true);

}
项目:openMAXIMS    文件:Logic.java   
private void updateRowToSpecialInterestDyngrd(SpecialInterestDetailsVo specialInterest)
{
    DynamicGridRow row = form.dyngrdSpecialInterest().getSelectedRow();
    row.setValue(specialInterest);

    //row.setReadOnly(true);

    DynamicGridCell SpecialIntCategory = row.getCells().newCell(getColumn(COLUMN_SPECIALINTERESTCATEGORY), DynamicCellType.STRING); 
    SpecialIntCategory.setValue(specialInterest.getSpecialInterestCategoryIsNotNull() ?specialInterest.getSpecialInterestCategory().getIItemText():null);
    SpecialIntCategory.setReadOnly(true);

    DynamicGridCell startdatecell = row.getCells().newCell(getColumn(COLUMN_STARTDATE), DynamicCellType.STRING);
    startdatecell.setValue(specialInterest.getStartDateTime() != null ? specialInterest.getStartDateTime().toString():"");
    startdatecell.setReadOnly(true);

    DynamicGridCell enddate = row.getCells().newCell(getColumn(COLUMN_ENDDATE), DynamicCellType.STRING);
    enddate.setValue(specialInterest.getCompletedDateTime() != null ? specialInterest.getCompletedDateTime().toString():"");
    enddate.setReadOnly(true);
}
项目:openMAXIMS    文件:Logic.java   
private boolean save()
{
    SpecialInterestDetailsVo specialInterestToSave = populateInstanceDataFromScreen(form.getLocalContext().getSelectedSpecialInterest());

    String[] errors = getUIErrors();

    if(errors != null && errors.length > 0)
    {
        engine.showErrors(errors);          
        return false;
    }

    form.getLocalContext().setSelectedSpecialInterest(specialInterestToSave);

    return true;
}
项目:openMAXIMS    文件:Logic.java   
protected void onBtnOkClick() throws ims.framework.exceptions.PresentationLogicException
{
    if( form.dtimStartDate().getValue() == null)
    {
        engine.showErrors(new String[]{"Start Date is mandatory."});    
        return;
    }
    if( form.dtimStartDate().getValue() != null && form.dtimEndDate().getValue() != null)
    {

        if( form.dtimStartDate().getValue().getDate().isGreaterThan(form.dtimEndDate().getValue().getDate()) || (form.dtimStartDate().getValue().getDate().isLessOrEqualThan(form.dtimEndDate().getValue().getDate()) && form.dtimStartDate().getValue().getTime().isGreaterThan(form.dtimEndDate().getValue().getTime())))
        {
            engine.showErrors(new String[]{"Start Date cannot be greater than End Date."});
            return;
        }
    }
    SpecialInterestDetailsVo tempVo = form.getGlobalContext().Emergency.getSpecialInterestDetails();
    tempVo.setCompletedDateTime(form.dtimEndDate().getValue());
    tempVo.setStartDateTime(form.dtimStartDate().getValue());
    tempVo.setSpecialInterestCategory(form.cmbSpecialInterestCategory().getValue());
    form.getGlobalContext().Emergency.setSpecialInterestDetails(tempVo);
    engine.close(DialogResult.OK);

}
项目:openMAXIMS    文件:Logic.java   
private String createSpecialInterestTooltip(SpecialInterestDetailsVoCollection collSpecialInterestDetails)
{
    if (collSpecialInterestDetails == null || (collSpecialInterestDetails != null && collSpecialInterestDetails.size() == 0))
        return null;

    StringBuffer tooltip = new StringBuffer();

    /*
     * tooltip.append("<table border=1>"); tooltip.append("<tr><td><b>Category  &nbsp &nbsp</b></td><td><b>Start Date &nbsp &nbsp </b></td><td><b>End Date &nbsp &nbsp </b></td></tr>"); for (int i=0;i<collSpecialInterestDetails.size();i++) { tooltip.append("<tr>"); SpecialInterestDetailsVo specInterest = collSpecialInterestDetails.get(i); tooltip.append("<td><b>"+specInterest.getSpecialInterestCategory().toString()+ "</b></td><td><b>"+specInterest.getStartDateTime().toString() +"</b></td><td><b>" + specInterest.getCompletedDateTime().toString()+"</b></td></tr>"); } tooltip.append("</table>");
     */
    // tooltip.append("<table style=\"border :1px solid black; border-collapse:collapse;\">");
    tooltip.append("<table style=\"border :1px solid black; border-collapse:collapse;\">");
    tooltip.append("<tr><td style=\" border:1px solid black;\"><b>Category  &nbsp &nbsp</b></td><td style=\" border:1px solid black;\"><b>Start Date &nbsp &nbsp </b></td><td style=\" border:1px solid black;\"><b>End Date &nbsp &nbsp </b></td></tr>");
    for (int i = 0; i < collSpecialInterestDetails.size(); i++)
    {
        tooltip.append("<tr>");
        SpecialInterestDetailsVo specInterest = collSpecialInterestDetails.get(i);
        tooltip.append("<td style=\" border:1px solid black;\"><b>" +( specInterest!=null && specInterest.getSpecialInterestCategory()!=null ? specInterest.getSpecialInterestCategory():"") 
                        + "</b></td><td style=\" border:1px solid black;\"><b>" +(specInterest!=null && specInterest.getStartDateTime()!=null ? specInterest.getStartDateTime():"" )
                        + "</b></td><td style=\" border:1px solid black;\"><b>" +(specInterest!=null && specInterest.getCompletedDateTime()!=null ? specInterest.getCompletedDateTime():"") + "</b></td></tr>");
    }
    tooltip.append("</table>");

    return tooltip.toString();
}
项目:openMAXIMS    文件:Logic.java   
private void populateScreenFormData(SpecialInterestDetailsVoCollection collSpecialInterestDetails)
{
    clearScreen();
    if (collSpecialInterestDetails==null || (collSpecialInterestDetails!=null && collSpecialInterestDetails.size()==0))
        return;

    for (int i = 0; i < collSpecialInterestDetails.size(); i++)
    {
         SpecialInterestDetailsVo specialInterest = collSpecialInterestDetails.get(i);
         addRowToSpecialInterestDyngrd(specialInterest);

    }

    populateInstanceControlsFromData(form.getLocalContext().getSelectedSpecialInterest());

}
项目:openMAXIMS    文件:Logic.java   
private void addRowToSpecialInterestDyngrd(SpecialInterestDetailsVo specialInterest)
{
    if( specialInterest == null)
        return;

    DynamicGridRow row = form.dyngrdSpecialInterest().getRows().newRow();
    row.setValue(specialInterest);

    //row.setReadOnly(true);

    DynamicGridCell SpecialIntCategory = row.getCells().newCell(getColumn(COLUMN_SPECIALINTERESTCATEGORY), DynamicCellType.STRING); 
    SpecialIntCategory.setValue(specialInterest.getSpecialInterestCategoryIsNotNull() ?specialInterest.getSpecialInterestCategory().getIItemText():null);
    SpecialIntCategory.setReadOnly(true);

    DynamicGridCell startdatecell = row.getCells().newCell(getColumn(COLUMN_STARTDATE), DynamicCellType.STRING);
    startdatecell.setValue(specialInterest.getStartDateTime() != null ? specialInterest.getStartDateTime().toString():"");
    startdatecell.setReadOnly(true);

    DynamicGridCell enddate = row.getCells().newCell(getColumn(COLUMN_ENDDATE), DynamicCellType.STRING);
    enddate.setValue(specialInterest.getCompletedDateTime() != null ? specialInterest.getCompletedDateTime().toString():"");
    enddate.setReadOnly(true);

}
项目:openMAXIMS    文件:Logic.java   
private void updateRowToSpecialInterestDyngrd(SpecialInterestDetailsVo specialInterest)
{
    DynamicGridRow row = form.dyngrdSpecialInterest().getSelectedRow();
    row.setValue(specialInterest);

    //row.setReadOnly(true);

    DynamicGridCell SpecialIntCategory = row.getCells().newCell(getColumn(COLUMN_SPECIALINTERESTCATEGORY), DynamicCellType.STRING); 
    SpecialIntCategory.setValue(specialInterest.getSpecialInterestCategoryIsNotNull() ?specialInterest.getSpecialInterestCategory().getIItemText():null);
    SpecialIntCategory.setReadOnly(true);

    DynamicGridCell startdatecell = row.getCells().newCell(getColumn(COLUMN_STARTDATE), DynamicCellType.STRING);
    startdatecell.setValue(specialInterest.getStartDateTime() != null ? specialInterest.getStartDateTime().toString():"");
    startdatecell.setReadOnly(true);

    DynamicGridCell enddate = row.getCells().newCell(getColumn(COLUMN_ENDDATE), DynamicCellType.STRING);
    enddate.setValue(specialInterest.getCompletedDateTime() != null ? specialInterest.getCompletedDateTime().toString():"");
    enddate.setReadOnly(true);
}
项目:openMAXIMS    文件:Logic.java   
private boolean save()
{
    SpecialInterestDetailsVo specialInterestToSave = populateInstanceDataFromScreen(form.getLocalContext().getSelectedSpecialInterest());

    String[] errors = getUIErrors();

    if(errors != null && errors.length > 0)
    {
        engine.showErrors(errors);          
        return false;
    }

    form.getLocalContext().setSelectedSpecialInterest(specialInterestToSave);

    return true;
}
项目:openMAXIMS    文件:Logic.java   
protected void onBtnOkClick() throws ims.framework.exceptions.PresentationLogicException
{
    if( form.dtimStartDate().getValue() == null)
    {
        engine.showErrors(new String[]{"Start Date is mandatory."});    
        return;
    }
    if( form.dtimStartDate().getValue() != null && form.dtimEndDate().getValue() != null)
    {

        if( form.dtimStartDate().getValue().getDate().isGreaterThan(form.dtimEndDate().getValue().getDate()) || (form.dtimStartDate().getValue().getDate().isLessOrEqualThan(form.dtimEndDate().getValue().getDate()) && form.dtimStartDate().getValue().getTime().isGreaterThan(form.dtimEndDate().getValue().getTime())))
        {
            engine.showErrors(new String[]{"Start Date cannot be greater than End Date."});
            return;
        }
    }
    SpecialInterestDetailsVo tempVo = form.getGlobalContext().Emergency.getSpecialInterestDetails();
    tempVo.setCompletedDateTime(form.dtimEndDate().getValue());
    tempVo.setStartDateTime(form.dtimStartDate().getValue());
    tempVo.setSpecialInterestCategory(form.cmbSpecialInterestCategory().getValue());
    form.getGlobalContext().Emergency.setSpecialInterestDetails(tempVo);
    engine.close(DialogResult.OK);

}
项目:openmaxims-linux    文件:Logic.java   
private String createSpecialInterestTooltip(SpecialInterestDetailsVoCollection collSpecialInterestDetails)
{
    if (collSpecialInterestDetails == null || (collSpecialInterestDetails != null && collSpecialInterestDetails.size() == 0))
        return null;

    StringBuffer tooltip = new StringBuffer();

    /*
     * tooltip.append("<table border=1>"); tooltip.append("<tr><td><b>Category  &nbsp &nbsp</b></td><td><b>Start Date &nbsp &nbsp </b></td><td><b>End Date &nbsp &nbsp </b></td></tr>"); for (int i=0;i<collSpecialInterestDetails.size();i++) { tooltip.append("<tr>"); SpecialInterestDetailsVo specInterest = collSpecialInterestDetails.get(i); tooltip.append("<td><b>"+specInterest.getSpecialInterestCategory().toString()+ "</b></td><td><b>"+specInterest.getStartDateTime().toString() +"</b></td><td><b>" + specInterest.getCompletedDateTime().toString()+"</b></td></tr>"); } tooltip.append("</table>");
     */
    // tooltip.append("<table style=\"border :1px solid black; border-collapse:collapse;\">");
    tooltip.append("<table style=\"border :1px solid black; border-collapse:collapse;\">");
    tooltip.append("<tr><td style=\" border:1px solid black;\"><b>Category  &nbsp &nbsp</b></td><td style=\" border:1px solid black;\"><b>Start Date &nbsp &nbsp </b></td><td style=\" border:1px solid black;\"><b>End Date &nbsp &nbsp </b></td></tr>");
    for (int i = 0; i < collSpecialInterestDetails.size(); i++)
    {
        tooltip.append("<tr>");
        SpecialInterestDetailsVo specInterest = collSpecialInterestDetails.get(i);
        tooltip.append("<td style=\" border:1px solid black;\"><b>" +( specInterest!=null && specInterest.getSpecialInterestCategory()!=null ? specInterest.getSpecialInterestCategory():"") 
                        + "</b></td><td style=\" border:1px solid black;\"><b>" +(specInterest!=null && specInterest.getStartDateTime()!=null ? specInterest.getStartDateTime():"" )
                        + "</b></td><td style=\" border:1px solid black;\"><b>" +(specInterest!=null && specInterest.getCompletedDateTime()!=null ? specInterest.getCompletedDateTime():"") + "</b></td></tr>");
    }
    tooltip.append("</table>");

    return tooltip.toString();
}
项目:openmaxims-linux    文件:Logic.java   
private void populateScreenFormData(SpecialInterestDetailsVoCollection collSpecialInterestDetails)
{
    clearScreen();
    if (collSpecialInterestDetails==null || (collSpecialInterestDetails!=null && collSpecialInterestDetails.size()==0))
        return;

    for (int i = 0; i < collSpecialInterestDetails.size(); i++)
    {
         SpecialInterestDetailsVo specialInterest = collSpecialInterestDetails.get(i);
         addRowToSpecialInterestDyngrd(specialInterest);

    }

    populateInstanceControlsFromData(form.getLocalContext().getSelectedSpecialInterest());

}
项目:openmaxims-linux    文件:Logic.java   
private void addRowToSpecialInterestDyngrd(SpecialInterestDetailsVo specialInterest)
{
    if( specialInterest == null)
        return;

    DynamicGridRow row = form.dyngrdSpecialInterest().getRows().newRow();
    row.setValue(specialInterest);

    //row.setReadOnly(true);

    DynamicGridCell SpecialIntCategory = row.getCells().newCell(getColumn(COLUMN_SPECIALINTERESTCATEGORY), DynamicCellType.STRING); 
    SpecialIntCategory.setValue(specialInterest.getSpecialInterestCategoryIsNotNull() ?specialInterest.getSpecialInterestCategory().getIItemText():null);
    SpecialIntCategory.setReadOnly(true);

    DynamicGridCell startdatecell = row.getCells().newCell(getColumn(COLUMN_STARTDATE), DynamicCellType.STRING);
    startdatecell.setValue(specialInterest.getStartDateTime() != null ? specialInterest.getStartDateTime().toString():"");
    startdatecell.setReadOnly(true);

    DynamicGridCell enddate = row.getCells().newCell(getColumn(COLUMN_ENDDATE), DynamicCellType.STRING);
    enddate.setValue(specialInterest.getCompletedDateTime() != null ? specialInterest.getCompletedDateTime().toString():"");
    enddate.setReadOnly(true);

}
项目:openmaxims-linux    文件:Logic.java   
private void updateRowToSpecialInterestDyngrd(SpecialInterestDetailsVo specialInterest)
{
    DynamicGridRow row = form.dyngrdSpecialInterest().getSelectedRow();
    row.setValue(specialInterest);

    //row.setReadOnly(true);

    DynamicGridCell SpecialIntCategory = row.getCells().newCell(getColumn(COLUMN_SPECIALINTERESTCATEGORY), DynamicCellType.STRING); 
    SpecialIntCategory.setValue(specialInterest.getSpecialInterestCategoryIsNotNull() ?specialInterest.getSpecialInterestCategory().getIItemText():null);
    SpecialIntCategory.setReadOnly(true);

    DynamicGridCell startdatecell = row.getCells().newCell(getColumn(COLUMN_STARTDATE), DynamicCellType.STRING);
    startdatecell.setValue(specialInterest.getStartDateTime() != null ? specialInterest.getStartDateTime().toString():"");
    startdatecell.setReadOnly(true);

    DynamicGridCell enddate = row.getCells().newCell(getColumn(COLUMN_ENDDATE), DynamicCellType.STRING);
    enddate.setValue(specialInterest.getCompletedDateTime() != null ? specialInterest.getCompletedDateTime().toString():"");
    enddate.setReadOnly(true);
}
项目:openmaxims-linux    文件:Logic.java   
private boolean save()
{
    SpecialInterestDetailsVo specialInterestToSave = populateInstanceDataFromScreen(form.getLocalContext().getSelectedSpecialInterest());

    String[] errors = getUIErrors();

    if(errors != null && errors.length > 0)
    {
        engine.showErrors(errors);          
        return false;
    }

    form.getLocalContext().setSelectedSpecialInterest(specialInterestToSave);

    return true;
}
项目:openmaxims-linux    文件:Logic.java   
protected void onBtnOkClick() throws ims.framework.exceptions.PresentationLogicException
{
    if( form.dtimStartDate().getValue() == null)
    {
        engine.showErrors(new String[]{"Start Date is mandatory."});    
        return;
    }
    if( form.dtimStartDate().getValue() != null && form.dtimEndDate().getValue() != null)
    {

        if( form.dtimStartDate().getValue().getDate().isGreaterThan(form.dtimEndDate().getValue().getDate()) || (form.dtimStartDate().getValue().getDate().isLessOrEqualThan(form.dtimEndDate().getValue().getDate()) && form.dtimStartDate().getValue().getTime().isGreaterThan(form.dtimEndDate().getValue().getTime())))
        {
            engine.showErrors(new String[]{"Start Date cannot be greater than End Date."});
            return;
        }
    }
    SpecialInterestDetailsVo tempVo = form.getGlobalContext().Emergency.getSpecialInterestDetails();
    tempVo.setCompletedDateTime(form.dtimEndDate().getValue());
    tempVo.setStartDateTime(form.dtimStartDate().getValue());
    tempVo.setSpecialInterestCategory(form.cmbSpecialInterestCategory().getValue());
    form.getGlobalContext().Emergency.setSpecialInterestDetails(tempVo);
    engine.close(DialogResult.OK);

}
项目:AvoinApotti    文件:Logic.java   
private void populateInstanceControlsFromData(SpecialInterestDetailsVo selectedSpecialInterest)
{
    clearDetails();

    if (selectedSpecialInterest==null)
        return;

    form.ctnDetails().dtimStartDate().setValue(selectedSpecialInterest.getStartDateTime());
    form.ctnDetails().dtimEndDate().setValue(selectedSpecialInterest.getCompletedDateTime());
    form.ctnDetails().cmbSpecialInterestCategory().setValue(selectedSpecialInterest.getSpecialInterestCategory());

    form.dyngrdSpecialInterest().setValue(selectedSpecialInterest);

}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onBtnCloseClick() throws ims.framework.exceptions.PresentationLogicException
{   
    SpecialInterestDetailsVoCollection collSpecialInterest = new SpecialInterestDetailsVoCollection();

    for (int i=0;i<form.dyngrdSpecialInterest().getRows().size();i++)
    {
        collSpecialInterest.add((SpecialInterestDetailsVo) form.dyngrdSpecialInterest().getRows().get(i).getValue());
    }

    form.getGlobalContext().Emergency.setCollSpecialInterestDetails(collSpecialInterest);
    engine.close(DialogResult.OK);
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onDyngrdSpecialInterestRowSelectionChanged(ims.framework.controls.DynamicGridRow row)
{
    form.getLocalContext().setSelectedSpecialInterest((SpecialInterestDetailsVo)form.dyngrdSpecialInterest().getValue());
    populateInstanceControlsFromData(form.getLocalContext().getSelectedSpecialInterest());
    updateControlState();
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onBtnCancelClick() throws PresentationLogicException
{
    form.setMode(FormMode.VIEW);
    form.getLocalContext().setSelectedSpecialInterest((SpecialInterestDetailsVo)form.dyngrdSpecialInterest().getValue());
    populateInstanceControlsFromData(form.getLocalContext().getSelectedSpecialInterest());
}
项目:openMAXIMS    文件:Logic.java   
private void populateInstanceControlsFromData(SpecialInterestDetailsVo selectedSpecialInterest)
{
    clearDetails();

    if (selectedSpecialInterest==null)
        return;

    form.ctnDetails().dtimStartDate().setValue(selectedSpecialInterest.getStartDateTime());
    form.ctnDetails().dtimEndDate().setValue(selectedSpecialInterest.getCompletedDateTime());
    form.ctnDetails().cmbSpecialInterestCategory().setValue(selectedSpecialInterest.getSpecialInterestCategory());

    form.dyngrdSpecialInterest().setValue(selectedSpecialInterest);

}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onBtnCloseClick() throws ims.framework.exceptions.PresentationLogicException
{   
    SpecialInterestDetailsVoCollection collSpecialInterest = new SpecialInterestDetailsVoCollection();

    for (int i=0;i<form.dyngrdSpecialInterest().getRows().size();i++)
    {
        collSpecialInterest.add((SpecialInterestDetailsVo) form.dyngrdSpecialInterest().getRows().get(i).getValue());
    }

    form.getGlobalContext().Emergency.setCollSpecialInterestDetails(collSpecialInterest);
    engine.close(DialogResult.OK);
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onDyngrdSpecialInterestRowSelectionChanged(ims.framework.controls.DynamicGridRow row)
{
    form.getLocalContext().setSelectedSpecialInterest((SpecialInterestDetailsVo)form.dyngrdSpecialInterest().getValue());
    populateInstanceControlsFromData(form.getLocalContext().getSelectedSpecialInterest());
    updateControlState();
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onBtnCancelClick() throws PresentationLogicException
{
    form.setMode(FormMode.VIEW);
    form.getLocalContext().setSelectedSpecialInterest((SpecialInterestDetailsVo)form.dyngrdSpecialInterest().getValue());
    populateInstanceControlsFromData(form.getLocalContext().getSelectedSpecialInterest());
}
项目:openMAXIMS    文件:Logic.java   
private void populateInstanceControlsFromData(SpecialInterestDetailsVo selectedSpecialInterest)
{
    clearDetails();

    if (selectedSpecialInterest==null)
        return;

    form.ctnDetails().dtimStartDate().setValue(selectedSpecialInterest.getStartDateTime());
    form.ctnDetails().dtimEndDate().setValue(selectedSpecialInterest.getCompletedDateTime());
    form.ctnDetails().cmbSpecialInterestCategory().setValue(selectedSpecialInterest.getSpecialInterestCategory());

    form.dyngrdSpecialInterest().setValue(selectedSpecialInterest);

}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onBtnCloseClick() throws ims.framework.exceptions.PresentationLogicException
{   
    SpecialInterestDetailsVoCollection collSpecialInterest = new SpecialInterestDetailsVoCollection();

    for (int i=0;i<form.dyngrdSpecialInterest().getRows().size();i++)
    {
        collSpecialInterest.add((SpecialInterestDetailsVo) form.dyngrdSpecialInterest().getRows().get(i).getValue());
    }

    form.getGlobalContext().Emergency.setCollSpecialInterestDetails(collSpecialInterest);
    engine.close(DialogResult.OK);
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onDyngrdSpecialInterestRowSelectionChanged(ims.framework.controls.DynamicGridRow row)
{
    form.getLocalContext().setSelectedSpecialInterest((SpecialInterestDetailsVo)form.dyngrdSpecialInterest().getValue());
    populateInstanceControlsFromData(form.getLocalContext().getSelectedSpecialInterest());
    updateControlState();
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onBtnCancelClick() throws PresentationLogicException
{
    form.setMode(FormMode.VIEW);
    form.getLocalContext().setSelectedSpecialInterest((SpecialInterestDetailsVo)form.dyngrdSpecialInterest().getValue());
    populateInstanceControlsFromData(form.getLocalContext().getSelectedSpecialInterest());
}
项目:openmaxims-linux    文件:Logic.java   
private void populateInstanceControlsFromData(SpecialInterestDetailsVo selectedSpecialInterest)
{
    clearDetails();

    if (selectedSpecialInterest==null)
        return;

    form.ctnDetails().dtimStartDate().setValue(selectedSpecialInterest.getStartDateTime());
    form.ctnDetails().dtimEndDate().setValue(selectedSpecialInterest.getCompletedDateTime());
    form.ctnDetails().cmbSpecialInterestCategory().setValue(selectedSpecialInterest.getSpecialInterestCategory());

    form.dyngrdSpecialInterest().setValue(selectedSpecialInterest);

}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onBtnCloseClick() throws ims.framework.exceptions.PresentationLogicException
{   
    SpecialInterestDetailsVoCollection collSpecialInterest = new SpecialInterestDetailsVoCollection();

    for (int i=0;i<form.dyngrdSpecialInterest().getRows().size();i++)
    {
        collSpecialInterest.add((SpecialInterestDetailsVo) form.dyngrdSpecialInterest().getRows().get(i).getValue());
    }

    form.getGlobalContext().Emergency.setCollSpecialInterestDetails(collSpecialInterest);
    engine.close(DialogResult.OK);
}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onDyngrdSpecialInterestRowSelectionChanged(ims.framework.controls.DynamicGridRow row)
{
    form.getLocalContext().setSelectedSpecialInterest((SpecialInterestDetailsVo)form.dyngrdSpecialInterest().getValue());
    populateInstanceControlsFromData(form.getLocalContext().getSelectedSpecialInterest());
    updateControlState();
}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onBtnCancelClick() throws PresentationLogicException
{
    form.setMode(FormMode.VIEW);
    form.getLocalContext().setSelectedSpecialInterest((SpecialInterestDetailsVo)form.dyngrdSpecialInterest().getValue());
    populateInstanceControlsFromData(form.getLocalContext().getSelectedSpecialInterest());
}