有志者、事竟成,破釜沉舟,百百二秦关终属楚;苦心人、天不负,卧薪尝胆,三千越甲可吞吴。

拂晓犬吠

学习中遇到困难是很正常的事情,不要苦恼,不要气馁,恰恰相反,应该兴奋,因为又学到知识了,需要不断提高自己应对问题和解决问题的能力和信心。

页码计算

 public class PagingInfo
    {
        //总的商品个数
        public int TotalItems { get; set; }

        //一页有多少商品
        public int ItemsPerPage { get; set; }

        //当前页码
        public int CurrentPage { get; set; }

        //总共 有多少页数
        public int TotalPages { get { return (int)Math.Ceiling((decimal)TotalItems/ItemsPerPage); } }
    }

 

posted @ 2019-05-20 10:29  ID拂晓犬吠  阅读(233)  评论(0编辑  收藏  举报