Esempio n. 1
0
        public ActionResult Management(Email email)
        {
            //Secure data
            email.Password = SecureData.EncryptText(email.Password, WebConfigurations.KeySecure);
            email.From     = SecureData.EncryptText(email.From, WebConfigurations.KeySecure);
            email.To       = SecureData.EncryptText(email.To, WebConfigurations.KeySecure);

            var result = _email.Update(email, CurrentUserLogin);

            return(View(email));
        }
Esempio n. 2
0
 public ActionResult Management(EmailModel emailModel)
 {
     if (ModelState.IsValid)
     {
         //Secure data
         emailModel.Password = SecureData.EncryptText(emailModel.Password, WebConfigurations.KeySecure);
         emailModel.From     = SecureData.EncryptText(emailModel.From, WebConfigurations.KeySecure);
         emailModel.To       = SecureData.EncryptText(emailModel.To, WebConfigurations.KeySecure);
         var email  = emailModel.CastTo <Models.Email>();
         var result = _email.Update(email, CurrentUserLogin);
     }
     return(View(emailModel));
 }