コード例 #1
0
        /// <summary>
        /// Function for delete data from tbl_Product
        /// </summary>
        public void Delete()
        {
            try
            {
                ProductSP spProduct = new ProductSP();
                decimal decResult = spProduct.DeleteProductWithReferenceCheck(decProductIdForEdit);
                if (decResult > 0)
                {
                    Messages.DeletedMessage();
                    ClearFunction();
                    this.Close();
                }
                else
                {
                    Messages.ReferenceExistsMessage();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("PC:66" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }

        }