Ejemplo n.º 1
0
        /// <summary>
        /// Load policy deductibles
        /// </summary>
        /// <param name="claimHeader">Claim Header</param>
        /// <returns>AXA policy excess and deductible data</returns>
        private AXAPolicyEDData LoadPolicyDeductibles(ClaimHeader claimHeader)
        {
           // Initialise to false
           AXAPolicyEDData policyEDData = new AXAPolicyEDData(false, false);
           // If policy is attached or changed, set context level flag to identify whether policy deductibles exist
           ProductClaimDefinition productClaimDef = claimHeader.GetProduct().ProductClaimDefinition;
           if (productClaimDef.ClaimHeaderAutomaticDeductibleProcessingMethod == (short)StaticValues.ClaimHeaderAutomaticDeductibleProcessingMethod.StandardClaimHeaderDeductible)
           {
               IAXAClaimsQuery query = new AXAClaimsQueries();
               bool deductibleExist = false;
               bool EDExcessExist = false;
               query.PolicyDeductiblesExist(claimHeader.PolicyHeaderID.Value, "AND2", "AND3", out deductibleExist, out EDExcessExist);
               policyEDData.DeductiblesExist = deductibleExist;
               policyEDData.EDExcessExist = EDExcessExist;
           }

           return policyEDData;
       }
Ejemplo n.º 2
0
        /// <summary>
        /// Try resolve policy excess and dedutible  data
        /// If one of the five Policy deductible or funded values has changed, sets the Deductibles Overridden setting (CustomBoolean15) to true 
        /// and creates a corresponding Event.
        /// </summary>
        /// <param name="component">Claim Header</param>
        /// <param name="data">AXA Policy ED Data</param>
        /// <returns>return true if policy deductible id NULL in AXAPolicyEDData</returns>
        private bool TryResolvePolicyEDData(IBusinessComponent component, out AXAPolicyEDData data)
        {
             var policyDeductibles = component.Context.GetAttachedData<AXAPolicyEDData>(false);
             if (policyDeductibles == null)
             {
                 ClaimHeader claimHeader = (ClaimHeader)component;
                 if (claimHeader.PolicyHeaderID.GetValueOrDefault() != 0)
                 {
                     data = this.LoadPolicyDeductibles(claimHeader);
                     claimHeader.Context.AddAttachedData<AXAPolicyEDData>(data);
                     return true;
                 }
                 else
                 {
                     data = null;
                     return false;
                 }
             }

             data = policyDeductibles.Single();
             return true;
        }