Exemple #1
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;
     }
 }
Exemple #2
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;
     }
 }
Exemple #3
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;
     }
 }
Exemple #4
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;
     }
 }