FlexitimeTracker/DataCenter_Windows/WindowsDataCenter/Interfaces/UserList.cs
chris.watts90@outlook.com 20bf968675 Added sorting to user list, ASCending and DESCending on first and last name
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
2020-02-25 14:48:49 +00:00

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; }
}
}