示例#1
0
 public Boolean UpdateUserPassword(string contact, string password)
 {
     try
     {
         User user = userDataLayer.GetUserByMobile(contact);
         if (user == null)
         {
             return(false);
         }
         user.Password        = Encryption.Encrypt(password);
         user.ConfirmPassword = Encryption.Encrypt(password);
         user = userDataLayer.UpdateUser(user);
         if (user != null)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch (Exception e)
     {
         ExceptionHandler.PrintException(e, new StackTrace(true));
         throw e;
     }
 }