Пример #1
0
        /// <summary>
        /// Function to get decimal places based on parameter
        /// </summary>
        /// <param name="decExchangeRateId"></param>
        /// <returns></returns>
        public int NoOfDecimalNumberViewByExchangeRateId(decimal decExchangeRateId)
        {
            int NoOfDecimalNumber = 0;

            try
            {
                NoOfDecimalNumber = SPExchangeRate.NoOfDecimalNumberViewByExchangeRateId(decExchangeRateId);
            }
            catch (Exception ex)
            {
                MessageBox.Show("ERBll14:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            return(NoOfDecimalNumber);
        }
Пример #2
0
 /// <summary>
 /// Function to fill controls for update
 /// </summary>
 public void FillControls()
 {
     try
     {
         ExchangeRateInfo infoExchangeRate = new ExchangeRateInfo();
         ExchangeRateSP   spExchangeRate   = new ExchangeRateSP();
         infoExchangeRate = spExchangeRate.ExchangeRateView(decId);
         int inNoOfDecimalPlaces = spExchangeRate.NoOfDecimalNumberViewByExchangeRateId(decId);
         cmbCurrency.SelectedValue = infoExchangeRate.CurrencyId.ToString();
         dtpDate.Text         = infoExchangeRate.Date.ToString();
         txtExchangeRate.Text = Math.Round(Convert.ToDecimal(infoExchangeRate.Rate.ToString()), inNoOfDecimalPlaces).ToString();
         txtNarration.Text    = infoExchangeRate.Narration;
         decExchangeRateId    = infoExchangeRate.ExchangeRateId;
     }
     catch (Exception ex)
     {
         MessageBox.Show("ER13:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }