Example #1
0
        public decimal PricingLevelCheckReferenceAndDelete(decimal decPricingLevelId)
        {
            decimal decReturnValue = 0;

            try
            {
                decReturnValue = spPricingLevel.PricingLevelCheckReferenceAndDelete(decPricingLevelId);
            }
            catch (Exception ex)
            {
                MessageBox.Show("PRL5:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            return(decReturnValue);
        }
Example #2
0
 /// <summary>
 /// Function to delete selected pricing level
 /// </summary>
 public void DeleteFunction()
 {
     try
     {
         PricingLevelSP spPricingLevel = new PricingLevelSP();
         if (spPricingLevel.PricingLevelCheckReferenceAndDelete(decPricingLevel) <= 0)
         {
             Messages.ReferenceExistsMessage();
         }
         else
         {
             spPricingLevel.PricingLevelDelete(Convert.ToDecimal(dgvPricingLevel.CurrentRow.Cells[1].Value.ToString()));
             Messages.DeletedMessage();
             Clear();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("PL6" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }