I changed my int to decimal? and I am now getting a error in my PdfSharp controller
gfx.DrawString(job.JobRetainage.ToString("C",
new System.Globalization.CultureInfo("en-US")), BodyFont, XBrushes.Black,
new XRect(460, 160, page.Width, page.Height),
XStringFormats.TopLeft);
Error Message
no overload for method tostring takes 2 arguments
Try this:
gfx.DrawString(job.JobRetainage.Value.ToString("C",
new System.Globalization.CultureInfo("en-US")), BodyFont, XBrushes.Black,
new XRect(460, 160, page.Width, page.Height),
XStringFormats.TopLeft);
You would also want to check for null or use GetValueOrDefault()
.