Example #1
0
        void Button11Click(object sender, EventArgs e)
        {
            if (this.listView3.SelectedItems.Count != 1)
            {
                MessageBox.Show("请选择一条记录", "提示");
                return;
            }
            PersonInfo person = ListView3_Select(this.listView3.SelectedItems[0]);

            SqlDBUtil.delete(person);
            this.getAllPersonInfo();
        }
Example #2
0
        void Button8Click(object sender, EventArgs e)
        {
            if (this.listView2.SelectedItems.Count != 1)
            {
                MessageBox.Show("请选择一条记录", "提示");
                return;
            }
            ProjectInfo project = ListView2_Select(this.listView2.SelectedItems[0]);

            SqlDBUtil.delete(project);
            this.getAllProjectInfo();
        }
Example #3
0
        //删除
        void Button3Click(object sender, EventArgs e)
        {
            if (this.listView1.SelectedItems.Count != 1)
            {
                MessageBox.Show("请选择一条记录", "提示");
                return;
            }
            ModuleInfo module = ListView1_Select(this.listView1.SelectedItems[0]);

            SqlDBUtil.delete(module);
            this.getAllModuleInfo();
        }
Example #4
0
 //按钮     已删除
 void Button6Click(object sender, EventArgs e)
 {
     if (listView1.CheckedItems.Count != 0)
     {
         foreach (ListViewItem lt in listView1.CheckedItems)
         {
             PackageInfo pack = new PackageInfo();
             pack = ListViewSelect(lt);
             SqlDBUtil.delete(pack);
         }
     }
     else
     {
         MessageBox.Show("请选择更新包", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     getAllPackInList();
 }
Example #5
0
 /// <summary>
 /// 删除
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void Button3Click(object sender, EventArgs e)
 {
     if (this.listView1.CheckedItems.Count > 0)
     {
         foreach (ListViewItem lvi in this.listView1.CheckedItems)
         {
             TestUnit tu = ListViewSelect(lvi);
             SqlDBUtil.delete(tu);
         }
         MessageBox.Show("删除成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
         this.listView1.Items.Clear();
         getTestUnitList();
     }
     else
     {
         MessageBox.Show("请至少选择一条记录!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Example #6
0
 //删除
 void Button3Click(object sender, EventArgs e)
 {
     if (this.listView1.CheckedItems.Count > 0)
     {
         foreach (ListViewItem lvi in this.listView1.CheckedItems)
         {
             UIcheckinfo tu = ListViewSelect(lvi);
             SqlDBUtil.delete(tu);
             UICheckDao.DelUICheckViewByNO(tu.Checkno);
         }
         MessageBox.Show("删除成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
         getUIcheckList();
     }
     else
     {
         MessageBox.Show("请至少选择一条记录", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Example #7
0
 void Button3Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("删除更新包,不可恢复。确定要删除吗?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Asterisk) == DialogResult.OK)
     {
         try {
             FileInfo packfile = new FileInfo(frompath);
             if (packfile.Exists)
             {
                 packfile.Delete();
             }
             SqlDBUtil.delete(this.packageinfo);
             MessageBox.Show("更新包删除成功");
             this.Close();
             this.Dispose();
         } catch (Exception) {
             MessageBox.Show("读取更新包错误,或不存在", "提示");
         }
     }
 }
Example #8
0
        //撤选
        void Button12Click(object sender, EventArgs e)
        {
            int count = this.listBox3.SelectedItems.Count;

            if (count > 0 && (int)comboBox3.SelectedValue != 0)
            {
                int i;
                for (i = 0; i < count; i++)
                {
                    string mid = comboBox3.SelectedValue.ToString();
                    string pid = ((ProjectInfo)this.listBox3.SelectedItems[i]).Id.ToString();
                    List <ModuleProject> mplist =
                        ModuleProjectDao.getAllMPByPrjIDAndMdlID(pid, mid);
                    SqlDBUtil.delete(mplist[0]);
                }
            }
            else
            {
                MessageBox.Show("请选择相应的模块或项目", "提示");
            }
            getlistboxdata2();
        }