/** * 按订单ID查询订单信息 * * @author lixiaogang * @param table * @param orderId */ public void getDataOrderByOrderId(Table table, String orderId) { List<Order> order = orderOperation.selectOrderInfoByOrderId(orderId); for (int i = 0; i < order.size(); i++) { TableItem item1_1 = new TableItem(table, SWT.NONE); item1_1.setText( new String[] { "" + order.get(i).getOrderId() + "", "" + order.get(i).getOrderName() + "" }); } }
/** * 选择任务的窗体加载时,初始化订单表的数据 * * @author lixiaogang * @param table */ public void getDataOrder(Table table) { List<Order> list_order = orderOperation.selectAllOrderInfo(); for (int i = 0; i < list_order.size(); i++) { TableItem item1_1 = new TableItem(table, SWT.NONE); item1_1.setText( new String[] { "" + list_order.get(i).getOrderId() + "", "" + list_order.get(i).getOrderName() + "" }); } }