fixed pagination where it wasnt rounding up so <x.5 would show not 1 page less than required. fix issue introduced in last branch where group drop down/filter wouldnt work. #51
33 lines
924 B
C#
33 lines
924 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Interfaces
|
|
{
|
|
public class UserList
|
|
{
|
|
public UserList()
|
|
{
|
|
Users = new List<User>();
|
|
PageSize = 10;
|
|
}
|
|
public string Query { get; set; }
|
|
public int UserCount { get { return Users.Count; } }
|
|
public int TotalUserCount { get; set; }
|
|
public List<User> Users { get; set; }
|
|
|
|
public SortOptions SelectedSortOption { get; set; }
|
|
|
|
public int PageCount
|
|
{
|
|
get
|
|
{
|
|
if (TotalUserCount < PageSize)
|
|
return 1;
|
|
return (int)Math.Ceiling(Convert.ToDouble(TotalUserCount) / Convert.ToDouble(PageSize));
|
|
}
|
|
}
|
|
public Group GroupFilter { get; set; }
|
|
public int PageSize { get; set; }
|
|
public int PageNumber { get; set; }
|
|
}
|
|
} |