private void PrintPictureAction(object obj) { var settingData = HelperPrint.GetReportSetting(); SelectedPhoto.STT = PenjualanItem.STT; var listSource = new List <ReportDataSource> { new ReportDataSource { Value = new List <ModelsShared.Photo> { SelectedPhoto }, Name = "DataSet1" }, new ReportDataSource { Value = settingData, Name = "Config" } }; var content = new Reports.Contents.ReportContent(listSource, "TrireksaApp.Reports.Layouts.PrintImageLayout.rdlc", null); var dlg = new ModernWindow { Content = content, Title = "Manifest Outgoing", Style = (Style)App.Current.Resources["BlankWindow"], ResizeMode = System.Windows.ResizeMode.CanResizeWithGrip, WindowState = WindowState.Maximized, }; dlg.ShowDialog(); }
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 async void PrintPackingListAction(object obj) { var list = await MainVM.ManifestOutgoingCollection.GetPackingList(SelectedItem.Id); var config = HelperPrint.GetReportSetting(); var sources = new List <Microsoft.Reporting.WinForms.ReportDataSource>() { new Microsoft.Reporting.WinForms.ReportDataSource() { Name = "DataSet1", Value = list }, new Microsoft.Reporting.WinForms.ReportDataSource() { Name = "Config", Value = config } }; var content = new Reports.Contents.ReportContent(sources, "TrireksaApp.Reports.Layouts.PackingListLayout.rdlc", null); var dlg = new ModernWindow { Content = content, Title = "Bukti Titipan Kapal", Style = (Style)App.Current.Resources["BlankWindow"], ResizeMode = System.Windows.ResizeMode.CanResizeWithGrip, WindowState = WindowState.Maximized, }; dlg.ShowDialog(); }
private void PreviewAction() { var listSource = new List <Microsoft.Reporting.WinForms.ReportDataSource>(); var setting = HelperPrint.GetReportSetting(); setting.FirstOrDefault().SignName = ResourcesBase.User.FullName ?? ResourcesBase.User.UserName; listSource.Add(new Microsoft.Reporting.WinForms.ReportDataSource() { Value = Manifest.Source, Name = "DataSet1" }); listSource.Add(new Microsoft.Reporting.WinForms.ReportDataSource() { Value = setting, Name = "Config" }); var content = new Reports.Contents.ReportContent(listSource, "TrireksaApp.Reports.Layouts.ManifestOutgoingLayout.rdlc", null); var dlg = new ModernWindow { Content = content, Title = "Manifest Outgoing", Style = (Style)App.Current.Resources["BlankWindow"], ResizeMode = System.Windows.ResizeMode.CanResizeWithGrip, WindowState = WindowState.Maximized, }; dlg.ShowDialog(); }
private void PrintTitipanKapalAction(object obj) { var item = SelectedItem; if (item != null && item.Information != null) { var list = new List <Titipankapal> { new Titipankapal { AgentContactName = item.Agent.ContactName, AgentName = item.Agent.Name, AgentHandphone = item.Agent.Handphone, AgentPhone = item.Agent.Phone, ArmadaName = item.Information.ArmadaName, Code = item.Id, CrewAddress = item.Information.Address, Jumlah = item.PackingList.GroupBy(x => x.PackNumber).Count(), CrewContact = item.Information.Contact, CrewName = item.Information.CrewName, Destination = item.DestinationNavigation.Name, Origin = item.OriginNavigation.Name, PackNumber = item.PackingList.GroupBy(x => x.PackNumber).Count(), DestinationCode = item.DestinationNavigation.Code, OriginCode = item.OriginNavigation.Code, PortType = item.PortType, ReferenceNumber = item.Information.ReferenceNumber } }; var config = HelperPrint.GetReportSetting(); var sources = new List <Microsoft.Reporting.WinForms.ReportDataSource>() { new Microsoft.Reporting.WinForms.ReportDataSource() { Name = "DataSet1", Value = list }, new Microsoft.Reporting.WinForms.ReportDataSource() { Name = "Config", Value = config } }; var content = new Reports.Contents.ReportContent(sources, "TrireksaApp.Reports.Layouts.TitipanKapalLayout.rdlc", null); var dlg = new ModernWindow { Content = content, Title = "Bukti Titipan Kapal", Style = (Style)App.Current.Resources["BlankWindow"], ResizeMode = System.Windows.ResizeMode.CanResizeWithGrip, WindowState = WindowState.Maximized, }; dlg.ShowDialog(); } else { ModernDialog.ShowMessage("Data Tidak Ditemukan", "Info", MessageBoxButton.OK); } }
private void SaveAndPrintAction() { Save.Execute(null); if (this.Number > 0) { var print = new HelperPrint(); 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 }; print.PrintDocument(datasources, "TrireksaApp.Reports.Layouts.InvoiceLayout.rdlc", null); } }