コード例 #1
0
 private void Delete_prdct_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Do You Want to Continue deleting the product ?", "Confirm", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
     {
         prd.Delete(dataGridView1.CurrentRow.Cells[0].Value.ToString());
         dataGridView1.DataSource = prd.Get_allprdcts();
         MessageBox.Show("Item Successfull Deleted", "Success", MessageBoxButtons.OK);
     }
     else
     {
         MessageBox.Show("Action Canceled", "Abort", MessageBoxButtons.OK);
     }
 }