Ejemplo n.º 1
0
 private void btnDeleteCategory_Click(object sender, EventArgs e)
 {
     if (txtCategoryID.Text == "")
     {
         MessageBox.Show("Please input the ID to Delete");
         return;
     }
     if (MessageBox.Show("Do you want to delete ", "Announce", MessageBoxButtons.YesNo) == DialogResult.Yes)
     {
         string ID = txtCategoryID.Text;
         if (busCT.Delete(ID))
         {
             LoadData();
             Refresh();
             MessageBox.Show("Delete success");
         }
         else
         {
             MessageBox.Show("Delete fail!");
         }
     }
 }