Example #1
0
        private void AddFlowToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AddFlow addFlow = new AddFlow(sqlConnection);
            addFlow.Text = "添加工序";
            addFlow.m_OperateFlag = 1;
            if (addFlow.ShowDialog(this) == DialogResult.OK)
            {
                dataSet.Tables["FlowDetails"].Clear();
                technologyLib.GetFlowDetailsData(dataSet);
                InitialListView(listView1);
            }

        }
Example #2
0
 private void ModifyFlowToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (listView1.SelectedItems.Count != 0)
     {
         AddFlow addFlow = new AddFlow(sqlConnection);
         addFlow.Text = "修改工序";
         addFlow.m_OperateFlag = 2;
         addFlow.FlowName = listView1.SelectedItems[0].SubItems[1].Text;
         if (addFlow.ShowDialog(this) == DialogResult.OK)
         {
             dataSet.Tables["FlowDetails"].Clear();
             technologyLib.GetFlowDetailsData(dataSet);
             InitialListView(listView1);
         }
     }
     else
     {
         MessageBox.Show("请选择要修改的工序!");
     }
 }