use of org.compiere.model.MQuery in project adempiere by adempiere.
the class WFActivity method cmd_button.
// cmd_zoom
/**
* Answer Button
*/
private void cmd_button() {
log.config("Activity=" + m_activity);
if (m_activity == null)
return;
//
MWFNode node = m_activity.getNode();
if (MWFNode.ACTION_UserWindow.equals(node.getAction())) {
// Explicit Window
int AD_Window_ID = node.getAD_Window_ID();
String ColumnName = m_activity.getPO().get_TableName() + "_ID";
int Record_ID = m_activity.getRecord_ID();
MQuery query = MQuery.getEqualQuery(ColumnName, Record_ID);
boolean IsSOTrx = m_activity.isSOTrx();
//
log.info("Zoom to AD_Window_ID=" + AD_Window_ID + " - " + query + " (IsSOTrx=" + IsSOTrx + ")");
AWindow frame = new AWindow();
if (!frame.initWindow(AD_Window_ID, query))
return;
AEnv.addToWindowManager(frame);
AEnv.showCenterScreen(frame);
frame = null;
} else if (MWFNode.ACTION_UserForm.equals(node.getAction())) {
int AD_Form_ID = node.getAD_Form_ID();
FormFrame ff = new FormFrame();
ff.openForm(AD_Form_ID);
ff.pack();
AEnv.addToWindowManager(ff);
AEnv.showCenterScreen(ff);
} else if (MWFNode.ACTION_SmartBrowse.equals(node.getAction())) {
CFrame ff = VBrowser.openBrowse(0, node.getAD_Browse_ID(), "", m_activity.isSOTrx());
ff.pack();
AEnv.addToWindowManager(ff);
AEnv.showCenterScreen(ff);
} else
/*
else if (MWFNode.ACTION_UserWorkbench.equals(node.getAction()))
{
}*/
log.log(Level.SEVERE, "No User Action:" + node.getAction());
}
use of org.compiere.model.MQuery in project adempiere by adempiere.
the class InfoProduct method zoom.
// hasHistory
/**
* Zoom
*/
protected void zoom(int record_id) {
log.info("");
Integer M_Product_ID = record_id;
if (M_Product_ID == null)
return;
MQuery query = new MQuery("M_Product");
query.addRestriction("M_Product_ID", MQuery.EQUAL, M_Product_ID);
query.setRecordCount(1);
// SO
int AD_WindowNo = getAD_Window_ID("M_Product", true);
zoom(AD_WindowNo, query);
}
use of org.compiere.model.MQuery in project adempiere by adempiere.
the class InfoInvoice method zoom.
// refresh
/**
* Zoom
*/
protected void zoom(int record_ID) {
log.info("InfoInvoice.zoom");
// Integer C_Invoice_ID = getSelectedRowKey();
Integer C_Invoice_ID = record_ID;
if (C_Invoice_ID == null)
return;
MQuery query = new MQuery("C_Invoice");
query.addRestriction("C_Invoice_ID", MQuery.EQUAL, C_Invoice_ID);
query.setRecordCount(1);
int AD_WindowNo = getAD_Window_ID("C_Invoice", fIsSOTrx.isSelected());
zoom(AD_WindowNo, query);
}
use of org.compiere.model.MQuery in project adempiere by adempiere.
the class InfoInOutPanel method zoom.
// setParameters
// Elaine 2008/12/16
/**
* Zoom
*/
public void zoom() {
log.info("InfoInOut.zoom");
Integer M_InOut_ID = getSelectedRowKey();
if (M_InOut_ID == null)
return;
MQuery query = new MQuery("M_InOut");
query.addRestriction("M_InOut_ID", MQuery.EQUAL, M_InOut_ID);
query.setRecordCount(1);
int AD_WindowNo = getAD_Window_ID("M_InOut", fIsSOTrx.isSelected());
AEnv.zoom(AD_WindowNo, query);
}
use of org.compiere.model.MQuery in project adempiere by adempiere.
the class InfoInvoicePanel method zoom.
// refresh
// Elaine 2008/12/16
/**
* Zoom
*/
public void zoom() {
log.info("InfoInvoice.zoom");
Integer C_Invoice_ID = getSelectedRowKey();
if (C_Invoice_ID == null)
return;
MQuery query = new MQuery("C_Invoice");
query.addRestriction("C_Invoice_ID", MQuery.EQUAL, C_Invoice_ID);
query.setRecordCount(1);
int AD_WindowNo = getAD_Window_ID("C_Invoice", fIsSOTrx.isSelected());
AEnv.zoom(AD_WindowNo, query);
}
Aggregations