import org.compiere.model.MTable
import org.compiere.util.DB
import org.compiere.util.Msg
import java.math.BigDecimal
import java.sql.PreparedStatement
import java.sql.ResultSet
import java.sql.Timestamp
// A_WindowNo A_Tab A_Field A_Value A_OldValue A_Ctx BOMQty
if (A_Value!=null) // A_OldValue!=A_Value)
{
Integer ID= (Integer)A_Value;
// Integer ID= (Integer)A_Tab.getValue("SK_BOM_ID");
String sql = "SELECT * FROM 訂單 WHERE 訂單_ID=?";
PreparedStatement pstmt = DB.prepareStatement(sql, null);
pstmt.setInt(1, ID.intValue());
ResultSet rs = pstmt.executeQuery();
while (rs.next()) {
String shno1 = rs.getString("訂單單號"); A_Tab.setValue("訂單單號", shno1);
String name1 = rs.getString("客戶名稱"); A_Tab.setValue("客戶名稱", name1);
String cusn1 = rs.getString("客戶單號"); A_Tab.setValue("客戶單號", cusn1);
String stat1 = rs.getString("單據狀態"); A_Tab.setValue("單據狀態", stat1);
Boolean uncl1 = (Boolean)("Y".equals( rs.getString("未結案"))); A_Tab.setValue("未結案", uncl1);
Boolean clos1 = (Boolean)("Y".equals( rs.getString("已結案"))); A_Tab.setValue("已結案", clos1);
Integer cuid1 = new Integer( rs.getInt("客戶_id")); A_Tab.setValue("客戶_id", cuid1);
Integer pdid1 = new Integer( rs.getInt("產品_id")); A_Tab.setValue("產品_id", pdid1);
Timestamp ordt1 = rs.getTimestamp("訂單日期"); A_Tab.setValue("訂單日期", ordt1);
//說明
}
}
result=""
沒有留言:
張貼留言