示例#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();
            }
        }