예제 #1
0
        } //, @returnDate

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

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

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

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