Ejemplo n.º 1
0
        public PaymentServiceModel FetchPolicyHolderDetails(PaymentServiceModel objPaymentModel)
        {
            //Common.CommonBusiness objCommonBusiness = new Common.CommonBusiness();
            List <PolicyHolderRenewedPolicies> PolicyHolderRenewedPolicies = new List <PolicyHolderRenewedPolicies>();

            objPaymentModel.FirstName  = "Zeeshan";
            objPaymentModel.MiddleName = "Mizra";
            objPaymentModel.LastName   = "Hyder";
            objPaymentModel.Email      = "*****@*****.**";
            //objPaymentModel.lstSalutation = objCommonBusiness.GetSalutation();
            objPaymentModel.Mobile = "9876465456";
            objPaymentModel.Home   = "5654674656";
            objPaymentModel.Work   = "08954455678";
            PolicyHolderRenewedPolicies.Add(new PolicyHolderRenewedPolicies {
                PolicyHolderPolicyNo = "PN176", PolicyHolderDepositAmount = 200000, PolicyHolderLastPaymentDate = DateTime.Now, PolicyHolderNextPremiumDueDate = DateTime.Now, PolicyHolderPremiumAmount = 250000
            });
            objPaymentModel.ObjPolicyHolderRenewedPolicies = PolicyHolderRenewedPolicies;

            List <RenewedAllPolicies> RenewedPolicies = new List <RenewedAllPolicies>();

            RenewedPolicies.Add(new RenewedAllPolicies {
                PolicyNumber = 1, FirstName = "Kiranmai", DepositAmount = "100000", LastPaymentDate = "20/11/2017", NoOfUnpaidPremiums = "3", PremiumAmount = "300000", Status = "Running", PremiumDueDate = "30/12/2018", TotalAmounttobePaid = "500000", TotalArrears = "3", DaysLeftForLapse = "3"
            });
            RenewedPolicies.Add(new RenewedAllPolicies {
                PolicyNumber = 2, FirstName = "Kranthi", DepositAmount = "100000", LastPaymentDate = "02/01/2017", NoOfUnpaidPremiums = "3", PremiumAmount = "370000", Status = "Lapsed", PremiumDueDate = "30/12/2018", TotalAmounttobePaid = "500000", TotalArrears = "3", DaysLeftForLapse = "3"
            });
            RenewedPolicies.Add(new RenewedAllPolicies {
                PolicyNumber = 3, FirstName = "Varma", DepositAmount = "100000", LastPaymentDate = "20/10/2017", NoOfUnpaidPremiums = "3", PremiumAmount = "350000", Status = "Inforced", PremiumDueDate = "30/12/2018", TotalAmounttobePaid = "500000", TotalArrears = "3", DaysLeftForLapse = "3"
            });
            RenewedPolicies.Add(new RenewedAllPolicies {
                PolicyNumber = 1, FirstName = "Kiranmai", DepositAmount = "100000", LastPaymentDate = "20/11/2017", NoOfUnpaidPremiums = "3", PremiumAmount = "300000", Status = "Running", PremiumDueDate = "30/12/2018", TotalAmounttobePaid = "500000", TotalArrears = "3", DaysLeftForLapse = "3"
            });
            RenewedPolicies.Add(new RenewedAllPolicies {
                PolicyNumber = 2, FirstName = "Kranthi", DepositAmount = "100000", LastPaymentDate = "02/01/2017", NoOfUnpaidPremiums = "3", PremiumAmount = "370000", Status = "Lapsed", PremiumDueDate = "30/12/2018", TotalAmounttobePaid = "500000", TotalArrears = "3", DaysLeftForLapse = "3"
            });
            RenewedPolicies.Add(new RenewedAllPolicies {
                PolicyNumber = 3, FirstName = "Varma", DepositAmount = "100000", LastPaymentDate = "20/10/2017", NoOfUnpaidPremiums = "3", PremiumAmount = "350000", Status = "Inforced", PremiumDueDate = "30/12/2018", TotalAmounttobePaid = "500000", TotalArrears = "3", DaysLeftForLapse = "3"
            });
            RenewedPolicies.Add(new RenewedAllPolicies {
                PolicyNumber = 1, FirstName = "Kiranmai", DepositAmount = "100000", LastPaymentDate = "20/11/2017", NoOfUnpaidPremiums = "3", PremiumAmount = "300000", Status = "Running", PremiumDueDate = "30/12/2018", TotalAmounttobePaid = "500000", TotalArrears = "3", DaysLeftForLapse = "3"
            });
            RenewedPolicies.Add(new RenewedAllPolicies {
                PolicyNumber = 2, FirstName = "Kranthi", DepositAmount = "100000", LastPaymentDate = "02/01/2017", NoOfUnpaidPremiums = "3", PremiumAmount = "370000", Status = "Lapsed", PremiumDueDate = "30/12/2018", TotalAmounttobePaid = "500000", TotalArrears = "3", DaysLeftForLapse = "3"
            });
            RenewedPolicies.Add(new RenewedAllPolicies {
                PolicyNumber = 3, FirstName = "Varma", DepositAmount = "100000", LastPaymentDate = "20/10/2017", NoOfUnpaidPremiums = "3", PremiumAmount = "350000", Status = "Inforced", PremiumDueDate = "30/12/2018", TotalAmounttobePaid = "500000", TotalArrears = "3", DaysLeftForLapse = "3"
            });
            objPaymentModel.ObjPaymentRenewedAllPolicies = RenewedPolicies;


            #region Inforced Policies
            List <RenewedInforcePolicies>            RenewedInforcedPolicies = new List <RenewedInforcePolicies>();
            RenewedInforcePoliciesDetailsAPIResponse objResponse             = FetchRenewedInforcePoliciesInfo(objPaymentModel);
            if (objResponse.Status == "Success")
            {
                foreach (var item in objResponse.output)
                {
                    int i = 1;
                    RenewedInforcePolicies objclientInfo = new RenewedInforcePolicies();
                    objclientInfo.FirstName           = item.firstName;
                    objclientInfo.PolicyNumber        = item.policyNo;
                    objclientInfo.PolicyId            = i;
                    objclientInfo.PremiumAmount       = item.premiumAmount;
                    objclientInfo.PremiumDueDate      = item.premiumDueDate;
                    objclientInfo.TotalAmounttobePaid = item.totalAmountToBePaid;
                    objclientInfo.DepositAmount       = item.depositAmount;
                    RenewedInforcedPolicies.Add(objclientInfo);
                    i++;
                }
            }
            objPaymentModel.ObjPaymentRenewedInforcePolicies = RenewedInforcedPolicies;
            #endregion

            #region Policies InGracePeriod
            List <RenewedPoliciesinGracePeriod>      PoliciesinGracePeriod = new List <RenewedPoliciesinGracePeriod>();
            RenewedInGracePoliciesDetailsAPIResponse objInGraceResponse    = FetchPoliciesinGracePeriodInfo(objPaymentModel);
            if (objInGraceResponse.Status == "Success")
            {
                foreach (var item in objInGraceResponse.output)
                {
                    int i = 1;
                    RenewedPoliciesinGracePeriod objclientInfo = new RenewedPoliciesinGracePeriod();
                    objclientInfo.FirstName               = item.firstName;
                    objclientInfo.PolicyNumber            = item.policyNo;
                    objclientInfo.PolicyId                = i;
                    objclientInfo.PremiumAmount           = item.premiumAmount;
                    objclientInfo.PremiumDueDate          = item.premiumDueDate;
                    objclientInfo.TotalAmounttobePaid     = item.totalAmountToBePaid;
                    objclientInfo.DepositAmount           = item.depositAmount;
                    objclientInfo.DaysLeftForRunningLapse = item.daysLeftforLaps;
                    objclientInfo.LastPaymentDate         = item.lastPaymentDate;
                    PoliciesinGracePeriod.Add(objclientInfo);
                    i++;
                }
            }
            objPaymentModel.ObjPaymentRenewedPoliciesinGracePeriod = PoliciesinGracePeriod;
            #endregion

            #region Running Lapse Policies
            List <RenewedRunningLapsePolicies>            RunningLapsePolicies    = new List <RenewedRunningLapsePolicies>();
            RenewedRunningLapsePoliciesDetailsAPIResponse objRunningLapseResponse = FetchRunningLapsePoliciesInfo(objPaymentModel);
            if (objRunningLapseResponse.Status == "Success")
            {
                foreach (var item in objRunningLapseResponse.output)
                {
                    int i = 1;
                    RenewedRunningLapsePolicies objRunningLapseInfo = new RenewedRunningLapsePolicies();
                    objRunningLapseInfo.FirstName           = item.firstName;
                    objRunningLapseInfo.PolicyNumber        = item.policyNo;
                    objRunningLapseInfo.PolicyId            = i;
                    objRunningLapseInfo.PremiumAmount       = item.premiumAmount;
                    objRunningLapseInfo.PremiumDueDate      = item.premiumDueDate;
                    objRunningLapseInfo.TotalAmounttobePaid = item.totalAmountToBePaid;
                    objRunningLapseInfo.DepositAmount       = item.depositAmount;
                    objRunningLapseInfo.DaysLeftForLapse    = item.daysLeftforLaps;
                    objRunningLapseInfo.LastPaymentDate     = item.lastPaymentDate;
                    objRunningLapseInfo.NoOfUnpaidPremiums  = item.noOfunpaidPremiums;
                    objRunningLapseInfo.TotalArrears        = item.totalAreas;
                    objRunningLapseInfo.TotalLateFees       = item.totalLateFees;
                    RunningLapsePolicies.Add(objRunningLapseInfo);
                    i++;
                }
            }

            objPaymentModel.ObjPaymentRenewedRunningLapsePolicies = RunningLapsePolicies;
            #endregion

            #region Lapsed Policies
            List <RenewedLapsedPolicies>            lstRenewedlapsedPolicies = new List <RenewedLapsedPolicies>();
            RenewedLapsedPoliciesDetailsAPIResponse objlapsedResponse        = FetchRenewedlapsedPoliciesInfo(objPaymentModel);
            if (objlapsedResponse.Status == "Success")
            {
                foreach (var item in objlapsedResponse.output)
                {
                    int i = 1;
                    RenewedLapsedPolicies objlapsedInfo = new RenewedLapsedPolicies();
                    objlapsedInfo.FirstName           = item.firstName;
                    objlapsedInfo.PolicyNumber        = item.policyNo;
                    objlapsedInfo.PolicyId            = i;
                    objlapsedInfo.PremiumAmount       = item.premiumAmount;
                    objlapsedInfo.PremiumDueDate      = item.premiumDueDate;
                    objlapsedInfo.TotalAmounttobePaid = item.totalAmountToBePaid;
                    objlapsedInfo.DepositAmount       = item.depositAmount;
                    objlapsedInfo.NoOfUnpaidPremiums  = item.noOfunpaidPremiums;
                    objlapsedInfo.LastPaymentDate     = item.lastPaymentDate;
                    objlapsedInfo.LapsedOn            = item.lapsedOn;
                    objlapsedInfo.TotalArrears        = item.totalAreas;
                    objlapsedInfo.TotalLateFees       = item.totalLateFees;
                    lstRenewedlapsedPolicies.Add(objlapsedInfo);
                    i++;
                }
            }
            objPaymentModel.ObjPaymentRenewedLapsedPolicies = lstRenewedlapsedPolicies;
            #endregion

            if (objPaymentModel.ObjPaymentRenewedAllPolicies == null)
            {
                objPaymentModel.ObjPaymentRenewedAllPolicies = new List <RenewedAllPolicies>();
            }
            if (objPaymentModel.ObjPaymentRenewedInforcePolicies == null)
            {
                objPaymentModel.ObjPaymentRenewedInforcePolicies = new List <RenewedInforcePolicies>();
            }
            if (objPaymentModel.ObjPaymentRenewedPoliciesinGracePeriod == null)
            {
                objPaymentModel.ObjPaymentRenewedPoliciesinGracePeriod = new List <RenewedPoliciesinGracePeriod>();
            }
            if (objPaymentModel.ObjPaymentRenewedRunningLapsePolicies == null)
            {
                objPaymentModel.ObjPaymentRenewedRunningLapsePolicies = new List <RenewedRunningLapsePolicies>();
            }
            if (objPaymentModel.ObjPaymentRenewedLapsedPolicies == null)
            {
                objPaymentModel.ObjPaymentRenewedLapsedPolicies = new List <RenewedLapsedPolicies>();
            }
            return(objPaymentModel);
        }
Ejemplo n.º 2
0
        public PaymentServiceModel FetchRenewedAllPolicies(PaymentServiceModel objPaymentModel)
        {
            List <RenewedAllPolicies> RenewedPolicies = new List <RenewedAllPolicies>();

            RenewedPolicies.Add(new RenewedAllPolicies {
                PolicyNumber = 1, FirstName = "Kiranmai", DepositAmount = "100000", LastPaymentDate = "20/11/2017", NoOfUnpaidPremiums = "3", PremiumAmount = "300000", Status = "Running", PremiumDueDate = "30/12/2018", TotalAmounttobePaid = "500000", TotalArrears = "3", DaysLeftForLapse = "3"
            });
            RenewedPolicies.Add(new RenewedAllPolicies {
                PolicyNumber = 2, FirstName = "Kranthi", DepositAmount = "100000", LastPaymentDate = "02/01/2017", NoOfUnpaidPremiums = "3", PremiumAmount = "370000", Status = "Lapsed", PremiumDueDate = "30/12/2018", TotalAmounttobePaid = "500000", TotalArrears = "3", DaysLeftForLapse = "3"
            });
            RenewedPolicies.Add(new RenewedAllPolicies {
                PolicyNumber = 3, FirstName = "Varma", DepositAmount = "100000", LastPaymentDate = "20/10/2017", NoOfUnpaidPremiums = "3", PremiumAmount = "350000", Status = "Inforced", PremiumDueDate = "30/12/2018", TotalAmounttobePaid = "500000", TotalArrears = "3", DaysLeftForLapse = "3"
            });
            RenewedPolicies.Add(new RenewedAllPolicies {
                PolicyNumber = 3, FirstName = "Varma", DepositAmount = "100000", LastPaymentDate = "20/10/2017", NoOfUnpaidPremiums = "3", PremiumAmount = "350000", Status = "Inforced", PremiumDueDate = "30/12/2018", TotalAmounttobePaid = "500000", TotalArrears = "3", DaysLeftForLapse = "3"
            });
            RenewedPolicies.Add(new RenewedAllPolicies {
                PolicyNumber = 3, FirstName = "Varma", DepositAmount = "100000", LastPaymentDate = "20/10/2017", NoOfUnpaidPremiums = "3", PremiumAmount = "350000", Status = "Inforced", PremiumDueDate = "30/12/2018", TotalAmounttobePaid = "500000", TotalArrears = "3", DaysLeftForLapse = "3"
            });
            RenewedPolicies.Add(new RenewedAllPolicies {
                PolicyNumber = 3, FirstName = "Varma", DepositAmount = "100000", LastPaymentDate = "20/10/2017", NoOfUnpaidPremiums = "3", PremiumAmount = "350000", Status = "Inforced", PremiumDueDate = "30/12/2018", TotalAmounttobePaid = "500000", TotalArrears = "3", DaysLeftForLapse = "3"
            });
            RenewedPolicies.Add(new RenewedAllPolicies {
                PolicyNumber = 3, FirstName = "Varma", DepositAmount = "100000", LastPaymentDate = "20/10/2017", NoOfUnpaidPremiums = "3", PremiumAmount = "350000", Status = "Inforced", PremiumDueDate = "30/12/2018", TotalAmounttobePaid = "500000", TotalArrears = "3", DaysLeftForLapse = "3"
            });
            RenewedPolicies.Add(new RenewedAllPolicies {
                PolicyNumber = 3, FirstName = "Varma", DepositAmount = "100000", LastPaymentDate = "20/10/2017", NoOfUnpaidPremiums = "3", PremiumAmount = "350000", Status = "Inforced", PremiumDueDate = "30/12/2018", TotalAmounttobePaid = "500000", TotalArrears = "3", DaysLeftForLapse = "3"
            });
            objPaymentModel.ObjPaymentRenewedAllPolicies = RenewedPolicies;

            #region Inforced Policies
            List <RenewedInforcePolicies>            RenewedInforcedPolicies = new List <RenewedInforcePolicies>();
            RenewedInforcePoliciesDetailsAPIResponse objResponse             = FetchRenewedInforcePoliciesInfo(objPaymentModel);
            if (objResponse.Status == "Success")
            {
                foreach (var item in objResponse.output)
                {
                    int i = 1;
                    RenewedInforcePolicies objclientInfo = new RenewedInforcePolicies();
                    objclientInfo.FirstName           = item.firstName;
                    objclientInfo.PolicyNumber        = item.policyNo;
                    objclientInfo.PolicyId            = i;
                    objclientInfo.PremiumAmount       = item.premiumAmount;
                    objclientInfo.PremiumDueDate      = item.premiumDueDate;
                    objclientInfo.TotalAmounttobePaid = item.totalAmountToBePaid;
                    objclientInfo.DepositAmount       = item.depositAmount;
                    RenewedInforcedPolicies.Add(objclientInfo);
                    i++;
                }
            }
            objPaymentModel.ObjPaymentRenewedInforcePolicies = RenewedInforcedPolicies;
            #endregion

            #region Policies InGracePeriod
            List <RenewedPoliciesinGracePeriod>      PoliciesinGracePeriod = new List <RenewedPoliciesinGracePeriod>();
            RenewedInGracePoliciesDetailsAPIResponse objInGraceResponse    = FetchPoliciesinGracePeriodInfo(objPaymentModel);
            if (objInGraceResponse.Status == "Success")
            {
                foreach (var item in objInGraceResponse.output)
                {
                    int i = 1;
                    RenewedPoliciesinGracePeriod objclientInfo = new RenewedPoliciesinGracePeriod();
                    objclientInfo.FirstName               = item.firstName;
                    objclientInfo.PolicyNumber            = item.policyNo;
                    objclientInfo.PolicyId                = i;
                    objclientInfo.PremiumAmount           = item.premiumAmount;
                    objclientInfo.PremiumDueDate          = item.premiumDueDate;
                    objclientInfo.TotalAmounttobePaid     = item.totalAmountToBePaid;
                    objclientInfo.DepositAmount           = item.depositAmount;
                    objclientInfo.DaysLeftForRunningLapse = item.daysLeftforLaps;
                    objclientInfo.LastPaymentDate         = item.lastPaymentDate;
                    PoliciesinGracePeriod.Add(objclientInfo);
                    i++;
                }
            }
            objPaymentModel.ObjPaymentRenewedPoliciesinGracePeriod = PoliciesinGracePeriod;
            #endregion

            #region Running Lapse Policies
            List <RenewedRunningLapsePolicies>            RunningLapsePolicies    = new List <RenewedRunningLapsePolicies>();
            RenewedRunningLapsePoliciesDetailsAPIResponse objRunningLapseResponse = FetchRunningLapsePoliciesInfo(objPaymentModel);
            if (objRunningLapseResponse.Status == "Success")
            {
                foreach (var item in objRunningLapseResponse.output)
                {
                    int i = 1;
                    RenewedRunningLapsePolicies objRunningLapseInfo = new RenewedRunningLapsePolicies();
                    objRunningLapseInfo.FirstName           = item.firstName;
                    objRunningLapseInfo.PolicyNumber        = item.policyNo;
                    objRunningLapseInfo.PolicyId            = i;
                    objRunningLapseInfo.PremiumAmount       = item.premiumAmount;
                    objRunningLapseInfo.PremiumDueDate      = item.premiumDueDate;
                    objRunningLapseInfo.TotalAmounttobePaid = item.totalAmountToBePaid;
                    objRunningLapseInfo.DepositAmount       = item.depositAmount;
                    objRunningLapseInfo.DaysLeftForLapse    = item.daysLeftforLaps;
                    objRunningLapseInfo.LastPaymentDate     = item.lastPaymentDate;
                    objRunningLapseInfo.NoOfUnpaidPremiums  = item.noOfunpaidPremiums;
                    objRunningLapseInfo.TotalArrears        = item.totalAreas;
                    objRunningLapseInfo.TotalLateFees       = item.totalLateFees;
                    RunningLapsePolicies.Add(objRunningLapseInfo);
                    i++;
                }
            }

            objPaymentModel.ObjPaymentRenewedRunningLapsePolicies = RunningLapsePolicies;
            #endregion

            #region Lapsed Policies
            List <RenewedLapsedPolicies>            lstRenewedlapsedPolicies = new List <RenewedLapsedPolicies>();
            RenewedLapsedPoliciesDetailsAPIResponse objlapsedResponse        = FetchRenewedlapsedPoliciesInfo(objPaymentModel);
            if (objlapsedResponse.Status == "Success")
            {
                foreach (var item in objlapsedResponse.output)
                {
                    int i = 1;
                    RenewedLapsedPolicies objlapsedInfo = new RenewedLapsedPolicies();
                    objlapsedInfo.FirstName           = item.firstName;
                    objlapsedInfo.PolicyNumber        = item.policyNo;
                    objlapsedInfo.PolicyId            = i;
                    objlapsedInfo.PremiumAmount       = item.premiumAmount;
                    objlapsedInfo.PremiumDueDate      = item.premiumDueDate;
                    objlapsedInfo.TotalAmounttobePaid = item.totalAmountToBePaid;
                    objlapsedInfo.DepositAmount       = item.depositAmount;
                    objlapsedInfo.NoOfUnpaidPremiums  = item.noOfunpaidPremiums;
                    objlapsedInfo.LastPaymentDate     = item.lastPaymentDate;
                    objlapsedInfo.LapsedOn            = item.lapsedOn;
                    objlapsedInfo.TotalArrears        = item.totalAreas;
                    objlapsedInfo.TotalLateFees       = item.totalLateFees;
                    lstRenewedlapsedPolicies.Add(objlapsedInfo);
                    i++;
                }
            }
            objPaymentModel.ObjPaymentRenewedLapsedPolicies = lstRenewedlapsedPolicies;
            #endregion

            if (objPaymentModel.ObjPaymentRenewedAllPolicies == null)
            {
                objPaymentModel.ObjPaymentRenewedAllPolicies = new List <RenewedAllPolicies>();
            }
            if (objPaymentModel.ObjPaymentRenewedInforcePolicies == null)
            {
                objPaymentModel.ObjPaymentRenewedInforcePolicies = new List <RenewedInforcePolicies>();
            }
            if (objPaymentModel.ObjPaymentRenewedPoliciesinGracePeriod == null)
            {
                objPaymentModel.ObjPaymentRenewedPoliciesinGracePeriod = new List <RenewedPoliciesinGracePeriod>();
            }
            if (objPaymentModel.ObjPaymentRenewedRunningLapsePolicies == null)
            {
                objPaymentModel.ObjPaymentRenewedRunningLapsePolicies = new List <RenewedRunningLapsePolicies>();
            }
            if (objPaymentModel.ObjPaymentRenewedLapsedPolicies == null)
            {
                objPaymentModel.ObjPaymentRenewedLapsedPolicies = new List <RenewedLapsedPolicies>();
            }

            return(objPaymentModel);
        }