Example #1
0
        private void look_soil(object sender, RoutedEventArgs e)
        {
            ComboBoxItem item = (ComboBoxItem)oils.SelectedItem;

            Console.WriteLine(item.Tag);
            Soil_Edit soil_Edit = new Soil_Edit(int.Parse(item.Tag + " "));

            soil_Edit.ShowDialog();
        }
Example #2
0
 public void button_edit(object sender, RoutedEventArgs e)
 {
     if (table.SelectedIndex >= 0)
     {
         Soil_Edit soil_Edit = new Soil_Edit(int.Parse(data.Rows[table.SelectedIndex]["soil_id"] + " "));
         soil_Edit.ShowDialog();
         initTable();
     }
     else
     {
         MessageBox.Show("没有选中项,无法编辑");
     }
 }