コード例 #1
0
ファイル: MainWindow.xaml.cs プロジェクト: Ocph23/appgrosir
        private void LpPenjualan_Click(object sender, RoutedEventArgs e)
        {
            var form = new ReportFilter();
            var vm   = new ReportFilterViewModel("LAPORAN PENJUALAN")
            {
                WindowClose = form.Close
            };

            form.DataContext = vm;
            form.ShowDialog();
            if (vm.IsValid)
            {
                var context = new Datas.Contexts.PenjualanContext();

                var datas = context.GetDataReportPenjualan().Where(x =>
                                                                   x.Tanggal.Value.Day >= vm.FromDate.Value.Day &&
                                                                   x.Tanggal.Value.Month >= vm.FromDate.Value.Month &&
                                                                   x.Tanggal.Value.Year >= vm.FromDate.Value.Year &&
                                                                   x.Tanggal.Value.Day <= vm.ToDate.Value.Day &&
                                                                   x.Tanggal.Value.Month <= vm.ToDate.Value.Month &&
                                                                   x.Tanggal.Value.Year <= vm.FromDate.Value.Year);

                HelperPrint.PrintPreviewWithFormAction("Print Preview",
                                                       new ReportDataSource {
                    Name = "DataSet1", Value = datas
                },
                                                       "MainApp.Reports.Layouts.LaporanPenjualan.rdlc",
                                                       new ReportParameter[] {
                    new ReportParameter("Dari", vm.FromDate.Value.ToShortDateString()),
                    new ReportParameter("Sampai", vm.ToDate.Value.ToShortDateString())
                });
            }
        }
コード例 #2
0
ファイル: MainWindow.xaml.cs プロジェクト: Ocph23/appgrosir
        private void LpPiutang_Click(object sender, RoutedEventArgs e)
        {
            var context = new Datas.Contexts.PenjualanContext();

            var datas = from a in context.Source.Where(x => x.Pembayaran == StatusPembayaran.Kredit && x.Pelunasan == StatusPelunasan.Belum)
                        select new PenjualanModel()
            {
                Tanggal     = a.Tanggal,
                Details     = a.Details,
                JatuhTempo  = a.JatuhTempo,
                Customer    = a.Customer,
                NomorFaktur = a.NomorFaktur,
                Pelunasan   = a.Pelunasan,
                Pembayaran  = a.Pembayaran,

                Total = a.Total
            };


            HelperPrint.PrintPreviewWithFormAction("Print Preview",
                                                   new ReportDataSource {
                Name = "DataSet1", Value = datas.ToList()
            },
                                                   "MainApp.Reports.Layouts.LaporanPiutang.rdlc", null);
        }
コード例 #3
0
ファイル: MainWindow.xaml.cs プロジェクト: Ocph23/appgrosir
        private void Lpbarang_Click(object sender, RoutedEventArgs e)
        {
            var context = new Datas.Contexts.BarangContext();

            HelperPrint.PrintPreviewWithFormAction("Print Preview",
                                                   new ReportDataSource {
                Name = "DataSet1", Value = context.Source
            },
                                                   "MainApp.Reports.Layouts.LaporanBarang.rdlc", null);
        }
コード例 #4
0
ファイル: MainWindow.xaml.cs プロジェクト: Ocph23/appgrosir
        private void Lpcustomer_Click(object sender, RoutedEventArgs e)
        {
            var context = new Datas.Contexts.CustomerContext();

            HelperPrint.PrintPreviewWithFormAction("Print Preview",
                                                   new ReportDataSource {
                Name = "DataSet1", Value = context.Source.Where(x => x.Status == CustomerStatus.Member)
            },
                                                   "MainApp.Reports.Layouts.LaporanCustomer.rdlc", null);
        }