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