Beispiel #1
0
    protected void YHputinStore_RefershData(object sender, StoreRefreshDataEventArgs e)
    {
        int   PageSize = this.pagecut.PageSize;  //获取当前在页面中PagingToolBar 的PageSize的值
        int   Count    = 0;
        int   CurPage  = e.Start / PageSize + 1; //获取当前的页码是多少,也就是第几页
        HBBLL hb       = new HBBLL();
        //绑定隐患录入信息
        var data2 = hb.GetYHInput2(SessionBox.GetUserSession().PersonNumber, SessionBox.GetUserSession().DeptNumber, ref Count);
        var data  = from yh in data2
                    orderby yh.INTime descending
                    select new
        {
            YHPutinID = yh.YHPutinID,
            DeptName  = yh.DeptName,
            PlaceName = yh.PlaceName,
            YHContent = yh.YHContent,
            Remarks   = yh.Remarks,
            BanCi     = yh.BanCi,
            Name      = yh.Name,
            INTime    = yh.INTime,
            PCTime    = yh.PCTime,
            YHType    = yh.TypeName,
            Status    = yh.Status
        };

        e.TotalCount = Count;
        if (e.TotalCount > 0)
        {
            this.YHputinStore.DataSource = data.Skip(e.Start <= 0 ? 0 : e.Start).Take(PageSize);//绑定数据
            this.YHputinStore.DataBind();
        }
    }