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); }
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); }
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); }
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); }