Exemplo n.º 1
0
        protected void btnSave_OnClick(object sender, EventArgs e)
        {
            if (Session["customerVo"] != null)
            {
                customerVo = (CustomerVo)Session["customerVo"];
            }
            StringBuilder strRMRecommendationText = new StringBuilder();

            strRMRecommendationText.Append("<html><head><title></title></head><body><table>");
            string strTR       = "<tr><td><p align=\"justify\">&nbsp;</p></td></tr>";
            string strParaText = string.Empty;

            if (!string.IsNullOrEmpty(txtParagraph1.Text.Trim()))
            {
                strRMRecommendationText.Append(strTR.Replace("&nbsp;", txtParagraph1.Text));
                strRMRecommendationText.Append(strTR);
            }

            if (!string.IsNullOrEmpty(txtParagraph2.Text.Trim()))
            {
                strRMRecommendationText.Append(strTR.Replace("&nbsp;", txtParagraph2.Text));
                strRMRecommendationText.Append(strTR);
            }

            if (!string.IsNullOrEmpty(txtParagraph3.Text.Trim()))
            {
                strRMRecommendationText.Append(strTR.Replace("&nbsp;", txtParagraph3.Text));
                strRMRecommendationText.Append(strTR);
            }

            if (!string.IsNullOrEmpty(txtParagraph4.Text.Trim()))
            {
                strRMRecommendationText.Append(strTR.Replace("&nbsp;", txtParagraph4.Text));
                strRMRecommendationText.Append(strTR);
            }

            if (!string.IsNullOrEmpty(txtParagraph5.Text.Trim()))
            {
                strRMRecommendationText.Append(strTR.Replace("&nbsp;", txtParagraph5.Text));
                strRMRecommendationText.Append(strTR);
            }

            strRMRecommendationText.Append("</table></body></html>");

            customerBo.AddRMRecommendationForCustomer(customerVo.CustomerId, Convert.ToString(strRMRecommendationText));
            getCustomerRMRecommendationText();
            setRecommendationControlReadOnly(true);
        }