/// <summary>
        ///   LoadSettings loads the settings from the Database and displays them
        /// </summary>
        /// <remarks>
        /// </remarks>
        /// <history>
        /// </history>
        public override void LoadSettings()
        {
            try
            {
                if (!Page.IsPostBack)
                {
                    var htmlTextController      = new HtmlTextController();
                    var workflowStateController = new WorkflowStateController();

                    // get replace token settings
                    if (ModuleSettings["HtmlText_ReplaceTokens"] != null)
                    {
                        chkReplaceTokens.Checked = Convert.ToBoolean(ModuleSettings["HtmlText_ReplaceTokens"]);
                    }

                    //get decoration setting, set to true as default.
                    cbDecorate.Checked = !ModuleSettings.ContainsKey("HtmlText_UseDecorate") ||
                                         ModuleSettings["HtmlText_UseDecorate"].ToString() == "1";

                    // get workflow/version settings
                    var workflows = new ArrayList();
                    foreach (WorkflowStateInfo state in workflowStateController.GetWorkflows(PortalId))
                    {
                        if (!state.IsDeleted)
                        {
                            workflows.Add(state);
                        }
                    }
                    cboWorkflow.DataSource = workflows;
                    cboWorkflow.DataBind();
                    var workflow = htmlTextController.GetWorkflow(ModuleId, TabId, PortalId);
                    if ((cboWorkflow.FindItemByValue(workflow.Value.ToString()) != null))
                    {
                        cboWorkflow.FindItemByValue(workflow.Value.ToString()).Selected = true;
                    }
                    DisplayWorkflowDetails();


                    if (rblApplyTo.Items.FindByValue(workflow.Key) != null)
                    {
                        rblApplyTo.Items.FindByValue(workflow.Key).Selected = true;
                    }

                    txtSearchDescLength.Text = ModuleSettings.ContainsKey("HtmlText_SearchDescLength") &&
                                               !string.IsNullOrEmpty(ModuleSettings["HtmlText_SearchDescLength"].ToString())
                                                                                    ? ModuleSettings["HtmlText_SearchDescLength"].ToString()
                                                    : HtmlTextController.MAX_DESCRIPTION_LENGTH.ToString();
                }
                //Module failed to load
            }
            catch (Exception exc)
            {
                Exceptions.ProcessModuleLoadException(this, exc);
            }
        }
        public override void LoadSettings()
        {
            base.LoadSettings();

            if (ModuleSettings.ContainsKey("Days"))
            {
                txtDays.Text = ModuleSettings["Days"].ToString();
            }
            else
            {
                txtDays.Text = "5";
            }
        }
 public override void LoadSettings()
 {
     base.LoadSettings();
     txtPageSize.Text = ModuleSettings.ContainsKey("PageSize") ? ModuleSettings["PageSize"].ToString() : "5";
 }