public string ToHtml() { var row = EmbadedResources.GetEmbeddedResource("Mashkanta.Reports.TableCourseRows.html"); row = row.Replace("@@Course@@", GetCourseTitle(Type)); row = row.Replace("@@Amount@@", Amount.ToString("C0")); row = row.Replace("@@AmountPercentage@@", (LoanPercentage * 100).ToString("N0")); row = row.Replace("@@Interest@@", Interest.ToString("N2")); row = row.Replace("@@Period@@", $"{Period} חודשים ({Years} שנים)"); row = row.Replace("@@Rcycle@@", Recycle == null ? "ללא" : "כן"); return(row); }
public string ToHtml(CourseType courseType) { var table1 = EmbadedResources.GetEmbeddedResource("Mashkanta.Reports.Table1.html"); table1 = table1.Replace("@@TITLE@@", Course.GetCourseTitle(courseType)); table1 = table1.Replace("@@RATIO@@", Ratio.ToString("N2")); table1 = table1.Replace("@@MIN_PAYMENT@@", MinMonthReturn.ToString("N2")); table1 = table1.Replace("@@MAX_PAYMENT@@", MaxMonthReturn.ToString("N2")); table1 = table1.Replace("@@TOTAL_PAYMENT@@", TotalReturn.ToString("N2")); table1 = table1.Replace("@@INTEREST@@", TotalInterestAndPriceIndex.ToString("N2")); var result = $"{table1}\r\n{Payments.ToHtml(courseType)}\r\n<hr />"; return(result); }