Exemplo n.º 1
0
 private void MakeHardDrive()
 {
     NewHardDrive = new HardDrive
     {
         //hard drive information
         Make           = comboBoxHDMake.Text,
         Model          = comboBoxHDModel.Text,
         Type           = comboBoxHDType.Text,
         Serial         = textBoxSerialNum.Text,
         SizeInGB       = Convert.ToDecimal(textBoxSize.Text),
         DriveInterface =
             RadioButtonListUtilities.ExtractTextFromRadioButtonGroup(groupBoxDriveInterface),
         DrivePosition =
             RadioButtonListUtilities.ExtractTextFromRadioButtonGroup(
                 groupBoxDrivePostitionAsInstalled),
         JumperSetting =
             RadioButtonListUtilities.ExtractTextFromRadioButtonGroup(groupBoxJumperSettings),
         JumperDiagram = jumperDiagram,
         CDFInfo       = new CdfInfo
         {
             IsFinishDate = true,
             Cdfdate      = dateTimePickerCDFDate.Value,
             TechExaminer =
                 SelectSingleEntityById.SelectEmployeeById(
                     new Guid(comboBoxCdfInfoTech.SelectedValue.ToString())),
         }
     };
 }
Exemplo n.º 2
0
        private void MakeNewRaid()
        {
            IList <HardDrive> selectedHardDrives = new List <HardDrive>();

            //IList<HardDrive> selectedHardDrives = (from object item in checkedListBoxOfHardDrives.CheckedItems select checkedListBoxOfHardDrives.Items.IndexOf(item) into i select SelectableHardDrives.ElementAt(i)).ToList();
            foreach (object item in checkedListBoxOfHardDrives.CheckedItems)
            {
                int i = checkedListBoxOfHardDrives.Items.IndexOf(item);
                selectedHardDrives.Add(SelectableHardDrives.ElementAt(i));
            }

            string HardOrSoft = RadioButtonListUtilities.ExtractTextFromRadioButtonGroup(groupBoxHardwareOrSoftware);

            RaidType raidType;

            if (HardOrSoft.ToUpper() == "HARDWARE")
            {
                raidType = RaidType.Hardware;
            }
            else
            {
                raidType = RaidType.Software;
            }

            NewRaid = new Raid
            {
                //raid information
                SoftwareOrHardware   = raidType,
                RaidType             = txtTypeofRaid.Text,
                RaidLevel            = RadioButtonListUtilities.ExtractTextFromRadioButtonGroup(groupBoxRaidLevel),
                AssociatedHardDrives = selectedHardDrives
            };


            selectedHardDrives.ToList().ForEach(hd => hd.ReferenceRaid = NewRaid);
        }
Exemplo n.º 3
0
 private void IntializeRadioButtons()
 {
     RadioButtonListUtilities.SelectFirstRadioInGroup(groupBoxDriveInterface);
     RadioButtonListUtilities.SelectFirstRadioInGroup(groupBoxDrivePostitionAsInstalled);
     RadioButtonListUtilities.SelectFirstRadioInGroup(groupBoxJumperSettings);
 }
Exemplo n.º 4
0
 private void IntializeRadioButtons()
 {
     RadioButtonListUtilities.SelectFirstRadioInGroup(groupBoxHardwareOrSoftware);
     RadioButtonListUtilities.SelectFirstRadioInGroup(groupBoxRaidLevel);
 }