protected void Page_Load(object sender, EventArgs e) { aid = Request["aid"]; webAction = Request["Action"]; actionStr = webAction == "add" ? "添加" : "编辑"; if (webAction == "edit") { model = this.bll.GetCompanyWebsiteNavigateById(aid); if (model == null) { Response.End(); } else { } } }
/// <summary> /// 获取幻灯片 /// </summary> /// <param name="context"></param> /// <returns></returns> private string GetProjectorList(HttpContext context) { CompanyWebsite_Config companyConfig = bllWebsite.GetCompanyWebsiteConfig(); var dataList = bllSlide.ListByType(companyConfig.ShopAdType, bll.WebsiteOwner); List <CompanyWebsite_Navigate> resultList = new List <CompanyWebsite_Navigate>(); foreach (var item in dataList) { CompanyWebsite_Navigate nav = new CompanyWebsite_Navigate(); nav.AutoID = item.AutoID; nav.NavigateName = item.LinkText; nav.NavigateImage = bll.GetImgUrl(item.ImageUrl); nav.NavigateType = item.Type; nav.NavigateTypeValue = item.Link; nav.PlayIndex = item.Sort; resultList.Add(nav); } return(Common.JSONHelper.ObjectToJson(resultList)); }
/// <summary> /// 获取导航列表 /// </summary> /// <param name="context"></param> /// <returns></returns> private string GetNavigateList(HttpContext context) { CompanyWebsite_Config companyConfig = bllWebsite.GetCompanyWebsiteConfig(); List <CompanyWebsite_ToolBar> dataList = bllCompanyWebSite.GetToolBarList(int.MaxValue, 1, bllCompanyWebSite.WebsiteOwner, "nav", companyConfig.ShopNavGroupName, false); List <CompanyWebsite_Navigate> resultList = new List <CompanyWebsite_Navigate>(); foreach (var item in dataList) { CompanyWebsite_Navigate nav = new CompanyWebsite_Navigate(); nav.AutoID = item.AutoID; nav.NavigateName = item.ToolBarName; nav.NavigateImage = bll.GetImgUrl(item.ImageUrl); nav.IconClass = item.ToolBarImage; nav.NavigateTypeValue = ReplaceArticleUrl(context, item.ToolBarTypeValue); //nav.NavigateType = item.KeyType; nav.NavigateType = item.ToolBarType; nav.PlayIndex = item.PlayIndex; resultList.Add(nav); } return(Common.JSONHelper.ObjectToJson(resultList)); }