Esempio n. 1
0
        public List <ApiGetUserSecurityQuestionsReturnModel> GetUserSecurityQuestions(int?userId)
        {
            int codeCategoryId = (int)Jcr.Api.Enumerators.Enums.CodeCategoryEnum.SecurityQuestions;
            int questionTyeId1 = (int)Jcr.Api.Enumerators.Enums.UserSecurityAttributeType.PasswordAnswer1;
            int questionTyeId2 = (int)Jcr.Api.Enumerators.Enums.UserSecurityAttributeType.PasswordAnswer2;
            List <ApiGetUserSecurityQuestionsReturnModel> _result;

            using (var db = new DBAMPContext())
            {
                try
                {
                    _result = db.ApiGetUserSecurityQuestions(userId, codeCategoryId, questionTyeId1, questionTyeId2);
                }
                catch (Exception ex)
                {
                    string sqlParam   = "ApiGetUserSecurityQuestions(" + userId + "," + codeCategoryId + "," + questionTyeId1 + "," + questionTyeId2 + ")";
                    string methodName = "JCRAPI/Business/UserServices/GetUserSecurityQuestions";
                    exceptionLog.ExceptionLogInsert(ex.Message.ToString(), "", methodName, userId, null, sqlParam, string.Empty);

                    return(null);
                }
            }

            return(_result);
        }