Esempio n. 1
0
        private void Delete()
        {
            try
            {
                BusinessManager BM  = new BusinessManager();
                BOInventory     BOI = new BOInventory();
                BOI.InventoryID = txtInventoryID.Text;
                int RowsAffected = BM.BALDeleteFromInventory(BOI);

                if (RowsAffected > 0)
                {
                    MessageBox.Show("The record has been successfully deleted", "Successfully Deleted", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    New();
                }
                else
                {
                    MessageBox.Show("No record found", "No Record", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    New();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }