public RR.HomeCommissionResponse GetHomePolicyCommision(RR.HomeCommissionRequest request)
 {
     try
     {
         BLO.HomeCommissionRequest  requestdetails = _mapper.Map <RR.HomeCommissionRequest, BLO.HomeCommissionRequest>(request);
         BLO.HomeCommissionResponse result         = _insurancePortalRepository.GetHomePolicyCommission(requestdetails);
         return(_mapper.Map <BLO.HomeCommissionResponse, RR.HomeCommissionResponse>(result));
     }
     catch (Exception ex)
     {
         return(new RR.HomeCommissionResponse
         {
             IsTransactionDone = false,
             TransactionErrorMessage = ex.Message
         });
     }
 }
        public decimal GetCommision(BO.HomeInsurancePolicy policy, decimal totalBasicPremium, decimal totalSRCCPremium)
        {
            decimal CommissionAmount = 0;

            var commisionRequest = new BO.HomeCommissionRequest
            {
                AgentCode         = policy.AgentCode,
                Agency            = policy.Agency,
                SubClass          = policy.SubClass,
                TotalBasicPremium = totalBasicPremium,
                TotalSRCCPremium  = totalSRCCPremium
            };

            var commissionResponse = _insurancePortalRepository.GetHomePolicyCommission(commisionRequest);

            if (commissionResponse.IsTransactionDone)
            {
                CommissionAmount = commissionResponse.BasicCommission;
            }
            return(CommissionAmount);
        }