/// <summary>
        /// Pricelist check reference for delete
        /// </summary>
        /// <param name="decpricinglevelId"></param>
        /// <returns></returns>
        public decimal PriceListCheckReferenceAndDelete(decimal decpricinglevelId)
        {
            decimal decReturnValue = 0;

            try
            {
                decReturnValue = spPriceList.PriceListCheckReferenceAndDelete(decpricinglevelId);
            }
            catch (Exception ex)
            {
                MessageBox.Show("AL20:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            return(decReturnValue);
        }
Example #2
0
 /// <summary>
 /// Function to delete the pricelist for the product
 /// </summary>
 public void DeleteFunction()
 {
     try
     {
         PriceListSP spPriceList = new PriceListSP();
         if (spPriceList.PriceListCheckReferenceAndDelete(decPricingLevelId) <= 0)
         {
             Messages.ReferenceExistsMessage();
         }
         else
         {
             spPriceList.PriceListDelete(decpriceListId);
             Messages.DeletedMessage();
             Clear();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("PLP7:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }