Пример #1
0
        private void button_editHabitat_Click(object sender, EventArgs e)
        {
            DataRow selectedDataRow = ((DataRowView)comboBox_habitat.SelectedItem).Row;
            string habitat_id = Convert.ToString(selectedDataRow[Constants.column_habitatId]);
            string habitat_name = Convert.ToString(selectedDataRow[Constants.column_habitatName]);
            string provider_id = Convert.ToString(selectedDataRow[Constants.column_providerId]);

            HabitatEditor habitatEditor =
                new HabitatEditor(habitat_id, habitat_name, provider_id);
            habitatEditor.ShowDialog();
            RefreshComboBoxes();
        }
Пример #2
0
 private void button_addHabitat_Click(object sender, EventArgs e)
 {
     HabitatEditor habitatEditor = new HabitatEditor();
     habitatEditor.ShowDialog();
     RefreshComboBoxes();
 }