Exemplo n.º 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;
        }
Exemplo n.º 2
0
 public IList <APIMasterResponseDetails> GetPaymentType(APICredenrials objAPICredenrials)
 {
     try
     {
         objDecisionPointEngine   = new DecisionPointEngine();
         objMasterResponseDetails = new List <APIMasterResponseDetails>();
         objAPIMasterResponse     = objDecisionPointEngine.ValidateAPIUser(objAPICredenrials.ApiUserName, objAPICredenrials.ApiPassword);
         if (objAPIMasterResponse.ResultCode != 216 && objAPIMasterResponse.ResultCode != 217)
         {
             objMasterResponseDetails = objDecisionPointEngine.GetPaymentType().Select(x => new APIMasterResponseDetails {
                 Name = x.Name, Id = x.Id
             }).ToList();
         }
         else
         {
             objAPIMasterResponseDetails = new APIMasterResponseDetails()
             {
                 ResultId   = objAPIMasterResponse.ResultId,
                 ResultCode = objAPIMasterResponse.ResultCode
             };
             objMasterResponseDetails.Add(objAPIMasterResponseDetails);
         }
         return(objMasterResponseDetails);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 3
0
 public APIMasterResponseDetails SendInvitation(UserRequestDetails objUserRequestDetails)
 {
     try
     {
         objDecisionPointEngine = new DecisionPointEngine();
         objAPIMasterResponse   = new APIMasterResponse();
         objAPIMasterResponse   = objDecisionPointEngine.ValidateAPIUser(objUserRequestDetails.ApiUserName, objUserRequestDetails.ApiPassword);
         if (objAPIMasterResponse.ResultCode != 216 && objAPIMasterResponse.ResultCode != 217)
         {
             objAPILogRequest = new APILogRequest()
             {
                 APIUserName = objUserRequestDetails.ApiUserName,
                 APIPassword = objUserRequestDetails.ApiPassword,
                 RefrenceId  = objUserRequestDetails.ReferenceId,
                 RequestData = WebOperationContext.Current.IncomingRequest.UriTemplateMatch.RequestUri.OriginalString,
             };
             objAPIMasterResponse = objDecisionPointEngine.InsertAPILog(objAPILogRequest);
             if (objAPIMasterResponse.ResultCode != 218)
             {
                 DSTInviteRequest objDSTInviteRequest = new DSTInviteRequest()
                 {
                     FirstName     = objUserRequestDetails.FirstName,
                     LastName      = objUserRequestDetails.LastName,
                     EmailId       = objUserRequestDetails.EmailId,
                     RoleTypeId    = objUserRequestDetails.RoleTypeId,
                     ClientId      = objUserRequestDetails.ClientId,
                     SubClientId   = objUserRequestDetails.SubClientId,
                     PackageId     = objUserRequestDetails.PackageId,
                     ProductId     = objUserRequestDetails.ProductId,
                     PaymentTypeId = objUserRequestDetails.PaymentTypeId,
                     ICTypeId      = objUserRequestDetails.ICTypeId,
                     BusinessName  = objUserRequestDetails.BusinessName,
                     RoleType      = objUserRequestDetails.RoleType,
                 };
                 objAPIMasterResponse = objDecisionPointEngine.SendInvitationByDST(objDSTInviteRequest);
             }
         }
         if (!object.Equals(objAPIMasterResponse, null))
         {
             objAPIMasterResponseDetails = new APIMasterResponseDetails()
             {
                 ResultId   = objAPIMasterResponse.ResultId,
                 ResultCode = objAPIMasterResponse.ResultCode
             };
         }
         return(objAPIMasterResponseDetails);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 4
0
 public IList <APIMasterResponseDetails> BatchVerifyComplianceStatus(APIComplianceStatusRequestDetails objAPIComplianceStatusRequestDetails)
 {
     try
     {
         objDecisionPointEngine = new DecisionPointEngine();
         IList <APIMasterResponseDetails> responselist = new List <APIMasterResponseDetails>();
         objAPIMasterResponse = objDecisionPointEngine.ValidateAPIUser(objAPIComplianceStatusRequestDetails.ApiUserName, objAPIComplianceStatusRequestDetails.ApiPassword);
         if (objAPIMasterResponse.ResultCode != 216 && objAPIMasterResponse.ResultCode != 217)
         {
             objAPILogRequest = new APILogRequest()
             {
                 APIUserName = objAPIComplianceStatusRequestDetails.ApiUserName,
                 APIPassword = objAPIComplianceStatusRequestDetails.ApiPassword,
                 RefrenceId  = objAPIComplianceStatusRequestDetails.ReferenceId,
                 RequestData = WebOperationContext.Current.IncomingRequest.UriTemplateMatch.RequestUri.OriginalString,
             };
             objAPIMasterResponse = objDecisionPointEngine.InsertAPILog(objAPILogRequest);
             if (objAPIMasterResponse.ResultCode != 218)
             {
                 objAPIComplianceStatusRequest = new APIComplianceStatusRequest()
                 {
                     ClientId    = objAPIComplianceStatusRequestDetails.ClientId,
                     SubClientId = objAPIComplianceStatusRequestDetails.SubClientId,
                     //PackageId = objAPIComplianceStatusRequestDetails.PackageId,
                     CandidateIdsCol = objAPIComplianceStatusRequestDetails.CandidateIdsCol
                 };
                 responselist = objDecisionPointEngine.GetCandidatesComplianceStatus(objAPIComplianceStatusRequest).Select(x => new APIMasterResponseDetails
                 {
                     ResultId   = x.ResultId,
                     ResultCode = x.ResultCode,
                     JCRList    = x.APIMasterResponseJCRInfoList
                 }).ToList();
             }
         }
         else
         {
             objAPIMasterResponseDetails = new APIMasterResponseDetails()
             {
                 ResultId   = objAPIMasterResponse.ResultId,
                 ResultCode = objAPIMasterResponse.ResultCode
             };
             responselist.Add(objAPIMasterResponseDetails);
         }
         JavaScriptSerializer jss = new JavaScriptSerializer();
         string output            = jss.Serialize(responselist);
         return(responselist);
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemplo n.º 5
0
 public APIMasterResponseDetails VerifyComplianceStatus(APIComplianceStatusRequestDetails objAPIComplianceStatusRequestDetails)
 {
     try
     {
         objDecisionPointEngine = new DecisionPointEngine();
         objAPIMasterResponse   = new APIMasterResponse();
         // objAPIMasterResponseDetails = new APIMasterResponseDetails();
         objAPIMasterResponse = objDecisionPointEngine.ValidateAPIUser(objAPIComplianceStatusRequestDetails.ApiUserName, objAPIComplianceStatusRequestDetails.ApiPassword);
         if (objAPIMasterResponse.ResultCode != 216 && objAPIMasterResponse.ResultCode != 217)
         {
             objAPILogRequest = new APILogRequest()
             {
                 APIUserName = objAPIComplianceStatusRequestDetails.ApiUserName,
                 APIPassword = objAPIComplianceStatusRequestDetails.ApiPassword,
                 RefrenceId  = objAPIComplianceStatusRequestDetails.ReferenceId,
                 RequestData = WebOperationContext.Current.IncomingRequest.UriTemplateMatch.RequestUri.OriginalString,
             };
             objAPIMasterResponse = objDecisionPointEngine.InsertAPILog(objAPILogRequest);
             if (objAPIMasterResponse.ResultCode != 218)
             {
                 objAPIComplianceStatusRequest = new APIComplianceStatusRequest()
                 {
                     ClientId    = objAPIComplianceStatusRequestDetails.ClientId,
                     SubClientId = objAPIComplianceStatusRequestDetails.SubClientId,
                     //PackageId = objAPIComplianceStatusRequestDetails.PackageId,
                     UserId = objAPIComplianceStatusRequestDetails.UserId
                 };
                 objDecisionPointEngine = new DecisionPointEngine();
                 objAPIMasterResponse   = objDecisionPointEngine.VerifyAssignment(objAPIComplianceStatusRequest);
             }
         }
         if (!object.Equals(objAPIMasterResponse, null))
         {
             objAPIMasterResponseDetails = new APIMasterResponseDetails()
             {
                 ResultId   = objAPIMasterResponse.ResultId,
                 ResultCode = objAPIMasterResponse.ResultCode,
                 JCRList    = objAPIMasterResponse.APIMasterResponseJCRInfoList
             };
         }
         JavaScriptSerializer jss = new JavaScriptSerializer();
         string output            = jss.Serialize(objAPIMasterResponseDetails);
         return(objAPIMasterResponseDetails);
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemplo n.º 6
0
 public APIMasterResponseDetails AddUpdateSubClient(UserRequestDetails objUserRequestDetails)
 {
     try
     {
         objDecisionPointEngine = new DecisionPointEngine();
         objAPIMasterResponse   = new APIMasterResponse();
         objAPIMasterResponse   = objDecisionPointEngine.ValidateAPIUser(objUserRequestDetails.ApiUserName, objUserRequestDetails.ApiPassword);
         if (objAPIMasterResponse.ResultCode != 216 && objAPIMasterResponse.ResultCode != 217)
         {
             objAPILogRequest = new APILogRequest()
             {
                 APIUserName = objUserRequestDetails.ApiUserName,
                 APIPassword = objUserRequestDetails.ApiPassword,
                 RefrenceId  = objUserRequestDetails.ReferenceId,
                 RequestData = WebOperationContext.Current.IncomingRequest.UriTemplateMatch.RequestUri.OriginalString,
             };
             objAPIMasterResponse = objDecisionPointEngine.InsertAPILog(objAPILogRequest);
             if (objAPIMasterResponse.ResultCode != 218)
             {
                 DSTInviteRequest objDSTInviteRequest = new DSTInviteRequest()
                 {
                     SubClientId  = objUserRequestDetails.SubClientId,
                     ClientId     = objUserRequestDetails.ClientId,
                     BusinessName = objUserRequestDetails.BusinessName
                 };
                 objAPIMasterResponse = objDecisionPointEngine.AddUpdateSubClient(objDSTInviteRequest);
             }
         }
         if (!object.Equals(objAPIMasterResponse, null))
         {
             objAPIMasterResponseDetails = new APIMasterResponseDetails()
             {
                 ResultId   = objAPIMasterResponse.ResultId,
                 ResultCode = objAPIMasterResponse.ResultCode
             };
         }
         return(objAPIMasterResponseDetails);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }