예제 #1
0
        public override void Printing_PrintPage(object sender, PrintPageEventArgs e)
        {
            e.Graphics.DrawImage(Properties.Resources.Certificate_Template, new PointF(0, 0));
            // Rectangle rect = new Rectangle(e.PageBounds.Width / 3 - 30, e.PageBounds.Height / 3 + 50, 550, 380);
            InitBodyRect(e);
            string first = Printing.Indention + "This is to certify that " + Printing.MrOrMrs(SexOption.Text) + " " + Printing.GetFullName(firstName, middleName, lastName, extension) + " has appeared in my office." + Printing.LineSpace +
                           Printing.Indention + "This certification is issued to " + Printing.MrOrMrs(SexOption.Text) + " " + lastName.Text + (string.IsNullOrEmpty(extension.Text) ? "" : " " + extension.Text) + "  for whatever legal intent it may serve " + Printing.HimOrHer(SexOption.Text) + "." + Printing.LineSpace +
                           Printing.Indention + "Issued this " + IssuedOn.customFormat() + " Barangay Poblacion, Kalibo, Aklan.";

            e.Graphics.DrawString(first, Printing.font, Brushes.Black, rect);
            DrawDebugRecs(rect, e);
            Printing.DrawCap(e, o.captName);
        }
예제 #2
0
        public override void Printing_PrintPage(object sender, PrintPageEventArgs e)
        {
            base.Printing_PrintPage(sender, e);

            string name  = Printing.GetFullName(firstName, middleName, lastName, extension);
            string first = "To whom it may concern," + Printing.LineSpace +
                           Printing.Indention + "This certification is issued to " + Printing.GetFullName(firstName, middleName, lastName, extension) + ", of legal age, Filipino and a residing at " + Printing.IfControlEmpty(Address) + ", per TD No." + Printing.IfControlEmpty(tdNoField) + " in support of " + Printing.HisOrHer(SexOption.Text) + " application for " + Printing.IfControlEmpty(specField) + " permit with the Local Government Unit (LGU) Kalibo." + Printing.LineSpace +
                           Printing.Indention + "Issued this " + IssuedOn.customFormat() + " at Barangay Poblacion, Kalibo, Aklan.";

            e.Graphics.DrawString(first, Printing.font, Brushes.Black, rect);
            DrawDebugRecs(rect, e);
            Printing.DrawSpecimenSignature(e, Printing.GetName(firstName, middleName, lastName, extension));
            Printing.DrawCap(e, o.captName);
        }
        public override void Printing_PrintPage(object sender, PrintPageEventArgs e)
        {
            base.Printing_PrintPage(sender, e);
            rect.Height += 6;
            string text = body.Text;

            e.Graphics.DrawString(text, Printing.font, Brushes.Black, rect);
            DrawDebugRecs(rect, e);
            if (!string.IsNullOrEmpty(specimen.Text))
            {
                Printing.DrawSpecimenSignature(e, specimen.Text);
            }
            if (!string.IsNullOrEmpty(officerInfo.Text))
            {
                Printing.DrawCapSb(e, o.captName, officerInfo.Text);
                return;
            }
            Printing.DrawCap(e, o.captName);
        }
        public override void Printing_PrintPage(object sender, PrintPageEventArgs e)
        {
            //e.Graphics.DrawImage(Properties.Resources.Certificate_Template, 0, 0);
            CustomHeaderCert(e, "BARANGAY/BUSINESS CLEARANCE");
            string name = Printing.GetFullName(firstName, middleName, lastName, extension);

            //var helper = new Class.NameHelper(name);

            #region firstbatch
            Rectangle firstRect  = new Rectangle(e.PageBounds.Width / 3 - 30, e.PageBounds.Height / 3 - 10, 548, 50);
            string    FirstBatch = Printing.Indention + name + " of legal age, Filipino and residing at " +
                                   Printing.IfControlEmpty(address) + " to operate:";
            e.Graphics.DrawString(FirstBatch, Printing.font, Brushes.Black, firstRect);
            DrawDebugRecs(firstRect, e);
            #endregion

            #region Businessname
            Rectangle    bussRect = new Rectangle(e.PageBounds.Width / 3 - 30, e.PageBounds.Height / 3 + 65, 548, 30);
            StringFormat format   = new StringFormat();
            format.Alignment = StringAlignment.Center;

            e.Graphics.DrawString(Printing.IfControlEmpty(establishmentName), Printing.fontBold, Brushes.Black, bussRect, format);
            // e.Graphics.DrawRectangle(Printing.pen, rect1);
            DrawDebugRecs(bussRect, e);
            #endregion

            #region thirdbatch
            Rectangle rect2   = new Rectangle(e.PageBounds.Width / 3 - 30, e.PageBounds.Height / 3 + 120, 548, 295);
            string    details = "With business address at " + Printing.IfControlEmpty(bussAdd) + ".\n" +
                                "This further certifies that the said applicant applying for Business Permit has no records of violations or pending case in this Barangay that could affect the general welfare in the area." +
                                Printing.LineSpace + "This BARANGAY CLEARANCE is hereby issued to the above application in Accordance with Section 152 ©. Of the Local Government Code of 1991." +
                                Printing.LineSpace + "This " + issuedOn.customFormat() + ", at Barangay Hall, Poblacion, Kalibo, Aklan." +
                                Printing.LineSpace + "Conforme";
            e.Graphics.DrawString(details, Printing.font, Brushes.Black, rect2);
            // e.Graphics.DrawRectangle(Printing.pen, rect2);
            DrawDebugRecs(rect2, e);
            #endregion

            #region Signature
            string s        = (string.IsNullOrEmpty(middleName.Text)?string.Empty: middleName.Text[0].ToString());
            string signName = firstName.Text + " " + s + ". " + lastName.Text + (string.IsNullOrEmpty(extension.Text) ? "" : " " + extension.Text);
            ///sign
            var SignRect = new Rectangle(e.PageBounds.Width / 3 - 30, e.PageBounds.Height + 10 - 290, 240, 30);
            //string Name = Printing.IfControlEmpty(this.nameField) + " " + Printing.IfControlEmpty(middleName) + ". " + Printing.IfControlEmpty(lastName);
            e.Graphics.DrawString(signName, Printing.fontBold, Brushes.Black, SignRect);
            //e.Graphics.DrawRectangle(Printing.pen, SignRect);
            DrawDebugRecs(SignRect, e);
            ///end

            /// line
            PointF from = new PointF(e.PageBounds.Width / 3 - 30, e.PageBounds.Height - 260);
            SizeF  size = e.Graphics.MeasureString(signName, Printing.fontBold);
            PointF to   = new PointF(e.PageBounds.Width / 3 - 30 + size.Width, e.PageBounds.Height - 260);
            e.Graphics.DrawLine(Printing.pen, from, to);
            ///end
            #endregion

            #region OR
            var    ORRect = new Rectangle(e.PageBounds.Width / 3 - 30, e.PageBounds.Height + 10 - 260, 240, 85);
            string orTxt  = "OR No: " + Printing.IfControlEmpty(orNo) + "\n" +
                            "DATE: " + orIssueDate.Value.ToString("MMMM") + " " + orIssueDate.Value.Day.ToString() + ", " + orIssueDate.Value.Year.ToString() + "\n" +
                            "AMOUNT:" + Printing.IfControlEmpty(orAmount) + "\n" +
                            "Note: Valid Until: " + orValidityDate.Value.ToString("MMMM") + " " + orValidityDate.Value.Day.ToString() + ", " + orValidityDate.Value.Year.ToString();

            e.Graphics.DrawString(orTxt, Printing.font, Brushes.Black, ORRect);

            DrawDebugRecs(ORRect, e);
            //e.Graphics.DrawRectangle(Printing.pen, ORRect);
            #endregion

            Printing.DrawCap(e, "NEIL I. CANDELARIO");
        }