public ViewModels.EmailAlertViewModel GetEmailAlert(EmailAlertViewModel emailAlert) { CurrencyLibrary cl = new CurrencyLibrary(); EmailAlertViewModel updatedAlert = emailAlert; updatedAlert.CurrenciesTo = cl.GetAllowedCurrenciesSelect(emailAlert.CurrencyFrom); return(updatedAlert); }
public void SaveEmailAlert(EmailAlertViewModel emailAlert) { var eaRes = DIResolver.Data.NinjectConfig.GetKernal().Get <Data.RepositoryInterfaces.IEmailAlertRepository>(); eaRes.Save(new Data.Entities.EmailAlertEntity { CurrencyFrom = emailAlert.CurrencyFrom, CurrencyTo = emailAlert.CurrencyTo, Email = emailAlert.Email, Threshold = emailAlert.PercentageChange, TimeToSend = emailAlert.TimeToSend, SessionID = this.SessionID }); }