private void comboBox_SelecProject_SelectedIndexChanged(object sender, EventArgs e) { if (comboBox_SelecProject.Text != "Select an project") { var idProject = Models.Search_Model(comboBox_SelecProject.Text); Model_information.Id = idProject.id; businessRules.Clear(); businessRules = new List <string> { "Select an business rule" }; var businessRules_name = Business_Rules.GetAll(Model_information.Id); foreach (var item in businessRules_name) { businessRules.Add(item.rules_name); } comboBox_SelectBusinessRule.DataSource = businessRules; } else { businessRules.Clear(); businessRules = new List <string> { "Select an business rule" }; comboBox_SelectBusinessRule.DataSource = businessRules; } }
private void Rules_All() { var idProject = Models.Search_Model(comboBox_SelecProject.Text); Model_information.Id = idProject.id; businessRules.Clear(); businessRules = new List <string> { "Select an business rule" }; var businessRules_name = Business_Rules.GetAll(Model_information.Id); foreach (var item in businessRules_name) { businessRules.Add(item.rules_name); } comboBox_SelectBusinessRule.DataSource = businessRules; }