public UserModel ReturnUserByNamePassword(string userNickName, string userPassword)
        {
            if (userNickName == null || userNickName.Equals(""))
            {
                throw new ArgumentOutOfRangeException();
            }
            if (userPassword == null || userPassword.Equals(""))
            {
                throw new ArgumentOutOfRangeException();
            }

            if (!CheckStringFormat.IsBase64String(userPassword))
            {
                userPassword = ComputeHash.ComputeNewHash(userPassword);
            }
            DataTable dt = new DataTable();

            UserModel userModel = new UserModel();

            using (SqlCommand command = new SqlCommand())
            {
                dt = GetMultipleQuery(UserStringsSql.ReturnUserByNamePassword(userNickName, userPassword));
            }

            foreach (DataRow ms in dt.Rows)
            {
                userModel = UserModel.ToObject(ms);
            }

            return(userModel);
        }
        public string ReturnImdbPassByNamePassword(LoginModel checkUser)
        {
            DataTable dt = new DataTable();

            checkUser.userPassword = ComputeHash.ComputeNewHash(checkUser.userPassword);
            if (checkUser == null)
            {
                throw new ArgumentOutOfRangeException();
            }
            LoginModel loginModel = new LoginModel();

            using (SqlCommand command = new SqlCommand())
            {
                dt = GetMultipleQuery(UserStringsSql.ReturnUserByNamePassword(checkUser));
            }

            foreach (DataRow ms in dt.Rows)
            {
                loginModel = LoginModel.ToObject(ms);
            }

            return(loginModel.userImdbPass);
        }