public BOPasswordHistoryComparer(BOPasswordHistory.Columns column, BOPasswordHistory.SortDirections direction)
 {
     _column = column;
     _direction = direction;
 }
 public ChangePasswordResult ChangePassword(string Password)
 {
     logger.Trace("ChangePassword");
     BOUser.ValidatePasswordResult validatePasswordResult = ValidatePassword(Password);
     if (validatePasswordResult == ValidatePasswordResult.Success)
     {
         if (MembershipUser.ChangePassword(MembershipUser.ResetPassword(), Password))
         {
             BOPasswordHistory passwordHistory = new BOPasswordHistory();
             passwordHistory.User = this;
             passwordHistory.Password = MD5.Md5Hash(Password);
             passwordHistory.Save();
             return ChangePasswordResult.Success;
         }
         else
         {
             return ChangePasswordResult.Failed;
         }
     }
     else
     {
         switch (validatePasswordResult)
         {
             case ValidatePasswordResult.CannotReusePassword:
                 return ChangePasswordResult.CannotReusePassword;
             case ValidatePasswordResult.InvalidPassword:
                 return ChangePasswordResult.InvalidPassword;
             default:
                 return ChangePasswordResult.Failed;
         }
     }
 }