Example #1
0
        /// <summary>
        /// Gets the user role profile by user name and password.
        /// </summary>
        /// <param name="UserName">Name of the user.</param>
        /// <param name="Password">The password.</param>
        /// <returns>UserProfile.</returns>
        public UserProfile GetUserRoleProfileByUserNameAndPassword(string UserName, string Password)
        {
            // create a list to hold the returned data
            var userProfileDetail = new UserProfile();

            userProfileDetail = UserProfileAccessor.FetchUserProfileDetail(UserName, Password);


            return(userProfileDetail);
        }
Example #2
0
        /// <summary>
        /// Determines whether [is valid user] [the specified user name].
        /// </summary>
        /// <param name="UserName">Name of the user.</param>
        /// <param name="Password">The password.</param>
        /// <returns><c>true</c> if [is valid user] [the specified user name]; otherwise, <c>false</c>.</returns>
        public static bool IsValidUser(string UserName, string Password)
        {
            var userProfileDetail = new UserProfile();

            userProfileDetail = UserProfileAccessor.FetchUserProfileDetail(UserName, Password);

            if (userProfileDetail != null)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }