public void Execute(ILog log)
        {
            Log = log;
            ServicesHelper.EnsureInitialized();
            SiteSettings settings = SetupContext();

            SiteSettingsManager.Save(settings);
            ProcessUsers("user_{0}");
            UpdateAspNetMembershipTable();
        }
Пример #2
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        SiteSettings settings = SiteSettingsManager.GetSiteSettings();

        settings.SiteName           = txtSiteName.Text;
        settings.SmtpServer         = txtSmtpServer.Text;
        settings.SmtpServerUserName = txtUserName.Text;
        settings.SmtpServerPassword = txtPwd.Text;
        SiteSettingsManager.Save(settings);
        lblTip.Text = "Save Success!";
    }
    void BindData()
    {
        SiteSettings settings = SiteSettingsManager.GetSiteSettings();

        this.txtAdminEmail.Text           = settings.AdminEmailAddress;
        this.txtEmailThrottle.Text        = settings.EmailThrottle.ToString();
        this.txtSmtpServer.Text           = settings.SmtpServer;
        this.txtSmtpPort.Text             = settings.SmtpPortNumber.ToString();
        this.txtSmtpPwd.Text              = settings.SmtpServerPassword;
        this.txtSmtpUserName.Text         = settings.SmtpServerUserName;
        this.rblEnableEmail.SelectedValue = settings.EnaleEmail;
        this.rblNeedLogin.SelectedValue   = settings.SmtpServerRequiredLogin;
        this.rblUseSSL.SelectedValue      = settings.SmtpServerUsingSsl;
    }
Пример #4
0
    protected void Bind()
    {
        //lblRes.Text = ResourceManager.GetString("AddAComment");
        SiteSettings settings = SiteSettingsManager.GetSiteSettings();

        txtSiteName.Text   = settings.SiteName;
        txtSmtpServer.Text = settings.SmtpServer;
        txtUserName.Text   = settings.SmtpServerUserName;
        txtPwd.Text        = settings.SmtpServerPassword;

        DropDownList1.DataSource     = StrategyFactory.GetStrategies();
        DropDownList1.DataTextField  = "Text";
        DropDownList1.DataValueField = "Name";
        DropDownList1.DataBind();
    }
    void BindData()
    {
        SiteSettings settings = SiteSettingsManager.GetSiteSettings();

        this.txtCopyright.Text             = settings.Copyright;
        this.txtSearchMetaDescription.Text = settings.SearchMetaDescription;
        this.txtSearchMetaKeywords.Text    = settings.SearchMetaKeywords;
        this.txtSiteDesc.Text   = settings.SiteDescription;
        this.txtSiteName.Text   = settings.SiteName;
        this.txtIdea.Text       = settings.CompanyIdea;
        this.txtService.Text    = settings.CompanyService;
        this.txtServiceTel.Text = settings.ServiceTel;
        this.txtICP.Text        = settings.CompanyICP;
        this.imgShow.ImageUrl   = SiteUrlManager.GetShowPicture((int)this.imgShow.Width.Value, (int)this.imgShow.Height.Value);
    }
    public void btnPost_Click(object sender, EventArgs e)
    {
        SiteSettings settings = SiteSettingsManager.GetSiteSettings();

        settings.AdminEmailAddress       = this.txtAdminEmail.Text;
        settings.EmailThrottle           = GlobalSettings.IsNullOrEmpty(this.txtEmailThrottle.Text) ? -1 : Convert.ToInt32(this.txtEmailThrottle.Text);
        settings.SmtpServer              = this.txtSmtpServer.Text;
        settings.SmtpPortNumber          = GlobalSettings.IsNullOrEmpty(this.txtSmtpPort.Text) ? 25 : Convert.ToInt32(this.txtSmtpPort.Text);
        settings.SmtpServerPassword      = this.txtSmtpPwd.Text;
        settings.SmtpServerUserName      = this.txtSmtpUserName.Text;
        settings.EnaleEmail              = this.rblEnableEmail.SelectedValue;
        settings.SmtpServerRequiredLogin = this.rblNeedLogin.SelectedValue;
        settings.SmtpServerUsingSsl      = this.rblUseSSL.SelectedValue;
        SiteSettingsManager.Save(settings);
        mbMessage.ShowMsg("修改邮件配置信息成功!", Color.Navy);
    }
    public void btnPost_Click(object sender, EventArgs e)
    {
        SiteSettings settings = SiteSettingsManager.GetSiteSettings();

        settings.Copyright             = this.txtCopyright.Text.Trim();
        settings.SearchMetaDescription = this.txtSearchMetaDescription.Text.Trim();
        settings.SearchMetaKeywords    = this.txtSearchMetaKeywords.Text.Trim();
        settings.SiteDescription       = this.txtSiteDesc.Text.Trim();
        settings.SiteName       = this.txtSiteName.Text.Trim();
        settings.CompanyIdea    = this.txtIdea.Text;
        settings.CompanyService = this.txtService.Text;
        settings.CompanyICP     = this.txtICP.Text.Trim();
        settings.ServiceTel     = this.txtServiceTel.Text.Trim();
        if (fuShow.PostedFile != null && fuShow.PostedFile.ContentLength > 0)
        {
            settings.ShowPicture = Path.GetFileName(fuShow.PostedFile.FileName);
            SiteFiles.AddFile(fuShow.PostedFile.InputStream, "ShowPicture", settings.ShowPicture);
        }
        SiteSettingsManager.Save(settings);
        mbMessage.ShowMsg("修改站点信息成功!", Color.Navy);
        BindData();
    }