Example #1
0
 private void GetAllRows()
 {
     if (all)
     {
         collection = controller.FetchAll(OrderBy, OwnerColumn, OwnerID);
     }
     else
     {
         string[] selection = this.Request.Params.GetValues("selection[]");
         if (selection == null)
         {
             collection = controller.FetchAllPaged((PageNumber - 1) * PageSize, PageSize, OrderBy, OwnerColumn, OwnerID);
         }
         else
         {
             StringBuilder columns = new StringBuilder();
             columns.Append("KD_VENDOR");
             columns.Append('\0');
             collection = controller.FetchSelected(columns.ToString().Split(new char[] { '\0' }, StringSplitOptions.RemoveEmptyEntries),
                                                   selection,
                                                   OrderBy,
                                                   OwnerColumn, OwnerID);
         }
     }
 }
 private void GetAllRows()
 {
     if (Selection == null)
     {
         if (all)
         {
             collection = controller.FetchAll(OrderBy, OwnerColumn, OwnerID);
             numrows    = controller.FetchAllCount(OwnerColumn, OwnerID);
         }
         else
         {
             collection = controller.FetchAllPaged((PageNumber - 1) * PageSize, PageSize, OrderBy, OwnerColumn, OwnerID);
             numrows    = controller.FetchAllCount(OwnerColumn, OwnerID);
         }
     }
     else
     {
         StringBuilder columns = new StringBuilder();
         columns.Append("KD_VENDOR");
         columns.Append('\0');
         collection = controller.FetchSelected(columns.ToString().Split(new char[] { '\0' }, StringSplitOptions.RemoveEmptyEntries),
                                               Selection,
                                               OrderBy,
                                               OwnerColumn, OwnerID);
         numrows   = collection.Count;
         Selection = null;
     }
 }