Beispiel #1
0
        private void WriteDataSetToXml(string reportOutPutPath, string fileName, DataSet dsReportDate)
        {
            string filePath = Path.Combine(reportOutPutPath, fileName);

            if (File.Exists(filePath))
            {
                File.Delete(filePath);
            }

            MemoryStream ms = new MemoryStream();

            dsReportDate.WriteXml(ms);

            File.WriteAllBytes(filePath, CompressionUtil.CompressZipFile(ms.ToArray(), Path.GetFileNameWithoutExtension(fileName) + ".xml"));
        }