/// <summary> /// Function to get particular values from ExchangeRate Table based on the parameter /// </summary> /// <param name="exchangeRateId"></param> /// <returns></returns> public ExchangeRateInfo ExchangeRateView(decimal exchangeRateId) { ExchangeRateInfo exchangerateinfo = new ExchangeRateInfo(); try { exchangerateinfo = SPExchangeRate.ExchangeRateView(exchangeRateId); } catch (Exception ex) { MessageBox.Show("ERBll4:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } return(exchangerateinfo); }
/// <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); } }