Exemplo n.º 1
0
        public override void Print()
        {
            DGVPrinter printer = new DGVPrinter();
            printer.Title = "Meriweather Mowing Service";
            printer.SubTitle = "Employee Listing";
            printer.SubTitleFormatFlags = StringFormatFlags.LineLimit |
                                          StringFormatFlags.NoClip;
            printer.PageNumbers = true;
            printer.PageNumberInHeader = false;
            printer.PorportionalColumns = true;
            printer.HeaderCellAlignment = StringAlignment.Near;
            printer.Footer = "Meriweather Management System";
            printer.FooterSpacing = 15;

            // use saved settings
            if (null != MMSUtility.myPrinterSettings)
                printer.printDocument.PrinterSettings = MMSUtility.myPrinterSettings;

            if (null != MMSUtility.myPageSettings)
                printer.printDocument.DefaultPageSettings = MMSUtility.myPageSettings;

            if (DialogResult.OK == printer.DisplayPrintDialog())  // replace DisplayPrintDialog()
            // with your own print dialog
            {
                // save users' settings
                MMSUtility.myPrinterSettings = printer.PrintSettings;
                MMSUtility.myPageSettings = printer.PageSettings;

                // print without displaying the printdialog
                printer.PrintNoDisplay(employeeDataGridView);
            }
        }
Exemplo n.º 2
0
        private void print_btn_Click(object sender, EventArgs e)
        {
            DGVPrinter printer = new DGVPrinter();

            printer.Title = "مصنع ال شاهين للتجارة والصناعة";

            printer.SubTitle = "تقرير عام لأوامر الشغل الخاس بالورشة ";

            printer.SubTitleFormatFlags = StringFormatFlags.LineLimit |

                                          StringFormatFlags.NoClip;

            printer.PageNumbers = true;

            printer.PageNumberInHeader = false;

            printer.PorportionalColumns = true;

            printer.HeaderCellAlignment = StringAlignment.Near;

            printer.Footer = "    ال شاهين للتجارة والصناعة     " + " إسم طالب التقرير :    " + mAccount.SH_EMP_NAME;

            printer.FooterSpacing = 15;
            printer.PrintNoDisplay(workshop_orders_grid_view);
        }
Exemplo n.º 3
0
        private void print_grid_view_btn_Click(object sender, EventArgs e)
        {
            //int height = raw_parcels_grid_view.Height;
            //raw_parcels_grid_view.Height = raw_parcels_grid_view.RowCount * raw_parcels_grid_view.RowTemplate.Height * 2;
            //bmp = new Bitmap(raw_parcels_grid_view.Width , raw_parcels_grid_view.Height);
            //raw_parcels_grid_view.DrawToBitmap(bmp, new Rectangle(0, 0, raw_parcels_grid_view.Width, raw_parcels_grid_view.Height));
            //raw_parcels_grid_view.Height = height;
            //printDialog1.ShowDialog();

            DGVPrinter printer = new DGVPrinter();

            printer.Title = "مصنع ال شاهين للتجارة والصناعة";

            printer.SubTitle = "تقرير عام لطرود الصفيح الخام ";

            printer.SubTitleFormatFlags = StringFormatFlags.LineLimit |

                                          StringFormatFlags.NoClip;

            printer.PageNumbers = true;

            printer.PageNumberInHeader = false;

            printer.PorportionalColumns = true;

            printer.HeaderCellAlignment = StringAlignment.Near;

            printer.Footer = "ال شاهين للتجارة والصناعة";

            printer.FooterSpacing = 15;



            //// use saved settings

            //if (null != myprintsettings)

            //    printer.PrintDocument.PrinterSettings = myprintsettings;

            //if (null != mypagesettings)

            //    printer.PrintDocument.DefaultPageSettings = mypagesettings;



            //if (DialogResult.OK == printer.DisplayPrintDialog())  // replace DisplayPrintDialog()

            //// with your own print dialog

            //{

            //    // save users' settings

            //    myprintsettings = printer.PrinterSettings;

            //    mypagesettings = printer.PageSettings;



            //    // print without displaying the printdialog

            printer.PrintNoDisplay(raw_parcels_grid_view);
        }