Esempio n. 1
0
        public ApiGetEulaStatusReturnModel CheckEULAStatus(int userId)
        {
            ApiGetEulaStatusReturnModel rtn = new ApiGetEulaStatusReturnModel();

            using (var db = new DBAMPContext())
            {
                try
                {
                    List <ApiGetEulaStatusReturnModel> user;

                    user = db.ApiGetEulaStatus(userId);

                    if (user != null)
                    {
                        ApiGetEulaStatusReturnModel firstOrDefault = user.FirstOrDefault();
                        if (firstOrDefault != null)
                        {
                            rtn = firstOrDefault;
                        }
                    }
                }
                catch (Exception ex)
                {
                    string sqlParam   = "ApiGetEulaStatus(" + userId + ")";
                    string methodName = "JCRAPI/Business/UserServices/CheckEULAStatus";
                    exceptionLog.ExceptionLogInsert(ex.Message.ToString(), "", methodName, userId, null, sqlParam, string.Empty);

                    return(null);
                }
            }
            return(rtn);
        }