public static io.Data.Return<UserProfileExpiredPasswords.UserProfileExpiredPassword> GetObjectWithKey(int key)
 {
     using(UserProfileExpiredPasswords objects = new UserProfileExpiredPasswords(key))
         {
             if (objects.QueryResult.Success && objects.Count != 0)
                 return new io.Data.Return<UserProfileExpiredPasswords.UserProfileExpiredPassword>(io.Constants.SUCCESS,"","", objects[0]);
             else
                 return new io.Data.Return<UserProfileExpiredPasswords.UserProfileExpiredPassword>(io.Constants.FAILURE, "", "", null);
         }
 }
        internal static io.Data.Return<bool> PasswordExpired(UserSession userSession)
        {
            bool result = false;

            using (UserProfileExpiredPasswords rows = new UserProfileExpiredPasswords(userSession.EntityContactKey))
            {
                if (rows.QueryResult.Success && rows.Count != 0)
                    result = true;
            }

            return new io.Data.Return<bool>(io.Constants.SUCCESS, result ? "Password Expired" : "Password not Expired", "", result);
        }