protected void BeginCreate() { string adurl = string.Empty; string width = string.Empty; string height = string.Empty; string picurl = string.Empty; string content = string.Empty; string jsname = string.Empty; string AdType = string.Empty; ShowShop.BLL.Accessories.AdvertiseManage bll = new ShowShop.BLL.Accessories.AdvertiseManage(); ShowShop.Common.SysParameter sysParm = new ShowShop.Common.SysParameter(); string ads_id = ChangeHope.WebPage.PageRequest.GetQueryString("Ads_ID"); if (ads_id != "" && ads_id != null) { ShowShop.Model.Accessories.AdvertiseManage model = bll.GetModelByID(Convert.ToInt32(ads_id)); if (model != null) { adurl = model.LinkAddress; width = model.SizeBreadth.ToString(); height = model.Hight.ToString(); picurl = sysParm.DummyPaht + model.UpspreadAdd; content = model.Advertisecont; jsname = model.Name; AdType = model.Adtype.ToString(); CreateJs(adurl, width, height, picurl, content, jsname, Convert.ToInt16(AdType)); this.ltlMsg.Text = "操作成功,已生成"+model.Name+".JS广告"; this.pnlMsg.Visible = true; this.pnlMsg.CssClass = "actionOk"; } } else { List<ShowShop.Model.Accessories.AdvertiseManage> modeList = bll.GetAll(); if (modeList.Count > 0) { int i = 0; foreach (ShowShop.Model.Accessories.AdvertiseManage model in modeList) { adurl = model.LinkAddress; width = model.SizeBreadth.ToString(); height = model.Hight.ToString(); picurl = sysParm.DummyPaht + model.UpspreadAdd; content = model.Advertisecont; jsname = model.Name; AdType = model.Adtype.ToString(); CreateJs(adurl, width, height, picurl, content, jsname, Convert.ToInt16(AdType)); i++; } this.ltlMsg.Text = "操作成功,共生成" + i.ToString() + "个广告"; this.pnlMsg.Visible = true; this.pnlMsg.CssClass = "actionOk"; } } }