コード例 #1
0
ファイル: AddView.cs プロジェクト: nayots/SoftUni
        public string View()
        {
            string html = File.ReadAllText(@".\Application\Resources\add.html");

            string cakesHtml = CakeList.GetCakesAsHtmlString();

            html = html.Replace(ReplacementSnip, cakesHtml);

            return(html);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }