EAS 序时簿界面根据值设置颜色
@Override
protected void afterTableFillData(KDTDataRequestEvent e) {
// TODO Auto-generated method stub
super.afterTableFillData(e);
for(int i = e.getFirstRow();i<=e.getLastRow();i++){
IRow row = tblMain.getRow(i);
ICell cell = row.getCell("bizDate");
Boolean fivouchered = (Boolean) row.getCell("Fivouchered").getValue();
Date bizDate = (Date) cell.getValue();
row.getCell("bizDate");
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
try {
Date parse = simpleDateFormat.parse("2021-03-23");
if(bizDate.compareTo(parse)<=0){
if(!fivouchered){
row.getCell("Fivouchered").getStyleAttributes().setBackground(Color.gray);
}
}
} catch (ParseException e1) {
e1.printStackTrace();
}
}
}