protected void BindData(Func <Good, object> orderBy = null, string sort = "DESC")
        {
            Func <Good, bool> delegation = circleType => true;

            Filter(ref orderBy, ref sort, ref delegation);
            int pageTotal;
            var list = goodBLL.GetGood(delegation, AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, out pageTotal, orderBy, sort);

            GridView1.DataSource = list;
            GridView1.DataBind();
            AspNetPager1.RecordCount = pageTotal;
        }
示例#2
0
        protected void BindData(int GoodID)
        {
            var list = goodBLL.GetGood(o => o.GoodID == GoodID);

            good = list.First();

            good.ImageList          = XFXExt.imgList(good.ImageList, ConfigurationManager.AppSettings["UploadUrl"]);
            good.Image              = ConfigurationManager.AppSettings["UploadUrl"] + good.Image;
            good.Detail             = good.Detail.Replace("***xing*fen*xiang*img*src***", ConfigurationManager.AppSettings["UploadUrl"]);
            DetailsView1.DataSource = list;
            DetailsView1.DataBind();
            CurrentMode_Init();
        }