Example #1
0
        /// <summary>
        /// 修改调试方案
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ToolStripMenuItem3_Click(object sender, EventArgs e)
        {
            if (listView1.SelectedItems.Count != 0)
            {
                AddDebugItemProject addDebugItemProject = new AddDebugItemProject(sqlConnection);
                addDebugItemProject.Text = "修改调试方案";
                addDebugItemProject.m_OperateFlag = 2;
                addDebugItemProject.ProjectName = listView1.SelectedItems[0].SubItems[1].Text;

                if (addDebugItemProject.ShowDialog(this)==DialogResult.OK)
                {
                    treeView1.Nodes.Clear();
                    dataSet.Tables["DebugItemProject"].Clear();
                    dataSet.Tables["DebugItemProjectDetailsView"].Clear();
                    technologyLib.GetDebugItemProjectData(dataSet);
                    technologyLib.GetDebugItemProjectDetailsViewData(dataSet);
                    InitialTreeView(treeView1);
                    listView1.Items.Clear();
                    AddItem_DebugItemProject();
                }
            }
            else
            {
                MessageBox.Show("请选择要修改的调试方案!");
            }
        }
Example #2
0
        /// <summary>
        /// 添加调试方案
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ToolStripMenuItem2_Click(object sender, EventArgs e)
        {
            AddDebugItemProject addDebugItemProject = new AddDebugItemProject(sqlConnection);
            addDebugItemProject.Text = "添加调试方案";
            addDebugItemProject.m_OperateFlag = 1;

            if (addDebugItemProject.ShowDialog(this) == DialogResult.OK)
            {
                treeView1.Nodes.Clear();
                dataSet.Tables["DebugItemProject"].Clear();
                dataSet.Tables["DebugItemProjectDetailsView"].Clear();
                technologyLib.GetDebugItemData(dataSet);
                technologyLib.GetDebugItemDetailsViewData(dataSet);
                InitialTreeView(treeView1);
                listView1.Items.Clear();
                AddItem_DebugItemProject();
            }
        }