@namespace Oqtane.Modules.Controls @inherits ModuleControlBase @if (_text != string.Empty) { @((MarkupString)_text) } @code { private string _text = string.Empty; [Parameter] public string CreatedBy { get; set; } [Parameter] public DateTime CreatedOn { get; set; } [Parameter] public string ModifiedBy { get; set; } [Parameter] public DateTime ModifiedOn { get; set; } [Parameter] public string DeletedBy { get; set; } [Parameter] public DateTime? DeletedOn { get; set; } [Parameter] public bool IsDeleted { get; set; } [Parameter] public string Style { get; set; } protected override void OnParametersSet() { _text = string.Empty; if (!String.IsNullOrEmpty(CreatedBy) || CreatedOn != null) { _text += "
Created "; if (!String.IsNullOrEmpty(CreatedBy)) { _text += " by " + CreatedBy + ""; } if (CreatedOn != null) { _text += " on " + CreatedOn.ToString("MMM dd yyyy HH:mm:ss") + ""; } _text += "
"; } if (!String.IsNullOrEmpty(ModifiedBy) || ModifiedOn != null) { _text += "Last modified "; if (!String.IsNullOrEmpty(ModifiedBy)) { _text += " by " + ModifiedBy + ""; } if (ModifiedOn != null) { _text += " on " + ModifiedOn.ToString("MMM dd yyyy HH:mm:ss") + ""; } _text += "
"; } if (!String.IsNullOrEmpty(DeletedBy) || DeletedOn.HasValue) { _text += "Deleted "; if (!String.IsNullOrEmpty(DeletedBy)) { _text += " by " + DeletedBy + ""; } if (DeletedOn != null) { _text += " on " + DeletedOn.Value.ToString("MMM dd yyyy HH:mm:ss") + ""; } _text += "
"; } } }