예제 #1
0
        private void btn_tambah_Click(object sender, RoutedEventArgs e)
        {
            ExportToExcel <RekapTerapi, RekapTerapis> s = new ExportToExcel <RekapTerapi, RekapTerapis>();
            ICollectionView view = CollectionViewSource.GetDefaultView(dgRekapTerapi.ItemsSource);

            s.dataToPrint = (RekapTerapis)view.SourceCollection;
            s.GenerateReport();
        }
예제 #2
0
 private void btn_tambah_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         ExportToExcel <RekapObat, RekapObats> s = new ExportToExcel <RekapObat, RekapObats>();
         ICollectionView view = CollectionViewSource.GetDefaultView(dgRekapData.ItemsSource);
         s.dataToPrint = (RekapObats)view.SourceCollection;
         s.GenerateReport();
     }catch (Exception ex) {
     }
 }