Example #1
0
        public void Page_Load(object sender, EventArgs e)
        {
            PageUtils.CheckRequestParameter("PublishmentSystemID");
            _advId = Body.GetQueryInt("AdvID");

            if (Body.IsQueryExists("Delete"))
            {
                var adMaterialId = Body.GetQueryInt("AdMaterialID");
                try
                {
                    DataProvider.AdMaterialDao.Delete(adMaterialId, PublishmentSystemId);

                    Body.AddSiteLog(PublishmentSystemId, "删除广告物料");

                    SuccessDeleteMessage();
                }
                catch (Exception ex)
                {
                    FailDeleteMessage(ex);
                }
            }
            BindGrid();

            if (!Page.IsPostBack)
            {
                BreadCrumb(AppManager.Cms.LeftMenu.IdFunction, AppManager.Cms.LeftMenu.Function.IdAdvertisement, "固定广告物料管理", AppManager.Cms.Permission.WebSite.Advertisement);

                AddAdMaterial.Attributes.Add("onclick", ModalAdMaterialAdd.GetOpenWindowStringToAdd(0, PublishmentSystemId, _advId));
                Delete.Attributes.Add("onclick", "return confirm(\"此操作将删除所选广告物料,确定吗?\");");
            }
        }
Example #2
0
 public string GetEditUrl(int adMaterialId)
 {
     return
         ($@"<a href=""javascript:;"" onclick=""{ModalAdMaterialAdd.GetOpenWindowStringToEdit(adMaterialId,
             PublishmentSystemId, _advId)}"">编辑</a>");
 }