public static void PrintNotaAction(Penjualan obj) { var list = CreateReportModel(obj); HelperPrint print = new HelperPrint(); print.PrintNota(list, "TrireksaApp.Reports.Layouts.NotaComplete.rdlc", null); }
internal List <ReportDataSource> CreateNotaDataSource <T>(List <T> source) { var data = ToDataTable <T>(source); var configs = HelperPrint.GetReportSetting(); var config = configs.FirstOrDefault(); config.Address = config.Address + "\n\r" + config.Phone; config.SignName = ResourcesBase.UserIsLogin.FirstName ?? ResourcesBase.User.UserName; List <ReportDataSource> list = new List <ReportDataSource> { new ReportDataSource("DataSet1", data), new ReportDataSource("Config", configs) }; return(list); }
public static void PrintPreviewNotaAction(Penjualan obj) { var list = CreateReportModel(obj); var helperPrint = new HelperPrint(); var content = new Reports.Contents.ReportContent(helperPrint.CreateNotaDataSource(list), "TrireksaApp.Reports.Layouts.NotaComplete.rdlc", null); var dlg = new ModernWindow { Content = content, Title = "Nota", Style = (Style)App.Current.Resources["BlankWindow"], ResizeMode = System.Windows.ResizeMode.CanResizeWithGrip, WindowState = WindowState.Maximized, }; dlg.ShowDialog(); }