public string DisplayEmail(object EmailToUse, object PersonalEmailAddress, object OfficeEmail, object OfficeEmailOverride) { string emailLink = string.Empty; if (OfficeEmail is DBNull) { OfficeEmail = ""; } switch (EmailToUse.ToString()) { case "OfficePosition": emailLink = HtmlUtils.FormatEmail((string)OfficeEmail); break; case "Override": emailLink = HtmlUtils.FormatEmail((string)OfficeEmailOverride); break; default: if (!(PersonalEmailAddress is DBNull)) { emailLink = HtmlUtils.FormatEmail((string)PersonalEmailAddress); } break; } return(emailLink); }
public string DisplayEmail(object emailAddress) { if (!emailAddress.Equals(string.Empty)) { return(HtmlUtils.FormatEmail((string)emailAddress)); } else { return(string.Empty); } }
/// <summary> /// DisplayEmail correctly formats an Email Address /// </summary> /// <remarks> /// </remarks> /// <history> /// [cnurse] 9/17/2004 Updated to reflect design changes for Help, 508 support /// and localisation /// </history> public string DisplayEmail(string Email) { string returnValue = String.Empty; try { returnValue = HtmlUtils.FormatEmail(Email); } catch (Exception exc) //Module failed to load { Exceptions.ProcessModuleLoadException(this, exc); } return(returnValue); }
public string DisplayEmail(string email) { var displayEmail = Null.NullString; try { if (email != null) { displayEmail = HtmlUtils.FormatEmail(email, false); } } catch (Exception exc) //Module failed to load { Exceptions.ProcessModuleLoadException(this, exc); } return(displayEmail); }
/// <summary> /// DisplayEmail correctly formats an Email Address /// </summary> /// <remarks> /// </remarks> /// <history> /// [cnurse] 9/10/2004 Updated to reflect design changes for Help, 508 support /// and localisation /// </history> public string DisplayEmail(string Email) { string _Email = Null.NullString; try { if (Email != null) { _Email = HtmlUtils.FormatEmail(Email); } } catch (Exception exc) //Module failed to load { Exceptions.ProcessModuleLoadException(this, exc); } return(_Email); }