v1.1.2.0
This commit is contained in:
@@ -87,7 +87,7 @@ namespace Saxonite.Net.Core.Web.Base.Models
|
||||
{
|
||||
return Internals.GetUserAccountDisplayName(userAccountId);
|
||||
}
|
||||
// User Accounts.
|
||||
// Organisations.
|
||||
public SaxOrganisation GetOrganisation(SysId organisationId)
|
||||
{
|
||||
return Internals.GetOrganisation(organisationId);
|
||||
@@ -292,15 +292,20 @@ namespace Saxonite.Net.Core.Web.Base.Models
|
||||
public ushort PageLength { get { return paging.PageLength; } set { paging.PageLength = value; } }
|
||||
public uint PageCount { get { return (PageLength > 0 ? (uint)Math.Ceiling((decimal)ItemTotal / PageLength) : 0); } }
|
||||
public ushort ItemCount { get; set; }
|
||||
public ulong ItemTotal { get; set; }
|
||||
private ulong itemTotal = 0;
|
||||
public ulong ItemTotal
|
||||
{
|
||||
get { return itemTotal; }
|
||||
set
|
||||
{
|
||||
itemTotal = value;
|
||||
// Check whether the total number of items is less than the current page and reduce page no if needed.
|
||||
if (IsPaged && (PageNo - 1) * PageLength > itemTotal)
|
||||
PageNo = (uint)((itemTotal - 1) / PageLength + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
public DataPaging Paging { get; } = new DataPaging();
|
||||
public bool DataPaged { get { return Paging.IsPaged; } }
|
||||
public uint DataPageNo { get { return Paging.PageNo; } set { Paging.PageNo = value; } }
|
||||
public ushort DataPageLength { get { return Paging.PageLength; } set { Paging.PageLength = value; } }
|
||||
public uint DataPageCount { get { return (DataPageLength > 0 ? (uint)Math.Ceiling((decimal)DataItemTotal / DataPageLength) : 0); } }
|
||||
public ushort DataItemCount { get; set; }
|
||||
public ulong DataItemTotal { get; set; }
|
||||
public void PopulatePagingTo(DbQuery.Paging resultsPaging)
|
||||
{
|
||||
Paging.PopulatePagingTo(resultsPaging);
|
||||
|
||||
Reference in New Issue
Block a user