예제 #1
0
 private void btnDelete_Click(object sender, EventArgs e)
 {
     try
     {
         if (!string.IsNullOrEmpty(SelectedId))
         {
             DialogResult dresult = MessageBox.Show("确认删除?", "删除确认", MessageBoxButtons.OKCancel);
             if (dresult == DialogResult.OK)
             {
                 taskdal.DeleteTask(SelectedId);
                 bindTask(SelectedStatus);
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }