Exemple #1
0
        } //, @returnDate

        public static RentalDAO getInstance()
        {
            if (dbInstance == null)
            {
                dbInstance = new RentalDAO();
            }

            return(dbInstance);
        }
Exemple #2
0
        public void createRental(Rental r)
        {
            RentalDAO rentalDAO = RentalDAO.getInstance();

            try
            {
                rentalDAO.openConnection();
                rentalDAO.createRental(r);

                return;
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                rentalDAO.CloseConnection();
            }
        }