private void FillRequirementComboBox() { RequirementNames.Clear(); RequirementNames = RequirementModel.GetNames(); RequirementComboBox.Items.Clear(); RequirementComboBox.Items.Add("_Add New Requirement"); foreach (string name in RequirementNames) { RequirementComboBox.Items.Add(name); } }
private void EditRequirementDialogClass_Load(object sender, EventArgs e) { AllowEvents = false; RequirementNames = RequirementModel.GetNames(); FillRequirementComboBox(); if (Method == MethodType.Add) { RequirementComboBox.SelectedIndex = -1; } else { RequirementComboBox.SelectedItem = RequirementModel.GetNameFromId(SelectedRequirementId); } ComparisonComboBox.SelectedItem = SelectedComparison.ToString(); RequirementValueNumUpDown.Value = (decimal)RequirementValueEntered; RequireAllCheckBox.Checked = RequireAllChecked; AllowEvents = true; }