示例#1
0
        public static void ShowPrintPreview_UsingExcelTemplate(string fileNameTemplate, List <O2S_Common.DataObjects.reportExcelDTO> thongTinThem, List <DataTable> lstDataTable)
        {
            try
            {
                thongTinThem.AddRange(ThemThongTinTemplate.ThemThongTin());//them thong tin

                O2S_Common.PrintPreview.ExcelFileTemplate.ShowPrintPreview_UsingExcelTemplate(fileNameTemplate, thongTinThem, lstDataTable);
            }
            catch (Exception ex)
            {
                O2S_Common.Logging.LogSystem.Error(ex);
            }
        }
        public static void ExportExcelTemplate(string pv_sErr, string fileNameTemplate, List <reportExcelDTO> thongTinThem, DataTable dataTable)
        {
            try
            {
                thongTinThem.AddRange(ThemThongTinTemplate.ThemThongTin());//them thong tin

                O2S_Common.Excel.ExcelExport.ExportExcelTemplate(pv_sErr, fileNameTemplate, thongTinThem, dataTable);
            }
            catch (Exception ex)
            {
                O2S_Common.Logging.LogSystem.Error(ex);
            }
        }
        public static MemoryStream ExportExcelTemplate_ToStream(string pv_sErr, string fileNameTemplate, List <reportExcelDTO> thongTinThem, List <DataTable> lstDataTable)
        {
            try
            {
                thongTinThem.AddRange(ThemThongTinTemplate.ThemThongTin());//them thong tin

                return(O2S_Common.Excel.ExcelExport.ExportExcelTemplate_ToStream(pv_sErr, fileNameTemplate, thongTinThem, lstDataTable));
            }
            catch (Exception ex)
            {
                return(null);

                O2S_Common.Logging.LogSystem.Error(ex);
            }
        }