public static MvcHtmlString HistoryItem(this HtmlHelper html, IHistoryItemPresentable historyItem) { if (historyItem.Client != null) return html.Partial("History/ClientHistoryItem", historyItem); else if (historyItem.Project != null) return html.Partial("History/ProjectHistoryItem", historyItem); else if (historyItem.Testimonial != null) return html.Partial("History/TestimonialHistoryItem", historyItem); else return null; }
public static MvcHtmlString HistoryItem(this HtmlHelper html, IHistoryItemPresentable historyItem) { if (historyItem.Client != null) { return(html.Partial("History/ClientHistoryItem", historyItem)); } else if (historyItem.Project != null) { return(html.Partial("History/ProjectHistoryItem", historyItem)); } else if (historyItem.Testimonial != null) { return(html.Partial("History/TestimonialHistoryItem", historyItem)); } else { return(null); } }