private void docPrint_PrintPage(object sender,
System.Drawing.Printing.PrintPageEventArgs e)
{
e.Graphics.DrawLine(new Pen(Color.Black, 2), 60, 90, 720, 90);
e.Graphics.DrawLine(new Pen(Color.Black, 1), 60, 93, 720, 93);
string strDisplay = "Georgetown Dry Cleaning Services";
System.Drawing.Font fntString = new Font("Times New Roman", 28,
FontStyle.Bold);
e.Graphics.DrawString(strDisplay, fntString,
Brushes.Black, 80, 100);
strDisplay = "Customer Cleaning Order";
fntString = new System.Drawing.Font("Times New Roman", 18,
FontStyle.Bold);
e.Graphics.DrawString(strDisplay, fntString,
Brushes.Black, 220, 150);
e.Graphics.DrawLine(new Pen(Color.Black, 1), 60, 184, 720, 184);
e.Graphics.DrawLine(new Pen(Color.Black, 2), 60, 188, 720, 188);
fntString = new System.Drawing.Font("Times New Roman", 12,
FontStyle.Bold);
e.Graphics.DrawString("", fntString,
Brushes.Black, 80, 200);
fntString = new System.Drawing.Font("Times New Roman", 12,
FontStyle.Bold);
e.Graphics.DrawString("Customer Identification: ", fntString,
Brushes.Black, 100, 220);
fntString = new System.Drawing.Font("Times New Roman", 12,
FontStyle.Regular);
e.Graphics.DrawString(txtCustomerName.Text + " - " +
txtCustomerPhone.Text, fntString,
Brushes.Black, 300, 220); ;
e.Graphics.DrawLine(new Pen(Color.Black, 1), 100, 240, 700, 240);
fntString = new Font("Times New Roman", 12, FontStyle.Bold);
e.Graphics.DrawString("Date Left: ", fntString,
Brushes.Black, 100, 260);
fntString = new Font("Times New Roman", 12, FontStyle.Regular);
e.Graphics.DrawString(dtpDateLeft.Value.ToString("D"), fntString,
Brushes.Black, 300, 260);
e.Graphics.DrawLine(new Pen(Color.Black, 1), 100, 280, 700, 280);
fntString = new Font("Times New Roman", 12, FontStyle.Bold);
e.Graphics.DrawString("Time Left: ", fntString,
Brushes.Black, 500, 260);
fntString = new Font("Times New Roman", 12, FontStyle.Regular);
e.Graphics.DrawString(dtpTimeLeft.Value.ToString("t"), fntString,
Brushes.Black, 620, 260);
fntString = new System.Drawing.Font("Times New Roman",
12, FontStyle.Bold);
e.Graphics.DrawString("Date Expected: ", fntString,
Brushes.Black, 100, 300);
fntString = new Font("Times New Roman", 12, FontStyle.Regular);
e.Graphics.DrawString(dtpDateExpected.Value.ToString("D"),
fntString, Brushes.Black, 300, 300);
fntString = new Font("Times New Roman", 12, FontStyle.Bold);
e.Graphics.DrawString("Time Expected: ", fntString,
Brushes.Black, 500, 300);
fntString = new Font("Times New Roman", 12, FontStyle.Regular);
e.Graphics.DrawString(dtpTimeExpected.Value.ToString("t"),
fntString, Brushes.Black, 620, 300);
e.Graphics.DrawLine(new Pen(Color.Black, 2), 100, 320, 700, 320);
fntString = new Font("Times New Roman", 12, FontStyle.Bold);
e.Graphics.DrawString("Item Type",
fntString, Brushes.Black, 140, 350);
e.Graphics.DrawString("Unit Price",
fntString, Brushes.Black, 300, 350);
e.Graphics.DrawString("Quantity",
fntString, Brushes.Black, 405, 350);
e.Graphics.DrawString("Sub-Total",
fntString, Brushes.Black, 500, 350);
e.Graphics.DrawLine(new Pen(Color.Black, 2), 140, 370, 640, 370);
StringFormat fmtString = new StringFormat();
fmtString.Alignment = StringAlignment.Far;
e.Graphics.DrawString("Shirts",
fntString, Brushes.Black, 150, 380);
fntString = new Font("Times New Roman", 12, FontStyle.Regular);
e.Graphics.DrawString(txtUnitPriceShirts.Text, fntString,
Brushes.Black, 350, 380, fmtString);
e.Graphics.DrawString(txtQuantityShirts.Text, fntString,
Brushes.Black, 440, 380, fmtString);
e.Graphics.DrawString(txtSubTotalShirts.Text, fntString,
Brushes.Black, 550, 380, fmtString);
e.Graphics.DrawLine(new Pen(Color.Black, 1), 140, 400, 640, 400);
fntString = new Font("Times New Roman", 12, FontStyle.Bold);
e.Graphics.DrawString("Pants",
fntString, Brushes.Black, 150, 410);
fntString = new Font("Times New Roman", 12, FontStyle.Regular);
e.Graphics.DrawString(txtUnitPricePants.Text, fntString,
Brushes.Black, 350, 410, fmtString);
e.Graphics.DrawString(txtQuantityPants.Text, fntString,
Brushes.Black, 440, 410, fmtString);
e.Graphics.DrawString(txtSubTotalPants.Text, fntString,
Brushes.Black, 550, 410, fmtString);
e.Graphics.DrawLine(new Pen(Color.Black, 1), 140, 430, 640, 430);
fntString = new Font("Times New Roman", 12, FontStyle.Bold);
e.Graphics.DrawString(cbxItem1.Text,
fntString, Brushes.Black, 150, 440);
fntString = new Font("Times New Roman", 12, FontStyle.Regular);
e.Graphics.DrawString(txtUnitPriceItem1.Text, fntString,
Brushes.Black, 350, 440, fmtString);
e.Graphics.DrawString(txtQuantityItem1.Text, fntString,
Brushes.Black, 440, 440, fmtString);
e.Graphics.DrawString(txtSubTotalItem1.Text, fntString,
Brushes.Black, 550, 440, fmtString);
e.Graphics.DrawLine(new Pen(Color.Black, 1), 140, 460, 640, 460);
fntString = new Font("Times New Roman", 12, FontStyle.Bold);
e.Graphics.DrawString(cbxItem2.Text,
fntString, Brushes.Black, 150, 470);
fntString = new Font("Times New Roman", 12, FontStyle.Regular);
e.Graphics.DrawString(txtUnitPriceItem2.Text, fntString,
Brushes.Black, 350, 470, fmtString);
e.Graphics.DrawString(txtQuantityItem2.Text, fntString,
Brushes.Black, 440, 470, fmtString);
e.Graphics.DrawString(txtSubTotalItem2.Text, fntString,
Brushes.Black, 550, 470, fmtString);
e.Graphics.DrawLine(new Pen(Color.Black, 1), 140, 490, 640, 490);
fntString = new Font("Times New Roman", 12, FontStyle.Bold);
e.Graphics.DrawString(cbxItem3.Text,
fntString, Brushes.Black, 150, 500);
fntString = new Font("Times New Roman", 12, FontStyle.Regular);
e.Graphics.DrawString(txtUnitPriceItem3.Text, fntString,
Brushes.Black, 350, 500, fmtString);
e.Graphics.DrawString(txtQuantityItem3.Text, fntString,
Brushes.Black, 440, 500, fmtString);
e.Graphics.DrawString(txtSubTotalItem3.Text, fntString,
Brushes.Black, 550, 500, fmtString);
e.Graphics.DrawLine(new Pen(Color.Black, 1), 140, 520, 640, 520);
fntString = new Font("Times New Roman", 12, FontStyle.Bold);
e.Graphics.DrawString(cbxItem4.Text,
fntString, Brushes.Black, 150, 530);
fntString = new Font("Times New Roman", 12, FontStyle.Regular);
e.Graphics.DrawString(txtUnitPriceItem4.Text, fntString,
Brushes.Black, 350, 530, fmtString);
e.Graphics.DrawString(txtQuantityItem4.Text, fntString,
Brushes.Black, 440, 530, fmtString);
e.Graphics.DrawString(txtSubTotalItem4.Text, fntString,
Brushes.Black, 550, 530, fmtString);
e.Graphics.DrawLine(new Pen(Color.Black, 2), 140, 550, 640, 550);
fntString = new System.Drawing.Font("Times New Roman", 12,
FontStyle.Bold);
e.Graphics.DrawString("Order Summary", fntString,
Brushes.Black, 260, 600);
e.Graphics.DrawLine(new Pen(Color.Black, 2), 220, 620, 560, 620);
fntString = new System.Drawing.Font("Times New Roman",
10, FontStyle.Bold);
e.Graphics.DrawString("Cleaning Total:", fntString,
Brushes.Black, 260, 630);
fntString = new System.Drawing.Font("Times New Roman",
10, FontStyle.Regular);
e.Graphics.DrawString(txtCleaningTotal.Text, fntString,
Brushes.Black, 440, 630, fmtString);
e.Graphics.DrawLine(new Pen(Color.Black, 1),
220, 650, 520, 650);
fntString = new System.Drawing.Font("Times New Roman",
10, FontStyle.Bold);
e.Graphics.DrawString("Tax Rate:", fntString,
Brushes.Black, 260, 660);
fntString = new System.Drawing.Font("Times New Roman",
10, FontStyle.Regular);
e.Graphics.DrawString(txtTaxRate.Text, fntString,
Brushes.Black, 440, 660, fmtString);
e.Graphics.DrawLine(new Pen(Color.Black, 1),
220, 680, 520, 680);
fntString = new System.Drawing.Font("Times New Roman",
10, FontStyle.Bold);
e.Graphics.DrawString("Tax Amount:", fntString,
Brushes.Black, 260, 690);
fntString = new System.Drawing.Font("Times New Roman",
10, FontStyle.Regular);
e.Graphics.DrawString(txtTaxAmount.Text, fntString,
Brushes.Black, 440, 690, fmtString);
e.Graphics.DrawLine(new Pen(Color.Black, 1),
220, 710, 520, 710);
fntString = new System.Drawing.Font("Times New Roman",
10, FontStyle.Bold);
e.Graphics.DrawString("Net Price:", fntString,
Brushes.Black, 260, 720);
fntString = new System.Drawing.Font("Times New Roman",
10, FontStyle.Regular);
e.Graphics.DrawString(txtNetPrice.Text, fntString,
Brushes.Black, 440, 720, fmtString);
e.Graphics.DrawLine(new Pen(Color.Black, 2),
200, 740, 560, 740);
}
|