예제 #1
0
        /// <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();
            }
        }
예제 #2
0
        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);
        }
예제 #3
0
 /// <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, "绑定数据错误!"); }
 }