验孕棒什么时候用最准确,丹普热水器,托班育儿知识
using system.collections.generic; namespace oyang.tool { public interface ipagination { int pageindex { get; set; } int pagesize { get; set; } int totalcount { get; set; } string sortfield { get; set; } bool isasc { get; set; } } public interface ifullpagination : ipagination { int pagecount { get; } int buttoncount { get; set; } list<int> listpagebutton { get; } list<int> calcpagebutton(); } public class pagination : ipagination { public int pageindex { get; set; } public int pagesize { get; set; } public int totalcount { get; set; } public string sortfield { get; set; } public bool isasc { get; set; } } public class fullpagination : pagination, ifullpagination { public int pagecount { get { return totalcount % pagesize == 0 ? totalcount / pagesize : totalcount / pagesize + 1; } } public int buttoncount { get; set; } = 5; list<int> _listpagebutton = null; public list<int> listpagebutton { get; } public list<int> calcpagebutton() { _listpagebutton = new list<int>(); int temp1 = (buttoncount - 1) / 2; int temp2 = buttoncount - 1 - temp1; int startpageindex = 1; int endpageindex = 1; if (pagecount <= buttoncount) { startpageindex = 1; endpageindex = pagecount; } else if (pageindex <= temp1) { startpageindex = 1; endpageindex = startpageindex + buttoncount - 1; } else if (pageindex + temp2 > pagecount) { endpageindex = pagecount; startpageindex = endpageindex - buttoncount + 1; } else { startpageindex = pageindex - temp1; endpageindex = pageindex + temp2; } for (int i = startpageindex; i <= endpageindex; i++) { _listpagebutton.add(i); } return _listpagebutton; } } }
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
Blazor server side 自家的一些开源的, 实用型项目的进度之 CEF客户端
.NET IoC模式依赖反转(DIP)、控制反转(Ioc)、依赖注入(DI)
vue+.netcore可支持业务代码扩展的开发框架 VOL.Vue 2.0版本发布
网友评论