/// <summary> /// Function for delete data from tbl_Product /// </summary> public void Delete() { try { ProductCreationBll BllProductCreation = new ProductCreationBll(); decimal decResult = BllProductCreation.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); } }