/// <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();
     }
 }
Beispiel #2
0
 public int CountInvoice(string OwnerId)
 {
     return(Convert.ToInt32(Collections.Count(Query.EQ("OwnerId", BsonValue.Create(OwnerId)))));
 }
Beispiel #3
0
 public int CountCustomers(string ownerId)
 {
     return(Convert.ToInt32(Collections.Count(Query.EQ("OwnerId", BsonValue.Create(ownerId)))));
 }