Exemple #1
0
        public IList <APIMasterResponseDetails> GetPackageIds(APICredenrials objAPICredenrials)
        {
            objDecisionPointEngine   = new DecisionPointEngine();
            objMasterResponseDetails = new List <APIMasterResponseDetails>();
            objAPIMasterResponse     = objDecisionPointEngine.ValidateAPIUser(objAPICredenrials.ApiUserName, objAPICredenrials.ApiPassword);
            if (objAPIMasterResponse.ResultCode != 216 && objAPIMasterResponse.ResultCode != 217)
            {
                objMasterResponseDetails = objDecisionPointEngine.GetBackgroundCheckPackages().Where(x => x.PacakgeType == 0).Select(x => new APIMasterResponseDetails {
                    Name = x.BackgroundTitle, Id = x.Id
                }).ToList();
            }
            else
            {
                objAPIMasterResponseDetails = new APIMasterResponseDetails()
                {
                    ResultId   = objAPIMasterResponse.ResultId,
                    ResultCode = objAPIMasterResponse.ResultCode
                };
                objMasterResponseDetails.Add(objAPIMasterResponseDetails);
            }
            return(objMasterResponseDetails);
            //Random rd = new Random();
            //Student aStudent = new Student
            //{
            //    ID = System.Convert.ToInt16(id),
            //    Name = "Name No. " + id,
            //    Score = Convert.ToInt16(60 + rd.NextDouble() * 40),
            //    State = "GA"
            //};

            //return aStudent;
        }