Example #1
0
        private void deletebtn_Click(object sender, EventArgs e)
        {
            int id = Int32.Parse(prodidtxt.Text);

            using (var form = new Confirmation())
            {
                var result = form.ShowDialog();

                if (result == DialogResult.OK)
                {
                    if (DatabaseOperation.DeleteItem(id, "Product") == false)
                    {
                        MessageBox.Show("ID doesn't exist, can't delete.");
                    }
                }
            }
            Update_Dataset();
        }