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

项目:AvoinApotti    文件:Logic.java   
protected void onBtnViewClick() throws PresentationLogicException
{
    PrintAgentDocumentsVo doc = form.grdDocuments().getValue();

    if(doc == null)
    {
        engine.showMessage("Please select a document to view !");
        return;
    }

    QueryBuilderClient qb = new QueryBuilderClient(ConfigFlag.GEN.QUERY_SERVER_URL.getValue(), engine.getSessionId());

    try
    {
        byte[] pdf = qb.convertReport(ConfigFlag.GEN.REPORT_SERVER_URL.getValue(), doc.getDocument().getBytes(), QueryBuilderClient.PDF, "", 1);
        String url = qb.prepareReportForViewing(pdf, "PDF"); 

        engine.openUrl(url);
    }
    catch (QueryBuilderClientException e)
    {
        engine.showMessage("Error viewing document: " + e.toString());
        return;
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onBtnViewClick() throws PresentationLogicException
{
    PrintAgentDocumentsVo doc = form.grdDocuments().getValue();

    if(doc == null)
    {
        engine.showMessage("Please select a document to view !");
        return;
    }

    QueryBuilderClient qb = new QueryBuilderClient(ConfigFlag.GEN.QUERY_SERVER_URL.getValue(), engine.getSessionId());

    try
    {
        byte[] pdf = qb.convertReport(ConfigFlag.GEN.REPORT_SERVER_URL.getValue(), doc.getDocument().getBytes(), QueryBuilderClient.PDF, "", 1);
        String url = qb.prepareReportForViewing(pdf, "PDF"); 

        engine.openUrl(url);
    }
    catch (QueryBuilderClientException e)
    {
        engine.showMessage("Error viewing document: " + e.toString());
        return;
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onBtnViewClick() throws PresentationLogicException
{
    PrintAgentDocumentsVo doc = form.grdDocuments().getValue();

    if(doc == null)
    {
        engine.showMessage("Please select a document to view !");
        return;
    }

    QueryBuilderClient qb = new QueryBuilderClient(ConfigFlag.GEN.QUERY_SERVER_URL.getValue(), engine.getSessionId());

    try
    {
        byte[] pdf = qb.convertReport(ConfigFlag.GEN.REPORT_SERVER_URL.getValue(), doc.getDocument().getBytes(), QueryBuilderClient.PDF, "", 1);
        String url = qb.prepareReportForViewing(pdf, "PDF"); 

        engine.openUrl(url);
    }
    catch (QueryBuilderClientException e)
    {
        engine.showMessage("Error viewing document: " + e.toString());
        return;
    }
}
项目:openmaxims-linux    文件:Logic.java   
protected void onBtnViewClick() throws PresentationLogicException
{
    PrintAgentDocumentsVo doc = form.grdDocuments().getValue();

    if(doc == null)
    {
        engine.showMessage("Please select a document to view !");
        return;
    }

    QueryBuilderClient qb = new QueryBuilderClient(ConfigFlag.GEN.QUERY_SERVER_URL.getValue(), engine.getSessionId());

    try
    {
        byte[] pdf = qb.convertReport(ConfigFlag.GEN.REPORT_SERVER_URL.getValue(), doc.getDocument().getBytes(), QueryBuilderClient.PDF, "", 1);
        String url = qb.prepareReportForViewing(pdf, "PDF"); 

        engine.openUrl(url);
    }
    catch (QueryBuilderClientException e)
    {
        engine.showMessage("Error viewing document: " + e.toString());
        return;
    }
}
项目:AvoinApotti    文件:Logic.java   
protected void onBtnPrintClick() throws ims.framework.exceptions.PresentationLogicException
{
    PrintAgentDocumentsVo doc = form.grdDocuments().getValue();
    if(doc == null)
    {
        engine.showMessage("Please select a document to print !");
        return;
    }

    String printer = form.cmbPrinter().getValue();
    if(printer == null || printer.length() == 0)
    {
        engine.showMessage("Please select a printer !");
        return;
    }

    QueryBuilderClient qb = new QueryBuilderClient(ConfigFlag.GEN.QUERY_SERVER_URL.getValue(), engine.getSessionId());

    try
    {
        qb.printReport(doc.getDocument().getBytes(), ConfigFlag.GEN.REPORT_SERVER_URL.getValue(), printer, 1);
    }
    catch (QueryBuilderClientException e)
    {
        engine.showMessage("Error printing document: " + e.toString());
        return;
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onBtnPrintClick() throws ims.framework.exceptions.PresentationLogicException
{
    PrintAgentDocumentsVo doc = form.grdDocuments().getValue();
    if(doc == null)
    {
        engine.showMessage("Please select a document to print !");
        return;
    }

    String printer = form.cmbPrinter().getValue();
    if(printer == null || printer.length() == 0)
    {
        engine.showMessage("Please select a printer !");
        return;
    }

    QueryBuilderClient qb = new QueryBuilderClient(ConfigFlag.GEN.QUERY_SERVER_URL.getValue(), engine.getSessionId());

    try
    {
        qb.printReport(doc.getDocument().getBytes(), ConfigFlag.GEN.REPORT_SERVER_URL.getValue(), printer, 1);
    }
    catch (QueryBuilderClientException e)
    {
        engine.showMessage("Error printing document: " + e.toString());
        return;
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onBtnPrintClick() throws ims.framework.exceptions.PresentationLogicException
{
    PrintAgentDocumentsVo doc = form.grdDocuments().getValue();
    if(doc == null)
    {
        engine.showMessage("Please select a document to print !");
        return;
    }

    String printer = form.cmbPrinter().getValue();
    if(printer == null || printer.length() == 0)
    {
        engine.showMessage("Please select a printer !");
        return;
    }

    QueryBuilderClient qb = new QueryBuilderClient(ConfigFlag.GEN.QUERY_SERVER_URL.getValue(), engine.getSessionId());

    try
    {
        qb.printReport(doc.getDocument().getBytes(), ConfigFlag.GEN.REPORT_SERVER_URL.getValue(), printer, 1);
    }
    catch (QueryBuilderClientException e)
    {
        engine.showMessage("Error printing document: " + e.toString());
        return;
    }
}
项目:openmaxims-linux    文件:Logic.java   
protected void onBtnPrintClick() throws ims.framework.exceptions.PresentationLogicException
{
    PrintAgentDocumentsVo doc = form.grdDocuments().getValue();
    if(doc == null)
    {
        engine.showMessage("Please select a document to print !");
        return;
    }

    String printer = form.cmbPrinter().getValue();
    if(printer == null || printer.length() == 0)
    {
        engine.showMessage("Please select a printer !");
        return;
    }

    QueryBuilderClient qb = new QueryBuilderClient(ConfigFlag.GEN.QUERY_SERVER_URL.getValue(), engine.getSessionId());

    try
    {
        qb.printReport(doc.getDocument().getBytes(), ConfigFlag.GEN.REPORT_SERVER_URL.getValue(), printer, 1);
    }
    catch (QueryBuilderClientException e)
    {
        engine.showMessage("Error printing document: " + e.toString());
        return;
    }
}