//Validate User
        public bool ValidateUser(UserAuthenticationRequestBO PassCodeBoObj)
        {
            string        PassCode       = PassCodeBoObj.PassCode;
            string        ResponseId     = PassCodeBoObj.ResponseId;
            List <string> ResponseIdList = new List <string>();

            ResponseIdList.Add(PassCodeBoObj.ResponseId);

            UserAuthenticationResponseBO results = this.SurveyResponseDao.GetAuthenticationResponse(PassCodeBoObj);



            bool ISValidUser = false;

            if (results != null && !string.IsNullOrEmpty(PassCode))
            {
                if (results.PassCode == PassCode)
                {
                    ISValidUser = true;
                }
                else
                {
                    ISValidUser = false;
                }
            }
            return(ISValidUser);
        }
 public static UserAuthenticationResponse ToUserAuthenticationResponse(this UserAuthenticationResponseBO AuthenticationRequestBO)
 {
     return(new UserAuthenticationResponse
     {
         PassCode = AuthenticationRequestBO.PassCode,
     });
 }
        //Validate User
        public bool ValidateUser(UserAuthenticationRequestBO uarBO)
        {
            string        passCode       = uarBO.PassCode;
            string        responseId     = uarBO.ResponseId;
            List <string> responseIdList = new List <string>();

            responseIdList.Add(responseId);

            UserAuthenticationResponseBO results = _surveyResponseDao.GetAuthenticationResponse(uarBO);

            bool isValidUser = false;

            if (results != null && !string.IsNullOrEmpty(passCode))
            {
                if (results.PassCode == passCode)
                {
                    isValidUser = true;
                }
                else
                {
                    isValidUser = false;
                }
            }
            return(isValidUser);
        }
Esempio n. 4
0
        public UserAuthenticationResponseBO GetAuthenticationResponse(UserAuthenticationRequestBO passcodeBO)
        {
            // TODO: Implement this correctly
            var userAuthenticationResponseBO = new UserAuthenticationResponseBO {
                PassCode = passcodeBO.PassCode, ResponseId = passcodeBO.ResponseId
            };

            return(userAuthenticationResponseBO);

#if false // from WebEnter
            UserAuthenticationResponseBO UserAuthenticationResponseBO = Mapper.ToAuthenticationResponseBO(UserAuthenticationRequestBO);
            try
            {
                Guid Id = new Guid(UserAuthenticationRequestBO.ResponseId);

                using (var Context = DataObjectFactory.CreateContext())
                {
                    SurveyResponse surveyResponse = Context.SurveyResponses.First(x => x.ResponseId == Id);
                    if (surveyResponse != null)
                    {
                        UserAuthenticationResponseBO.PassCode = surveyResponse.ResponsePasscode;
                    }
                }
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            return(UserAuthenticationResponseBO);
#endif
        }
Esempio n. 5
0
        public UserAuthenticationResponseBO GetAuthenticationResponse(UserAuthenticationRequestBO UserAuthenticationRequestBO)
        {
            UserAuthenticationResponseBO UserAuthenticationResponseBO = Mapper.ToAuthenticationResponseBO(UserAuthenticationRequestBO);

            try
            {
                Guid Id = new Guid(UserAuthenticationRequestBO.ResponseId);


                using (var Context = DataObjectFactory.CreateContext())
                {
                    SurveyResponse surveyResponse = Context.SurveyResponses.First(x => x.ResponseId == Id);
                    if (surveyResponse != null)
                    {
                        UserAuthenticationResponseBO.PassCode = surveyResponse.ResponsePasscode;
                    }
                }
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            return(UserAuthenticationResponseBO);
        }
        // Get Authentication Response
        public UserAuthenticationResponseBO GetAuthenticationResponse(UserAuthenticationRequestBO pValue)
        {
            UserAuthenticationResponseBO result = this.SurveyResponseDao.GetAuthenticationResponse(pValue);

            return(result);
        }
        // Get Authentication Response
        public UserAuthenticationResponseBO GetAuthenticationResponse(UserAuthenticationRequestBO uarBO)
        {
            UserAuthenticationResponseBO result = _surveyResponseDao.GetAuthenticationResponse(uarBO);

            return(result);
        }