public void PrintSelectedWarehouseOut() { var toPrints = Entities.Cast<WarehouseOut>().Where(o => o.IsSelected); foreach (var wo in toPrints) { var reportVM = new PrintInOutTemplateVM(wo.Id, "打印出库单"); var dataSources = new Dictionary<string, object> { { "Header", reportVM.Header }, { "Lines", reportVM.Lines } }; var printHelper = new PrintHelper(dataSources, "PrintTemplate\\内贸出库单\\上海长然出入库单.rdlc", null, true); printHelper.Run(); } }
public void PrintSelected() { var toPrints = Entities.Cast<WarehouseOut>().Where(o => o.IsSelected); foreach (var wo in toPrints) { var reportVM = new PrintWarehouseOutTemplateVM("出库", wo.Id); var dataSources = new Dictionary<string, object> { { "Header", reportVM.HeaderList }, { "Lines", reportVM.LineList } }; var printHelper = new PrintHelper(dataSources, reportVM.PathName, null, true); printHelper.Run(); } }