StringBuffer sql = new StringBuffer();
priceListChecks = new Vector<CCheckBox>(80);
priceListIDs = new Vector<Integer>(80);
Box priceLists = Box.createVerticalBox();
Box line;
CCheckBox check;
sql.append("SELECT pl.name, pl.m_pricelist_id "+
"FROM m_pricelist pl "+
"WHERE pl.ad_client_id = "+ad_client_id+" "+
"AND pl.ad_org_id = "+ad_org_id+" "+
"AND pl.isactive = 'Y' "+
"ORDER BY pl.name");
PreparedStatement pstmt = null;
ResultSet rs = null;
try
{
pstmt = DB.prepareStatement(sql.toString(), null);
rs = pstmt.executeQuery();
while (rs.next())
{
check = new CCheckBox(rs.getString(1));
check.addActionListener(this);
priceListChecks.add(check);
priceListIDs.add(Integer.valueOf(rs.getInt(2)));
line = Box.createHorizontalBox();
line.add(Box.createHorizontalStrut(5));