Beispiel #1
0
        protected void BindContent()
        {
            DataTable m_dt = AdvTopicContentBll.GetInstance().GetListByTopic(int.Parse(drpTopic.SelectedValue));

            m_dt.Columns.Add("deleteurl");
            for (int i = 0; i < m_dt.Rows.Count; i++)
            {
                m_dt.Rows[i]["deleteurl"] = urlnow + "&delete=";
            }
            rptFamous.DataSource = m_dt;
            rptFamous.DataBind();
        }
Beispiel #2
0
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Delete()
        {
            try
            {
                AdvTopicContentMod m_content = AdvTopicContentBll.GetInstance().GetModel(int.Parse(Request.QueryString["delete"]));
                m_content.DR = (int)AppEnum.State.deleted;
                AdvTopicContentBll.GetInstance().Update(m_content);

                ltrNotice.Text = "该记录已删除!";
                this.ClientScript.RegisterStartupScript(this.GetType(), "", "document.getElementById('noticediv').style.display='';", true);
            }
            catch
            {
                ltrError.Text = "系统错误,删除失败!";
                this.ClientScript.RegisterStartupScript(this.GetType(), "", "document.getElementById('errordiv').style.display='';", true);
            }
        }