private void generateHtmlDescription() { // Get Id var categoryIdString = ID.Substring(0, 2); var fileName = "Html_" + categoryIdString + ".html"; var sReader = new StreamReader(fileName); HtmlDescription = sReader.ReadToEnd(); HtmlDescription = HtmlDescription.Replace("[PRODUCT_DETAIL]", Description); }
private void GenerateHtmlDescription() { // Get Id var categoryIdString = Id.Substring(0, 3); var appSettingName = "ProductNameTemplate_" + categoryIdString; ProductName += ConfigurationManager.AppSettings[appSettingName]; switch (categoryIdString) { case "PYD": case "PYS": case "PYW": ProductName = ProductName.Replace("[PAYEAR_VALUE]", _detailInfo.Boobs); break; case "PYK": case "PYP": ProductName = ProductName.Replace("[PAYEAR_VALUE]", _detailInfo.Waist); break; case "PYB": break;; default: break; } var fileName = "Html_" + categoryIdString + ".html"; var sReader = new StreamReader(fileName); HtmlDescription = sReader.ReadToEnd(); HtmlDescription = HtmlDescription.Replace("[PAYEAR_PRODUCTNAME]", ProductName); HtmlDescription = HtmlDescription.Replace("[PAYEAR_BOOBS]", _detailInfo.Boobs); HtmlDescription = HtmlDescription.Replace("[PAYEAR_WAIST]", _detailInfo.Waist); HtmlDescription = HtmlDescription.Replace("[PAYEAR_HIP]", _detailInfo.Hip); HtmlDescription = HtmlDescription.Replace("[PAYEAR_LENGTH]", _detailInfo.Length); HtmlDescription = HtmlDescription.Replace("[PAYEAR_SHOULDER]", _detailInfo.Shoulder); HtmlDescription = HtmlDescription.Replace("[PAYEAR_EARLY_ARM]", _detailInfo.EarlyArm); HtmlDescription = HtmlDescription.Replace("[PAYEAR_FINAL_ARM]", _detailInfo.FinalArm); HtmlDescription = HtmlDescription.Replace("[PAYEAR_CROTCH]", _detailInfo.Crotch); HtmlDescription = HtmlDescription.Replace("[PAYEAR_EARLY_LEG]", _detailInfo.EarlyLeg); HtmlDescription = HtmlDescription.Replace("[PAYEAR_FINAL_LEG]", _detailInfo.FinalLeg); }
partial void OnHtmlDescriptionChanged() { TextDescription = HtmlDescription.StripHtml().Trim(); }