コード例 #1
0
        public void MyBind()
        {
            DataTable dt  = cateBll.Cate_SelByType(M_GuestBookCate.TypeEnum.PostBar);
            string    ids = "";

            if (CateID > 0)
            {
                BindItem(dt, CateID, ref ids);
                BindDrown(dt);
                ids = ids.TrimEnd(',');
            }
            //----绑定数据
            DataTable item = new DataTable();

            if (BarStatus == (int)ZLEnum.ConStatus.Recycle)
            {
                Rels.Visible   = true;
                DelAll.Visible = true;
                item           = barBll.SelByStatus(BarStatus);
            }
            else
            {
                Opiton_Span.Visible = true;
                item = barBll.SelByCateIDS(ids, SKey, BarStatus);
            }
            Egv1.DataSource = item;
            Egv1.DataBind();
        }
コード例 #2
0
        public void DataBind(string key = "")
        {
            DataTable dt = barBll.SelByPid(1, int.MaxValue, ID).dt;

            barMod        = barBll.SelReturnModel(ID);
            ID_L.Text     = barMod.ID.ToString();
            IP_L.Text     = barMod.IP == "" ? "无IP地址" : barMod.IP;
            CDate_L.Text  = barMod.CDate.ToString();
            CDate_T.Text  = barMod.CDate.ToString();
            CUser_LB.Text = barMod.CUName == "" ? "[匿名]" : "<a href=\"javascript:;\" onclick=\"ShowUserInfo(" + barMod.CUser + ")\">" + barMod.CUName + "</a>";//
            Title_L.Text  = barMod.Title;
            Title_L.Attributes["style"] += barMod.Style;
            txtTitle.Text = barMod.Title;
            txtTitle.Attributes["style"] += barMod.Style;
            MedalBind();
            string content = StrHelper.DecompressString(barMod.MsgContent);

            MsgContent_L.Text = content;
            MsgContent_T.Text = content;
            Egv1.DataSource   = dt;
            Egv1.DataBind();
        }