예제 #1
0
 public void ChangeMyPassword(LoginToken <AirlineCompany> token, string oldPassword, string newPassword)
 {
     if (UserIsValid(token))
     {
         if (token.User.Password == oldPassword)
         {
             token.User.Password = newPassword;
             _airlineDAO         = new AirlineDAOMSSQL();
             _airlineDAO.Update(token.User);
         }
         else
         {
             throw new WrongPasswordException("Your Password Old, Please write new Password");
         }
     }
 }