private PdfPCell paymentDetailsSummary(UserShows userShow) { Paragraph p = new Paragraph(); RunningPlanDto tt = new RunningPlanDto(); if (userShow.Userid == -1) { } else { Decimal amount = ProcessEntry.ProcessEntry.GetOutstandingBalance(userShow); tt = Transaction.GetUserTransactions(userShow.ShowID, userShow.RefCode); } p = new Paragraph(); if (tt.Amount < 0) { p.Add(new Phrase(Chunk.NEWLINE)); p.Add(new Phrase(new Chunk(String.Format("*** £{0:0.00} Money Due. (Please pay at show)", Math.Abs(tt.Amount)), headerFont))); p.Add(new Phrase(Chunk.NEWLINE)); } var cell = new PdfPCell(p); cell.BorderWidth = 0; cell.Colspan = 3; return cell; }
public static RunningPlanDto GetUserTransactions(int Id, string refCode) { String moduleSettings = ModuleConfig.GetSettings(); Fpp.Data.Transaction t = new Fpp.Data.Transaction(moduleSettings); DataSet ds = t.GetUserTransactions(Id, refCode); DataRow row = ds.Tables[0].Rows[0]; var item = new RunningPlanDto { Amount = Convert.ToDecimal(row["Amount"]), RefCode = Convert.ToString(row["RefCode"]), EnteredBy = Convert.ToInt32(row["EnteredBy"]) }; return item; }