Exemplo n.º 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         DialogResult dr = MessageBox.Show("确认要删除    裁单号为:'" + comboBox1.Text + "'的单耗表吗?", "提示", MessageBoxButtons.YesNo);
         if (dr == DialogResult.Yes)
         {
             cal.deletDh(comboBox1.Text);
             this.backgroundWorker1.RunWorkerAsync();
             JingDu form = new JingDu(this.backgroundWorker1, "删除中");// 显示进度条窗体
             form.ShowDialog(this);
             form.Close();
             MessageBox.Show("删除成功!");
             DanHaoFrm_Load(sender, e);
             comboBox1.Text = comboBox1.Text;
             comboBox1_SelectedIndexChanged(sender, e);
         }
     }
     catch (Exception ex)
     {
         //throw ex;
         MessageBox.Show(ex.Message);
     }
 }