Пример #1
0
        public ActionResult ResetPass(Account model,string NewPassword)
        {
            Cryptography ch = new Cryptography();
            Account acc = dal.FindAcc(model);
            dal.ChangePass(acc, ch.md5(NewPassword));

            return RedirectToAction("Index","Login",acc);
        }
Пример #2
0
 public void SendKey(LayoutTest.Models.Account model)
 {
     String NPass = GetUniqueKey(8);
     Debug.Write(NPass);
     Cryptography e = new Cryptography();
     dal.ChangePass(model,e.md5(NPass));
     string sender = dal.GetAccountEmail(model);
     SendMail(sender,"Your new password" ,NPass);
 }