/// <summary> /// Function to check refernce bassed on parameter /// </summary> /// <param name="decExchangeRateId"></param> /// <returns></returns> public decimal ExchangeRateCheckReferences(decimal decExchangeRateId) { decimal decReturnValue = 0; try { decReturnValue = SPExchangeRate.ExchangeRateCheckReferences(decExchangeRateId); } catch (Exception ex) { MessageBox.Show("ERBll11:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } return(decReturnValue); }
/// <summary> /// Function to delete /// </summary> public void DeleteFunction() { try { ExchangeRateSP spExchangeRate = new ExchangeRateSP(); if (spExchangeRate.ExchangeRateCheckReferences(decId) == -1) { Messages.ReferenceExistsMessage(); } else { Messages.DeletedMessage(); Clear(); GridFill(); } } catch (Exception ex) { MessageBox.Show("ER10:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }