Exemple #1
0
        private void btnExport_Click(object sender, EventArgs e)
        {
            var patients = patientBLL.GetTodayPatients();
            var data     = patientBLL.Export(patients);

            string fileName = DateTime.Now.ToString("yyyy-MM-dd") + "营养液发放记录.csv";
            string filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, fileName);

            File.WriteAllText(filePath, data, Encoding.UTF8);

            Process.Start(filePath);
        }