Exemplo n.º 1
0
        } //, @returnDate

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

            return(dbInstance);
        }
Exemplo n.º 2
0
        public void createRental(Rental r)
        {
            RentalDAO rentalDAO = RentalDAO.getInstance();

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

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