public PrivateIPAddress[] GetPackagePrivateIPAddresses(int packageId, string filterColumn, string filterValue, string sortColumn, int maximumRows, int startRowIndex) { privateAddresses = ES.Services.VPS.GetPackagePrivateIPAddressesPaged(packageId, filterColumn, filterValue, sortColumn, startRowIndex, maximumRows); return privateAddresses.Items; }
public static PrivateIPAddressesPaged GetPackagePrivateIPAddressesPaged(int packageId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) { PrivateIPAddressesPaged result = new PrivateIPAddressesPaged(); // get reader IDataReader reader = DataProvider.GetPackagePrivateIPAddressesPaged(packageId, filterColumn, filterValue, sortColumn, startRow, maximumRows); // number of items = first data reader reader.Read(); result.Count = (int)reader[0]; // items = second data reader reader.NextResult(); result.Items = ObjectUtils.CreateListFromDataReader<PrivateIPAddress>(reader).ToArray(); return result; }