small improves

This commit is contained in:
vpj-cd 2008-11-20 22:59:45 +00:00
parent 7736107df9
commit f4d17bdb5f
1 changed files with 5 additions and 24 deletions

View File

@ -11,7 +11,7 @@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us * * For the text or an alternative of this public license, you may reach us *
* Copyright (C) 2003-2007 e-Evolution,SC. All Rights Reserved. * * Copyright (C) 2003-2007 e-Evolution,SC. All Rights Reserved. *
* Contributor(s): Victor Perez www.e-evolution.com * * Contributor(s): victor.perez@e-evolution.com www.e-evolution.com *
*****************************************************************************/ *****************************************************************************/
package org.eevolution.form; package org.eevolution.form;
@ -67,7 +67,6 @@ import org.compiere.util.Env;
import org.compiere.util.KeyNamePair; import org.compiere.util.KeyNamePair;
import org.compiere.util.Msg; import org.compiere.util.Msg;
import org.eevolution.model.MPPOrder; import org.eevolution.model.MPPOrder;
import org.eevolution.model.X_PP_Order;
/** /**
* *
* @author vpj-cd * @author vpj-cd
@ -321,7 +320,7 @@ public class VOrderPlanning extends CPanel
Integer PP_Order_ID = id.getRecord_ID(); Integer PP_Order_ID = id.getRecord_ID();
MPPOrder order = new MPPOrder(Env.getCtx(), PP_Order_ID.intValue(),null); MPPOrder order = new MPPOrder(Env.getCtx(), PP_Order_ID.intValue(),null);
order.setDocStatus(order.prepareIt()); order.setDocStatus(order.prepareIt());
order.setDocAction(X_PP_Order.DOCACTION_Prepare); order.setDocAction(MPPOrder.DOCACTION_Prepare);
order.save(); order.save();
} }
} }
@ -613,16 +612,7 @@ public class VOrderPlanning extends CPanel
{ {
log.fine("Info.Worker.run"); log.fine("Info.Worker.run");
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
//setStatusLine(Msg.getMsg(Env.getCtx(), "StartSearch"), false);
// Clear Table
p_table.setRowCount(0);
//
//System.out.println("########" + m_sqlMain);
StringBuffer sql = new StringBuffer (m_sqlMain); StringBuffer sql = new StringBuffer (m_sqlMain);
//String dynWhere = "" ;//find ();
String dynWhere = find (); String dynWhere = find ();
if (dynWhere.length() > 0) if (dynWhere.length() > 0)
sql.append(" AND " + dynWhere); // includes first AND sql.append(" AND " + dynWhere); // includes first AND
@ -635,10 +625,7 @@ public class VOrderPlanning extends CPanel
{ {
PreparedStatement pstmt = DB.prepareStatement(xSql,null); PreparedStatement pstmt = DB.prepareStatement(xSql,null);
log.fine("SQL=" + xSql); log.fine("SQL=" + xSql);
//setParameters (pstmt);
// Log.trace(Log.l6_Database, "Info.Worker.run - start query");
ResultSet rs = pstmt.executeQuery(); ResultSet rs = pstmt.executeQuery();
// Log.trace(Log.l6_Database, "Info.Worker.run - end query");
while (!isInterrupted() & rs.next()) while (!isInterrupted() & rs.next())
{ {
int row = p_table.getRowCount(); int row = p_table.getRowCount();
@ -653,10 +640,8 @@ public class VOrderPlanning extends CPanel
{ {
IDColumn id = new IDColumn(rs.getInt(colIndex)); IDColumn id = new IDColumn(rs.getInt(colIndex));
id.setSelected(true); id.setSelected(true);
//data = new IDColumn(rs.getInt(colIndex));
data = id; data = id;
p_table.setColumnReadOnly(0, false); p_table.setColumnReadOnly(0, false);
//p_table.setColumnReadOnly(1, false);
} }
else if (c == Boolean.class) else if (c == Boolean.class)
data = new Boolean("Y".equals(rs.getString(colIndex))); data = new Boolean("Y".equals(rs.getString(colIndex)));
@ -679,8 +664,6 @@ public class VOrderPlanning extends CPanel
data = rs.getString(colIndex); data = rs.getString(colIndex);
// store // store
p_table.setValueAt(data, row, col); p_table.setValueAt(data, row, col);
// Log.trace(Log.l6_Database, "r=" + row + ", c=" + col + " " + m_layout[col].getColHeader(),
// "data=" + data.toString() + " " + data.getClass().getName() + " * " + m_table.getCellRenderer(row, col));
} }
} }
log.config("Interrupted=" + isInterrupted()); log.config("Interrupted=" + isInterrupted());
@ -694,9 +677,7 @@ public class VOrderPlanning extends CPanel
p_table.autoSize(); p_table.autoSize();
// //
setCursor(Cursor.getDefaultCursor()); setCursor(Cursor.getDefaultCursor());
int no = p_table.getRowCount();
//setStatusLine(Integer.toString(no) + " " + Msg.getMsg(Env.getCtx(), "SearchRows_EnterQuery"), false);
//setStatusDB(Integer.toString(no));
} // run } // run
} // Worker } // Worker