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(); }
public void button_edit(object sender, RoutedEventArgs e) { if (table.SelectedIndex >= 0) { Phy_Edit phy_Edit = new Phy_Edit(int.Parse(data.Rows[table.SelectedIndex]["oils_id"] + " ")); phy_Edit.ShowDialog(); initTable(); } else { MessageBox.Show("没有选中项,无法编辑"); } }