using CMS.GlobalHelper; using CMS.PortalControls; public partial class CMSWebParts_Messaging_Outbox : CMSAbstractWebPart { #region "Public properties" /// /// Gets or sets the text which is displayed when no data found. /// public string ZeroRowsText { get { return DataHelper.GetNotEmpty(ValidationHelper.GetString(GetValue("ZeroRowsText"), ucOutbox.ZeroRowsText), ucOutbox.ZeroRowsText); } set { SetValue("ZeroRowsText", value); ucOutbox.ZeroRowsText = value; } } /// /// Gets or sets the size of the page when paging is used. /// public int PageSize { get { return ValidationHelper.GetInteger(GetValue("PageSize"), ucOutbox.PageSize); } set { SetValue("PageSize", value); ucOutbox.PageSize = value; } } /// /// Gets or sets the value that indicates whether the original message should be shown. /// public bool ShowOriginalMessage { get { return ValidationHelper.GetBoolean(GetValue("ShowOriginalMessage"), ucOutbox.ShowOriginalMessage); } set { SetValue("ShowOriginalMessage", value); ucOutbox.ShowOriginalMessage = value; } } #endregion #region "Stop processing" /// /// Returns true if the control processing should be stopped. /// public override bool StopProcessing { get { return base.StopProcessing; } set { base.StopProcessing = value; ucOutbox.StopProcessing = value; } } #endregion /// /// Content loaded event handler. /// public override void OnContentLoaded() { base.OnContentLoaded(); SetupControl(); } /// /// Initializes the control properties. /// protected void SetupControl() { if (StopProcessing) { // Do nothing ucOutbox.StopProcessing = true; } else { ucOutbox.ZeroRowsText = ZeroRowsText; ucOutbox.PageSize = PageSize; ucOutbox.ShowOriginalMessage = ShowOriginalMessage; } } /// /// Reloads the data. /// public override void ReloadData() { SetupControl(); } }