Beispiel #1
0
        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();
        }
Beispiel #2
0
        private async void PrintCommandAction(object obj)
        {
            using (var print = new HelperPrint())
            {
                if (SelectedPTI.Details.Count <= 0)
                {
                    var res = await ptiContext.GetDetailOfPTI(SelectedPTI);

                    foreach (var item in res)
                    {
                        SelectedPTI.Details.Add(item);
                    }


                    var header = new ReportDataSource()
                    {
                        Value = print.ToDataTable <PTI>(new List <PTI> {
                            SelectedPTI
                        }),
                        Name = "Header"
                    };

                    var source = new ReportDataSource()
                    {
                        Name = "Detail", Value = print.ToDataTable <collies>(SelectedPTI.Details.ToList())
                    };
                    var datasources = new List <ReportDataSource>()
                    {
                        header, source
                    };

                    print.PrintDocument(datasources, "MainApp.Reports.Layouts.PTI.rdlc", null);
                }
            }
        }
Beispiel #3
0
        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 SaveAction(object obj)
 {
     try
     {
         if (this.context.Save(Selected))
         {
             if (Message.QuestionYesNo("Data Berhasil Disimpan, Print Faktur ?"))
             {
                 Selected.NamaCustomer = Selected.Customer.NamaCustomer;
                 Selected.KodeCustomer = Selected.Customer.KodeCustomer;
                 var layout = "MainApp.Reports.Layouts.FakturPernjualan.rdlc";
                 if (Selected.Pembayaran == StatusPembayaran.Kredit)
                 {
                     layout = "MainApp.Reports.Layouts.FakturPernjualanKredit.rdlc";
                 }
                 HelperPrint.PrintWithFormActionTwoSource("Print Preview",
                                                          new ReportDataSource {
                     Name = "Header", Value = new List <Penjualan> {
                         Selected
                     }
                 },
                                                          new ReportDataSource {
                     Name = "DataSet1", Value = Selected.Details.ToList()
                 },
                                                          layout, null);
             }
             BarangSourceView.Refresh();
             CancelCommand.Execute(null);
         }
     }
     catch (Exception ex)
     {
         Message.Error(ex.Message);
     }
 }
        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 printAction(object obj)
        {
            var datas =  SourceView.Cast<PelunasanUtang>().ToList();

            var dari = FromDate == null ? "" : FromDate.Value.ToShortDateString();
            var sampai = ToDate == null ? "" : ToDate.Value.ToShortDateString();

            HelperPrint.PrintPreviewWithFormAction("Print Preview",
                new ReportDataSource { Name = "DataSet1", Value = AutoMapper.Mapper.Map<List<PelunasanUtangModel>>(datas) },
                    "MainApp.Reports.Layouts.PelunasanUtang.rdlc",
                    new ReportParameter[] {
                            new ReportParameter("Dari", dari),new ReportParameter("Sampai", sampai)
                    });
        }
Beispiel #9
0
        private void PrintAction(object obj)
        {
            var header = new ReportHeader {
                Title = Title, Tahun = DateTime.Now.Year
            };

            HelperPrint.PrintWithFormActionTwoSource("Print Preview",
                                                     new ReportDataSource {
                Name = "Header", Value = new List <ReportHeader>()
                {
                    header
                }
            },
                                                     new ReportDataSource {
                Name = "DataSet1", Value = datgrafirk
            },
                                                     "Main.Reports.Layout.GrafikMultiSeries.rdlc", null);
        }
        private void printAction(object obj)
        {
            var dari   = FromDate == null ? "" : FromDate.Value.ToShortDateString();
            var sampai = ToDate == null ? "" : ToDate.Value.ToShortDateString();

            var datas = from a in  SourceView.Cast <PelunasanPiutang>()
                        select new PelunasanPiutangModel {
                Bayar = a.Bayar, Cutomer = a.Customer, TanggalBayar = a.TanggalBayar
            };



            HelperPrint.PrintPreviewWithFormAction("Print Preview",
                                                   new ReportDataSource {
                Name = "DataSet1", Value = datas.ToList()
            },
                                                   "MainApp.Reports.Layouts.PelunasanPiutang.rdlc",
                                                   new ReportParameter[] {
                new ReportParameter("Dari", dari), new ReportParameter("Sampai", sampai)
            });
        }
Beispiel #11
0
        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);
            }
        }