public string View() { string html = File.ReadAllText(@".\Application\Resources\add.html"); string cakesHtml = CakeList.GetCakesAsHtmlString(); html = html.Replace(ReplacementSnip, cakesHtml); return(html); }
public string View() { string html = File.ReadAllText(@".\Application\Resources\search.html"); if (!string.IsNullOrEmpty(this.cakeSearchName) && !string.IsNullOrWhiteSpace(this.cakeSearchName)) { string cakesHtml = CakeList.GetCakesAsHtmlString(this.cakeSearchName); html = html.Replace(ReplacementSnip, cakesHtml); } return(html); }
public string View() { string html = File.ReadAllText(@".\Application\Resources\search.html"); if (!string.IsNullOrEmpty(this.cakeSearchName) && !string.IsNullOrWhiteSpace(this.cakeSearchName)) { string cakesHtml = CakeList.GetCakesAsHtmlString(this.cakeSearchName); html = html.Replace(ReplacementSnip, cakesHtml); } string productsMessage = productCount <= 1 ? $"{productCount} product" : $"{productCount} products"; html = html.Replace(ProductCountSnip, productsMessage); return(html); }