/// <summary>
        /// Delete an item from the inventory.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnDeleteItem_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                // Prevent user from deleting an item that is in the current invoice.
                // Display a warning message to the user.
                // Delete item from database using SQL.

                lblErrorCantDeleteItem.Visibility = Visibility.Hidden;

                sSQL = mydb.CheckIfItemIsInAnInvoice(itemCode);
                ds = db.ExecuteSQLStatement(sSQL, ref iRetVal);

                if(iRetVal == 0)
                {
                    ///check to see what the message box is showing
                    if (MessageBox.Show("Are you sure you want to delete item: " + txtItemDesc.Text + "?", "Delete item?", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.No)
                    {
                        //do no stuff
                    }
                    else
                    {
                        sSQL = mydb.DeleteInventoryItem(itemCode);
                        db.ExecuteNonQuery(sSQL);

                        EditWindow ew = new EditWindow();
                        ew.Show();
                        this.Close();
                    }
                }
                else
                {
                    lblErrorCantDeleteItem.Visibility = Visibility.Visible;
                }
            }
            catch (Exception)
            {
                MessageBox.Show(MethodInfo.GetCurrentMethod().DeclaringType.Name);
            }
        }