private void PreviewManifestAction() { var data = this.GetInvoiceReportModel(); var config = HelperPrint.GetReportSetting(); var configSource = new ReportDataSource { Value = config, Name = "Config" }; config.FirstOrDefault().SignName = ResourcesBase.User.FullName ?? ResourcesBase.User.UserName; var dataSource = new ReportDataSource { Value = data.OrderBy(x => x.STT), Name = "DataSet1" }; var datasources = new List <ReportDataSource> { dataSource, configSource }; var content = new Reports.Contents.ReportContent(datasources, "TrireksaApp.Reports.Layouts.InvoiceLayout.rdlc", null); var dlg = new FirstFloor.ModernUI.Windows.Controls.ModernWindow { Content = content, Title = "Invoice", Style = (Style)App.Current.Resources["BlankWindow"], ResizeMode = System.Windows.ResizeMode.CanResizeWithGrip, WindowState = WindowState.Maximized, }; dlg.ShowDialog(); }
private void PrintpreviewReportAction(object obj) { var data = MainVM.InvoiceCollections.SourceView.Cast <ModelsShared.Models.Invoice>().ToList(); if (data != null && data.Count > 0) { StringBuilder sb = new StringBuilder(); if (IsUnpaid) { AddText("Belum Dibayar", sb); } if (IsPaid) { AddText("Terbayar", sb); } if (IsPending) { AddText("Pending", sb); } if (IsPaid) { AddText("Batal", sb); } if (sb.Length <= 0) { sb.Append("Laporan Invoice"); } var p = new ReportParameter() { Name = "Title" }; p.Values.Add(sb.ToString()); ReportParameter[] param = new ReportParameter[] { p }; var list = new List <InvoiceReport>(); foreach (var item in data) { list.Add(new InvoiceReport(item)); } var content = new Reports.Contents.ReportContent(new Microsoft.Reporting.WinForms.ReportDataSource { Value = list }, "TrireksaApp.Reports.Layouts.InvoiceReportLayout.rdlc", param); var dlg = new FirstFloor.ModernUI.Windows.Controls.ModernWindow { Content = content, Title = "Daftar Invoice", Style = (Style)App.Current.Resources["BlankWindow"], ResizeMode = System.Windows.ResizeMode.CanResizeWithGrip, WindowState = WindowState.Maximized, }; dlg.ShowDialog(); } }
private void PreviewManifestAction() { var data = this.GetInvoiceReportModel(); var content = new Reports.Contents.ReportContent(new Microsoft.Reporting.WinForms.ReportDataSource { Value = data.OrderBy(O => O.STT) }, "TrireksaApp.Reports.Layouts.InvoiceLayout.rdlc", null); var dlg = new FirstFloor.ModernUI.Windows.Controls.ModernWindow { Content = content, Title = "Invoice", Style = (Style)App.Current.Resources["BlankWindow"], ResizeMode = System.Windows.ResizeMode.CanResizeWithGrip, WindowState = WindowState.Maximized, }; dlg.ShowDialog(); }
/// <summary> /// Method for the right click on a transition. /// This method opens a footprintviewer /// </summary> /// <autor>Andrej Albrecht</autor> private static void Transition_MouseRightButtonDown(object sender, MouseButtonEventArgs e) { try { Thumb thumb = (Thumb)sender; String transitionName = thumb.GetValue(ContentProperty).ToString(); ModernWindow footprintViewer = new ModernWindow { Style = (Style)Application.Current.Resources["EmptyWindow"], Width = 600, Height = 550, Content = new FootprintViewer(transitionName), //Topmost = true }; footprintViewer.ShowDialog(); } catch (Exception Ex) { ErrorHandling.ReportErrorToUser("Error: " + Ex.Message + Ex.StackTrace); } }