Esempio n. 1
0
        private void AddFlow_Load(object sender, EventArgs e)
        {
            technologyLib = new TechnologyLib(sqlConnection);
            dataSet = new DataSet();

            technologyLib.GetFlowDetailsData(dataSet);
            m_FlowID = technologyLib.GetFlowID(FlowName);

            //获取子工序名称
            technologyLib.GetFlowSubData(dataSet);
            for (int i = 0;i < dataSet.Tables["FlowSub"].Rows.Count;i++ )
            {
                this.comboBox1.Items.Add(dataSet.Tables["FlowSub"].Rows[i][1]);
            }

            switch (m_OperateFlag)
            {
                case 1:	//添加
                    break;
                case 2:	//属性
                    for (int i = 0; i < dataSet.Tables["FlowDetails"].Rows.Count; i++)
                    {
                        if (m_FlowID == Convert.ToInt16(dataSet.Tables["FlowDetails"].Rows[i]["FlowID"]))
                        {
                            textBox1.Text = dataSet.Tables["FlowDetails"].Rows[i]["FlowName"].ToString();
                            richTextBox1.Text = dataSet.Tables["FlowDetails"].Rows[i]["Description"].ToString();
                            break;
                        }
                    }
                    break;
            }
        }