Java 类ims.admin.vo.ReportVo 实例源码

项目:AvoinApotti    文件:Logic.java   
@Override
protected void onFormOpen(Object[] args) throws PresentationLogicException
{
    if(args == null || args.length == 0)
        throw new PresentationLogicException("No template was assigned to this form !");

    TemplateBoRefVo templateRef = (TemplateBoRefVo) args[0];

    //templateRef.setID_TemplateBo(new Integer(2));

    ReportVo report = domain.getReport(templateRef);
    form.getLocalContext().setTemplateRef(templateRef);         //wdev-16393
    if(report == null)
    {
        form.htmReport().setHTML("<br><br><br><br><center><b>I could not get report for template id = " + templateRef.getID_TemplateBo() + "</b></center>");
        return;
    }

    form.getLocalContext().setCurrentReport(report);
    //form.getLocalContext().setTemplateRef(templateRef);

    createSeedColumns();
    populateDynamicGrid(report.getReportXml());
    populateSeedsFromContext();
}
项目:AvoinApotti    文件:Logic.java   
protected void onBtnBuildClick() throws ims.framework.exceptions.PresentationLogicException
{
    TreeNode node = form.treTemplate().getSelectedNode();

    if (node == null || node.getParent() == null)
    {
        engine.showMessage("Please select at template !");
        return;
    }

    form.getGlobalContext().Core.setCurrentFormName(engine.getPreviousNonDialogFormName());

    form.getGlobalContext().Core.setReportID(((ReportVo) node.getParent().getValue()).getID_ReportBo());
    form.getGlobalContext().Core.setTemplateID(((ReportTemplateVo) node.getValue()).getID_TemplateBo());

    if (form.getGlobalContext().Core.getAutoOpenViewReportIsNotNull() && form.getGlobalContext().Core.getAutoOpenViewReport().equals(Boolean.TRUE))
        engine.open(form.getForms().Core.ViewReport);

    engine.close(DialogResult.OK);
}
项目:AvoinApotti    文件:Logic.java   
private grdReportsToPrintRow getParentRowById(ReportVo report)
{
    if (report == null)
        return null;

    for (int i = 0; i < form.grdReportsToPrint().getRows().size(); i++)
    {
        ReportVo rep = (ReportVo) form.grdReportsToPrint().getRows().get(i).getValue();

        if (form.grdReportsToPrint().getRows().get(i).getValue() instanceof ReportVo)
        {
            if (rep.getID_ReportBo().equals(report.getID_ReportBo()))
                return form.grdReportsToPrint().getRows().get(i);
        }
    }

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private ReportVo getJobReport(Integer id) 
{
    if(form.getLocalContext().getReportsAvailableIsNotNull())
    {
        for(int i=0; i<form.getLocalContext().getReportsAvailable().size(); i++)
        {
            ReportVo currentReport = form.getLocalContext().getReportsAvailable().get(i);

            if(id.equals(currentReport.getImsId()))
            {
                return currentReport;
            }
        }
    }

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private ReportVoCollection getValidReps(Integer formId) 
{   
    ReportVoCollection coll = new ReportVoCollection();
    ReportVoCollection fullColl = form.getLocalContext().getRepColl();

    if(fullColl != null)
    {
        for (int i = 0; i < fullColl.size(); i++)
        {
            ReportVo repVo = fullColl.get(i);
            IReportSeed[] iSeeds = getIseeds(repVo);

            if (engine.canFormProvideData(getFormNameFromId(formId.intValue()), iSeeds))
            {
                coll.add(repVo);
            }
        }
    }

    return coll;
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onBtnAssignAllClick() throws PresentationLogicException
{
    for(int i = 0; i < form.grdAvailableReports().getRows().size(); i++)
    {
        ReportVo value = form.grdAvailableReports().getRows().get(i).getValue();

        if(!hasValue(value))
        {
            grdReportListRow row = form.grdReportList().getRows().newRow();

            row.setReportName(value.getReportName());
            row.setValue(value);
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onBtnAssignClick() throws PresentationLogicException
{
    ReportVo value = form.grdAvailableReports().getValue();

    if(value == null)
    {
        engine.showMessage("Please select a report to assign !");
        return;
    }

    if(!hasValue(value))
    {
        grdReportListRow row = form.grdReportList().getRows().newRow();

        row.setReportName(value.getReportName());
        row.setValue(value);
    }
    else
    {
        engine.showMessage("The selected report is already assigned to '" + form.qmbFormName().getEditedText() + "' form !");
        return;

    }
}
项目:AvoinApotti    文件:WebServicesIntegrationImpl.java   
private ReportVo getReportByImsId(String imsId)
{
    StringBuffer hql = new StringBuffer();

    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Integer> values = new ArrayList<Integer>();

    hql.append("from ReportBo as report where report.ImsId =:imsId");
    markers.add("imsId");
    values.add(new Integer(imsId).intValue());

    DomainFactory factory = getDomainFactory();
    List list = factory.find(hql.toString(), markers, values);
    ReportVoCollection result = ReportVoAssembler.createReportVoCollectionFromReportBo(list);               

    return result != null ? result.get(0) : null;       
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onFormOpen(Object[] args) throws PresentationLogicException
{
    if(args == null || args.length == 0)
        throw new PresentationLogicException("This form should not be added to navigation as a standalone form. The report that needs to be displayed should be added to navigation.");

    TemplateBoRefVo templateRef = (TemplateBoRefVo) args[0];

    //templateRef.setID_TemplateBo(new Integer(2));

    ReportVo report = domain.getReport(templateRef);
    form.getLocalContext().setTemplateRef(templateRef);         //wdev-16393
    if(report == null)
    {
        form.htmReport().setHTML("<br><br><br><br><center><b>I couldn't get report for template with id " + templateRef.getID_TemplateBo() + "</b></center>");
        return;
    }

    form.getLocalContext().setCurrentReport(report);
    //form.getLocalContext().setTemplateRef(templateRef);

    createSeedColumns();
    populateDynamicGrid(report.getReportXml());
    populateSeedsFromContext();
}
项目:openMAXIMS    文件:Logic.java   
protected void onBtnBuildClick() throws ims.framework.exceptions.PresentationLogicException
{
    TreeNode node = form.treTemplate().getSelectedNode();

    if (node == null || node.getParent() == null)
    {
        engine.showMessage("Please select at template !");
        return;
    }

    form.getGlobalContext().Core.setCurrentFormName(engine.getPreviousNonDialogFormName());

    form.getGlobalContext().Core.setReportID(((ReportVo) node.getParent().getValue()).getID_ReportBo());
    form.getGlobalContext().Core.setTemplateID(((ReportTemplateVo) node.getValue()).getID_TemplateBo());

    if (form.getGlobalContext().Core.getAutoOpenViewReportIsNotNull() && form.getGlobalContext().Core.getAutoOpenViewReport().equals(Boolean.TRUE))
        engine.open(form.getForms().Core.ViewReport);

    engine.close(DialogResult.OK);
}
项目:openMAXIMS    文件:Logic.java   
private grdReportsToPrintRow getParentRowById(ReportVo report)
{
    if (report == null)
        return null;

    for (int i = 0; i < form.grdReportsToPrint().getRows().size(); i++)
    {
        ReportVo rep = (ReportVo) form.grdReportsToPrint().getRows().get(i).getValue();

        if (form.grdReportsToPrint().getRows().get(i).getValue() instanceof ReportVo)
        {
            if (rep.getID_ReportBo().equals(report.getID_ReportBo()))
                return form.grdReportsToPrint().getRows().get(i);
        }
    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private ReportVo getJobReport(Integer id) 
{
    if(form.getLocalContext().getReportsAvailableIsNotNull())
    {
        for(int i=0; i<form.getLocalContext().getReportsAvailable().size(); i++)
        {
            ReportVo currentReport = form.getLocalContext().getReportsAvailable().get(i);

            if(id.equals(currentReport.getImsId()))
            {
                return currentReport;
            }
        }
    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private ReportVoCollection getValidReps(Integer formId) 
{   
    ReportVoCollection coll = new ReportVoCollection();
    ReportVoCollection fullColl = form.getLocalContext().getRepColl();

    if(fullColl != null)
    {
        for (int i = 0; i < fullColl.size(); i++)
        {
            ReportVo repVo = fullColl.get(i);
            IReportSeed[] iSeeds = getIseeds(repVo);

            if (engine.canFormProvideData(getFormNameFromId(formId.intValue()), iSeeds))
            {
                coll.add(repVo);
            }
        }
    }

    return coll;
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onBtnAssignAllClick() throws PresentationLogicException
{
    for(int i = 0; i < form.grdAvailableReports().getRows().size(); i++)
    {
        ReportVo value = form.grdAvailableReports().getRows().get(i).getValue();

        if(!hasValue(value))
        {
            grdReportListRow row = form.grdReportList().getRows().newRow();

            row.setReportName(value.getReportName());
            row.setValue(value);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onBtnAssignClick() throws PresentationLogicException
{
    ReportVo value = form.grdAvailableReports().getValue();

    if(value == null)
    {
        engine.showMessage("Please select a report to assign !");
        return;
    }

    if(!hasValue(value))
    {
        grdReportListRow row = form.grdReportList().getRows().newRow();

        row.setReportName(value.getReportName());
        row.setValue(value);
    }
    else
    {
        engine.showMessage("The selected report is already assigned to '" + form.qmbFormName().getEditedText() + "' form !");
        return;

    }
}
项目:openMAXIMS    文件:WebServicesIntegrationImpl.java   
private ReportVo getReportByImsId(String imsId)
{
    StringBuffer hql = new StringBuffer();

    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Integer> values = new ArrayList<Integer>();

    hql.append("from ReportBo as report where report.ImsId =:imsId");
    markers.add("imsId");
    values.add(new Integer(imsId).intValue());

    DomainFactory factory = getDomainFactory();
    List list = factory.find(hql.toString(), markers, values);
    ReportVoCollection result = ReportVoAssembler.createReportVoCollectionFromReportBo(list);               

    return result != null ? result.get(0) : null;       
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onFormOpen(Object[] args) throws PresentationLogicException
{
    if(args == null || args.length == 0)
        throw new PresentationLogicException("No template was assigned to this form !");

    TemplateBoRefVo templateRef = (TemplateBoRefVo) args[0];

    //templateRef.setID_TemplateBo(new Integer(2));

    ReportVo report = domain.getReport(templateRef);
    form.getLocalContext().setTemplateRef(templateRef);         //wdev-16393
    if(report == null)
    {
        form.htmReport().setHTML("<br><br><br><br><center><b>I could not get report for template id = " + templateRef.getID_TemplateBo() + "</b></center>");
        return;
    }

    form.getLocalContext().setCurrentReport(report);
    //form.getLocalContext().setTemplateRef(templateRef);

    createSeedColumns();
    populateDynamicGrid(report.getReportXml());
    populateSeedsFromContext();
}
项目:openMAXIMS    文件:Logic.java   
protected void onBtnBuildClick() throws ims.framework.exceptions.PresentationLogicException
{
    TreeNode node = form.treTemplate().getSelectedNode();

    if (node == null || node.getParent() == null)
    {
        engine.showMessage("Please select at template !");
        return;
    }

    form.getGlobalContext().Core.setCurrentFormName(engine.getPreviousNonDialogFormName());

    form.getGlobalContext().Core.setReportID(((ReportVo) node.getParent().getValue()).getID_ReportBo());
    form.getGlobalContext().Core.setTemplateID(((ReportTemplateVo) node.getValue()).getID_TemplateBo());

    if (form.getGlobalContext().Core.getAutoOpenViewReportIsNotNull() && form.getGlobalContext().Core.getAutoOpenViewReport().equals(Boolean.TRUE))
        engine.open(form.getForms().Core.ViewReport);

    engine.close(DialogResult.OK);
}
项目:openmaxims-linux    文件:WebServicesIntegrationImpl.java   
private ReportVo getReportByImsId(String imsId)
{
    StringBuffer hql = new StringBuffer();

    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Integer> values = new ArrayList<Integer>();

    hql.append("from ReportBo as report where report.ImsId =:imsId");
    markers.add("imsId");
    values.add(new Integer(imsId).intValue());

    DomainFactory factory = getDomainFactory();
    List list = factory.find(hql.toString(), markers, values);
    ReportVoCollection result = ReportVoAssembler.createReportVoCollectionFromReportBo(list);               

    return result != null ? result.get(0) : null;       
}
项目:openMAXIMS    文件:Logic.java   
private grdReportsToPrintRow getParentRowById(ReportVo report)
{
    if (report == null)
        return null;

    for (int i = 0; i < form.grdReportsToPrint().getRows().size(); i++)
    {
        ReportVo rep = (ReportVo) form.grdReportsToPrint().getRows().get(i).getValue();

        if (form.grdReportsToPrint().getRows().get(i).getValue() instanceof ReportVo)
        {
            if (rep.getID_ReportBo().equals(report.getID_ReportBo()))
                return form.grdReportsToPrint().getRows().get(i);
        }
    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private ReportVo getJobReport(Integer id) 
{
    if(form.getLocalContext().getReportsAvailableIsNotNull())
    {
        for(int i=0; i<form.getLocalContext().getReportsAvailable().size(); i++)
        {
            ReportVo currentReport = form.getLocalContext().getReportsAvailable().get(i);

            if(id.equals(currentReport.getImsId()))
            {
                return currentReport;
            }
        }
    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private ReportVoCollection getValidReps(Integer formId) 
{   
    ReportVoCollection coll = new ReportVoCollection();
    ReportVoCollection fullColl = form.getLocalContext().getRepColl();

    if(fullColl != null)
    {
        for (int i = 0; i < fullColl.size(); i++)
        {
            ReportVo repVo = fullColl.get(i);
            IReportSeed[] iSeeds = getIseeds(repVo);

            if (engine.canFormProvideData(getFormNameFromId(formId.intValue()), iSeeds))
            {
                coll.add(repVo);
            }
        }
    }

    return coll;
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onBtnAssignAllClick() throws PresentationLogicException
{
    for(int i = 0; i < form.grdAvailableReports().getRows().size(); i++)
    {
        ReportVo value = form.grdAvailableReports().getRows().get(i).getValue();

        if(!hasValue(value))
        {
            grdReportListRow row = form.grdReportList().getRows().newRow();

            row.setReportName(value.getReportName());
            row.setValue(value);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onBtnAssignClick() throws PresentationLogicException
{
    ReportVo value = form.grdAvailableReports().getValue();

    if(value == null)
    {
        engine.showMessage("Please select a report to assign !");
        return;
    }

    if(!hasValue(value))
    {
        grdReportListRow row = form.grdReportList().getRows().newRow();

        row.setReportName(value.getReportName());
        row.setValue(value);
    }
    else
    {
        engine.showMessage("The selected report is already assigned to '" + form.qmbFormName().getEditedText() + "' form !");
        return;

    }
}
项目:openMAXIMS    文件:WebServicesIntegrationImpl.java   
private ReportVo getReportByImsId(String imsId)
{
    StringBuffer hql = new StringBuffer();

    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Integer> values = new ArrayList<Integer>();

    hql.append("from ReportBo as report where report.ImsId =:imsId");
    markers.add("imsId");
    values.add(new Integer(imsId).intValue());

    DomainFactory factory = getDomainFactory();
    List list = factory.find(hql.toString(), markers, values);
    ReportVoCollection result = ReportVoAssembler.createReportVoCollectionFromReportBo(list);               

    return result != null ? result.get(0) : null;       
}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onFormOpen(Object[] args) throws PresentationLogicException
{
    if(args == null || args.length == 0)
        throw new PresentationLogicException("No template was assigned to this form !");

    TemplateBoRefVo templateRef = (TemplateBoRefVo) args[0];

    //templateRef.setID_TemplateBo(new Integer(2));

    ReportVo report = domain.getReport(templateRef);
    form.getLocalContext().setTemplateRef(templateRef);         //wdev-16393
    if(report == null)
    {
        form.htmReport().setHTML("<br><br><br><br><center><b>I could not get report for template id = " + templateRef.getID_TemplateBo() + "</b></center>");
        return;
    }

    form.getLocalContext().setCurrentReport(report);
    //form.getLocalContext().setTemplateRef(templateRef);

    createSeedColumns();
    populateDynamicGrid(report.getReportXml());
    populateSeedsFromContext();
}
项目:openmaxims-linux    文件:Logic.java   
protected void onBtnBuildClick() throws ims.framework.exceptions.PresentationLogicException
{
    TreeNode node = form.treTemplate().getSelectedNode();

    if (node == null || node.getParent() == null)
    {
        engine.showMessage("Please select at template !");
        return;
    }

    form.getGlobalContext().Core.setCurrentFormName(engine.getPreviousNonDialogFormName());

    form.getGlobalContext().Core.setReportID(((ReportVo) node.getParent().getValue()).getID_ReportBo());
    form.getGlobalContext().Core.setTemplateID(((ReportTemplateVo) node.getValue()).getID_TemplateBo());

    if (form.getGlobalContext().Core.getAutoOpenViewReportIsNotNull() && form.getGlobalContext().Core.getAutoOpenViewReport().equals(Boolean.TRUE))
        engine.open(form.getForms().Core.ViewReport);

    engine.close(DialogResult.OK);
}
项目:openmaxims-linux    文件:Logic.java   
private grdReportsToPrintRow getParentRowById(ReportVo report)
{
    if (report == null)
        return null;

    for (int i = 0; i < form.grdReportsToPrint().getRows().size(); i++)
    {
        ReportVo rep = (ReportVo) form.grdReportsToPrint().getRows().get(i).getValue();

        if (form.grdReportsToPrint().getRows().get(i).getValue() instanceof ReportVo)
        {
            if (rep.getID_ReportBo().equals(report.getID_ReportBo()))
                return form.grdReportsToPrint().getRows().get(i);
        }
    }

    return null;
}
项目:openmaxims-linux    文件:Logic.java   
private ReportVo getJobReport(Integer id) 
{
    if(form.getLocalContext().getReportsAvailableIsNotNull())
    {
        for(int i=0; i<form.getLocalContext().getReportsAvailable().size(); i++)
        {
            ReportVo currentReport = form.getLocalContext().getReportsAvailable().get(i);

            if(id.equals(currentReport.getImsId()))
            {
                return currentReport;
            }
        }
    }

    return null;
}
项目:openmaxims-linux    文件:Logic.java   
private ReportVoCollection getValidReps(Integer formId) 
{   
    ReportVoCollection coll = new ReportVoCollection();
    ReportVoCollection fullColl = form.getLocalContext().getRepColl();

    if(fullColl != null)
    {
        for (int i = 0; i < fullColl.size(); i++)
        {
            ReportVo repVo = fullColl.get(i);
            IReportSeed[] iSeeds = getIseeds(repVo);

            if (engine.canFormProvideData(getFormNameFromId(formId.intValue()), iSeeds))
            {
                coll.add(repVo);
            }
        }
    }

    return coll;
}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onBtnAssignAllClick() throws PresentationLogicException
{
    for(int i = 0; i < form.grdAvailableReports().getRows().size(); i++)
    {
        ReportVo value = form.grdAvailableReports().getRows().get(i).getValue();

        if(!hasValue(value))
        {
            grdReportListRow row = form.grdReportList().getRows().newRow();

            row.setReportName(value.getReportName());
            row.setValue(value);
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onBtnAssignClick() throws PresentationLogicException
{
    ReportVo value = form.grdAvailableReports().getValue();

    if(value == null)
    {
        engine.showMessage("Please select a report to assign !");
        return;
    }

    if(!hasValue(value))
    {
        grdReportListRow row = form.grdReportList().getRows().newRow();

        row.setReportName(value.getReportName());
        row.setValue(value);
    }
    else
    {
        engine.showMessage("The selected report is already assigned to '" + form.qmbFormName().getEditedText() + "' form !");
        return;

    }
}
项目:AvoinApotti    文件:Logic.java   
private boolean canBeSeeded(ReportVo report)
{
    //reports without seeds can always be printed
    if(!report.getSeedsIsNotNull())
        return true;

    if(report.getSeeds().size() == 0)
        return true;

    ReportSeedVo voReportSeed = new ReportSeedVo();

    return engine.formHasData(engine.getPreviousNonDialogFormName(), voReportSeed.getIseeds(report.getSeeds()));
}
项目:AvoinApotti    文件:Logic.java   
private void open()
{
    ReportVoCollection coll = domain.listReports(new Integer(engine.getPreviousNonDialogFormName().getID()));

    for(int i = 0; i < coll.size(); i++)
    {
        ReportVo report = coll.get(i);

        if(canBeSeeded(report) && report.getTemplatesIsNotNull() && report.getTemplates().size() > 0)
        {
            grdReportsRow row = form.grdReports().getRows().newRow();

            row.setBackColor(Color.Beige);
            row.setcolName(report.getReportName());
            row.setcolDescription(report.getReportDescription());
            row.setValue(report);

            for (int j = 0; j < report.getTemplates().size(); j++)
            {
                ReportTemplateVo template = report.getTemplates().get(j);

                grdReportsRow templateRow = row.getRows().newRow();
                templateRow.setcolName(template.getName());
                templateRow.setcolDescription(template.getDescription());
                templateRow.setValue(template);
            }

            row.setExpanded(true);
        }
    }

    if(form.grdReports().getRows().size() == 1 && form.grdReports().getRows().get(0).getRows().size() == 1)
        form.grdReports().setValue(form.grdReports().getRows().get(0).getRows().get(0).getValue());
}
项目:AvoinApotti    文件:Logic.java   
private boolean canBeSeeded(ReportVo report)
{
    //reports without seeds can always be printed
    if(!report.getSeedsIsNotNull())
        return true;

    if(report.getSeeds().size() == 0)
        return true;

    ReportSeedVo voReportSeed = new ReportSeedVo();

    return engine.formHasData(engine.getPreviousNonDialogFormName(), voReportSeed.getIseeds(report.getSeeds()));
}
项目:AvoinApotti    文件:Logic.java   
private void displayAvailableReports(ReportVoCollection coll, PrintAgentVo printAgentVo)
{
    form.grdReportsAvailable().getRows().clear();

    for (int i = 0; i < coll.size(); i++)
    {
        ReportVo rep = coll.get(i);

        if (rep.getTemplatesIsNotNull() && bHasActiveTemplates(rep))
        {
            grdReportsAvailableRow row = form.grdReportsAvailable().getRows().newRow();
            row.setColumnReport(rep.getReportName());
            row.setTooltip(rep.getReportDescription());
            row.setBold(true);
            row.setBackColor(Color.Beige);
            row.setValue(rep);

            for (int j = 0; j < rep.getTemplates().size(); j++)
            {
                if (rep.getTemplates().get(j).getIsActiveIsNotNull() && rep.getTemplates().get(j).getIsActive().equals(Boolean.TRUE) && isTemplateAlreadySelected(rep.getTemplates().get(j), printAgentVo) == false)
                {
                    grdReportsAvailableRow child = row.getRows().newRow();

                    child.setColumnReport(rep.getTemplates().get(j).getName());
                    child.setTooltip(rep.getTemplates().get(j).getDescription());
                    child.setValue(rep.getTemplates().get(j));
                }
            }

            row.setExpanded(true);

            if (row.getRows().size() == 0)
            {
                form.grdReportsAvailable().setValue(row.getValue());
                form.grdReportsAvailable().removeSelectedRow();
            }
        }
    }

}
项目:AvoinApotti    文件:Logic.java   
private boolean bHasActiveTemplates(ReportVo rep)
{
    if (!rep.getTemplatesIsNotNull())
        return false;

    boolean bHasActiveTemplate = false;

    for (int j = 0; j < rep.getTemplates().size(); j++)
    {
        if (rep.getTemplates().get(j).getIsActiveIsNotNull() && rep.getTemplates().get(j).getIsActive().equals(Boolean.TRUE))
            return true;
    }

    return bHasActiveTemplate;
}
项目:AvoinApotti    文件:Logic.java   
private void displaySelectedTemplates(PrintAgentVo agent)
{
    form.grdReportsToPrint().getRows().clear();

    if (agent == null || agent.getTemplatesToPrintIsNotNull() == false)
        return;

    for (int i = 0; i < agent.getTemplatesToPrint().size(); i++)
    {
        TemplatePrinterVo tp = agent.getTemplatesToPrint().get(i);

        grdReportsToPrintRow parentRow = getParentRowById(tp.getTemplate().getReport());

        if (parentRow == null)
        {
            ReportVo rep = tp.getTemplate().getReport();
            parentRow = form.grdReportsToPrint().getRows().newRow();

            parentRow.setColumnReport(rep.getReportName());
            parentRow.setTooltip(rep.getReportDescription());
            parentRow.setBold(true);
            parentRow.setBackColor(Color.Beige);
            parentRow.setValue(rep);
            parentRow.setExpanded(true);
        }

        grdReportsToPrintRow child = parentRow.getRows().newRow();

        child.setColumnReport(tp.getTemplate().getName());
        child.setColumnPrintTo(tp.getPrinterName());
        child.setColumnPrintToReadOnly(false);
        child.setTooltip(tp.getTemplate().getDescription());
        child.setValue(tp);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateReports(ReportVoCollection repColl) 
{
    for (int i = 0; i < repColl.size(); i++)
    {
        ReportVo rep = repColl.get(i);
        GenForm.grdReportListRow row = form.grdReportList().getRows().newRow();
        row.setReportName(rep.getReportName());
        //row.setRepAssign(false);
        row.setValue(rep);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateReportsGridAssignment(ReportVoCollection coll)
{
    form.grdReportList().getRows().clear();

    for (int i = 0; i < coll.size(); i++)
    {
        ReportVo rep = coll.get(i);
        GenForm.grdReportListRow row = form.grdReportList().getRows().newRow();

        row.setReportName(rep.getReportName());
        row.setValue(rep);
    }
}