//修改工序方案 private void ToolStripMenuItem3_Click(object sender, EventArgs e) { if (listView1.SelectedItems.Count != 0) { AddFlowProject addFlowProject = new AddFlowProject(sqlConnection); addFlowProject.Text = "修改工序方案"; addFlowProject.m_OperateFlag = 2; addFlowProject.FlowProjectName = listView1.SelectedItems[0].SubItems[1].Text; if (addFlowProject.ShowDialog(this) == DialogResult.OK) { treeView1.Nodes.Clear(); dataSet.Tables["FlowProject"].Clear(); dataSet.Tables["FlowProjectDetailsView"].Clear(); technologyLib.GetFlowProjectData(dataSet); technologyLib.GetFlowProjectDetailsViewData(dataSet); InitialTreeView(treeView1); listView1.Items.Clear(); AddItem_FlowProject(); } } else { MessageBox.Show("请选择要修改的工序方案!"); } }
//添加工序方案 private void ToolStripMenuItem2_Click(object sender, EventArgs e) { AddFlowProject addFlowProject = new AddFlowProject(sqlConnection); addFlowProject.Text = "添加工序方案"; addFlowProject.m_OperateFlag = 1; if (addFlowProject.ShowDialog(this) == DialogResult.OK) { treeView1.Nodes.Clear(); dataSet.Tables["FlowProject"].Clear(); dataSet.Tables["FlowProjectDetailsView"].Clear(); technologyLib.GetFlowProjectData(dataSet); technologyLib.GetFlowProjectDetailsViewData(dataSet); InitialTreeView(treeView1); listView1.Items.Clear(); AddItem_FlowProject(); } }