Пример #1
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)
     {
         formMDI.infoError.ErrorString = "ER13:" + ex.Message;
     }
 }
Пример #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);
     }
 }
Пример #3
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);
     }
 }