Esempio n. 1
0
        /// <summary>
        /// Save Site settings
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void MasterSave_Click(Object sender, System.EventArgs e)
        {
            if (Page.IsValid)
            {
                if (PXWeb.Settings.BeginUpdate())
                {
                    try
                    {
                        PXWeb.SiteSettings site = (PXWeb.SiteSettings)PXWeb.Settings.NewSettings.General.Site;
                        site.ApplicationName = txtApplicationName.Text;
                        site.LogoPath        = txtLogoPath.Text;
                        switch (cboMainHeaderForTables.SelectedValue)
                        {
                        case "TableName":
                            site.MainHeaderForTables = MainHeaderForTablesType.TableName;
                            break;

                        case "StatisticArea":
                            site.MainHeaderForTables = MainHeaderForTablesType.StatisticArea;
                            break;

                        default:
                            site.MainHeaderForTables = MainHeaderForTablesType.TableName;
                            break;
                        }

                        PXWeb.Settings.Save();
                    }
                    finally
                    {
                        PXWeb.Settings.EndUpdate();
                    }
                }
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Save Site settings
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void MasterSave_Click(Object sender, System.EventArgs e)
        {
            if (Page.IsValid)
            {
                if (PXWeb.Settings.BeginUpdate())
                {
                    try
                    {
                        PXWeb.SiteSettings site = (PXWeb.SiteSettings)PXWeb.Settings.NewSettings.General.Site;
                        site.ApplicationName = txtApplicationName.Text;
                        site.LogoPath        = txtLogoPath.Text;

                        PXWeb.Settings.Save();
                    }
                    finally
                    {
                        PXWeb.Settings.EndUpdate();
                    }
                }
            }
        }