Example #1
0
        private List <AdditionalHdd> GetAdditionalHdd()
        {
            var result = new List <AdditionalHdd>();

            foreach (RepeaterItem item in repHdd.Items)
            {
                AdditionalHdd hdd = new AdditionalHdd(GetTextBoxText(item, "txtAdditionalHdd"), GetHiddenFieldValue(item, "txtAdditionalHddPath"));
                result.Add(hdd);
            }

            return(result);
        }
Example #2
0
        private List <AdditionalHdd> GetAdditionalHdd(VirtualMachine vm)
        {
            var result = new List <AdditionalHdd>();

            if (vm.HddSize.Length < 2)
            {
                return(result);
            }
            for (int i = 1; i < vm.HddSize.Length; i++)
            {
                AdditionalHdd hdd = new AdditionalHdd(vm.HddSize[i].ToString(), "");
                result.Add(hdd);
            }

            return(result);
        }
        private List <AdditionalHdd> GetAdditionalHdd(VirtualMachine vm)
        {
            var result = new List <AdditionalHdd>();

            if (vm.HddSize.Length < 2)
            {
                return(result);
            }
            for (int i = 1; i < vm.HddSize.Length; i++)
            {
                AdditionalHdd hdd = new AdditionalHdd(String.Format(GetLocalizedString("Hdd.Text"), vm.HddSize[i]), "");
                result.Add(hdd);
            }

            return(result);
        }
Example #4
0
        private void BindAdditionalHdd(VirtualMachine vm)
        {
            CheckAdditionalHddQuota(vm.HddSize.Length - 1);
            List <AdditionalHdd> result = new List <AdditionalHdd>();

            if (vm.HddSize.Length > 1)
            {
                for (int i = 1; i < vm.HddSize.Length; i++)
                {
                    if (vm.HddSize[i] == 0 || String.IsNullOrEmpty(vm.VirtualHardDrivePath[i]))
                    {
                        continue;
                    }
                    AdditionalHdd hdd = new AdditionalHdd(vm.HddSize[i].ToString(), vm.VirtualHardDrivePath[i]);
                    result.Add(hdd);
                }
            }
            repHdd.DataSource = result;
            repHdd.DataBind();
        }
        private List <AdditionalHdd> GetAdditionalHdd(VirtualMachine vm)
        {
            List <AdditionalHdd> result = new List <AdditionalHdd>();

            if (vm.HddSize.Length < 2 || vm.HddSize.Length != vm.VirtualHardDrivePath.Length)
            {
                return(result);
            }
            for (int i = 1; i < vm.HddSize.Length; i++)
            {
                if (String.IsNullOrEmpty(vm.VirtualHardDrivePath[i]))
                {
                    continue;
                }
                AdditionalHdd hdd = new AdditionalHdd(vm.HddSize[i].ToString(), vm.VirtualHardDrivePath[i]);
                result.Add(hdd);
            }

            return(result);
        }