From 7f05b0798072857e10a7cf09d8f7ff08fc6b6e0e Mon Sep 17 00:00:00 2001 From: Dinesh Date: Wed, 6 Dec 2023 15:57:08 +0545 Subject: [PATCH] PDF css --- .../Controllers/ReportController.cs | 64 +++++++++++-------- 1 file changed, 38 insertions(+), 26 deletions(-) diff --git a/CustomerOnlineV2/CustomerOnlineV2/Controllers/ReportController.cs b/CustomerOnlineV2/CustomerOnlineV2/Controllers/ReportController.cs index 51d61fd..52d8039 100644 --- a/CustomerOnlineV2/CustomerOnlineV2/Controllers/ReportController.cs +++ b/CustomerOnlineV2/CustomerOnlineV2/Controllers/ReportController.cs @@ -63,7 +63,14 @@ namespace CustomerOnlineV2.Controllers //[HttpPost] public IActionResult GeneratePdf(CustomerTransaction customerTransaction) { - + //if (TempData["ResponseCode"] == null || string.IsNullOrEmpty(TempData["ResponseCode"].ToString())) + //{ + // TempData["ResponseCode"] = "0"; + //} + //else + //{ + // TempData["ResponseCode"] = "1"; + //} var loginDetails = HttpContext.GetLoginDetails(); var r = _transactionBusiness.GetTransactionReportList(loginDetails, customerTransaction); @@ -75,13 +82,18 @@ namespace CustomerOnlineV2.Controllers } StringBuilder htmlContent = new StringBuilder(); var imageUrl = "data:image/png;base64," + Convert.ToBase64String(System.IO.File.ReadAllBytes("wwwroot/images/logo.png")); + var svgContent = System.IO.File.ReadAllText("wwwroot/images/imelondon.svg"); + var imageUrl1 = $"data:image/svg+xml;base64,{Convert.ToBase64String(Encoding.UTF8.GetBytes(svgContent))}"; htmlContent.AppendLine(" " + "
" + $"" + - "

IME is the trading name of Subhida UK Ltd company." + + $"" + + "

" + + "



IME is the trading name of Subhida UK Ltd company." + "
Registration No.: 6432399" + "
FCA Registration No.: 576127" + "
HMRC Registration No.: 12663526" + @@ -89,16 +101,16 @@ namespace CustomerOnlineV2.Controllers "
London, HA2 0DU" + "
Email:info@imelondon.co.uk

" + "

Transaction List

"); - htmlContent.AppendLine("" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + + htmlContent.AppendLine("
S.NReceiver NameSend DateTran IdControl NoDelivery MethodStatusTransfer AmountReceive Amount
" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + ""); int sn = 1; @@ -110,22 +122,22 @@ namespace CustomerOnlineV2.Controllers totalPayoutAmt += payoutAmtDecimal; } htmlContent.AppendLine( - $"" + - $"" + - $"" + - $"" + - $"" + - $"" + - $"" + - $"" + - $"" + - $"" + + $"" + + $"" + + $"" + + $"" + + $"" + + $"" + + $"" + + $"" + + $"" + + $"" + $""); sn++; } htmlContent.AppendLine( - $"" + + $"" + $"" + $"" + $"" + @@ -133,8 +145,8 @@ namespace CustomerOnlineV2.Controllers $"" + $"" + $"" + - $"" + - $"" + + $"" + + $"" + $""); htmlContent.AppendLine("
S.NReceiver NameSend DateTran IdControl NoDelivery MethodStatusTransfer AmtReceive Amt
{sn}{transa.Id}{transa.SendDate}{transa.TranId}{transa.ControlNo}{transa.PayoutMode}{transa.PayStatus}{transa.CollAmt}{transa.PayoutAmt}
{sn}{transa.Id}{transa.SendDate}{transa.TranId}{transa.ControlNo}{transa.PayoutMode}{transa.PayStatus}{transa.CollAmt}{transa.PayoutAmt}
Total:{totalPayoutAmt}Total:{totalPayoutAmt}
");