コード例 #1
0
 public VirtualMachineMetaItem[] GetVirtualMachines(int packageId, string filterColumn, string filterValue,
     string sortColumn, int maximumRows, int startRowIndex)
 {
     vms = ES.Services.VPS.GetVirtualMachines(packageId, filterColumn, filterValue,
             sortColumn, startRowIndex, maximumRows, true);
     return vms.Items;
 }
コード例 #2
0
        public static VirtualMachineMetaItemsPaged GetVirtualMachines(int packageId,
            string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, bool recursive)
        {
            VirtualMachineMetaItemsPaged result = new VirtualMachineMetaItemsPaged();

            // get reader
            IDataReader reader = DataProvider.GetVirtualMachinesPaged2012(
                    SecurityContext.User.UserId,
                    packageId, filterColumn, filterValue, sortColumn, startRow, maximumRows, recursive);

            // number of items = first data reader
            reader.Read();
            result.Count = (int)reader[0];

            // items = second data reader
            reader.NextResult();
            result.Items = ObjectUtils.CreateListFromDataReader<VirtualMachineMetaItem>(reader).ToArray();

            return result;
        }
コード例 #3
0
        public int GetVirtualMachinesCount(int packageId, string filterColumn, string filterValue)
        {
            if (vms == null)
            {
                vms = ES.Services.VPSPC.GetVirtualMachines(packageId, filterColumn, filterValue,
                        String.Empty, 0, 10, true);
            }

            return vms.Count;
        }