/// <summary> /// Initial paging data /// </summary> private void InitPaging() { if (Collections != null) { TotalPage = (int)Math.Ceiling(Collections.Count() / (float)PageSize); Total = Collections.Count; Collections = Collections.Skip(PageSize * (Page - 1)).Take(PageSize).ToList(); } }
public int CountInvoice(string OwnerId) { return(Convert.ToInt32(Collections.Count(Query.EQ("OwnerId", BsonValue.Create(OwnerId))))); }
public int CountCustomers(string ownerId) { return(Convert.ToInt32(Collections.Count(Query.EQ("OwnerId", BsonValue.Create(ownerId))))); }