public void SetGridViewVoucherAllocationStrategy (GridViewVoucherAllocationStrategyEnum defaultStrategyType) { Strategy = GridViewVoucherAllocationStrategySimpleFactory .CreateGridViewVoucherAllocationStrategy(defaultStrategyType); InitDataSource(); }
CreateGridViewVoucherAllocationStrategy(GridViewVoucherAllocationStrategyEnum type) { GridViewVoucherAllocationStrategy ret = null; switch (type) { case GridViewVoucherAllocationStrategyEnum.RECEIPT_VOUCHER: ret = new GridViewReceiptVoucherAllocationStrategy(); break; case GridViewVoucherAllocationStrategyEnum.PAYMENT_VOUCHER: ret = new GridViewPaymentVoucherAllocationStrategy(); break; default: break; } return(ret); }