use of cn.cerc.jdb.core.TDate in project summer-bean by cn-cerc.
the class Template method writeColumn.
protected void writeColumn(WritableSheet sheet, int col, int row, Column column) throws WriteException, RowsExceededException {
if (column instanceof NumberColumn) {
jxl.write.Number item = new jxl.write.Number(col, row, (double) column.getValue());
sheet.addCell(item);
} else if (column instanceof DateColumn) {
TDate day = (TDate) column.getValue();
DateTime item = new DateTime(col, row, day.getData(), new WritableCellFormat(df1));
sheet.addCell(item);
} else if (column instanceof DateTimeColumn) {
DateTime item = new DateTime(col, row, (Date) column.getValue(), new WritableCellFormat(df2));
sheet.addCell(item);
} else {
Label item = new Label(col, row, column.getValue().toString());
sheet.addCell(item);
}
}
use of cn.cerc.jdb.core.TDate in project summer-mis by cn-cerc.
the class AbstractField method getDate.
public TDate getDate() {
String val = this.getString();
if (val == null)
return null;
TDateTime obj = TDateTime.fromDate(val);
if (obj == null)
return null;
return new TDate(obj.getData());
}
Aggregations