public void RefreshList() { if (comboBox.SelectedIndex == 0) { ProjectHelper.GetProjectList(_identity, ProjectList, filtr = null); } if (comboBox.SelectedIndex == 1) { ProjectHelper.GetProjectList(_identity, ProjectList, filtr = $"WHERE STATUS = 'ACTIVE'"); } if (comboBox.SelectedIndex == 2) { ProjectHelper.GetProjectList(_identity, ProjectList, filtr = $"WHERE STATUS = 'INACTIVE'"); } }
public Project_page(string ID, EventClass IPHelper) { _IPHelper = IPHelper; InitializeComponent(); _identity = ID; comboBox.SelectedIndex = 1; ProjectHelper = new ProjectClass(); ProjectHelper.GetProjectList(_identity, ProjectList, filtr = $"WHERE STATUS = 'ACTIVE'"); comboBox.SelectionChanged += (o, e) => RefreshList(); }