/// <summary> /// 绑定数据 Binds this instance. /// </summary> void Bind() { try { ROYcms.Sys.BLL.ROYcms_remark bll = new ROYcms.Sys.BLL.ROYcms_remark(); Repeater_list.DataSource = bll.GetList(" NewID =" + Request["NewsId"]); Repeater_list.DataBind(); } catch { ROYcms.Common.MessageBox.Show(this, "绑定数据错误!"); } }
/// <summary> /// 输出 /// </summary> /// <param name="output">The output.</param> protected override void Render(HtmlTextWriter output) { if (this.Rid != null) { ROYcms.Sys.BLL.ROYcms_remark ___ROYcms_remark = new ROYcms.Sys.BLL.ROYcms_remark(); try { output.Write(___ROYcms_remark.GetCount("NewId=" + this.Rid)); } catch { output.Write(0); } } }
/// <summary> /// Handles the Load event of the Page control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Bind(); if (Request["t"] == "del") { ROYcms.Sys.BLL.ROYcms_remark bll = new ROYcms.Sys.BLL.ROYcms_remark(); bll.Delete(Convert.ToInt32(Request["id"])); Bind(); } } }
/// <summary> /// 绑定数据 Binds this instance. /// </summary> void Bind() { ROYcms.Sys.BLL.ROYcms_remark bll = new ROYcms.Sys.BLL.ROYcms_remark(); if (Request["NewsId"] != null) { Repeater_admin.DataSource = bll.GetList(" NewID =" + Request["NewsId"]); Repeater_admin.DataBind(); } else { Repeater_admin.DataSource = bll.GetList(" NewID <>0"); Repeater_admin.DataBind(); } }
protected override void OnDataBinding(EventArgs e) { ROYcms.Sys.BLL.ROYcms_remark ___ROYcms_remark = new ROYcms.Sys.BLL.ROYcms_remark(); if (NewId != null) { dataSource = (IList)(new DataView(((DataSet)(___ROYcms_remark.GetList(Top, " NewID = " + NewId, FiledOrder))).Tables[0])); } else { dataSource = (IList)(new DataView(((DataSet)(___ROYcms_remark.GetList(Top, " NewID >0 ", FiledOrder))).Tables[0])); } intItemCount = dataSource.Count; base.DataSource = dataSource; base.OnDataBinding(e); }