예제 #1
0
        private void CancelHomePage(HttpContext context)
        {
            int num = context.Request["topicId"].ToInt(0);

            if (num <= 0)
            {
                throw new HidistroAshxException("错误的参数");
            }
            if (VShopHelper.CancelHomePage(num))
            {
                SiteSettings masterSettings = SettingsManager.GetMasterSettings();
                masterSettings.HomePageTopicId = 0;
                SettingsManager.Save(masterSettings);
                base.ReturnSuccessResult(context, "取消成功", 0, true);
                return;
            }
            throw new HidistroAshxException("取消失败");
        }