Пример #1
0
 public IResult Update(Car car)
 {
     if (car.DailyPrice > 0)
     {
         _carDao.Update(car);
         return(new SuccessResult(Messages.CarUpdated));
     }
     else
     {
         Console.WriteLine($"araba güncelleme aşamasında günlük fiyat hatalı girildi . O dan büyük giriniz girdiginiz deger {car.DailyPrice}");
         return(new ErrorResult(Messages.CarPriceInValid));
     }
 }
Пример #2
0
 public Car StoreCar(Car car)
 {
     if (car != null)
     {
         if (car.Id == 0)
         {
             car.CreatedOn = DateTime.Now;
             _carDao.Create(car);
         }
         else
         {
             car.LastUpdatedOn = DateTime.Now;
             _carDao.Update(car);
         }
     }
     return(car);
 }
Пример #3
0
 public Car Update(long carId, string number, string brand, int manufacturerYear)
 {
     return(_carDao.Update(carId, number, brand, manufacturerYear));
 }
 public void Update(Car car)
 {
     _icarDao.Update(car);
 }
Пример #5
0
 public IResult Update(Car car)
 {
     _carDao.Update(car);
     return(new SuccessResult(Messages.CarUpdated));
 }