private void PreviewAction() { var man = new Models.PenjualanManifestView(); man.SetManifest(this); var content = new Reports.Contents.ReportContent(new Microsoft.Reporting.WinForms.ReportDataSource { Value = man.Source }, "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(); }
public ManifestOutGoingListVM() { Manifest = new Models.PenjualanManifestView(); Preview = new CommandHandler { ExecuteAction = x => PreviewAction(), CanExecuteAction = x => PreviewValidation() }; UpdateDeparture = new CommandHandler { CanExecuteAction = x => UpdateDepartureValidate(), ExecuteAction = UpdateDepartureAction }; UpdateOrigin = new CommandHandler { CanExecuteAction = x => UpdateOriginValidate(), ExecuteAction = UpdateOriginAction }; UpdateManifestInfo = new CommandHandler { CanExecuteAction = UpdateManifestInfoValidation, ExecuteAction = UpdateManifestInfoActionAsync }; PrintTitipanKapal = new CommandHandler { CanExecuteAction = x => SelectedItem != null, ExecuteAction = PrintTitipanKapalAction }; PrintPackingList = new CommandHandler { CanExecuteAction = x => SelectedItem != null, ExecuteAction = PrintPackingListAction }; MainVM.ManifestOutgoingCollection.RefreshCompleted += ManifestOutgoingCollection_RefreshCompleted; RefreshAction(null); }