Example #1
0
 /// <summary>
 /// Saves this Currency object to the database
 /// </summary>
 /// <returns><b>SaveResult</b> enumeration that represents the result of the save operation.</returns>
 public SaveResult Save()
 {
     if (this.CurrencyId != 0)
     {
         Decimal oldRate = CurrencyDataSource.GetExchangeRate(this.CurrencyId);
         if (this.ExchangeRate != oldRate)
         {
             this.LastUpdate = LocaleHelper.LocalNow;
         }
     }
     else
     {
         this.LastUpdate = LocaleHelper.LocalNow;
     }
     return(this.BaseSave());
 }
Example #2
0
 public static Currency Load(Int32 currencyId)
 {
     return(CurrencyDataSource.Load(currencyId, true));
 }