Search in sources :

Example 1 with IPrintDocument

use of org.eevolution.form.IPrintDocument in project adempiere by adempiere.

the class GenerateMovement method printDocument.

//	generate
/**
     * Print Document
     *
     * @param document
     * @param printFormantName
     */
public static void printDocument(PO document, String printFormantName, int windowNo) {
    IPrintDocument IPrintDocument;
    //	OK to print shipments
    if (Ini.isClient())
        IPrintDocument = getPrintDocument("org.eevolution.form.VPrintDocument");
    else
        IPrintDocument = getPrintDocument("org.eevolution.form.WPrintDocument");
    IPrintDocument.print(document, printFormantName, windowNo);
}
Also used : IPrintDocument(org.eevolution.form.IPrintDocument)

Example 2 with IPrintDocument

use of org.eevolution.form.IPrintDocument in project adempiere by adempiere.

the class GenerateMovement method getPrintDocument.

public static IPrintDocument getPrintDocument(String className) throws RuntimeException {
    Class<?> clazz;
    IPrintDocument result = null;
    try {
        clazz = Class.forName(className);
        Constructor<?> constructor = null;
        constructor = clazz.getDeclaredConstructor();
        result = (IPrintDocument) constructor.newInstance();
    } catch (Exception e) {
        throw new RuntimeException(e);
    }
    return result;
}
Also used : IPrintDocument(org.eevolution.form.IPrintDocument) AdempiereException(org.adempiere.exceptions.AdempiereException)

Example 3 with IPrintDocument

use of org.eevolution.form.IPrintDocument in project adempiere by adempiere.

the class GenerateMovementMaterial method getPrintDocument.

public IPrintDocument getPrintDocument(String className) throws RuntimeException {
    Class<?> clazz;
    IPrintDocument result = null;
    try {
        clazz = Class.forName(className);
        Constructor<?> constructor = null;
        constructor = clazz.getDeclaredConstructor();
        result = (IPrintDocument) constructor.newInstance();
    } catch (Exception e) {
        throw new RuntimeException(e);
    }
    return result;
}
Also used : IPrintDocument(org.eevolution.form.IPrintDocument) AdempiereException(org.adempiere.exceptions.AdempiereException)

Example 4 with IPrintDocument

use of org.eevolution.form.IPrintDocument in project adempiere by adempiere.

the class GenerateMovementMaterial method printDocument.

/**
     * Print Document
     *
     * @param document
     * @param printFormantName
     */
private void printDocument(PO document, String printFormantName) {
    //  Switch Tabs
    StringBuffer resultText = new StringBuffer(Msg.translate(Env.getCtx(), "DocumentNo") + " : " + document.get_ValueAsString("DocumentNo"));
    result = resultText.toString();
    IPrintDocument IPrintDocument;
    //	OK to print shipments
    if (Ini.isClient())
        IPrintDocument = getPrintDocument("org.eevolution.form.VPrintDocument");
    else
        IPrintDocument = getPrintDocument("org.eevolution.form.WPrintDocument");
    IPrintDocument.print(document, printFormantName, getProcessInfo().getWindowNo());
}
Also used : IPrintDocument(org.eevolution.form.IPrintDocument)

Aggregations

IPrintDocument (org.eevolution.form.IPrintDocument)4 AdempiereException (org.adempiere.exceptions.AdempiereException)2