Пример #1
0
        public bool ValidateSecurityQuestionAnswer(int?userId, int?questionId, string answer)
        {
            bool rtn = false;

            ApiValidateSecurityQuestionAnswerReturnModel.ResultSetModel1 _result;

            using (var db = new DBAMPContext())
            {
                try
                {
                    _result = db.ApiValidateSecurityQuestionAnswer(userId, questionId, answer).ResultSet1.FirstOrDefault();

                    if (_result.ValidateAnswer.ToUpper() == "TRUE")
                    {
                        rtn = true;
                    }
                }
                catch (Exception ex)
                {
                    string sqlParam   = "ApiValidateSecurityQuestionAnswer(" + userId + "," + questionId + "," + answer + ")";
                    string methodName = "JCRAPI/Business/UserServices/ValidateSecurityQuestionAnswer";
                    exceptionLog.ExceptionLogInsert(ex.Message.ToString(), "", methodName, userId, null, sqlParam, string.Empty);

                    return(false);
                }
                return(rtn);
            }
        }