예제 #1
0
        public IResult CalculateFindeks(int identityNumber, int carId)
        {
            var result  = _carService.GetByCarId(carId);
            var findeks = _findeksDal.Get(p => p.IdentityNumber == identityNumber);

            if (result.Data.FindeksScore > findeks.FindeksScore)
            {
                return(new ErrorResult("Your findeks score not enough"));
            }
            return(new SuccessResult("Success"));
        }
예제 #2
0
        public IDataResult <Findeks> GetByCustomerId(int customerId)
        {
            var findeks = _findeksDal.Get(f => f.CustomerId == customerId);

            if (findeks == null)
            {
                return(new ErrorDataResult <Findeks>(Messages.FindeksNotFound));
            }

            return(new SuccessDataResult <Findeks>(findeks));
        }
예제 #3
0
        public IDataResult <Findeks> GetFindexByCustomerId(int customerId)
        {
            var result = _findeksDal.Get(f => f.CustomerId == customerId);

            if (result == null)
            {
                return(new ErrorDataResult <Findeks>(Messages.UserHasNoFindex));
            }
            return(new SuccessDataResult <Findeks>(result));
        }
 public IDataResult <Findeks> GetById(int id)
 {
     return(new SuccessDataResult <Findeks>(_findeksDal.Get(c => c.Id == id)));
 }
예제 #5
0
 public IDataResult <Findeks> GetByCustomerId(int customerId)
 {
     return(new SuccessDataResult <Findeks>(_findeksDal.Get(f => f.CustomerId == customerId)));
 }
예제 #6
0
 public IDataResult <Findeks> GetById(int findeksId)
 {
     return(new SuccessDataResult <Findeks>(_findeksDal.Get(f => f.FindeksId == findeksId)));
 }