Beispiel #1
0
        //private void look_oils(object sender, RoutedEventArgs e)
        //{
        //    ComboBoxItem item = (ComboBoxItem)oils.SelectedItem;
        //    Console.WriteLine(item.Tag);
        //    Phy_Edit phy_Edit = new Phy_Edit(int.Parse(item.Tag + " "));
        //    phy_Edit.ShowDialog();
        //}
        //private void look_soil(object sender, RoutedEventArgs e)
        //{
        //    ComboBoxItem item = (ComboBoxItem)soil.SelectedItem;
        //    Console.WriteLine(item.Tag);
        //    Soil_Edit soil_Edit = new Soil_Edit(int.Parse(item.Tag + " "));
        //    soil_Edit.ShowDialog();
        //}
        //private void look_pump(object sender, RoutedEventArgs e)
        //{
        //    ComboBoxItem item = (ComboBoxItem)pump.SelectedItem;
        //    Console.WriteLine(item.Tag);
        //    Pum_Edit pum_Edit = new Pum_Edit(int.Parse(item.Tag + " "));
        //    pum_Edit.ShowDialog();

        //}
        private void look_other(object sender, RoutedEventArgs e)
        {
            ComboBoxItem item = (ComboBoxItem)other.SelectedItem;

            Console.WriteLine(item.Tag);
            Oth_Edit oth_Edit = new Oth_Edit(int.Parse(item.Tag + " "));

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