public FileStreamResult CreateExcelToClient() { int page = 0, rows = 0; string billNo = Request.QueryString["billNo"]; System.Data.DataTable dt1 = InBillDetailService.GetInBillDetail(page, rows, billNo); System.Data.DataTable dt2 = InBillAllotService.AllotSearch(page, rows, billNo); string headText1 = "入库单据分配"; string headText2 = "入库单据分配明细"; string headFont = "微软雅黑"; Int16 headSize = 20; string colHeadFont = "Arial"; Int16 colHeadSize = 10; string[] HeaderFooder = { "……" //眉左 , "……" //眉中 , "……" //眉右 , "&D" //脚左 日期 , "……" //脚中 , "&P" //脚右 页码 }; System.IO.MemoryStream ms = THOK.Common.ExportExcel.ExportDT(dt1, dt2, headText1, headText2, headFont, headSize , 0, true, colHeadFont, colHeadSize, 0, true, 0, HeaderFooder, null, 0); return(new FileStreamResult(ms, "application/ms-excel")); }
public FileStreamResult CreateExcelToClient() { int page = 0, rows = 0; string billNo = Request.QueryString["billNo"]; ExportParam ep = new ExportParam(); ep.DT1 = InBillDetailService.GetInBillDetail(page, rows, billNo); ep.DT2 = InBillAllotService.AllotSearch(page, rows, billNo);; ep.HeadTitle1 = "入库单据分配"; ep.HeadTitle2 = "入库单据分配明细"; return(PrintService.Print(ep)); }