/// <summary> /// Provides the description of the model settings for summary (GetFullSummary) /// </summary> /// <param name="formatForParentControl">Use full verbose description</param> /// <returns></returns> public override string ModelSummary(bool formatForParentControl) { using (StringWriter htmlWriter = new StringWriter()) { if (!formatForParentControl) { htmlWriter.Write("\r\n<div class=\"activityentry\">"); switch (PurchaseOrSale) { case PurchaseOrSalePricingStyleType.Both: htmlWriter.Write("Buy and sell for "); break; case PurchaseOrSalePricingStyleType.Purchase: htmlWriter.Write("Buy for "); break; case PurchaseOrSalePricingStyleType.Sale: htmlWriter.Write("Sell for "); break; } if (Value.ToString() == "0") { htmlWriter.Write("<span class=\"errorlink\">NOT SET"); } else { htmlWriter.Write("<span class=\"setvalue\">"); htmlWriter.Write(Value.ToString("#,0.##")); } htmlWriter.Write("</span> "); htmlWriter.Write("<span class=\"setvalue\">"); htmlWriter.Write(PricingStyle.ToString()); htmlWriter.Write("</span>"); htmlWriter.Write("</div>"); } return(htmlWriter.ToString()); } }
/// <summary> /// Provides the description of the model settings for summary (GetFullSummary) /// </summary> /// <param name="formatForParentControl">Use full verbose description</param> /// <returns></returns> public override string ModelSummary(bool formatForParentControl) { string html = ""; if (!formatForParentControl) { html += "\n<div class=\"activityentry\">"; switch (PurchaseOrSale) { case PurchaseOrSalePricingStyleType.Both: html += "Buy and sell for "; break; case PurchaseOrSalePricingStyleType.Purchase: html += "Buy for "; break; case PurchaseOrSalePricingStyleType.Sale: html += "Sell for "; break; } if (Value.ToString() == "0") { html += "<span class=\"errorlink\">NOT SET"; } else { html += "<span class=\"setvalue\">"; html += Value.ToString("#,0.##"); } html += "</span> "; html += "<span class=\"setvalue\">"; html += PricingStyle.ToString(); html += "</span>"; html += "</div>"; } return(html); }