コード例 #1
0
ファイル: Helpers.cs プロジェクト: TrireksaDevelopOrg/3MG
        internal static void PrintWithFormActionTwoSource(string title, ReportDataSource dataHeader, ReportDataSource items, string layout, ReportParameter[] parameters)
        {
            var   content = new ReportContent(dataHeader, items, layout, parameters);
            Style style   = Application.Current.FindResource("WindowKey") as Style;
            var   dlg     = new Window
            {
                Style       = style,
                Content     = content, AllowsTransparency = false,
                Title       = "",
                ResizeMode  = System.Windows.ResizeMode.CanResizeWithGrip,
                WindowState = WindowState.Maximized,
            };

            content.WindowClose = dlg.Close;
            var vm = new BaseNotify();

            vm.MyTitle      = title;
            dlg.DataContext = vm;
            dlg.ShowDialog();
        }
コード例 #2
0
ファイル: Helpers.cs プロジェクト: TrireksaDevelopOrg/3MG
        internal static void PrintPreviewWithFormAction(string title, ReportDataSource source, string layout, ReportParameter[] parameters)
        {
            //TrireksaApp.Reports.Layouts.Nota.rdlc"
            var   content = new ReportContent(source, layout, parameters);
            Style style   = Application.Current.FindResource("WindowKey") as Style;
            var   dlg     = new Window
            {
                Style       = style, AllowsTransparency = false,
                Content     = content,
                Title       = "",
                ResizeMode  = System.Windows.ResizeMode.CanResizeWithGrip,
                WindowState = WindowState.Maximized,
            };

            content.WindowClose = dlg.Close;
            var vm = new BaseNotify();

            vm.MyTitle      = title;
            dlg.DataContext = vm;
            dlg.ShowDialog();
        }