Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            config = bll.GetCompanyWebsiteConfig();

            toolBars = bllCompanyWebSite.GetToolBarList(int.MaxValue, 1, bllCompanyWebSite.WebsiteOwner, null, null, false)
                       .OrderBy(p => p.KeyType).Select(p => p.KeyType).Distinct().ToList();
            slides = bllSlide.GetCurrWebsiteAllTypeList();

            #region 会员标准字段
            List <TableFieldMapping> baseFieldList = bllTableFieldMap.GetTableFieldMap(null, "ZCJ_UserInfo");
            List <TableFieldMapping> webFieldList  = bllTableFieldMap.GetTableFieldMap(bllTableFieldMap.WebsiteOwner, "ZCJ_UserInfo", null, null, true);
            foreach (var item in baseFieldList)
            {
                if (fieldList.Exists(p => p.Value == item.Field))
                {
                    continue;
                }
                TableFieldMapping nWebFieldItem = webFieldList.FirstOrDefault(p => p.Field == item.Field);
                fieldList.Add(new ListItem
                {
                    Value    = item.Field,
                    Text     = nWebFieldItem == null ? item.MappingName : nWebFieldItem.MappingName,
                    Selected = nWebFieldItem != null && nWebFieldItem.IsDelete == 0 ? true:false
                });
            }
            List <string> baseFieldStringList = baseFieldList.Select(p => p.Field).ToList();
            foreach (var item in webFieldList.Where(p => !baseFieldStringList.Contains(p.Field)))
            {
                if (fieldList.Exists(p => p.Value == item.Field))
                {
                    continue;
                }
                fieldList.Add(new ListItem
                {
                    Value    = item.Field,
                    Text     = item.MappingName,
                    Selected = item.IsDelete == 0 ? true : false
                });
            }
            #endregion 会员标准字段

            currentWebsiteInfo = bll.GetWebsiteInfoModelFromDataBase();

            List <CompanyWebsite_ToolBar> dataList = bll.GetColList <CompanyWebsite_ToolBar>(int.MaxValue, 1, string.Format(" WebsiteOwner = '{0}'", bll.WebsiteOwner), "AutoID,KeyType,BaseID");
            ArticleGroups = dataList.OrderBy(p => p.KeyType).Select(p => p.KeyType).Distinct().ToList();

            if (!string.IsNullOrEmpty(config.LoginConfigJson))
            {
                JTokenLogin = JToken.Parse(config.LoginConfigJson);
            }
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //currWebSiteUserInfo = this.userBll.GetUserInfo(userBll.WebsiteOwner);
            currWebSiteInfo = bllMall.GetWebsiteInfoModelFromDataBase();
            if (string.IsNullOrEmpty(currWebSiteInfo.ProductImgRatio1))
            {
                currWebSiteInfo.ProductImgRatio1 = (600).ToString();
            }
            if (string.IsNullOrEmpty(currWebSiteInfo.ProductImgRatio2))
            {
                currWebSiteInfo.ProductImgRatio2 = (600).ToString();
            }
            WXMallIndexUrl = string.Format("http://{0}/customize/comeoncloud/Index.aspx?key=MallHome", Request.Url.Host);
            if (currWebSiteInfo != null)
            {
                if (currWebSiteInfo.MallTemplateId.Equals(1))//外卖
                {
                    WXMallIndexUrl = string.Format("http://{0}/App/Cation/wap/mall/IndexV2.aspx", Request.Url.Host);
                }
            }

            toolBars = bllCompanyWebSite.GetToolBarList(int.MaxValue, 1, bllMall.WebsiteOwner, null, null, false)
                       .OrderBy(p => p.KeyType).Select(p => p.KeyType).Distinct().ToList();

            slides      = bllSlide.GetCurrWebsiteAllTypeList();
            scoreConfig = bllScore.GetScoreConfig();
            if (scoreConfig == null)
            {
                scoreConfig = new BLLJIMP.Model.ScoreConfig();
            }
            CompanyWebsiteConfig = bllWebsite.GetCompanyWebsiteConfig();

            StoreSinceTimeJson = CompanyWebsiteConfig.StoreSinceTimeJson;
            if (string.IsNullOrEmpty(StoreSinceTimeJson))
            {
                StoreSinceTimeJson = "[]";
            }

            HomeDeliveryTimeJson = CompanyWebsiteConfig.HomeDeliveryTimeJson;
            if (string.IsNullOrEmpty(HomeDeliveryTimeJson))
            {
                HomeDeliveryTimeJson = "[]";
            }
        }