Example #1
0
        /// <summary>
        /// This gets the community information block
        /// </summary>
        /// <param name="CommunityNumber"></param>
        /// <returns></returns>
        public string CommunityInformationSnapIn()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine("<table border=\"0\" cellspacing=\"0\" cellpadding=\"3\" style=\"width:325px;\">");
            sb.AppendLine("<tr>");
            sb.AppendLine("<td style=\"background-color:#f7f7f7;border:3px solid #efefef;\">");
            sb.AppendFormat("<div style=\"color: #4a6d94; padding-bottom: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 12px; font-weight: bold;\">{0}</div>", CommunityName);

            sb.AppendFormat("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"width:100%;margin-bottom:5px;\">");
            sb.AppendFormat("<tbody>");
            sb.AppendFormat("<tr>");
            sb.AppendFormat("<td style=\"background-color:#FFFFFF;padding:10px;border-top:#e5e5e5 1px solid;border-bottom:#d2d2d2 1px solid;border-left:#dbdbdb 1px solid;border-right:#dbdbdb 1px solid;width: 100%;\"> ");
            sb.AppendFormat("<img src=\"../../../../../../../images/Community/{0}0.jpg\" width='120' style=\"padding:0px 7px 0px 0px;\" align='left' >", CommunityNumber);

            sb.AppendFormat("<div class=\"ContactInformation\" style=\"font-family:Helvetica, Arial, sans-serif;font-size:11px;line-height:14px;color:#999999;\">");

            if (Address1.WhenNullOrEmpty(string.Empty).Length > 0 && City.WhenNullOrEmpty(string.Empty).Length > 0)
            {
                sb.AppendLine(Address1 + "<br>");
                if (Address2.WhenNullOrEmpty(string.Empty).Length > 0)
                {
                    sb.AppendLine(Address2 + "<br>");
                }
                sb.AppendLine(City + ",");
                sb.AppendLine(State + " " + Country);
                sb.AppendLine(PostalCode + "<br>");
            }
            if (PhoneNumber1.WhenNullOrEmpty(string.Empty).Length > 0)
            {
                sb.AppendFormat("Phone: {0}<br />", PhoneNumber1);
            }
            if (FaxNumber.WhenNullOrEmpty(string.Empty).Length > 0)
            {
                sb.AppendFormat("Fax: {0}<br />", FaxNumber);
            }
            sb.AppendFormat("</div>");

            if (Region.WhenNullOrEmpty(string.Empty).Length > 0)
            {
                sb.AppendFormat("<br><div style=\"font-family:Helvetica, Arial, sans-serif;font-size:12px;font-weight:bold;color:#999999;\">Region: {0}</div>", Region.WhenNullOrEmpty("&nbsp;"));
            }
            if (Division.WhenNullOrEmpty(string.Empty).Length > 0)
            {
                sb.AppendFormat("<div style=\"font-family:Helvetica, Arial, sans-serif;font-size:12px;font-weight:bold;color:#999999;\">Division: {0}</div>", Division.WhenNullOrEmpty("&nbsp;"));
            }

            sb.AppendFormat("</td>");
            sb.AppendFormat("</tr>");
            sb.AppendFormat("</tbody>");
            sb.AppendFormat("</table>");

            sb.AppendFormat("</td>");
            sb.AppendFormat("</tr>");
            sb.AppendFormat("</tbody>");
            sb.AppendFormat("</table>");

            return(sb.ToString());
        }