* ResultPages.cs:
* NpgsqlBlogProvider.cs: PageIndex is now one based * AccountController.cs: Fixes a typo in the registration mail * AdminController.cs: Should fix a 500 at Registration validation * BasketController.cs: WIP * BlogsController.cs: page indexes are now one based * FrontOfficeController.cs: cleanning * GoogleController.cs: code formatting * Global.asax.cs: Default route data to "controller" "action" "id" * BBCodeHelper.cs: Allows not closed "url" BBcodes * InitDb.aspx: StatisPage.master was renamed * packages.config: Google references require System.Web 4.0.0.0 ... removed
This commit is contained in:
parent
630ddee841
commit
f54336852b
12 changed files with 29 additions and 54 deletions
|
|
@ -293,7 +293,8 @@ namespace Npgsql.Web.Blog
|
|||
cnx.Open ();
|
||||
using (NpgsqlDataReader rdr = cmd.ExecuteReader()) {
|
||||
totalRecords = 0;
|
||||
int firstrec = pageIndex * pageSize;
|
||||
// pageIndex became one based
|
||||
int firstrec = (pageIndex-1) * pageSize;
|
||||
int lastrec = firstrec + pageSize - 1;
|
||||
while (rdr.Read()) {
|
||||
if (totalRecords >= firstrec && totalRecords <= lastrec) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue