コード例 #1
0
        public Result <IList <LifeInsurance> > GetAll(int plannerId)
        {
            var result = new Result <IList <LifeInsurance> >();
            LifeInsuranceService lifeInsuranceService = new LifeInsuranceService();

            result.Value     = lifeInsuranceService.GetAll(plannerId);
            result.IsSuccess = true;
            return(result);
        }
コード例 #2
0
        public Result <LifeInsurance> GetById(int id, int plannerId)
        {
            var result = new Result <LifeInsurance>();
            LifeInsuranceService lifeInsuranceService = new LifeInsuranceService();

            result.Value     = lifeInsuranceService.GetById(id, plannerId);
            result.IsSuccess = true;
            return(result);
        }
コード例 #3
0
        public Result <IList <LicPremiumReminder> > GetLICPolicyMaturity(DateTime fromDate, DateTime toDate)
        {
            var result = new Result <IList <LicPremiumReminder> >();
            LifeInsuranceService lifeInsuranceService = new LifeInsuranceService();

            result.Value     = lifeInsuranceService.GetLICPolicyMaturity(fromDate, toDate);
            result.IsSuccess = true;
            return(result);
        }
コード例 #4
0
        public Result Delete(LifeInsurance lifeInsurance)
        {
            var result = new Result();

            try
            {
                LifeInsuranceService lifeInsuranceService = new LifeInsuranceService();
                lifeInsuranceService.Delete(lifeInsurance);
                result.IsSuccess = true;
            }
            catch (Exception exception)
            {
                result.IsSuccess     = false;
                result.ExceptionInfo = exception;
            }
            return(result);
        }