private void PlaceAvailableINNIntoComboBox() { RequisiteSQLiteDataProvider requisiteDataProvider = new RequisiteSQLiteDataProvider(); List <string> innList = requisiteDataProvider.GetAllINN(); if (!innList.Any()) { AddRequisiteForm addRequisiteForm = new AddRequisiteForm(); addRequisiteForm.ShowDialog(); if (addRequisiteForm.wasNewUserAdded) { innList = requisiteDataProvider.GetAllINN(); } else { Close(); } } НалогоплательщикИННComboBox.Items.Clear(); foreach (var i in innList) { НалогоплательщикИННComboBox.Items.Add(i); } if (НалогоплательщикИННComboBox.Items.Count > 0) { НалогоплательщикИННComboBox.SelectedIndex = 0; } isINNPlaced = true; }
private void AddUserButton_Click(object sender, EventArgs e) { AddRequisiteForm addRequisiteForm = new AddRequisiteForm(); addRequisiteForm.ShowDialog(); PlaceAvailableINNIntoComboBox(); }