public bool FindRent() { bool found = false; Car car = Car.GetCarByLicensePlateNum(returnCarView.LicenseNumber); if (!string.IsNullOrEmpty(car.LicensePlateNum) && car.Status.Trim().Equals(EnumStatus.Wypożyczony.ToString())) { int id = car.GetId("numer rejestracyjny", car.LicensePlateNum); Rent rent = Rent.GetRentByCarId(id); if (rent != null) { rent.Car = car; found = true; returnCarView.Rent = rent; } } return(found); }