예제 #1
0
        private void BtnCountByArea_Click(object sender, RoutedEventArgs e)
        {
            string    msg  = _archorList.GetCountByArea();
            DataTable dt   = _archorList.GetCountByAreaTable();
            FileInfo  file = new FileInfo(AppDomain.CurrentDomain.BaseDirectory + "\\Data\\基站信息\\基站数量按区域统计.xls");

            ExcelLib.ExcelHelper.Save(dt, file, "");
            System.Windows.Clipboard.SetText(msg);
            MessageBox.Show(msg);
            Process.Start(file.Directory.FullName);
        }
예제 #2
0
 private void CountByArea()
 {
     try
     {
         string    msg  = _archorList.GetCountByArea();
         DataTable dt   = _archorList.GetCountByAreaTable();
         FileInfo  file = new FileInfo(AppDomain.CurrentDomain.BaseDirectory + "\\Data\\基站信息\\基站数量按区域统计.xls");
         ExcelLib.ExcelHelper.Save(dt, file, "");
         System.Windows.Clipboard.SetText(msg);
         MessageBox.Show(msg);
         Process.Start(file.Directory.FullName);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }