Esempio n. 1
0
        public ViewModels.EmailAlertViewModel GetEmailAlert(EmailAlertViewModel emailAlert)
        {
            CurrencyLibrary     cl           = new CurrencyLibrary();
            EmailAlertViewModel updatedAlert = emailAlert;

            updatedAlert.CurrenciesTo = cl.GetAllowedCurrenciesSelect(emailAlert.CurrencyFrom);
            return(updatedAlert);
        }
Esempio n. 2
0
        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
            });
        }