private void look_pipe(object sender, RoutedEventArgs e) { ComboBoxItem item = (ComboBoxItem)pipe.SelectedItem; Console.WriteLine(item.Tag); ProDAL proDal = new ProDAL(); int proid = proDal.getNowPro(); PiP_Edit piP_Edit = new PiP_Edit(proid, int.Parse(item.Tag + " ")); piP_Edit.ShowDialog(); }
public void pipbutton_edit(object sender, RoutedEventArgs e) { if (pipe_grid.SelectedIndex >= 0) { int projectid = int.Parse(data.Rows[pipe_grid.SelectedIndex]["project_id"] + " "); int pipeid = int.Parse(data.Rows[pipe_grid.SelectedIndex]["pipe_id"] + " "); PiP_Edit pipedit = new PiP_Edit(projectid, pipeid); pipedit.ShowDialog(); initTable(); } else { MessageBox.Show("没有选中项,无法编辑"); } }