コード例 #1
0
        /// <summary>
        /// 安装解决方案
        /// </summary>
        private void InstallSolution()
        {
            SiteTemplateGlobalSettingModel model = ISiteTemplate.Instance.GetSiteTempalteSetting(this.CurrentCustomerID);

            if (model == null)
            {
                model = new SiteTemplateGlobalSettingModel();
            }
            model.CustomerID       = this.CurrentCustomerID;
            model.IndexTemplateID  = this.GetFormValue("indextemplateid", 0);
            model.ListTemplateID   = this.GetFormValue("listtemplateid", 0);
            model.ViewTemplateID   = this.GetFormValue("viewtemplateid", 0);
            model.NavBarTemplateID = this.GetFormValue("navbartemplateid", 0);
            string myDomain          = this.GetFormValue("mydomain", "");
            int    orginalCustomerId = this.GetFormValue("orginalcustomerid", 0);

            model.SolutionID = orginalCustomerId;
            try
            {
                bool flag = ISiteTemplate.Instance.InstallSolutionTemplate(orginalCustomerId, model);
                if (flag)
                {
                    //IUserInfo.Instance.SetCustomerSuDomain(this.CurrentCustomerID, myDomain);
                    this.code = 1;
                }
            }
            catch
            {
                this.code = 0;
            }
        }
コード例 #2
0
        private void IsRedirect()
        {
            //string url = Request.Url.Host;
            //if (url.IndexOf("fanmore.cn") > 0)
            //{
            SiteTemplateGlobalSettingModel st = ISiteTemplate.Instance.GetSiteTempalteSetting(this.CurrentCustomerID);

            if (st != null)
            {
                if (st.SolutionID > 0)
                {
                    this.code = 1;
                }
            }
            //}
        }